From: qinhaijun <qinhai...@eswincomputing.com> The privileged mode of next booting stage is forced to S-mode,there change it getting from PcdPeiCorePrivilegeMode PCD.
Signed-off-by: qinhaijun <qinhai...@eswincomputing.com> --- Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c index c488f03a6a..750d27567d 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c +++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c @@ -488,7 +488,7 @@ PeiCore ( // Scratch->next_arg1 is the device tree. // Scratch->next_addr = (UINTN)(PeiCoreEntryPoint); - Scratch->next_mode = PRV_S; + Scratch->next_mode = FixedPcdGet32(PcdPeiCorePrivilegeMode); DEBUG ((DEBUG_INFO, "%a: Initializing OpenSBI library for booting hart %d\n", __FUNCTION__, BootHartId)); sbi_init (Scratch); } @@ -728,6 +728,6 @@ SecCoreStartUpWithStack ( // Non boot hart wiil be halted waiting for SBI_HART_STARTING. // Use HSM ecall to start non boot hart (SBI_EXT_HSM_HART_START) later on, // - Scratch->next_mode = PRV_S; + Scratch->next_mode = FixedPcdGet32(PcdPeiCorePrivilegeMode); sbi_init (Scratch); } -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100908): https://edk2.groups.io/g/devel/message/100908 Mute This Topic: https://groups.io/mt/97490102/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-