MdePkg: Synchronize UEFI2.11 LoongArch64 DebugSupportLib definition

Synchronize the changes about LoongArch64 in section 18.2.5 of UEFI2.11.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
Chao Li 2024-12-10 20:25:17 +08:00 committed by mergify[bot]
parent 03783393e1
commit 3c8e10c8b3
1 changed files with 37 additions and 26 deletions

View File

@ -680,23 +680,23 @@ typedef struct {
UINT32 STVAL; UINT32 STVAL;
} EFI_SYSTEM_CONTEXT_RISCV64; } EFI_SYSTEM_CONTEXT_RISCV64;
// ///
// LoongArch processor exception types. /// LoongArch processor exception types.
// ///
// The exception types is located in the CSR ESTAT /// The exception types is located in the CSR ESTAT
// register offset 16 bits, width 6 bits. /// register offset 16 bits, width 6 bits.
// ///
// If you want to register an exception hook, you can /// If you want to register an exception hook, you can
// shfit the number left by 16 bits, and the exception /// shfit the number left by 16 bits, and the exception
// handler will know the types. /// handler will know the types.
// ///
// For example: /// For example:
// mCpu->CpuRegisterInterruptHandler ( /// mCpu->CpuRegisterInterruptHandler (
// mCpu, /// mCpu,
// (EXCEPT_LOONGARCH_PPI << CSR_ESTAT_EXC_SHIFT), /// (EXCEPT_LOONGARCH_PPI << CSR_ESTAT_EXC_SHIFT),
// PpiExceptionHandler /// PpiExceptionHandler
// ); /// );
// ///
#define EXCEPT_LOONGARCH_INT 0 #define EXCEPT_LOONGARCH_INT 0
#define EXCEPT_LOONGARCH_PIL 1 #define EXCEPT_LOONGARCH_PIL 1
#define EXCEPT_LOONGARCH_PIS 2 #define EXCEPT_LOONGARCH_PIS 2
@ -716,11 +716,22 @@ typedef struct {
#define EXCEPT_LOONGARCH_SXD 16 #define EXCEPT_LOONGARCH_SXD 16
#define EXCEPT_LOONGARCH_ASXD 17 #define EXCEPT_LOONGARCH_ASXD 17
#define EXCEPT_LOONGARCH_FPE 18 #define EXCEPT_LOONGARCH_FPE 18
#define EXCEPT_LOONGARCH_TBR 64 // For code only, there is no such type in the ISA spec, the TLB refill is defined for an independent exception. #define EXCEPT_LOONGARCH_WPE 19
#define EXCEPT_LOONGARCH_BTD 20
#define EXCEPT_LOONGARCH_BTE 21
#define EXCEPT_LOONGARCH_GSPR 22
#define EXCEPT_LOONGARCH_HVC 23
#define EXCEPT_LOONGARCH_GCXC 24
// ///
// LoongArch processor Interrupt types. /// For coding convenience, define the maximum valid
// /// LoongArch exception.
///
#define MAX_LOONGARCH_EXCEPTION 64
///
/// LoongArch processor Interrupt types.
///
#define EXCEPT_LOONGARCH_INT_SIP0 0 #define EXCEPT_LOONGARCH_INT_SIP0 0
#define EXCEPT_LOONGARCH_INT_SIP1 1 #define EXCEPT_LOONGARCH_INT_SIP1 1
#define EXCEPT_LOONGARCH_INT_IP0 2 #define EXCEPT_LOONGARCH_INT_IP0 2
@ -735,11 +746,11 @@ typedef struct {
#define EXCEPT_LOONGARCH_INT_TIMER 11 #define EXCEPT_LOONGARCH_INT_TIMER 11
#define EXCEPT_LOONGARCH_INT_IPI 12 #define EXCEPT_LOONGARCH_INT_IPI 12
// ///
// For coding convenience, define the maximum valid /// For coding convenience, define the maximum valid
// LoongArch interrupt. /// LoongArch interrupt.
// ///
#define MAX_LOONGARCH_INTERRUPT 14 #define MAX_LOONGARCH_INTERRUPT 16
typedef struct { typedef struct {
UINT64 R0; UINT64 R0;