Re: [Etherboot-developers] Q: does xstart work?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eric W B. <ebi...@ln...> - 2002-07-23 05:49:40
|
ke...@us... (Ken Yap) writes:
> >Staring at the assembly in xstart there is the following code
> >snippet:
> > pushl %eax
> > ADDR32 LJMPI(_execaddr-_start16)
> >1:
> >...
> >_execaddr:
> > .long 0
> >
> >What I don't get is how this snippet of code successfully jumps
> >to an application. ADDR32 should ljmpi should take a m16:32.
> >Where the offset which comes first is 32 bits, and the segment
> >that comes after is 16bits. I just don't see how that works when
> >we pass it a m16:16 in execaddr.
>
> _execaddr is filled in with a linear address.
For 32 bit code yes. But for 16bit code it is clearly a filled with
a segment offset to jump to.
From the nbi spec:
| |
| Initial Magic No. | 4 bytes
+---------------------+
| |
| Flags and length | double word
+---------------------+
| |
| Location Address | double word in ds:bx format
+---------------------+
| |
| Execute Address | double word in cs:ip format
+---------------------+
______________________________________________________________________
And Execute Address is the ultimate source of the address.
Eric
|