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 C84EC740039 for ; Fri, 26 Jan 2024 06:29:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=szN1Z698GXiinPuIE9T9kcybg70GhLlDwz4jtu52OZU=; 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=1706250540; v=1; b=aCidPKKDwInDlKwmUFwxoPwU1tZ+eMz1UwDHXpl5aYdHJzEkib6M44SPDPqg1QoEjRT1cwBp PPXIPMYYzyz82jxZYFboOr8dHpcz39lAE4oGvu/x56cJzYI1bed95/h1zvkDCGlHzV+coKkrKcH KOLG4XNcLXEyjSK+2TaMjWRo= X-Received: by 127.0.0.2 with SMTP id SLmCYY7687511xODNsSMYeYv; Thu, 25 Jan 2024 22:29:00 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.9993.1706250538958962762 for ; Thu, 25 Jan 2024 22:29:00 -0800 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8Bx3+spUbNl5R0GAA--.21497S3; Fri, 26 Jan 2024 14:28:57 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHs8oUbNl9XEbAA--.52916S2; Fri, 26 Jan 2024 14:28:56 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH v8 10/37] MdePkg: Add some comments for LoongArch exceptions Date: Fri, 26 Jan 2024 14:28:55 +0800 Message-Id: <20240126062855.3101424-1-lichao@loongson.cn> In-Reply-To: <20240126062715.3099433-1-lichao@loongson.cn> References: <20240126062715.3099433-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxHs8oUbNl9XEbAA--.52916S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAICGWyG+ALOQBGsZ 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: 2tHmSP0QpJHlF7hnSy6GtIhBx7686176AA= 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=aCidPKKD; 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 (#114536): https://edk2.groups.io/g/devel/message/114536 Mute This Topic: https://groups.io/mt/103971649/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-