On 10/06/16 07:45, spam collector wrote: > ----- Original Message ----- >> From: "Laszlo Ersek" <[email protected]> >> To: "spam collector" <[email protected]> >> Cc: [email protected] >> Sent: Wednesday, October 5, 2016 8:28:46 AM >> Subject: Re: [edk2] OVMF.fd and placement of EfiBootServicesData >> >> I recommend trying the following (32-bit command line), with Gerd's package: >> >> FW_BIN=/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd >> VARS_TMPL=/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd >> VARS=myvars.fd >> SHELL_ISO=/usr/share/edk2.git/ovmf-ia32/UefiShell.iso >> if ! [ -e "$VARS" ]; then >> cp -v -- "$VARS_TMPL" "$VARS" >> fi >> >> qemu-system-i386 \ >> -m 2048 \ >> -machine accel=kvm \ >> \ >> -drive if=pflash,format=raw,unit=0,readonly,file="$FW_BIN" \ >> -drive if=pflash,format=raw,unit=1,file="$VARS" \ >> \ >> -device virtio-scsi-pci,id=scsi0 \ >> -drive if=none,format=raw,readonly,file="$SHELL_ISO",id=shell \ >> -device scsi-cd,bus=scsi0.0,drive=shell,bootindex=1 \ >> \ >> -chardev file,id=debugfile,path=ovmf.log \ >> -device isa-debugcon,iobase=0x402,chardev=debugfile >> >> This will boot the shell for you, and even save the OVMF debug log in >> the file "ovmf.log". > > I used the following command line (again, a WinXP DOS Session .BAT file): > > "..\qemu-system-i386w.exe" -m 256 -drive > if=pflash,format=raw,unit=0,readonly,file=..\OVMF_CODE.fd -drive > if=pflash,format=raw,unit=1,file=..\OVMF_VARS.fd -device > virtio-scsi-pci,id=scsi0 -drive > if=none,format=raw,readonly,file=..\UefiShell.iso,id=shell -device > scsi-cd,bus=scsi0.0,drive=shell,bootindex=1 > -chardev file,id=debugfile,path=ovmf.log -device > isa-debugcon,iobase=0x402,chardev=debugfile -drive > file=uefi.bin.vhd,format=raw,if=ide,media=disk,index=0 > > The shell booted up as expected. However, my BOOT.efi file is now a: > > "image is not an application" > > I don't think I mentioned before, my BOOT.efi is an OS loader, not > a UEFI driver or other type application.
(A UEFI_DRIVER module is *not* an application.) > Sorry, I should have mentioned > that earlier, hope that did not confuse you. > > My BOOT.efi file has a value of 0x0B as the Subsystem value. > > PE Optional Header: Subsystem: 0x000B > > I removed the UefiShell.iso part: > > "..\qemu-system-i386w.exe" -m 256 -drive > if=pflash,format=raw,unit=0,readonly,file=..\OVMF_CODE.fd -drive > if=pflash,format=raw,unit=1,file=..\OVMF_VARS.fd -device > virtio-scsi-pci,id=scsi0 -chardev > file,id=debugfile,path=ovmf.log -device > isa-debugcon,iobase=0x402,chardev=debugfile -drive > file=uefi.bin.vhd,format=raw,if=ide,media=disk,index=0 > > and the shell was loaded, with the same result, "not an application". Based on "MdePkg/Include/IndustryStandard/PeImage.h": - Subsystem type 0xb (11 decimal) seems to correspond to EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER. If your module is an application however (and a boot loader is usually an application), it should have EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION (= 0xa, 10 decimal). - You might want to double-check if the bitnesses match (you can't launch an IMAGE_FILE_MACHINE_I386 (0x014c) image on the X64 and Ia32X64 builds of OVMF, nor an IMAGE_FILE_MACHINE_X64 (0x8664) image on the Ia32 build). Laszlo _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

