From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3B5C6D80A5F for ; Tue, 30 Apr 2024 12:02:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=EH32CfavMa5rrSJnE/eWPTVxsJcJVNfrnyrYS2jyfBU=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1714478543; v=1; b=WtqxQaXQydqyQC1qhuSvN0S65fxuw2Oz3rgn8+he5pKrbg8nETn/A6Dmz/OGiY9j/EY1WXAA fc+0uhlQsnnQh9LEbCfHnxAEYst0EvBvktG+UkKM6ET6tL/TEl8PQruHGCrTPhj7ECEDyC/nj6E +RCi89FsmQf2Esaqvzl646KNBzzod1+mUVHjzKBfGGFUy1Z6DiH+iLW0hBKSc5RvFfGUJRDb2mb s9mUHdosH55qrNWZumU70b7n9k6zfCQHoRpagauz1dsS8GByOUpCdIx3h64AJ75+kGtmAm9tM6K Lrm+uFe5C6/HdqxTBfxHhcSXLoutCIcLyTbpvRKMAgwTg== X-Received: by 127.0.0.2 with SMTP id 2fq5YY7687511x1JbgpK6lWA; Tue, 30 Apr 2024 05:02:23 -0700 X-Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web10.13607.1714478542725303934 for ; Tue, 30 Apr 2024 05:02:22 -0700 X-Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1e2c725e234so50692155ad.1 for ; Tue, 30 Apr 2024 05:02:22 -0700 (PDT) X-Gm-Message-State: 1f6NBjHEkLlBsUGk5f3mx5Egx7686176AA= X-Google-Smtp-Source: AGHT+IFPFd1LYqPQYiO8cxh8uOWTwW0+jUQRvhQuxeb+XSSICWPnRBWhfJJSFAtdEa1WOGvSEwXauA== X-Received: by 2002:a17:902:d4c1:b0:1ea:657f:318f with SMTP id o1-20020a170902d4c100b001ea657f318fmr3973343plg.0.1714478541039; Tue, 30 Apr 2024 05:02:21 -0700 (PDT) X-Received: from sunil-laptop ([106.51.188.106]) by smtp.gmail.com with ESMTPSA id g2-20020a170902934200b001e25da6f2f2sm22152103plp.68.2024.04.30.05.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:02:20 -0700 (PDT) Date: Tue, 30 Apr 2024 17:32:15 +0530 From: "Sunil V L" To: devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: dylanlhdu Subject: Re: [edk2-devel] [PATCH] Added support for ACPI related data structures for RISC_V64 platform Message-ID: References: <20240429095355.1009-1-gaoliming@byosoft.com.cn> MIME-Version: 1.0 In-Reply-To: <20240429095355.1009-1-gaoliming@byosoft.com.cn> 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 Resent-Date: Tue, 30 Apr 2024 05:02:22 -0700 Resent-From: sunilvl@ventanamicro.com Reply-To: devel@edk2.groups.io,sunilvl@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=WtqxQaXQ; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none Hi Lingheng Du, What is the use of adding this header file and how did you create it? I think EDK2 needs ACPI spec to be released to get these definitions added. Also, these are not part of 6.5 and hence names like EFI_ACPI_6_5* are incorrect. So, it will be helpful if you add some commit message why do we need this header. Thanks, Sunil On Mon, Apr 29, 2024 at 05:53:55PM +0800, gaoliming via groups.io wrote: > From: dylanlhdu > > Signed-off-by: Lingheng Du > Reviewed-by: Song Huang > Reviewed-by: Bing Fan > --- > .../Include/IndustryStandard/AcpiRiscv64.h | 176 ++++++++++++++++++ > 1 file changed, 176 insertions(+) > create mode 100644 edk2/MdePkg/Include/IndustryStandard/AcpiRiscv64.h > > diff --git a/edk2/MdePkg/Include/IndustryStandard/AcpiRiscv64.h b/edk2/MdePkg/Include/IndustryStandard/AcpiRiscv64.h > new file mode 100644 > index 00000000..4111b3ea > --- /dev/null > +++ b/edk2/MdePkg/Include/IndustryStandard/AcpiRiscv64.h > @@ -0,0 +1,176 @@ > +/** @file > + RISCV64 platform ACPI related support April, 2022. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#ifndef ACPI_RISCV64_H_ > +#define ACPI_RISCV64_H_ > + > +// > +// Ensure proper structure formats > +// > +#pragma pack(1) > + > +/// > +/// RISC-V Interrupt Type > +/// > +#define EFI_ACPI_6_5_INC_RINTC_TYPE 0x18 > +#define EFI_ACPI_6_5_INC_IMSIC_TYPE 0x19 > +#define EFI_ACPI_6_5_INC_APLIC_TYPE 0x1A > +#define EFI_ACPI_6_5_INC_PLIC_TYPE 0x1B > + > +/// > +/// RISC-V Interrupt Controller (RINTC) > +/// > +typedef struct { > + UINT8 Type; > + UINT8 Length; > + UINT8 Version; > + UINT8 Reserved; > + UINT32 Flags; > + UINT64 HartId; > + UINT32 Uid; > + UINT32 ExtIntcId; > + UINT64 ImsicAddr; > + UINT32 ImsicSize; > +} EFI_ACPI_6_5_INC_RINTC_STRUCTURE; > + > +/// > +/// Incoming MSI Controller (IMSIC) > +/// > +typedef struct { > + UINT8 Type; > + UINT8 Length; > + UINT8 Version; > + UINT8 Reserved; > + UINT32 Flags; > + UINT16 NumIds; > + UINT16 NumGuestIds; > + UINT8 GuestIndexBits; > + UINT8 HartIndexBits; > + UINT8 GroupIndexBits; > + UINT8 GroupIndexShift; > +} EFI_ACPI_6_5_INC_IMSIC_STRUCTURE; > + > +/// > +/// RISC-V Advanced Platform Level Interrupt Controller (APLIC) > +/// > +typedef struct { > + UINT8 Type; > + UINT8 Length; > + UINT8 Version; > + UINT8 AplicId; > + UINT32 Flags; > + UINT8 HW_ID[8]; > + UINT16 NumIdc; > + UINT16 ExternSoureceSupport; > + UINT32 GSysInterruptBase; > + UINT64 AplicAddress; > + UINT32 AplicSize; > +} EFI_ACPI_6_5_INC_APLIC_STRUCTURE; > + > +/// > +/// RISC-V Platform Level Interrupt Controller (PLIC) > +/// > +typedef struct { > + UINT8 Type; > + UINT8 Length; > + UINT8 Version; > + UINT8 PlicId; > + UINT8 HwId[8]; > + UINT16 NumIrqs; > + UINT16 MaxPrio; > + UINT32 Flags; > + UINT32 PlicSize; > + UINT64 PlicAddress; > + UINT32 GsiBase; > +} EFI_ACPI_6_5_INC_PLIC_STRUCTURE; > + > +/// > +/// RISC-V Hart Capabilities Table (RHCT) > +/// > +typedef struct { > + EFI_ACPI_DESCRIPTION_HEADER Header; > +} EFI_ACPI_6_5_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER; > + > +/// > +/// RHCT Revision > +/// > +#define EFI_ACPI_6_5_RHCT_APIC_DESCRIPTION_TABLE_REVISION 0x05 > + > +/// > +/// RHCT types > +/// > +#define EFI_ACPI_6_5_NODE_ISA_TYPE 0x0 > +#define EFI_ACPI_6_5_NODE_CM0_TYPE 0x1 > +#define EFI_ACPI_6_5_NODE_MMU_TYPE 0x2 > +#define EFI_ACPI_6_5_NODE_RESERVED_TYPE 0x3 > +#define EFI_ACPI_6_5_NODE_HART_TYPE 0xFFFF > + > +/// > +/// RHCT Flags > +/// > +#define ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU (1) > + > +/// > +/// ISA string node > +/// > +typedef struct { > + UINT16 Type; > + UINT16 Length; > + UINT16 Revision; > + UINT16 IsaLength; > + UINT8 IsaString[]; > +} EFI_ACPI_6_5_NODE_ISA_STRING_STRUCTURE; > + > +/// > +/// CM0 node > +/// > +typedef struct { > + UINT16 Type; > + UINT16 Length; > + UINT16 Revision; > + UINT8 Reserved; > + UINT8 CbomSize; > + UINT8 CbopSize; > + UINT8 CbozSize; > +} EFI_ACPI_6_5_NODE_CM0_STRUCTURE; > + > +/// > +/// MMU node > +/// > +typedef struct { > + UINT16 Type; > + UINT16 Length; > + UINT16 Revision; > + UINT8 Reserved; > + UINT8 MmuType; > +} EFI_ACPI_6_5_NODE_MMU_STRUCTURE; > + > +/// > +/// MMU type > +/// > +#define EFI_ACPI_6_5_MMU_SV39_TYPE 0x0 > +#define EFI_ACPI_6_5_MMU_SV48_TYPE 0x1 > +#define EFI_ACPI_6_5_MMU_SV57_TYPE 0x2 > + > +/// > +/// Hart Info Node > +/// > +typedef struct { > + UINT16 Type; > + UINT16 Length; > + UINT16 Revision; > + UINT16 NumOffsets; > + UINT32 Uid; > +} EFI_ACPI_6_5_NODE_HARTINFO_STRUCTURE; > + > +/// > +/// "RHCT" RISC-V Hart Capabilities Table > +/// > +#define EFI_ACPI_6_5_RHCT_HART_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'H', 'C', 'T') > + > +#pragma pack() > + > +#endif > \ No newline at end of file > -- > 2.34.1 > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118437): https://edk2.groups.io/g/devel/message/118437 Mute This Topic: https://groups.io/mt/105797514/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-