Enable the use of HEST table generation protocol, GHES error source descriptor protocol and DMC-620 MM driver on ARM Neoverse Reference Design platforms. This allows firmware-first error handling and reporting of DMC-620 memory controller's 1-bit DRAM ECC errors.
Co-authored-by: Thomas Abraham <thomas.abra...@arm.com> Signed-off-by: Omkar Anand Kulkarni <omkar.kulka...@arm.com> --- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 17 +++++++++++ Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 30 ++++++++++++++++++++ Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf | 6 ++++ Platform/ARM/SgiPkg/SgiPlatform.fdf | 6 ++++ 4 files changed, 59 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc index 7e37732fb93c..bb32584de63d 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -21,6 +21,9 @@ DEFINE LPI_EN = FALSE DEFINE CPPC_EN = FALSE + # To allow firmware first error handling, set this to TRUE. + DEFINE ENABLE_GHES_MM = FALSE + [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES @@ -208,6 +211,12 @@ gArmTokenSpaceGuid.PcdMmBufferBase|0xFF600000 gArmTokenSpaceGuid.PcdMmBufferSize|0x10000 +!if $(ENABLE_GHES_MM) == TRUE + ## GHESv2 Generic Error memory space + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferBase|0xFF610000 + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferSize|0x20000 +!endif + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform @@ -365,3 +374,11 @@ !else ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf !endif + + # + # GHESv2 HEST error sources support + # + MdeModulePkg/Universal/Apei/HestDxe/HestDxe.inf +!if $(ENABLE_GHES_MM) == TRUE + ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceDxe.inf +!endif diff --git a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc index 5287e1f8e568..dbba82c74f39 100644 --- a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc @@ -11,6 +11,10 @@ # Library Class section - list of all Library Classes needed by this Platform. # ################################################################################ +[Defines] + # To enable DMC-620 MM driver, set this to TRUE. + DEFINE ENABLE_DMC620_MM = FALSE + [LibraryClasses] # # Basic @@ -94,6 +98,25 @@ gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE !endif +!if $(ENABLE_GHES_MM) == TRUE + ## GHESv2 Generic Error Memory Space + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferBase|0xFF610000 + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferSize|0x20000 +!endif + +!if $(ENABLE_DMC620_MM) == TRUE + ## DMC620 + gDmc620MmTokenSpaceGuid.PcdDmc620NumCtrl|2 + gDmc620MmTokenSpaceGuid.PcdDmc620RegisterBase|0x4E000000 + gDmc620MmTokenSpaceGuid.PcdDmc620CtrlSize|0x100000 + gDmc620MmTokenSpaceGuid.PcdDmc620CorrectableErrorThreshold|10 + gDmc620MmTokenSpaceGuid.PcdDmc620ErrSourceCount|1 + gDmc620MmTokenSpaceGuid.PcdDmc620DramErrorSdeiEventBase|804 + gDmc620MmTokenSpaceGuid.PcdDmc620DramOneBitErrorDataBase|0xFF610000 + gDmc620MmTokenSpaceGuid.PcdDmc620DramOneBitErrorDataSize|0x100 + gDmc620MmTokenSpaceGuid.PcdDmc620DramOneBitErrorSourceId|0 +!endif + ################################################################################################### # # Components Section - list of the modules and components that will be processed by compilation @@ -134,6 +157,13 @@ } !endif +!if $(ENABLE_GHES_MM) == TRUE + ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceStandaloneMm.inf +!endif +!if $(ENABLE_DMC620_MM) == TRUE + Platform/ARM/Drivers/Dmc620Mm/Dmc620Mm.inf +!endif + ################################################################################################### # # BuildOptions Section - Define the module specific tool chain flags that should be used as diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf b/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf index c1c24b747fa5..e029b9164570 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf @@ -48,6 +48,12 @@ READ_STATUS = TRUE READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE +!if $(ENABLE_GHES_MM) == TRUE + INF ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceStandaloneMm.inf +!endif +!if $(ENABLE_DMC620_MM) == TRUE + INF Platform/ARM/Drivers/Dmc620Mm/Dmc620Mm.inf +!endif INF StandaloneMmPkg/Core/StandaloneMmCore.inf !if $(SECURE_STORAGE_ENABLE) == TRUE INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf index 8227ae03330c..d6e942e19b81 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -179,6 +179,12 @@ READ_LOCK_STATUS = TRUE # MM Communicate INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf + # Hest Error Source Support + INF MdeModulePkg/Universal/Apei/HestDxe/HestDxe.inf +!if $(ENABLE_GHES_MM) == TRUE + INF ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceDxe.inf +!endif + # # Platform driver # -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79751): https://edk2.groups.io/g/devel/message/79751 Mute This Topic: https://groups.io/mt/85104847/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-