public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chao Li" <lichao@loongson.cn>
To: devel@edk2.groups.io
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Zhiguang Liu <zhiguang.liu@intel.com>
Subject: [PATCH v2 3/3] MdePkg: Added serveral tables to MATD used by LoongArch64
Date: Sun, 29 Jan 2023 18:20:17 +0800	[thread overview]
Message-ID: <20230129102017.3763122-4-lichao@loongson.cn> (raw)
In-Reply-To: <20230129102017.3763122-1-lichao@loongson.cn>

Add CORE_PIC, LIO_PIC, HT_PIC, EIO_PIC, MSI_PIC, BIO_PIC and LPC_PIC
tables for LoongArch64 as defined in ACPI SPEC 6.5.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4306

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>
---
 MdePkg/Include/IndustryStandard/Acpi65.h | 95 +++++++++++++++++++++++-
 1 file changed, 94 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/Acpi65.h b/MdePkg/Include/IndustryStandard/Acpi65.h
index fdca5316a9..1e41ae9a27 100644
--- a/MdePkg/Include/IndustryStandard/Acpi65.h
+++ b/MdePkg/Include/IndustryStandard/Acpi65.h
@@ -303,7 +303,7 @@ typedef struct {
 
 //
 // Multiple APIC Description Table APIC structure types
-// All other values between 0x10 and 0x7F are reserved and
+// All other values between 0x18 and 0x7F are reserved and
 // will be ignored by OSPM. 0x80 ~ 0xFF are reserved for OEM.
 //
 #define EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC           0x00
@@ -323,6 +323,13 @@ typedef struct {
 #define EFI_ACPI_6_5_GICR                           0x0E
 #define EFI_ACPI_6_5_GIC_ITS                        0x0F
 #define EFI_ACPI_6_5_MULTIPROCESSOR_WAKEUP          0x10
+#define EFI_ACPI_6_5_CORE_PIC                       0x11
+#define EFI_ACPI_6_5_LIO_PIC                        0x12
+#define EFI_ACPI_6_5_HT_PIC                         0x13
+#define EFI_ACPI_6_5_EIO_PIC                        0x14
+#define EFI_ACPI_6_5_MSI_PIC                        0x15
+#define EFI_ACPI_6_5_BIO_PIC                        0x16
+#define EFI_ACPI_6_5_LPC_PIC                        0x17
 
 //
 // APIC Structure Definitions
@@ -617,6 +624,92 @@ typedef struct {
 #define EFI_ACPI_6_5_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_NOOP    0x0000
 #define EFI_ACPI_6_5_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_WAKEUP  0x0001
 
+///
+/// Core Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT32    ProcessorId;
+  UINT32    CoreId;
+  UINT32    Flags;
+} EFI_ACPI_6_5_CORE_PIC_STRUCTURE;
+
+///
+/// Legacy I/O Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT64    Address;
+  UINT16    Size;
+  UINT8     Cascade[2];
+  UINT32    CascadeMap[2];
+} EFI_ACPI_6_5_LIO_PIC_STRUCTURE;
+
+///
+/// HyperTransport Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT64    Address;
+  UINT16    Size;
+  UINT8     Cascade[8];
+} EFI_ACPI_6_5_HT_PIC_STRUCTURE;
+
+///
+/// Extend I/O Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT8     Cascade;
+  UINT8     Node;
+  UINT64    NodeMap;
+} EFI_ACPI_6_5_EIO_PIC_STRUCTURE;
+
+///
+/// MSI Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT64    MsgAddress;
+  UINT32    Start;
+  UINT32    Count;
+} EFI_ACPI_6_5_MSI_PIC_STRUCTURE;
+
+///
+/// Bridge I/O Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT64    Address;
+  UINT16    Size;
+  UINT16    Id;
+  UINT16    GsiBase;
+} EFI_ACPI_6_5_BIO_PIC_STRUCTURE;
+
+///
+/// Low Pin Count Programmable Interrupt Controller
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Length;
+  UINT8     Version;
+  UINT64    Address;
+  UINT16    Size;
+  UINT8     Cascade;
+} EFI_ACPI_6_5_LPC_PIC_STRUCTURE;
+
 ///
 /// Smart Battery Description Table (SBST)
 ///
-- 
2.27.0


  parent reply	other threads:[~2023-01-29 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 10:20 [PATCH v2 0/3] Add ACPI 6.5 header Chao Li
2023-01-29 10:20 ` [PATCH v2 1/3] MdePkg: Add Acpi65.h to IgnoreFiles area Chao Li
2023-01-29 10:20 ` [PATCH v2 2/3] MdePkg: Add ACPI 6.5 header Chao Li
2023-01-29 10:20 ` Chao Li [this message]
2023-01-30  0:55 ` 回复: [PATCH v2 0/3] " gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230129102017.3763122-4-lichao@loongson.cn \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox