UefiCpuPkg: Add CPU exception library for LoongArch
Added LoongArch exception handler into CpuExceptionHandlerLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# CPU Exception Handler library instance for DXE modules.
|
||||
#
|
||||
# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
@@ -18,7 +19,7 @@
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64
|
||||
# VALID_ARCHITECTURES = IA32 X64 LOONGARCH64
|
||||
#
|
||||
|
||||
[Sources.Ia32]
|
||||
@@ -32,12 +33,19 @@
|
||||
X64/ArchInterruptDefs.h
|
||||
X64/ExceptionHandlerAsm.nasm
|
||||
|
||||
[Sources.common]
|
||||
[Sources.Ia32, Sources.X64]
|
||||
CpuExceptionCommon.h
|
||||
CpuExceptionCommon.c
|
||||
DxeException.c
|
||||
PeiDxeSmmCpuException.c
|
||||
|
||||
[Sources.LoongArch64]
|
||||
LoongArch/DxeExceptionLib.c
|
||||
LoongArch/ExceptionCommon.h
|
||||
LoongArch/ExceptionCommon.c
|
||||
LoongArch/LoongArch64/ArchExceptionHandler.c
|
||||
LoongArch/LoongArch64/ExceptionHandlerAsm.S | GCC
|
||||
|
||||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList
|
||||
@@ -51,16 +59,21 @@
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
[LibraryClasses.common]
|
||||
BaseLib
|
||||
CcExitLib
|
||||
DebugLib
|
||||
LocalApicLib
|
||||
MemoryAllocationLib
|
||||
PeCoffGetEntryPointLib
|
||||
PrintLib
|
||||
SerialPortLib
|
||||
SynchronizationLib
|
||||
|
||||
[LibraryClasses.Ia32, LibraryClasses.X64]
|
||||
CcExitLib
|
||||
LocalApicLib
|
||||
|
||||
[LibraryClasses.LoongArch64]
|
||||
CpuLib
|
||||
|
||||
[BuildOptions]
|
||||
XCODE:*_*_X64_NASM_FLAGS = -D NO_ABSOLUTE_RELOCS_IN_TEXT
|
||||
|
Reference in New Issue
Block a user