aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/smm/smm_module_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/smm/smm_module_handler.c')
-rw-r--r--src/cpu/x86/smm/smm_module_handler.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index 0884819ea2..d987ddc476 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -106,6 +106,13 @@ void *smm_get_save_state(int cpu)
return base;
}
+uint32_t smm_revision(void)
+{
+ const uintptr_t save_state = (uintptr_t)(smm_get_save_state(0));
+
+ return *(uint32_t *)(save_state + smm_runtime->save_state_size - SMM_REVISION_OFFSET_FROM_TOP);
+}
+
bool smm_region_overlaps_handler(const struct region *r)
{
const struct region r_smm = {smm_runtime->smbase, smm_runtime->smm_size};