Hi,
I was a bit confused when I received an error message via QEMU with OVMF:
BdsDxe: failed to load Boot0001 "UEFI QEMU HARDDISK QM00003 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0): Not Found
It took me quite a while to understand that the EFI System Partition was missing on that disk. Unfortunately, it's not very obvious who is producing this error message, I was first suspecting some issue with my QEMU command line.
Would it be possible to enhance the error message in OVMF, for example
a) By printing that the error message comes from the firmware (OVMF)
b) By being more specific about what was not found
c) or by giving examples of what might not have been found?
QEMU invocation example:
qemu-system-x86_64 \
-nodefaults \
-nographic \
-drive if=pflash,format=raw,unit=0,readonly,file=ovmf-code.bin \
-drive if=pflash,format=raw,unit=1,file=ovmf-vars.bin \
-serial mon:stdio \
-drive file=emptyfile,format=raw,media=disk,index=1
I have skimmed through the edk2 source code and now believe that the message is produced via
OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c
HandleStatusCode
and the part about "Not found" looks like it a message for some form of EFI result code RETURN_NOT_FOUND, via
MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
mStatusString
or via
MdePkg/Library/BasePrintLib/PrintLibInternal.c
mErrorString
Since I know nothing about edk2, I can only guess that implementing b) might be tricky, but maybe a) and c) could be done?
Or maybe you have another suggestion?
Thanks,
Robert