Re: [Etherboot-developers] Q: does xstart work?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2002-07-23 07:22:55
|
>> But it's in 32-bit PM at that point. > >Hmm. The LJMPI sure looks like it is in 32PM to me.... >xstart: > pushl %ebp > movl %esp,%ebp > pushl %ebx > pushl %esi > pushl %edi > movl 8(%ebp),%eax > movl %eax,_execaddr > movl 12(%ebp),%ebx > movl 16(%ebp),%ecx /* bootp record (32bit pointer) */ > shll $12,%ecx /* convert to segment:offset form */ > shrw $12,%cx > call _prot_to_real > .code16 > pushl %ecx /* bootp record */ > pushl %ebx /* file header */ > movl $((RELOC<<12)+(1f-RELOC)),%eax > pushl %eax > ADDR32 LJMPI(_execaddr-_start) >1: > addw $8,%sp /* XXX or is this 10 in case of a 16bit "ret" >*/ > DATA32 call _real_to_prot > .code32 No, you were right, it's in 16-bit RM at that point and so interprets the 32-bit word as segment:offset. For a moment I was worried that I was generating non-compliant tagged images in mknbi. I don't know what ADDR32 does in .code16 but nothing harmful apparently. Maybe it's needed for the indirection address. |