Segments in pre-C and C part
Eric W. Biederman
ebiederman at lnxi.com
Tue Nov 2 17:29:01 CET 2004
Li-Ta Lo <ollie at lanl.gov> writes:
> On Tue, 2004-11-02 at 16:23, Eric W. Biederman wrote:
> > Li-Ta Lo <ollie at lanl.gov> writes:
> > > Eric,
> > >
> > > Why we use two differenct segment lay out for pre-C and
> > > C part ?
> > For the code that runs from ram and the code that runs
> > directly from the rom chip.
> > > In entry32.inc it is 0x08 for code and 0x10 for data but
> > > in c_start we use 0x10 for code and 0x18 for data.
> > Good question but it is probably a decent thing that will
> > keep up from making too many assumptions that they have the
> > same gdt.
> > I don't believe this is something that has changed recently.
> It is there for a long time. I just want to know why.
To be clear I think it was because we were confusing which gdt was which
at some point. With different segment values we cannot have that confusion.
And if you are actually mucking with segments I think not confusing
the two is important.
More information about the coreboot