summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/pi/Lib/amdlib.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-08-03 23:10:36 +0200
committerPatrick Georgi <pgeorgi@google.com>2016-08-08 17:33:04 +0200
commit98c65c1b0167d47e0eb0c362d8edc40a9fab085b (patch)
treec629d60ffacfbaa250f11e4564f086455f21baa4 /src/vendorcode/amd/pi/Lib/amdlib.c
parent9844d56993b2e43bd54536b3ac6a777fa01397cf (diff)
vendorcode/amd/pi/Lib: Fix reporting fatal error
Instead of writing the first word of 6 "post code structs" where only one exists (leading to 0xDEAD and 5 garbage words), write the correct set. Change-Id: Ifdfa53a970dda33dc9dc8c05788875077c001ecf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1361054, #1361055, #1361056 Reviewed-on: https://review.coreboot.org/16058 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/vendorcode/amd/pi/Lib/amdlib.c')
-rw-r--r--src/vendorcode/amd/pi/Lib/amdlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vendorcode/amd/pi/Lib/amdlib.c b/src/vendorcode/amd/pi/Lib/amdlib.c
index 5e85f6b1f8..4c8a56dba8 100644
--- a/src/vendorcode/amd/pi/Lib/amdlib.c
+++ b/src/vendorcode/amd/pi/Lib/amdlib.c
@@ -1408,7 +1408,7 @@ IdsErrorStop (
while(1) {
offset %= sizeof(struct POST) / 2;
- WriteIo32(80, *((UINT32*)(&post+offset)));
+ WriteIo16(80, *((UINT16 *)&post)+offset);
++offset;
for (j=0; j<250; ++j) {
ReadIo8(80);