From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10840.1604047335029405932 for ; Fri, 30 Oct 2020 01:42:15 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: omkar.kulkarni@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B2F59143D; Fri, 30 Oct 2020 01:42:14 -0700 (PDT) Received: from usa.arm.com (a076764.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 16B713F719; Fri, 30 Oct 2020 01:42:12 -0700 (PDT) From: "Omkar Anand Kulkarni" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao Subject: [edk2-platforms][PATCH 5/6] Platform/Arm/Sgi: dmc-620 firmware-first error handling Date: Fri, 30 Oct 2020 14:11:55 +0530 Message-Id: <20201030084156.8291-6-omkar.kulkarni@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201030084156.8291-1-omkar.kulkarni@arm.com> References: <20201030084156.8291-1-omkar.kulkarni@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Enable the use of HEST table generation protocol, GHES error source descriptor protocol and DMC-620 MM driver on SGI/RD 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 Signed-off-by: Omkar Anand Kulkarni --- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 34 ++++++++++++++++++++ Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc | 25 ++++++++++++++ Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf | 6 ++++ Platform/ARM/SgiPkg/SgiPlatform.fdf | 12 +++++++ 4 files changed, 77 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPk= g/SgiPlatform.dsc.inc index f5f9f144eee9..1861beef57ef 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -84,6 +84,19 @@ gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|TRUE gArmSgiTokenSpaceGuid.PcdVirtioNetSupported|TRUE =20 +!ifdef EDK2_ENABLE_HEST + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + gArmSgiTokenSpaceGuid.PcdHestSupported|TRUE +!endif + +!ifdef EDK2_ENABLE_SDEI + gArmSgiTokenSpaceGuid.PcdSdeiSupported|TRUE +!endif + +!ifdef EDK2_ENABLE_GHES_MM + gArmSgiTokenSpaceGuid.PcdGhesMmSupported|TRUE +!endif + [PcdsFixedAtBuild.common] gArmTokenSpaceGuid.PcdVFPEnabled|1 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 @@ -181,6 +194,12 @@ gArmTokenSpaceGuid.PcdMmBufferBase|0xFF600000 gArmTokenSpaceGuid.PcdMmBufferSize|0x10000 =20 +!ifdef EDK2_ENABLE_GHES_MM + ## GHESv2 Generic Error memory space + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferBase|0xFF610= 000 + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferSize|0x20000 +!endif + ########################################################################= ######## # # Components Section - list of all EDK II Modules needed by this Platfor= m @@ -257,7 +276,11 @@ # # platform driver # +!ifdef EDK2_ENABLE_GHES_MM + Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxeMm.inf +!else Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +!endif =20 # # FAT filesystem + GPT/MBR partitioning @@ -314,3 +337,14 @@ MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf =20 ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf + + + # + # GHESv2 HEST error sources support + # +!ifdef EDK2_ENABLE_HEST + ArmPlatformPkg/Drivers/Apei/HestDxe/HestDxe.inf +!endif +!ifdef EDK2_ENABLE_GHES_MM + ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceDxe.inf +!endif diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc b/Platform/ARM/= SgiPkg/PlatformStandaloneMm.dsc index 38bf6020ba4c..b9c8c386be12 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc @@ -94,6 +94,25 @@ =20 gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x2 =20 +!ifdef EDK2_ENABLE_GHES_MM + ## GHESv2 Generic Error Memory Space + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferBase|0xFF610= 000 + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferSize|0x20000 +!endif + +!ifdef EDK2_ENABLE_DMC620_MM + ## 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 p= rocessed by compilation @@ -119,6 +138,12 @@ StandaloneMmPkg/Core/StandaloneMmCore.inf =20 [Components.AARCH64] +!ifdef EDK2_ENABLE_GHES_MM + ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceStandaloneMm.= inf +!endif +!ifdef EDK2_ENABLE_DMC620_MM + Platform/ARM/Drivers/Dmc620Mm/Dmc620Mm.inf +!endif StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf =20 ########################################################################= ########################### diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf b/Platform/ARM/= SgiPkg/PlatformStandaloneMm.fdf index 5a0772cd8522..8eab45e35a8a 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf @@ -48,6 +48,12 @@ READ_STATUS =3D TRUE READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE =20 +!ifdef EDK2_ENABLE_GHES_MM + INF ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceStandalon= eMm.inf +!endif +!ifdef EDK2_ENABLE_DMC620_MM + INF Platform/ARM/Drivers/Dmc620Mm/Dmc620Mm.inf +!endif INF StandaloneMmPkg/Core/StandaloneMmCore.inf INF StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.in= f =20 diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/Sg= iPlatform.fdf index 546021a8bf33..42dfdd06b003 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -164,10 +164,22 @@ READ_LOCK_STATUS =3D TRUE # MM Communicate INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf =20 + # Hest Error Source Support +!ifdef EDK2_ENABLE_HEST + INF ArmPlatformPkg/Drivers/Apei/HestDxe/HestDxe.inf +!endif +!ifdef EDK2_ENABLE_GHES_MM + INF ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSourceDxe.inf +!endif + # # Platform driver # +!ifdef EDK2_ENABLE_GHES_MM + INF Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxeMm.inf +!else INF Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +!endif =20 # # Bds --=20 2.17.1