Provide DxeIpl platform implementation-specifc library for RISC-V platform. Two libraries are provided in this commit, * Defualt library which simply switch stack and transfer control to DXE core. * Switch stack, privilege mode and then transfer control to DXE core through RISC-V opensbi.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abner Chang <abner.ch...@hpe.com> --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 9 ++++++++- MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c | 11 ++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index ea79536..b4c35e5 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -6,7 +6,7 @@ # needed to run the DXE Foundation. # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -# Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -68,6 +68,9 @@ [Packages.ARM, Packages.AARCH64] ArmPkg/ArmPkg.dec +[Packages.RISCV64] + RiscVPkg/RiscVPkg.dec + [LibraryClasses] PcdLib MemoryAllocationLib @@ -86,6 +89,10 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmLib +[LibraryClasses.RISCV64] + RiscVPlatformDxeIplLib + RiscVOpensbiLib + [Ppis] gEfiDxeIplPpiGuid ## PRODUCES gEfiPeiDecompressPpiGuid ## PRODUCES diff --git a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c index 2d5c7b9..934dfa5 100644 --- a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c @@ -1,7 +1,7 @@ /** @file RISC-V specific functionality for DxeLoad. - Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> + Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -13,6 +13,7 @@ **/ #include "DxeIpl.h" +#include "Library/RiscVPlatformDxeIpl.h" typedef VOID* @@ -70,10 +71,6 @@ HandOffToDxeCore ( // // Transfer the control to the entry point of DxeCore. // - SwitchStack ( - (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint, - HobList.Raw, - NULL, - TopOfStack - ); + RiscVPlatformHandOffToDxeCore (BaseOfStack, TopOfStack, DxeCoreEntryPoint, HobList); } + -- 2.7.4 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46418): https://edk2.groups.io/g/devel/message/46418 Mute This Topic: https://groups.io/mt/33043362/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-