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 9F3DD7803D7 for ; Thu, 9 May 2024 09:06:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=CdKUtAVrVC9+pgbq1bdzlHt9ede1C18L5OqPP9cIAsE=; c=relaxed/simple; d=groups.io; h=From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index: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-Transfer-Encoding:Content-Language; s=20240206; t=1715245582; v=1; b=Kr40IN3thERfKxVBM8zdo1/iDCxdeiQ89BhOa35YVlBQQHm408j4XpO31Wbu6mC8BcCFXkTB qJASpoZVgfL15FngKEHj4WNhibpJzZEjR5I2ZCwPNIuQawQ12UFQTDhM1ZmZ3+DiXc9s6aib3uI PPbkNSkLiCLksROUdeCWI+TiFBkDOn5Ay8Qo4MepWqSagJfoIdSSiMWCSotmYpHfXJM/cM+CvYS 7ZUsPzr7peIQia+j4kI5b2z/BfEHxp+Uw+gcJCrlXvUJLT8oTvqwpNaVWMdMRLscDWWPtvZDNjh WqmY+pvGvKVT3/0rQnPoc6OrHSKFdlAbzH06UifYTincg== X-Received: by 127.0.0.2 with SMTP id v4mMYY7687511xjUCxGzqaK3; Thu, 09 May 2024 02:06:22 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web11.5682.1715245580663196459 for ; Thu, 09 May 2024 02:06:21 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 04618DDA7BF for ; Thu, 9 May 2024 17:06:16 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id F3D39DDA798 for ; Thu, 9 May 2024 17:06:15 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id 1BA38DDA78C for ; Thu, 9 May 2024 17:06:06 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Thu, 09 May 2024 17:06:03 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , =?utf-8?B?J2R5bGFubGhkdSjmnZzmnpfmgZIpJw==?= References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiDlm57lpI3vvJpbSW50ZXJuZXRdUmU6IFtlZGsyLWRldmVsXSBbUEFUQ0hdIEFkZGVkIHN1cHBvcnQgZm9yIEFDUEkgcmVsYXRlZCBkYXRhIHN0cnVjdHVyZXMgZm9yIFJJU0NfVjY0IHBsYXRmb3Jt?= Date: Thu, 9 May 2024 17:06:06 +0800 Message-ID: <011901daa1f0$201d1210$60573630$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQIHajWs4Tl3QSsH9X3NZWQQly1PIADmAfLosS3ahyA= 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: Thu, 09 May 2024 02:06:21 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: V2JlKXvRzpi9oELh1jzl0nbex7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Kr40IN3t; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io MdePkg includes the definitions from the public specification.=20 Those definitions are the implement related definition. So, they should be = added into RISC-V platform package instead of MdePkg. Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Sunil V L > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B45=E6=9C=889=E6=97=A5 1= 6:36 > =E6=94=B6=E4=BB=B6=E4=BA=BA: dylanlhdu(=E6=9D=9C=E6=9E=97=E6=81=92) > =E6=8A=84=E9=80=81: devel ; gaoliming > =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D=EF=BC=9A[Internet]Re: [edk2-de= vel] [PATCH] Added support for ACPI > related data structures for RISC_V64 platform >=20 > On Mon, May 06, 2024 at 10:54:45AM +0800, dylanlhdu(=E6=9D=9C=E6=9E=97=E6= =81=92) wrote: > > Hi Sunil, > > > > > > > > We mainly want to use UEFI+ACPI mode to start RISCV64 server. However, > during the development process, we found that ACPI(6.5) in the current ve= rsion > of UEFI does not support riscv for the time being. In order to solve this= problem, > We refer to the upstream RISC-V ACPI platform specification provided by V= entana > to implement RISC-V ACPI support, so adding this header file can make ACP= I > support RISCV architecture until the new version of ACPI specification su= pports > RISCV architecture. > > > Understood. But adding as 6_5* doesn't make sense. >=20 > I will let maintainers of MdePkg to comment. I don't know > whether they can accept approved ECRs but not yet released spec. >=20 > Thanks, > Sunil >=20 > > > > > > > > > > > > > > Thanks > > > > > > > > > > =E5=8F=91=E8=87=AA=E6=88=91=E7=9A=84=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF= =A1 > > > > > > > > > > > > ----------=E5=9B=9E=E5=A4=8D=E7=9A=84=E9=82=AE=E4=BB=B6=E4= =BF=A1=E6=81=AF---------- > > Sunil V L 20:02 =E5=86=99=E9=81=93=EF=BC=9A > > > > 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 (AP= LIC) > > > +/// > > > +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 > > > > > > > > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118758): https://edk2.groups.io/g/devel/message/118758 Mute This Topic: https://groups.io/mt/105997809/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-