This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: i386 loading from flash


>>>>> "Tim" == Tim michals <tcmichals@yahoo.com> writes:

    Tim> I'm looking at loading ecos from ROM for a SC520, the
    Tim> romboot.S assumes a BIOS? because it is call video memory and
    Tim> loading the descriptor from ROM to RAM without setting RAM?

    Tim> Can the GDT descriptor be in ROM, instead of creating the
    Tim> header in RAM use the header stored in ROM?

I assume you are referring to the romboot.S in the PC platform HAL. I
believe that file was for use in a PC option ROM so it could assume
both the presence of a full BIOS and that the hardware had already
been fully initialized. Having eCos itself boot from ROM on an
embedded x86 platform, i.e. all the way from the processor's reset
vector, is possible. However it can prove tricky and the details will
depend on exactly which x86-mostly-compatible processor you are using.

To date I have only done one such port (not to an SC520) and it was
somewhat of a challenge - especially since the main debug facility
available was a 7-segment LED display. That port was to
customer-specific hardware so I am not at liberty to share any of the
code.

It should certainly be possible to store the global descriptor table
in ROM. However one issue that you need to be aware of is that there
are two versions of the lgdt instruction:

    lgdt	 %cs:_gdt
    data32 lgdt	 %cs:_gdt

  _gdt:
    <global descriptor table data comes here>

Which one is appropriate will depend on exactly what your memory map
looks like at the time the instruction is executed. Unfortunately
objdump -d will not distinguish between the two instructions so you
may end up having to decode the binary. The ndisasm utility may also
prove useful.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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