summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c')
-rw-r--r--src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c b/src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c
index 05f57278da..f911632232 100644
--- a/src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c
+++ b/src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c
@@ -66,7 +66,8 @@ WriteECmsg (
{
UINT8 Index;
- OpFlag = OpFlag & 0x7f;
+ ASSERT (OpFlag < AccessWidth64); /* TODO: Add the assertion to make it not crash for now. */
+ OpFlag = (OpFlag & 0x7f) - 1;
if (OpFlag == 0x02) {
OpFlag = 0x03;
}
@@ -101,7 +102,8 @@ ReadECmsg (
{
UINT8 Index;
- OpFlag = OpFlag & 0x7f;
+ ASSERT (OpFlag < AccessWidth64); /* TODO: Add the assertion to make it not crash for now. */
+ OpFlag = (OpFlag & 0x7f) - 1;
if (OpFlag == 0x02) {
OpFlag = 0x03;
}