diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2014-01-21 19:38:34 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-21 19:38:34 +0000 |
commit | b382ede3864e17e8827dbc90c7d4f1540b94ff3f (patch) | |
tree | a11992942fe9601482f02f0bbd1e8c1d2f31a70f /OvmfPkg/Sec | |
parent | bb4aa855f3615352d1cbe733b1a329f6d94c7264 (diff) | |
download | edk2-b382ede3864e17e8827dbc90c7d4f1540b94ff3f.tar.gz edk2-b382ede3864e17e8827dbc90c7d4f1540b94ff3f.tar.bz2 edk2-b382ede3864e17e8827dbc90c7d4f1540b94ff3f.zip |
OvmfPkg X64 ResetVector: Move page tables from 512KB to 8MB
To help consolidate OVMF fixed memory uses, we declare this
range in MEMFD and thereby move it to 8MB.
We also now declare the table range in the FDF to set
PCDs. This allows us to ASSERT that CR3 is set as expected
in OVMF SEC.
OvmfPkgIa32.fdf and OvmfPkgIa32X64.fdf are updated simply
for consistency.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15146 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/Sec')
-rw-r--r-- | OvmfPkg/Sec/SecMain.c | 8 | ||||
-rw-r--r-- | OvmfPkg/Sec/SecMain.inf | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index e235b964a8..ece1c9b517 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -615,6 +615,14 @@ SecCoreStartupWithStack ( AsmWriteIdtr (&IdtDescriptor);
+#if defined (MDE_CPU_X64)
+ //
+ // ASSERT that the Page Tables were set by the reset vector code to
+ // the address we expect.
+ //
+ ASSERT (AsmReadCr3 () == (UINTN) PcdGet32 (PcdOvmfSecPageTablesBase));
+#endif
+
//
// |-------------| <-- TopOfCurrentStack
// | Stack | 32k
diff --git a/OvmfPkg/Sec/SecMain.inf b/OvmfPkg/Sec/SecMain.inf index 91d0a4469f..68dfeaaa4b 100644 --- a/OvmfPkg/Sec/SecMain.inf +++ b/OvmfPkg/Sec/SecMain.inf @@ -66,3 +66,4 @@ [Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvBase
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvSize
+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|