qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Impact of incorrectly-mapped OVMF


From: Jakob Bohm
Subject: Re: [Qemu-discuss] Impact of incorrectly-mapped OVMF
Date: Tue, 24 Apr 2018 23:50:34 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 20/04/2018 10:54, Laszlo Ersek wrote:
...
Unfortunately this detection logic is extremely prone to mis-use (and
esp. it was never meant to deal with case (4)) and to causing confusion.
For this reason, I have had patches for a long time now that allow the
user to compile "-bios" support out of OVMF, with a build flag
(-DMEM_VARSTORE_EMU_ENABLE=FALSE). Then you will simply become unable to
boot with "-bios" -- the firmware will just hang with a black screen.
(If you capture the debug log (see OvmfPkg/README), you'll know what's
up though.) Note that this would not be the default -- the default build
wouldn't change.
Wouldn't it be much more user-friendly for this case to output a
cleartext error message to both screen and any non-screen console (such
as qemu stdout or a real serial console on a physical machine), before
halting the boot.  Hopefully UEFI has a standard way to do that for
early boot errors.

A nice default Tianocore message could be:
"UEFI BIOS flashed at wrong offset see your hardware manual. System
halted".

With an option for a motherboard build config (such as qemu) to
specify a different text such as:

"UEFI OVMF_CODE.fd passed to qemu -bios, pass it to -pflash instead, see
qemu-system-x86_64(1).  System halted."

Docs/samples could show an override such as

"UEFI BIOS flashed at wrong address, see https://help.example.com/badflash/
for recovery instructions.  System halted."


Similarly there can be a second error message:
"NVRAM config flash chip not found, check for hardware damage.
System halted."
With the qemu board override
"OVMF_VARS.fd not found in VM, please pass pass to qemu -????, see
qemu-system-x86_64(1).  System halted."
And doc/sample override:
"Chip U123 not responding, check for mainboard damage.  System halted."

And a third:
"UEFI NVRAM config flash chip is read only, check your Config
jumper setting.  Booting as configured."
With a qemu board override referring to the relevant qemu option.
(A secure pro motherboard may have such a hardware lockdown
feature).

etc.



Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2860 Soborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded



reply via email to

[Prev in Thread] Current Thread [Next in Thread]