diff options
Diffstat (limited to 'src/vendorcode/amd/agesa/f12')
-rw-r--r-- | src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c b/src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c index 1a3f7dd2f5..8795f0b37c 100644 --- a/src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c +++ b/src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c @@ -55,7 +55,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; for (Index = 0; Index <= OpFlag; Index++) { @@ -77,7 +78,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; for (Index = 0; Index <= OpFlag; Index++) { |