diff options
author | Sughosh Ganu <sughosh.ganu@arm.com> | 2018-12-28 17:18:03 +0530 |
---|---|---|
committer | Thomas Abraham <thomas.abraham@arm.com> | 2020-04-15 21:22:49 +0530 |
commit | 402eb98cad232b8e5c1ad179e93ddc775e684503 (patch) | |
tree | d2c7f990101d95fd274da19bad976ac392bc50e8 | |
parent | fb0a6555e0a90ba4d6200fe5541c2bd10a9756e5 (diff) |
PlatformDxe: Apei: Get error source information from StandaloneMM
Call apei driver to get error source information from
StandaloneMM and use the retrieved information to update the HEST
table.
Since the PlatformDxe driver relies on the apei driver to get the
error information, add a dependency in the PlatformDxe.inf to have the
apei driver loaded prior to loading the PlatformDxe driver.
Change-Id: I313d71f71e0ba4b405eab9568ede5a6812d5e215
Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
-rw-r--r-- | Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 19 | ||||
-rw-r--r-- | Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 5 |
2 files changed, 22 insertions, 2 deletions
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 2f72e715..675a10d3 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -9,6 +9,10 @@ #include <Library/AcpiLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#include <Protocol/Apei.h>
+
#include <SgiPlatform.h>
VOID
@@ -23,6 +27,7 @@ ArmSgiPkgEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
+ EFI_APEI_PROTOCOL *ApeiProtocol;
EFI_STATUS Status;
Status = LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid);
@@ -31,7 +36,19 @@ ArmSgiPkgEntryPoint ( return Status;
}
+ // Update ACPI table with available Error Source information
+ // Continue booting if MM is not enabled.
+ Status = gBS->LocateProtocol (&gEfiApeiProtocolGuid, NULL, (VOID **) &ApeiProtocol);
+ if (!EFI_ERROR (Status)) {
+ Status = ApeiProtocol->UpdateApei (ApeiProtocol, EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_INFO, "PlatformDxe: Failed to update \n"));
+ }
+ } else {
+ DEBUG ((DEBUG_INFO, "PlatformDxe: Failed to locate APEI protocol\n"));
+ }
+
InitVirtioDevices ();
- return Status;
+ return EFI_SUCCESS;
}
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf index 9d89314a..dda4c31f 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf @@ -32,6 +32,9 @@ gArmSgiPlatformIdDescriptorGuid
gArmSgiAcpiTablesGuid
+[Protocols]
+ gEfiApeiProtocolGuid
+
[FeaturePcd]
gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
gArmSgiTokenSpaceGuid.PcdVirtioNetSupported
@@ -43,4 +46,4 @@ gArmSgiTokenSpaceGuid.PcdVirtioNetSize
[Depex]
- TRUE
+ gEfiApeiProtocolGuid
|