From 772eb9a012d7f3336da838c170aaf5c0411ce7ef Mon Sep 17 00:00:00 2001 From: Nhi Pham Date: Thu, 29 Jul 2021 21:14:26 +0700 Subject: [PATCH] AcpiPlatformDxe: Update BERT size for additional RAS records captured BERT size has increased to capture additional RAS IP error records. Update the BERT size to accommodate the new entries. This also updates the current BERT version (CURRENT_BERT_VERION) as the crash dump data structure has changed. Signed-off-by: Nhi Pham --- Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c | 2 +- Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c index 3ec63250a5d..e9208dcc3ed 100644 --- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c +++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c @@ -152,7 +152,7 @@ WrapBertErrorData ( CrashSize = PLAT_CRASH_ITERATOR_SIZE * GetNumberOfSupportedSockets () * GetMaximumNumberOfCores (); - CrashSize += 2 * (SMPRO_CRASH_SIZE + PMPRO_CRASH_SIZE); + CrashSize += 2 * (SMPRO_CRASH_SIZE + PMPRO_CRASH_SIZE + RASIP_CRASH_SIZE); CrashSize += sizeof (WrappedError->Bed.Vendor) + sizeof (WrappedError->Bed.BertRev); WrappedError->Ges.BlockStatus.ErrorDataEntryCount = 1; diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.h b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.h index 5a0ce9dcc69..617e7ff1fa0 100644 --- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.h +++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.h @@ -36,9 +36,10 @@ #define PLAT_CRASH_ITERATOR_SIZE 0x398 #define SMPRO_CRASH_SIZE 0x800 #define PMPRO_CRASH_SIZE 0x800 +#define RASIP_CRASH_SIZE 0x1000 #define HEST_NUM_ENTRIES_PER_SOC 3 -#define CURRENT_BERT_VERSION 0x10 +#define CURRENT_BERT_VERSION 0x11 #define BERT_FLASH_OFFSET 0x91B30000ULL #define BERT_DDR_OFFSET 0x88230000ULL #define BERT_DDR_LENGTH 0x50000 @@ -55,8 +56,10 @@ typedef struct { UINT8 BertRev; UINT8 S0PmproRegisters[PMPRO_CRASH_SIZE]; UINT8 S0SmproRegisters[SMPRO_CRASH_SIZE]; + UINT8 S0RasIpRegisters[RASIP_CRASH_SIZE]; UINT8 S1PmproRegisters[PMPRO_CRASH_SIZE]; UINT8 S1SmproRegisters[SMPRO_CRASH_SIZE]; + UINT8 S1RasIpRegisters[RASIP_CRASH_SIZE]; UINT8 AtfDump[PLATFORM_CPU_MAX_NUM_CORES * PLAT_CRASH_ITERATOR_SIZE]; } APEI_CRASH_DUMP_DATA;