On Tue, 2013-01-08 at 14:41 -0800, Jordan Justen wrote:
> Could you sign this as documented in OvmfPkg/Contributions.txt?

When it's ready :)

> > +;------------------------------------------------------------------------------
> > +JumpToKernelEFI PROC
> > +
> > +    mov     eax, [esp + 12]
> > +    mov     eax, [eax + 264h]
> 
> Is this really the interface?? Matt?

Oh yes. The value at 0x264 in the header of 'handover_offset' and gives
the offset at which the EFI entry point is. On a 32-bit kernel. For a
64-bit kernel, you have to add 0x200 to it just for... well, someone
smoked too much crack that day. 

And no, we don't tell you which is which. You can infer it from the PE
header (and for current kernels you *need* to check for the PE header
because we helpfully fill in handover_offset in the header even when
it's not actually there). But the whole EFI entry point thing is broken
in current kernels *anyway* for various reasons, on both 32-bit and
64-bit.

We're working on adding flags in the kernel to indicate the availability
of the 32-bit and/or 64-bit EFI entry points. Once that lands in the
kernel, it's best to make OVMF *just* check for those flags, and never
use the EFI entry point for older (existing) kernels which don't have
them.

> >  VOID
> > +EFIAPI
> > +JumpToKernelEFI (
> > +  EFI_HANDLE ImageHandle,
> > +  EFI_SYSTEM_TABLE *SystemTable,
> > +  VOID *KernelBootParams,
> > +  VOID *KernelStart
> > +  );
> 
> I don't think we need a separate API for this. Is it not possible to
> just handle it within the LoadLinuxLib?

Not easily. It has to convert from EFI ABI to ELF ABI. Yes, the pointer
arithmetic could be done on the C side; I did wonder about that in the
existing code but figured it was just done to avoid void* arithmetic
which is a GCCism?

-- 
dwmw2

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to