diff options
Diffstat (limited to 'source/include/actbl2.h')
-rw-r--r-- | source/include/actbl2.h | 90 |
1 files changed, 78 insertions, 12 deletions
diff --git a/source/include/actbl2.h b/source/include/actbl2.h index 6dc2efd0c..9b2812a0f 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -192,6 +192,7 @@ #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ +#define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ @@ -230,7 +231,6 @@ typedef struct acpi_table_aest { ACPI_TABLE_HEADER Header; - void *NodeArray[]; } ACPI_TABLE_AEST; @@ -572,7 +572,7 @@ typedef struct acpi_iort_node UINT32 Identifier; UINT32 MappingCount; UINT32 MappingOffset; - char NodeData[1]; + char NodeData[]; } ACPI_IORT_NODE; @@ -638,7 +638,7 @@ typedef struct acpi_iort_memory_access typedef struct acpi_iort_its_group { UINT32 ItsCount; - UINT32 Identifiers[1]; /* GIC ITS identifier array */ + UINT32 Identifiers[]; /* GIC ITS identifier array */ } ACPI_IORT_ITS_GROUP; @@ -648,7 +648,7 @@ typedef struct acpi_iort_named_component UINT32 NodeFlags; UINT64 MemoryProperties; /* Memory access properties */ UINT8 MemoryAddressLimit; /* Memory address size limit */ - char DeviceName[1]; /* Path of namespace object */ + char DeviceName[]; /* Path of namespace object */ } ACPI_IORT_NAMED_COMPONENT; @@ -664,7 +664,7 @@ typedef struct acpi_iort_root_complex UINT32 PciSegmentNumber; UINT8 MemoryAddressLimit; /* Memory address size limit */ UINT16 PasidCapabilities; /* PASID Capabilities */ - UINT8 Reserved[1]; /* Reserved, must be zero */ + UINT8 Reserved[]; /* Reserved, must be zero */ } ACPI_IORT_ROOT_COMPLEX; @@ -688,7 +688,7 @@ typedef struct acpi_iort_smmu UINT32 ContextInterruptOffset; UINT32 PmuInterruptCount; UINT32 PmuInterruptOffset; - UINT64 Interrupts[1]; /* Interrupt array */ + UINT64 Interrupts[]; /* Interrupt array */ } ACPI_IORT_SMMU; @@ -1135,7 +1135,8 @@ enum AcpiMadtType ACPI_MADT_TYPE_MSI_PIC = 21, ACPI_MADT_TYPE_BIO_PIC = 22, ACPI_MADT_TYPE_LPC_PIC = 23, - ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */ + ACPI_MADT_TYPE_RINTC = 24, + ACPI_MADT_TYPE_RESERVED = 25, /* 25 to 0x7F are reserved */ ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */ }; @@ -1240,7 +1241,7 @@ typedef struct acpi_madt_local_sapic UINT8 Reserved[3]; /* Reserved, must be zero */ UINT32 LapicFlags; UINT32 Uid; /* Numeric UID - ACPI 3.0 */ - char UidString[1]; /* String UID - ACPI 3.0 */ + char UidString[]; /* String UID - ACPI 3.0 */ } ACPI_MADT_LOCAL_SAPIC; @@ -1548,11 +1549,29 @@ enum AcpiMadtLpcPicVersion { ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ }; +/* 24: RISC-V INTC */ +struct acpi_madt_rintc { + ACPI_SUBTABLE_HEADER Header; + UINT8 Version; + UINT8 Reserved; + UINT32 Flags; + UINT64 HartId; + UINT32 Uid; /* ACPI processor UID */ +}; + +/* Values for RISC-V INTC Version field above */ + +enum AcpiMadtRintcVersion { + ACPI_MADT_RINTC_VERSION_NONE = 0, + ACPI_MADT_RINTC_VERSION_V1 = 1, + ACPI_MADT_RINTC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + /* 80: OEM data */ typedef struct acpi_madt_oem_data { - UINT8 OemData[0]; + ACPI_FLEX_ARRAY(UINT8, OemData); } ACPI_MADT_OEM_DATA; @@ -2045,7 +2064,7 @@ typedef struct acpi_nfit_interleave UINT16 Reserved; /* Reserved, must be zero */ UINT32 LineCount; UINT32 LineSize; - UINT32 LineOffset[1]; /* Variable length */ + UINT32 LineOffset[]; /* Variable length */ } ACPI_NFIT_INTERLEAVE; @@ -2056,7 +2075,7 @@ typedef struct acpi_nfit_smbios { ACPI_NFIT_HEADER Header; UINT32 Reserved; /* Reserved, must be zero */ - UINT8 Data[1]; /* Variable length */ + UINT8 Data[]; /* Variable length */ } ACPI_NFIT_SMBIOS; @@ -2122,7 +2141,7 @@ typedef struct acpi_nfit_flush_address UINT32 DeviceHandle; UINT16 HintCount; UINT8 Reserved[6]; /* Reserved, must be zero */ - UINT64 HintAddress[1]; /* Variable length */ + UINT64 HintAddress[]; /* Variable length */ } ACPI_NFIT_FLUSH_ADDRESS; @@ -3259,6 +3278,53 @@ enum AcpiRgrtImageType /******************************************************************************* * + * RHCT - RISC-V Hart Capabilities Table + * Version 1 + * + ******************************************************************************/ + +typedef struct acpi_table_rhct { + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT32 Reserved; + UINT64 TimeBaseFreq; + UINT32 NodeCount; + UINT32 NodeOffset; +} ACPI_TABLE_RHCT; + +/* + * RHCT subtables + */ +typedef struct acpi_rhct_node_header { + UINT16 Type; + UINT16 Length; + UINT16 Revision; +} ACPI_RHCT_NODE_HEADER; + +/* Values for RHCT subtable Type above */ + +enum acpi_rhct_node_type { + ACPI_RHCT_NODE_TYPE_ISA_STRING = 0x0000, + ACPI_RHCT_NODE_TYPE_HART_INFO = 0xFFFF, +}; + +/* + * RHCT node specific subtables + */ + +/* ISA string node structure */ +typedef struct acpi_rhct_isa_string { + UINT16 IsaLength; + char Isa[]; +} ACPI_RHCT_ISA_STRING; + +/* Hart Info node structure */ +typedef struct acpi_rhct_hart_info { + UINT16 NumOffsets; + UINT32 Uid; /* ACPI processor UID */ +} ACPI_RHCT_HART_INFO; + +/******************************************************************************* + * * SBST - Smart Battery Specification Table * Version 1 * |