summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/agesa/f12/Proc/Fch/Imc/ImcLib.c6
-rw-r--r--src/vendorcode/amd/agesa/f15tn/Proc/Fch/Imc/ImcLib.c6
-rw-r--r--src/vendorcode/amd/agesa/f16kb/Proc/Fch/Imc/ImcLib.c6
3 files changed, 12 insertions, 6 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++) {
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/Fch/Imc/ImcLib.c b/src/vendorcode/amd/agesa/f15tn/Proc/Fch/Imc/ImcLib.c
index a451c41fcd..3e3bf5c04e 100644
--- a/src/vendorcode/amd/agesa/f15tn/Proc/Fch/Imc/ImcLib.c
+++ b/src/vendorcode/amd/agesa/f15tn/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;
}
@@ -79,7 +80,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;
}
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;
}