Re: [Etherboot-developers] Q: does xstart work?
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eric W B. <ebi...@ln...> - 2002-07-23 07:07:05
|
ke...@us... (Ken Yap) writes: > >> > _execaddr is filled in with a linear address. > > > >My best guess is that the ADDR32 prefix is just ignored somewhere. > >As a linear address doesn't make any sense in 16bit real mode. > > 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 popl %edi popl %esi popl %ebx popl %ebp ret _execaddr: .long 0 Eric |