Re: [edk2] [PATCH] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread David Woodhouse
On Tue, 2013-01-08 at 19:27 -0800, Jordan Justen wrote: > Shouldn't retf in X64 pop 2 qwords? That was my first attempt, but it didn't work. When gas sees 'retf' it emits the single opcode 0xcb, which pops 32-bit EIP and CS (0x10) from the stack as I've (now) constructed it. A retfq (0x48 0xcb) w

Re: [edk2] [RFC PATCH] Use EFI handover protocol for booting Linux kernel

2013-01-09 Thread Matt Fleming
On Tue, 2013-01-08 at 14:41 -0800, Jordan Justen wrote: > On Tue, Jan 8, 2013 at 1:41 AM, David Woodhouse wrote: > > Recent versions of the Linux kernel provide an EFI boot stub of their > > own, for interrogating the runtime services and building up the > > bootparams. Where possible, we should u

[edk2] HII changes in uefi 2.31 and 2.3

2013-01-09 Thread Ben Schroeder
Hi, I am working on development of HII forms for a device driver. I am having problems with these forms running on a machine with UEFI version 2.3. However they seem to run fine where UEFI version 2.31 is installed. Specifically I am having problems with fields like 'one of', 'string', 'option

[edk2] [PATCH v2] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread David Woodhouse
We currently just jump to offset 0x200 in the kernel image, in 64-bit mode. This is completely broken. If it's a 32-bit kernel, we'll be jumping into the compressed data payload. If it's a 64-bit kernel, it'll work... but the 0x200 offset is explicitly marked as 'may change in the future', has alr

[edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread David Woodhouse
We're supposed to zero everything in the kernel bootparams that we don't explicitly initialise, other than the setup_header from 0x1f1 onwards for a precisely defined length, which is copied from the bzImage. We're *not* supposed to just pass the garbage that we happened to find in the bzImage fil

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 11:12 AM, David Woodhouse wrote: > We're supposed to zero everything in the kernel bootparams that we don't > explicitly initialise, other than the setup_header from 0x1f1 onwards > for a precisely defined length, which is copied from the bzImage. > > We're *not* supposed to

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread David Woodhouse
On Wed, 2013-01-09 at 13:11 -0800, Jordan Justen wrote: > Can you make this a separate patch? OK. > > + // Clear all but the setup_header > > + SetMem (KernelSetup, 0x1f1, 0); > > + SetMem (((UINT8 *)KernelSetup) + SetupEnd, KernelSetupSize - SetupEnd, > > 0); > > + return EFI_SUCCESS; > >

Re: [edk2] [PATCH v2] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 11:07 AM, David Woodhouse wrote: > --- a/edk2/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm > +++ b/edk2/OvmfPkg/Library/LoadLinuxLib/X64/JumpToKernel.asm > @@ -24,10 +24,47 @@ > > ;-- > JumpT

Re: [edk2] [PATCH v2] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread David Woodhouse
On Wed, 2013-01-09 at 13:24 -0800, Jordan Justen wrote: > > This push won't assemble. ("Invalid instruction operands") > > There might be a way to get masm to assemble that instruction, but I > don't know the magic syntax. Hm. it works for me. $ wine ~/Downloads/ml64.exe /h Microsoft (R) Macro

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 1:18 PM, David Woodhouse wrote: > On Wed, 2013-01-09 at 13:11 -0800, Jordan Justen wrote: >> > + // Clear all but the setup_header >> > + SetMem (KernelSetup, 0x1f1, 0); What about OFFSET_OF rather than 0x1f1? >> > + SetMem (((UINT8 *)KernelSetup) + SetupEnd, KernelSetu

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread David Woodhouse
On Wed, 2013-01-09 at 13:38 -0800, Jordan Justen wrote: > Then it should go in a new function that gets called in > SetupLinuxBootParams and once on the EFI entry point path. > > LoadLinuxCheckKernelSetup is just a check routine. (Notice it gets > called in several places via BasicKernelSetupCheck.

Re: [edk2] [PATCH v2] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread H. Peter Anvin
On 01/09/2013 01:35 PM, David Woodhouse wrote: > On Wed, 2013-01-09 at 13:24 -0800, Jordan Justen wrote: >> >> This push won't assemble. ("Invalid instruction operands") >> >> There might be a way to get masm to assemble that instruction, but I >> don't know the magic syntax. > > Hm. it works for

Re: [edk2] [PATCH v2] OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 1:35 PM, David Woodhouse wrote: > On Wed, 2013-01-09 at 13:24 -0800, Jordan Justen wrote: >> >> This push won't assemble. ("Invalid instruction operands") >> >> There might be a way to get masm to assemble that instruction, but I >> don't know the magic syntax. > > Hm. it wo

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 11:12 AM, David Woodhouse wrote: > We're supposed to zero everything in the kernel bootparams that we don't > explicitly initialise, other than the setup_header from 0x1f1 onwards > for a precisely defined length, which is copied from the bzImage. > > We're *not* supposed to

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread H. Peter Anvin
On 01/09/2013 02:02 PM, Jordan Justen wrote: > On Wed, Jan 9, 2013 at 11:12 AM, David Woodhouse wrote: >> We're supposed to zero everything in the kernel bootparams that we don't >> explicitly initialise, other than the setup_header from 0x1f1 onwards >> for a precisely defined length, which is co

Re: [edk2] HII changes in uefi 2.31 and 2.3

2013-01-09 Thread Prakash, Sathya
Hi Ben, What exact issues you are seeing with the One of or string or option text with your uefi 2.3 system. Do both the systems have same browser implementation or do they have different IBV browsers? Thanks Sathya From: Ben Schroeder [mailto:ben...@mellanox.com] Sent: Wednesday, January 09,

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread Jordan Justen
On Wed, Jan 9, 2013 at 2:05 PM, H. Peter Anvin wrote: > On 01/09/2013 02:02 PM, Jordan Justen wrote: >> In which case might this be garbage? A PE/COFF based image? >> > > For all kernels. For non-EFI-stub kernels there will be a dummy boot > sector there; there is also garbage *after* the initial

Re: [edk2] HII changes in uefi 2.31 and 2.3

2013-01-09 Thread Tim Lewis
Also, Ben, can you see what the VERSION opcode returns. That browser should return the version it supports. Hard to see it (because you have to create a page to do it), but it could be different from what you see in the system table. Thanks, Tim From: Prakash, Sathya [mailto:sathya.prak...@lsi

Re: [edk2] How to impose 1 to 1 mapping between driver and controller

2013-01-09 Thread Prakash, Sathya
Thanks for the replies Mike and Andrew. I was on vacation so couldn't respond earlier. I am trying to explain my requirement more in detail here Let me assume we have two controllers C1 and C2. In Controller C1 there is a particular version of firmware and a particular version of UEFI Boot S

Re: [edk2] [PATCH] OvmPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

2013-01-09 Thread David Woodhouse
On Wed, 2013-01-09 at 13:38 -0800, Jordan Justen wrote: > On Wed, Jan 9, 2013 at 1:18 PM, David Woodhouse > wrote: > > On Wed, 2013-01-09 at 13:11 -0800, Jordan Justen wrote: > >> > + // Clear all but the setup_header > >> > + SetMem (KernelSetup, 0x1f1, 0); > > What about OFFSET_OF rather than

[edk2] Why the limitation on '\' for DSC files?

2013-01-09 Thread Tim Lewis
Section 3.1.1 says: Use of the back slash character "\" in this document is only for lines that cannot be displayed within the margins of this document. The backslash character must not be used to extend a line over multiple lines in the DSC file. However, in real life, with large PCD declaratio