From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AA418740032 for ; Fri, 2 Feb 2024 02:28:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=aOlng9krKlt+6ixT0RwQ9apnt4ptiAqSHkPTcDiUreE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706840896; v=1; b=WsLqOZ+QdQEoYCOR1DXeqx2gKJ6TQVmsFga2+864u7jndRVejdOR4mI1Kdq35mkiLCYAU/Lt KeabkIAajrcH/04ezqhRdVDlmlYzvAwhNsbSsU1GN9F0ZbGaMEFLpwC+uC9pz6YG1VVU3TJDa9+ rMBhKqYWYI5mn8PuAoaY/D9A= X-Received: by 127.0.0.2 with SMTP id 0dy4YY7687511xyR6ZxbrPlj; Thu, 01 Feb 2024 18:28:16 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.14286.1706840895389001869 for ; Thu, 01 Feb 2024 18:28:15 -0800 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8BxXes8U7xlTfgJAA--.28801S3; Fri, 02 Feb 2024 10:28:12 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx_c47U7xlXscsAA--.40441S2; Fri, 02 Feb 2024 10:28:11 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH v1 10/19] MdePkg: Add some comments for LoongArch exceptions Date: Fri, 2 Feb 2024 10:28:10 +0800 Message-Id: <20240202022810.2445018-1-lichao@loongson.cn> In-Reply-To: <20240202022637.2444159-1-lichao@loongson.cn> References: <20240202022637.2444159-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx_c47U7xlXscsAA--.40441S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAOCGW7VmEFUQBbsh X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QK3ystIqwRH4jtMDidQ2EMWFx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=WsLqOZ+Q; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Added some comments for registing LoongArch exceptions. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/DebugSupport.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.27.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114995): https://edk2.groups.io/g/devel/message/114995 Mute This Topic: https://groups.io/mt/104112131/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-