aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c')
-rw-r--r--src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c b/src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c
index 169de7d8f8..b0f0e419f3 100644
--- a/src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c
+++ b/src/vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEventLog.c
@@ -121,6 +121,8 @@ AmdReadEventLog (
ASSERT (Event != NULL);
Event->StdHeader.HeapBasePtr = HeapGetBaseAddress (&Event->StdHeader);
Status = GetEventLog (&LogEvent, &Event->StdHeader);
+ if (Status != AGESA_SUCCESS)
+ return Status;
Event->EventClass = LogEvent.EventClass;
Event->EventInfo = LogEvent.EventInfo;
@@ -219,6 +221,9 @@ PutEventLog (
AgesaEventAlloc = NULL;
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return;
+
Index = AgesaEventAlloc->WriteRecordPtr;
// Add the new event log data into a circular buffer
@@ -281,6 +286,8 @@ GetEventLog (
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return AGESA_BOUNDS_CHK;
if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) &&
(AgesaEventAlloc->ReadWriteFlag == 1)) {
@@ -338,6 +345,8 @@ PeekEventLog (
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return FALSE;
if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) &&
(AgesaEventAlloc->ReadWriteFlag == 1)) {