On 03/31/16 15:37, Michael Brown wrote:
> On 31/03/16 11:13, Laszlo Ersek wrote:
>> Which translates to the following response string:
>>
>> GUID=<Guid>&NAME=<String>&PATH=<UEFI binary Device Path represented as
>> hex number>&<Label1>=<Value1>&<Label2>=<Value2>&...&<LabelN>=<ValueN>
>>
>> In a nutshell, I think iPXE should:
>> - reflect the GUID / NAME / PATH triplet from the input to the output
>> verbatim,
>> - for each config knob <LabelN> requested, respond with
>> <LabelN>=<ValueN>.
>>
>> (See also: "if a ConfigHdr is passed in with no request elements, all
>> of the settings being abstracted for that particular ConfigHdr
>> reference will be returned in the Results Field" -- but I think the
>> iPXE code already handles that.)
>>
>> ... I suspect iPXE's ExtractConfig() logic is almost complete, except
>> it doesn't reflect GUID / NAME / PATH (= the "routing information") in
>> the output. Shouldn't be hard to try out.
> 
> Thank you, Laszlo!  That is exactly the kind of answer I was looking for.
> 
> I'm about to get on a plane, but will update the iPXE code ASAP.  What's
> the easiest way to reproduce the original ASSERT() that you were seeing?
>  If I build EDK2 as of 8a45f80edad4, should I see the assertion as soon
> as I power on the VM, or do I need to do something to trigger it?

Right, building OVMF from edk2 at 8a45f80edad4, then launching QEMU such
that a NIC with an IPXE option ROM is present (from a CONFIG=qemu IPXE
build), then finally *booting* an UEFI application, should trigger the
problem. (For example, launching just the UEFI shell should suffice.)

The following commands should do it:

(
  CODE=.../OVMF_CODE.fd
  TMPL=.../OVMF_VARS.fd
  IPXE_EFI_DRV=.../1af41000.efidrv

  if ! [ -e vars.fd ]; then
    cp $TMPL vars.fd
  fi

  qemu-system-x86_64 \
    -m 2048 \
    -M pc \
    -enable-kvm \
    -device qxl-vga \
    \
    -drive if=pflash,readonly,format=raw,file=$CODE \
    -drive if=pflash,format=raw,file=vars.fd \
    \
    -debugcon file:debug.log \
    -global isa-debugcon.iobase=0x402 \
    \
    -chardev stdio,signal=off,mux=on,id=char0 \
    -mon chardev=char0,mode=readline,default \
    -serial chardev:char0 \
    \
    -netdev user,id=netdev0 \
    -device virtio-net-pci,netdev=netdev0,romfile=$IPXE_EFI_DRV
)

The assertion failure will be at the end of "debug.log".

The model of the emulated / virtual NIC is irrelevant; e.g., the rtl8139
device (with 10ec8139.efidrv) should reproduce the problem similarly.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to