Skip to content

Commit 5a08091

Browse files
committed
Use relocated OVMF
See patch description for details. This fixes running UEFI tests after QubesOS/qubes-linux-kernel@3e8be4a The binaries are based on ccf91b518f22102d446f26320110d30ea0fc1fa9 of edk2, with the patch applied and then built using "OvmfPkg/build.sh -a X64" command. Fixes QubesOS/qubes-issues#9028
1 parent c12e7bd commit 5a08091

4 files changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 13abe408d3be60bc6f646933e1219a24e7d80eae Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3+
<marmarek@invisiblethingslab.com>
4+
Date: Mon, 11 Mar 2024 00:42:28 +0000
5+
Subject: [PATCH] Raise MEMFD_BASE_ADDRESS to not conflict with dom0 kernel
6+
7+
Kernel in qubes is built with CONFIG_PHYSICAL_START=0x200000 to fix booting on
8+
AMD Threadripper[1]. But this in turns conflicts with OVMF using area around
9+
0x800000. The dom0 kernel cannot relocate itself this early (at least not yet),
10+
so this conflict leads to boot failure.
11+
Dom0 kernel used to have CONFIG_PHYSICAL_START=0x1000000, so it was above that
12+
OVMF working area.
13+
For now unbreak virtualized UEFI installation tests by moving OVMF much higher
14+
(above kernel and initrd).
15+
16+
[1] https://github.com/QubesOS/qubes-linux-kernel/commit/3e8be4ac1682370977d4d0dc1d782c428d860282
17+
---
18+
OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc | 2 +-
19+
1 file changed, 1 insertion(+), 1 deletion(-)
20+
21+
diff --git a/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc b/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
22+
index 6170c5993c..26518e9f85 100644
23+
--- a/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
24+
+++ b/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
25+
@@ -103,4 +103,4 @@ SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase = gUefiOvmfPk
26+
SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase
27+
!endif
28+
29+
-DEFINE MEMFD_BASE_ADDRESS = 0x800000
30+
+DEFINE MEMFD_BASE_ADDRESS = 0x4000000
31+
--
32+
2.43.0
33+

utils/OVMF.fd

4 MB
Binary file not shown.

utils/OVMF_CODE.fd

3.48 MB
Binary file not shown.

utils/OVMF_VARS.fd

528 KB
Binary file not shown.

0 commit comments

Comments
 (0)