UefiPayloadPkg: Add library for logging to EC

Make use of the SMFI command interface to forward logs from edk2 to
System76 EC.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Jeremy Soller
2020-04-17 10:45:17 -06:00
committed by Tim Crawford
parent 9030464a1b
commit 9daa69a59e
4 changed files with 199 additions and 4 deletions

View File

@@ -32,6 +32,11 @@
DEFINE PLATFORM_BOOT_TIMEOUT = 2
#
# Send logs to System76 EC
#
DEFINE SYSTEM76_EC_LOGGING = FALSE
#
# SBL: UEFI payload for Slim Bootloader
# COREBOOT: UEFI payload for coreboot
@@ -220,11 +225,16 @@
#
TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
ResetSystemLib|UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
!if $(UNIVERSAL_PAYLOAD) == TRUE
PlatformHookLib|UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
!if $(SYSTEM76_EC_LOGGING) == TRUE
SerialPortLib|UefiPayloadPkg/Library/System76EcLib/System76EcLib.inf
PlatformHookLib|UefiPayloadPkg/Library/System76EcLib/System76EcLib.inf
!else
PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
!if $(UNIVERSAL_PAYLOAD) == TRUE
PlatformHookLib|UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
!else
PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
!endif
!endif
PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf