Check Coldboot or Warmboot hart in SEC OpenSBI platform function. Cc: Sunil V L <suni...@ventanamicro.com> Cc: Daniel Schaefer <daniel.schae...@hpe.com>
Signed-off-by: Abner Chang <abner.ch...@hpe.com> --- .../RISC-V/PlatformPkg/Universal/Sec/SecMain.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c index 51d9edfe75..9b162fb3b6 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c @@ -398,6 +398,13 @@ SecPostOpenSbiPlatformEarlylInit( IN BOOLEAN ColdBoot ) { + UINT32 HartId; + + if (!ColdBoot) { + HartId = current_hartid(); + DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId)); + return 0; + } // // Boot HART is already in the process of OpenSBI initialization. // We can let other HART to keep booting. @@ -423,6 +430,12 @@ SecPostOpenSbiPlatformFinalInit ( struct sbi_platform *SbiPlatform; EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext; + if (!ColdBoot) { + HartId = current_hartid(); + DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId)); + return 0; + } + DEBUG((DEBUG_INFO, "%a: Entry, preparing to jump to PEI Core\n\n", __FUNCTION__)); SbiScratch = sbi_scratch_thishart_ptr(); @@ -777,7 +790,7 @@ VOID EFIAPI SecCoreStartUpWithStack( sbi_init(Scratch); } -void xxxx (char *debugstr, ...) +void OpensbiDebugPrint (char *debugstr, ...) { VA_LIST Marker; -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82332): https://edk2.groups.io/g/devel/message/82332 Mute This Topic: https://groups.io/mt/86435685/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-