summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/ResetVector/ResetVector.nasmb
diff options
context:
space:
mode:
authorMarvin Häuser <Marvin.Haeuser@outlook.com>2016-11-04 13:32:39 +0000
committerLaszlo Ersek <lersek@redhat.com>2016-11-04 23:47:07 +0100
commit73d66c5871cc8aef4f482255eeeff60c2585bd4f (patch)
tree6eacfbd7b0cc24299aefa26e300f286dd00e7b8e /OvmfPkg/ResetVector/ResetVector.nasmb
parentfdaf78424da45b34ef515119cd308ffa8cd43d54 (diff)
downloadedk2-73d66c5871cc8aef4f482255eeeff60c2585bd4f.tar.gz
edk2-73d66c5871cc8aef4f482255eeeff60c2585bd4f.tar.bz2
edk2-73d66c5871cc8aef4f482255eeeff60c2585bd4f.zip
OvmfPkg/ResetVector: Depend on PCD values of the page tables.
Currently, the value of the page tables' address is hard-coded in the ResetVector. This patch replaces these values with a PCD dependency. A check for the size has been added to alert the developer to rewrite the ASM according to the new size, if it has been changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/ResetVector/ResetVector.nasmb')
-rw-r--r--OvmfPkg/ResetVector/ResetVector.nasmb7
1 files changed, 7 insertions, 0 deletions
diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector/ResetVector.nasmb
index 31ac06ae4a..29cbad3677 100644
--- a/OvmfPkg/ResetVector/ResetVector.nasmb
+++ b/OvmfPkg/ResetVector/ResetVector.nasmb
@@ -53,6 +53,13 @@
%include "Ia32/SearchForSecEntry.asm"
%ifdef ARCH_X64
+ #include <AutoGen.h>
+
+ %if (FixedPcdGet32 (PcdOvmfSecPageTablesSize) != 0x6000)
+ %error "This implementation inherently depends on PcdOvmfSecPageTablesSize"
+ %endif
+
+ %define PT_ADDR(Offset) (FixedPcdGet32 (PcdOvmfSecPageTablesBase) + (Offset))
%include "Ia32/Flat32ToFlat64.asm"
%include "Ia32/PageTables64.asm"
%endif