diff options
author | Chao Li <lichao@loongson.cn> | 2024-01-08 11:32:53 +0800 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2024-02-06 23:51:47 +0800 |
commit | f560c5d112905a87da9de31a011098607c390f63 (patch) | |
tree | 967d5f8fed41586b3bf51d694ce8353e39ad73d5 | |
parent | 3f8fb8aeb9e7e66e0f03b3eb9c140d4168dbd707 (diff) | |
download | edk2-f560c5d112905a87da9de31a011098607c390f63.tar.gz |
MdePkg: Add some comments for LoongArch exceptions
Added some comments for registing LoongArch exceptions.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584
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>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
-rw-r--r-- | MdePkg/Include/Protocol/DebugSupport.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/MdePkg/Include/Protocol/DebugSupport.h b/MdePkg/Include/Protocol/DebugSupport.h index 9742663619..06f99ba7f7 100644 --- a/MdePkg/Include/Protocol/DebugSupport.h +++ b/MdePkg/Include/Protocol/DebugSupport.h @@ -683,6 +683,20 @@ typedef struct { //
// LoongArch processor exception types.
//
+// The exception types is located in the CSR ESTAT
+// register offset 16 bits, width 6 bits.
+//
+// If you want to register an exception hook, you can
+// shfit the number left by 16 bits, and the exception
+// handler will know the types.
+//
+// For example:
+// mCpu->CpuRegisterInterruptHandler (
+// mCpu,
+// (EXCEPT_LOONGARCH_PPI << CSR_ESTAT_EXC_SHIFT),
+// PpiExceptionHandler
+// );
+//
#define EXCEPT_LOONGARCH_INT 0
#define EXCEPT_LOONGARCH_PIL 1
#define EXCEPT_LOONGARCH_PIS 2
|