Date
1 - 1 of 1
How to load BootOptions in '/boot/efi/NvVars' on aarch64 platform?
Xiaohe Yang <xhyang1024@...>
hello everyone,
I am using ArmVirtQemu.dsc to build a firmware which support to booting
into virtual machine. I have found one difference for OVMF on x86 and arm:
- With configuring '-bios' on x86, OVMF will load BootOptions which is
saved in '/boot/efi/NvVars' in disk.
- With configuring '-bios' on arm virt machine-type in Qemu, Qemu will
initialize two pflash device, and OVMF use pflash-1 device to store
Variables including
BootOptions. But because no backend file is configured for pflash-1, the
Variables will not be permanent and will not be used for the next boot.
*Question 1*: I wonder why loading BootOptions from '/boot/efi/NvVars' is
not supported on arm?
I want to add support of loading BootOptions from '/boot/efi/NvVars', and I
add 'OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf'
in ArmVirtPkg/ArmVirtQemu.dsc and corresponding fdf file, but it seems that
I have disorganized the loading sequence of DXE drivers. I got the
following error log:
'''
2022-12-08 21:28:53 ProcessPciHost: Config[0x8040000000+0x10000000)
Bus[0x0..0xFF] Io[0x0+0x10000)@0x3FFF0000 Mem32[0x11000000+0x2EFF0000)@0x0
Mem64[0xA000000000+0x6000000000)@0x0^M
2022-12-08 21:28:53 RootBridge: PciRoot(0x0)^M
2022-12-08 21:28:53 Support/Attr: 70001 / 70001^M
2022-12-08 21:28:53 DmaAbove4G: Yes^M
2022-12-08 21:28:53 NoExtConfSpace: No^M
2022-12-08 21:28:53 AllocAttr: 3 (CombineMemPMem Mem64Decode)^M
2022-12-08 21:28:53 Bus: 0 - FF Translation=0^M
2022-12-08 21:28:53 Io: 0 - FFFF Translation=0^M
2022-12-08 21:28:53 Mem: 11000000 - 3FFEFFFF Translation=0^M
2022-12-08 21:28:53 MemAbove4G: A000000000 - FFFFFFFFFF Translation=0^M
2022-12-08 21:28:53 PMem: FFFFFFFFFFFFFFFF - 0 Translation=0^M
2022-12-08 21:28:53 PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectIoDescriptor: add [0,
10000): Success^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectMemoryDescriptor: add
[11000000, 3FFF0000): Success^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectMemoryDescriptor: add
[A000000000, 10000000000): Success^M
2022-12-08 21:28:53 InstallProtocolInterface:
CF8034BE-6768-4D8B-B739-7CCE683A9FBE 43AA96BC0^M
2022-12-08 21:28:53 InstallProtocolInterface:
09576E91-6D3F-11D2-8E39-00A0C969723B 43AA96F18^M
2022-12-08 21:28:53 InstallProtocolInterface:
2F707EBB-4A1A-11D4-9A38-0090273FC14D 43AA962F0^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Bds Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Variable Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Variable Write Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Capsule Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Monotonic Counter Arch Protocol not present!!^M
'''
*Question-2: *Is it reasonable to add support for loading BootOptions from
'/boot/efi/NvVars' on arm64? if reasonable, how can I solve this problem?
Best Wishes,
Xiaohe Yang
I am using ArmVirtQemu.dsc to build a firmware which support to booting
into virtual machine. I have found one difference for OVMF on x86 and arm:
- With configuring '-bios' on x86, OVMF will load BootOptions which is
saved in '/boot/efi/NvVars' in disk.
- With configuring '-bios' on arm virt machine-type in Qemu, Qemu will
initialize two pflash device, and OVMF use pflash-1 device to store
Variables including
BootOptions. But because no backend file is configured for pflash-1, the
Variables will not be permanent and will not be used for the next boot.
*Question 1*: I wonder why loading BootOptions from '/boot/efi/NvVars' is
not supported on arm?
I want to add support of loading BootOptions from '/boot/efi/NvVars', and I
add 'OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf'
in ArmVirtPkg/ArmVirtQemu.dsc and corresponding fdf file, but it seems that
I have disorganized the loading sequence of DXE drivers. I got the
following error log:
'''
2022-12-08 21:28:53 ProcessPciHost: Config[0x8040000000+0x10000000)
Bus[0x0..0xFF] Io[0x0+0x10000)@0x3FFF0000 Mem32[0x11000000+0x2EFF0000)@0x0
Mem64[0xA000000000+0x6000000000)@0x0^M
2022-12-08 21:28:53 RootBridge: PciRoot(0x0)^M
2022-12-08 21:28:53 Support/Attr: 70001 / 70001^M
2022-12-08 21:28:53 DmaAbove4G: Yes^M
2022-12-08 21:28:53 NoExtConfSpace: No^M
2022-12-08 21:28:53 AllocAttr: 3 (CombineMemPMem Mem64Decode)^M
2022-12-08 21:28:53 Bus: 0 - FF Translation=0^M
2022-12-08 21:28:53 Io: 0 - FFFF Translation=0^M
2022-12-08 21:28:53 Mem: 11000000 - 3FFEFFFF Translation=0^M
2022-12-08 21:28:53 MemAbove4G: A000000000 - FFFFFFFFFF Translation=0^M
2022-12-08 21:28:53 PMem: FFFFFFFFFFFFFFFF - 0 Translation=0^M
2022-12-08 21:28:53 PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectIoDescriptor: add [0,
10000): Success^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectMemoryDescriptor: add
[11000000, 3FFF0000): Success^M
2022-12-08 21:28:53 PciHostBridgeDxe: IntersectMemoryDescriptor: add
[A000000000, 10000000000): Success^M
2022-12-08 21:28:53 InstallProtocolInterface:
CF8034BE-6768-4D8B-B739-7CCE683A9FBE 43AA96BC0^M
2022-12-08 21:28:53 InstallProtocolInterface:
09576E91-6D3F-11D2-8E39-00A0C969723B 43AA96F18^M
2022-12-08 21:28:53 InstallProtocolInterface:
2F707EBB-4A1A-11D4-9A38-0090273FC14D 43AA962F0^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Bds Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Variable Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Variable Write Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Capsule Arch Protocol not present!!^M
2022-12-08 21:28:53 ^M
2022-12-08 21:28:53 Monotonic Counter Arch Protocol not present!!^M
'''
*Question-2: *Is it reasonable to add support for loading BootOptions from
'/boot/efi/NvVars' on arm64? if reasonable, how can I solve this problem?
Best Wishes,
Xiaohe Yang