This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i386 CYG_HAL_STARTUP_FLOPPY


Stephen Polkowski wrote:
> 
> Hello,
> 
>         I've noticed that the CYG_HAL_STARTUP_FLOPPY code in
> packages/hal/i386/pcmb/current/include/pcmb.inc always loads
> and executes the hal at address 0x30000 on PC systems.  This
> isn't a big surprise since the BIOS always loads the boot
> record to 0x30000.

0x3000.

>         I have a special situation where I need the HAL to run in a
> different address range.  For example, I want to load the
> HAL/REDBOOT image into the 16 meg address space leaving the
> lower memory free.  The current FLOPPY code doesn't know how
> to handle this (I think?).
> 
>         The current floppy support in _start appears to have 3 main
> parts.  I would summarize each part as:
> 
>         1) Load HAL image sectors from floppy
>         2) Switch from real_mode to protect_mode
>         3) Transfer control to HAL
> 
>         I would like to propose that we added an extra section to
> allow for image relocation.  The new startup floppy code
> would look like the following:
> 
>         1) Load HAL image sectors from floppy
>         2) Switch from real_mode to protect_mode
>         3) Relocate/Copy Image if necessary
>         4) Transfer control to HAL
> 
>         Adding image relocation to the floppy code should be
> relatively easy.  It will also be useful for booting off of
> hard drives, option roms, etc.  I am willing to do this work
> if the ECOS community believes it will be useful addition to
> the i386 tree.  Otherwise, I'll just hack up my own copy.
> What are your thought's on the subject?

As long as it's configurable (i.e. no extra code for people who don't need
it) go ahead and submit a patch for comments. What you're proposing is
essentially a "FLOPPYRAM" startup type, like "ROMRAM" in other targets, so
look at what other targets do to see what to do. Note the relocation
shoudln't really be in the floppy code. It should probably be in
hal_memc_init. Have a look at e.g.
hal/mips/vrc437x/current/include/platform.inc (in your sources vrc437x may
be vrc4373). The lar macro is particularly interesting for determining the
difference between the loaded address and the linked address.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]