From 78bccfec9ce5082499db035270e7998d5330d75c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 25 Jan 2024 08:39:18 +0100 Subject: OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h Signed-off-by: Gerd Hoffmann --- OvmfPkg/IntelTdx/Sec/SecMain.c | 2 +- OvmfPkg/Sec/SecMain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OvmfPkg') diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c index 6eeae09e3b..95a31af029 100644 --- a/OvmfPkg/IntelTdx/Sec/SecMain.c +++ b/OvmfPkg/IntelTdx/Sec/SecMain.c @@ -69,7 +69,7 @@ SecMtrrSetup ( } DefType.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE); - DefType.Bits.Type = 6; /* write back */ + DefType.Bits.Type = MSR_IA32_MTRR_CACHE_WRITE_BACK; DefType.Bits.E = 1; /* enable */ AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64); } diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index b0bb7b295d..c1c08a947a 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -765,7 +765,7 @@ SecMtrrSetup ( } DefType.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE); - DefType.Bits.Type = 6; /* write back */ + DefType.Bits.Type = MSR_IA32_MTRR_CACHE_WRITE_BACK; DefType.Bits.E = 1; /* enable */ AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, DefType.Uint64); } -- cgit v1.2.3