summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Library
diff options
context:
space:
mode:
authorRARelph <44270374+RARelph@users.noreply.github.com>2025-10-31 01:02:27 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-11-04 09:51:50 +0300
commitb98ccecdecec0bb768e6e5bd4df1694de87ad42f (patch)
treebf65937fbfd27d509fca19af61996efdf20169f1 /MdePkg/Include/Library
parent8058a94f60a129476a7955ee839cec96467b9bef (diff)
downloadedk2-b98ccecdecec0bb768e6e5bd4df1694de87ad42f.tar.xz
MdePkg: Add code to detect running as an SEV guest
Similar to Intel's Tdx, we need a mechanism to detect running as an AMD SEV guest that will work in all phases everywhere. This will be immediately used to prevent usage of MTRRs with SEV guests. Signed-off-by: Richard Relph <richard.relph@amd.com>
Diffstat (limited to 'MdePkg/Include/Library')
-rw-r--r--MdePkg/Include/Library/BaseLib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index b50a1d5ecd..a2b5b01f17 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -5396,6 +5396,18 @@ TdIsEnabled (
VOID
);
+/**
+ Probe if running as some kind of SEV guest.
+
+ @return FALSE Not running as a guest under any kind of SEV
+ @return TRUE Running as a guest under any kind of SEV
+**/
+BOOLEAN
+EFIAPI
+SevGuestIsEnabled (
+ VOID
+ );
+
#if defined (MDE_CPU_X64)
//
// The page size for the PVALIDATE instruction