import acpica-tools-20210604-5.el9

This commit is contained in:
CentOS Sources 2023-03-28 08:52:07 +00:00 committed by root
parent 4caeeb6ce7
commit 25c8782cdd
9 changed files with 764 additions and 1 deletions

View File

@ -0,0 +1,74 @@
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 11 ++++++-----
source/compiler/dttable2.c | 4 ++--
2 files changed, 8 insertions(+), 7 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
@@ -1959,13 +1959,14 @@ AcpiDmDumpPrmt (
ACPI_PRMT_MODULE_INFO *PrmtModuleInfo;
ACPI_PRMT_HANDLER_INFO *PrmtHandlerInfo;
ACPI_STATUS Status;
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
UINT32 i, j;
/* Main table header */
PrmtHeader = ACPI_ADD_PTR (ACPI_TABLE_PRMT_HEADER, Table, CurrentOffset);
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHeader,
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtHeader,
sizeof (ACPI_TABLE_PRMT_HEADER), AcpiDmTableInfoPrmtHdr);
if (ACPI_FAILURE (Status))
{
@@ -1977,20 +1978,20 @@ AcpiDmDumpPrmt (
/* PRM Module Information Structure array */
- for (i = 0; i < PrmtHeader->ModuleInfoCount; ++i)
+ for (i = 0; i < AcpiUtReadUint32 (&PrmtHeader->ModuleInfoCount); ++i)
{
PrmtModuleInfo = ACPI_ADD_PTR (ACPI_PRMT_MODULE_INFO, Table, CurrentOffset);
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtModuleInfo,
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtModuleInfo,
sizeof (ACPI_PRMT_MODULE_INFO), AcpiDmTableInfoPrmtModule);
CurrentOffset += sizeof (ACPI_PRMT_MODULE_INFO);
/* PRM handler information structure array */
- for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; ++j)
+ for (j = 0; j < AcpiUtReadUint16 (&PrmtModuleInfo->HandlerInfoCount); ++j)
{
PrmtHandlerInfo = ACPI_ADD_PTR (ACPI_PRMT_HANDLER_INFO, Table, CurrentOffset);
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHandlerInfo,
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtHandlerInfo,
sizeof (ACPI_PRMT_HANDLER_INFO), AcpiDmTableInfoPrmtHandler);
CurrentOffset += sizeof (ACPI_PRMT_HANDLER_INFO);
Index: acpica-unix2-20210604/source/compiler/dttable2.c
===================================================================
--- acpica-unix2-20210604.orig/source/compiler/dttable2.c
+++ acpica-unix2-20210604/source/compiler/dttable2.c
@@ -1278,7 +1278,7 @@ DtCompilePrmt (
DtInsertSubtable (ParentTable, Subtable);
PrmtHeader = ACPI_CAST_PTR (ACPI_TABLE_PRMT_HEADER, Subtable->Buffer);
- for (i = 0; i < PrmtHeader->ModuleInfoCount; i++)
+ for (i = 0; i < AcpiUtReadUint32 (&PrmtHeader->ModuleInfoCount); i++)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtModule,
&Subtable);
@@ -1289,7 +1289,7 @@ DtCompilePrmt (
DtInsertSubtable (ParentTable, Subtable);
PrmtModuleInfo = ACPI_CAST_PTR (ACPI_PRMT_MODULE_INFO, Subtable->Buffer);
- for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; j++)
+ for (j = 0; j < AcpiUtReadUint16 (&PrmtModuleInfo->HandlerInfoCount); j++)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtHandler,
&Subtable);

View File

@ -0,0 +1,35 @@
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
@@ -2019,11 +2019,12 @@ AcpiDmDumpRgrt (
ACPI_STATUS Status;
ACPI_TABLE_RGRT *Subtable = ACPI_CAST_PTR (ACPI_TABLE_RGRT, Table);
UINT32 Offset = sizeof (ACPI_TABLE_RGRT);
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
/* Main table */
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoRgrt);
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoRgrt);
if (ACPI_FAILURE (Status))
{
return;
@@ -2031,8 +2032,8 @@ AcpiDmDumpRgrt (
/* Dump the binary image as a subtable */
- Status = AcpiDmDumpTable (Table->Length, Offset, &Subtable->Image,
- Table->Length - Offset, AcpiDmTableInfoRgrt0);
+ Status = AcpiDmDumpTable (TableLength, Offset, &Subtable->Image,
+ TableLength - Offset, AcpiDmTableInfoRgrt0);
if (ACPI_FAILURE (Status))
{
return;

View File

@ -0,0 +1,42 @@
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump3.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
===================================================================
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
@@ -339,14 +339,14 @@ AcpiDmDumpSvkl (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
- UINT32 Length = Table->Length;
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
UINT32 Offset = sizeof (ACPI_TABLE_SVKL);
ACPI_SVKL_KEY *Subtable;
/* Main table */
- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSvkl);
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSvkl);
if (ACPI_FAILURE (Status))
{
return;
@@ -355,12 +355,12 @@ AcpiDmDumpSvkl (
/* The rest of the table consists of subtables (single type) */
Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Table, Offset);
- while (Offset < Table->Length)
+ while (Offset < TableLength)
{
/* Dump the subtable */
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
sizeof (ACPI_SVKL_KEY), AcpiDmTableInfoSvkl0);
if (ACPI_FAILURE (Status))
{

View File

@ -0,0 +1,91 @@
Signed-off-by: Dean Nelson <dnelson@redhat.com>
---
source/common/dmtbdump1.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump1.c
===================================================================
--- acpica-unix2-20210604.orig/source/common/dmtbdump1.c
+++ acpica-unix2-20210604/source/common/dmtbdump1.c
@@ -242,20 +242,23 @@ AcpiDmDumpCedt (
{
ACPI_STATUS Status;
ACPI_CEDT_HEADER *Subtable;
- UINT32 Length = Table->Length;
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
UINT32 Offset = sizeof (ACPI_TABLE_CEDT);
+ UINT16 SubtableLength;
/* There is no main table (other than the standard ACPI header) */
Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Table, Offset);
- while (Offset < Table->Length)
+ while (Offset < TableLength)
{
/* Common subtable header */
+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length);
+
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoCedtHdr);
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
+ SubtableLength, AcpiDmTableInfoCedtHdr);
if (ACPI_FAILURE (Status))
{
return;
@@ -264,8 +267,8 @@ AcpiDmDumpCedt (
switch (Subtable->Type)
{
case ACPI_CEDT_TYPE_CHBS:
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoCedt0);
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
+ SubtableLength, AcpiDmTableInfoCedt0);
if (ACPI_FAILURE (Status)) {
return;
}
@@ -277,8 +280,8 @@ AcpiDmDumpCedt (
/* print out table with first "Interleave target" */
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, AcpiDmTableInfoCedt1);
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
+ SubtableLength, AcpiDmTableInfoCedt1);
if (ACPI_FAILURE (Status)) {
return;
}
@@ -288,8 +291,8 @@ AcpiDmDumpCedt (
for (i = 1; i < max; i++) {
unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET(ACPI_CEDT_CFMWS, InterleaveTargets);
unsigned int *trg = &(ptr->InterleaveTargets[i]);
- Status = AcpiDmDumpTable (Length, loc_offset, trg,
- Subtable->Length, AcpiDmTableInfoCedt1_te);
+ Status = AcpiDmDumpTable (TableLength, loc_offset, trg,
+ SubtableLength, AcpiDmTableInfoCedt1_te);
if (ACPI_FAILURE (Status)) {
return;
}
@@ -302,7 +305,7 @@ AcpiDmDumpCedt (
Subtable->Type);
/* Attempt to continue */
- if (!Subtable->Length)
+ if (!SubtableLength)
{
AcpiOsPrintf ("Invalid zero length subtable\n");
return;
@@ -310,9 +313,9 @@ AcpiDmDumpCedt (
}
/* Point to next subtable */
- Offset += Subtable->Length;
+ Offset += SubtableLength;
Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Subtable,
- Subtable->Length);
+ SubtableLength);
}
}

View File

@ -0,0 +1,184 @@
commit 19b11f91660b1a38a8e9655b0b1a4ad51ec4db1e
Author: Lawrence Hileman <larry.hileman@xconn-tech.com>
Date: Fri Jan 7 16:33:40 2022 -0800
Add the subtable CFMWS to the CEDT table
diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c
index 105a88e..6abe8bc 100644
--- a/source/common/dmtbdump1.c
+++ b/source/common/dmtbdump1.c
@@ -244,7 +244,6 @@ AcpiDmDumpCedt (
ACPI_CEDT_HEADER *Subtable;
UINT32 Length = Table->Length;
UINT32 Offset = sizeof (ACPI_TABLE_CEDT);
- ACPI_DMTABLE_INFO *InfoTable;
/* There is no main table (other than the standard ACPI header) */
@@ -265,35 +264,50 @@ AcpiDmDumpCedt (
switch (Subtable->Type)
{
case ACPI_CEDT_TYPE_CHBS:
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoCedt0);
+ if (ACPI_FAILURE (Status)) {
+ return;
+ }
+ break;
+
+ case ACPI_CEDT_TYPE_CFMWS: {
+ ACPI_CEDT_CFMWS *ptr = (ACPI_CEDT_CFMWS *) Subtable;
+ unsigned int i, max = 0x01 << (ptr->InterleaveWays);
+
+ // print out table with first "Interleave target"
+ Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Subtable->Length, AcpiDmTableInfoCedt1);
+ if (ACPI_FAILURE (Status)) {
+ return;
+ }
- InfoTable = AcpiDmTableInfoCedt0;
+ // Now, print out any interleave targets beyond the first.
+ for (i = 1; i < max; i++) {
+ unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET(ACPI_CEDT_CFMWS, InterleaveTargets);
+ unsigned int *trg = &(ptr->InterleaveTargets[i]);
+ Status = AcpiDmDumpTable (Length, loc_offset, trg,
+ Subtable->Length, AcpiDmTableInfoCedt1_te);
+ if (ACPI_FAILURE (Status)) {
+ return;
+ }
+ }
break;
+ }
default:
-
AcpiOsPrintf ("\n**** Unknown CEDT subtable type 0x%X\n\n",
Subtable->Type);
/* Attempt to continue */
-
if (!Subtable->Length)
{
AcpiOsPrintf ("Invalid zero length subtable\n");
return;
}
- goto NextSubtable;
- }
-
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
- Subtable->Length, InfoTable);
- if (ACPI_FAILURE (Status))
- {
- return;
}
-NextSubtable:
/* Point to next subtable */
-
Offset += Subtable->Length;
Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Subtable,
Subtable->Length);
diff --git a/source/common/dmtbinfo1.c b/source/common/dmtbinfo1.c
index 5b8ffe6..ac8e79e 100644
--- a/source/common/dmtbinfo1.c
+++ b/source/common/dmtbinfo1.c
@@ -275,6 +275,28 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[] =
ACPI_DMT_TERMINATOR
};
+/* 1: CXL Fixed Memory Window Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT1_OFFSET (BaseHpa), "Window base address", 0},
+ {ACPI_DMT_UINT64, ACPI_CEDT1_OFFSET (WindowSize), "Window size", 0},
+ {ACPI_DMT_UINT8, ACPI_CEDT1_OFFSET (InterleaveWays), "Interleave Members (2^n)", 0},
+ {ACPI_DMT_UINT8, ACPI_CEDT1_OFFSET (InterleaveArithmetic), "Interleave Arithmetic", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (Granularity), "Granularity", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (Restrictions), "Restrictions", 0},
+ {ACPI_DMT_UINT16, ACPI_CEDT1_OFFSET (QtgId), "QtgId", 0},
+ {ACPI_DMT_UINT32, ACPI_CEDT1_OFFSET (InterleaveTargets), "First Target", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1_te[] =
+{
+ {ACPI_DMT_UINT32, ACPI_CEDT1_TE_OFFSET (InterleaveTarget), "Next Target", 0},
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c
index c56f61c..972be5f 100644
--- a/source/compiler/dttable1.c
+++ b/source/compiler/dttable1.c
@@ -282,18 +282,18 @@ DtCompileCedt (
switch (CedtHeader->Type)
{
case ACPI_CEDT_TYPE_CHBS:
-
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt0, &Subtable);
+ break;
+ case ACPI_CEDT_TYPE_CFMWS:
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1, &Subtable);
break;
default:
-
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "CEDT");
return (AE_ERROR);
}
/* CEDT Subtable */
-
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt0, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index 4e7c02f..c165ba0 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -267,6 +267,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1_te[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt0[];
diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h
index 80bd806..6b9f5c1 100644
--- a/source/include/actbinfo.h
+++ b/source/include/actbinfo.h
@@ -112,6 +112,8 @@
#define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
#define ACPI_CEDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_HEADER, f)
#define ACPI_CEDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CHBS, f)
+#define ACPI_CEDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS, f)
+#define ACPI_CEDT1_TE_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS_TARGET_ELEMENT, f)
#define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
#define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f)
#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f)
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 420189e..359861f 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -465,6 +465,11 @@ typedef struct acpi_cedt_cfmws
} ACPI_CEDT_CFMWS;
+typedef struct acpi_cedt_cfmws_target_element
+{
+ UINT32 InterleaveTarget;
+} ACPI_CEDT_CFMWS_TARGET_ELEMENT;
+
/* Values for Interleave Arithmetic field above */
#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)

View File

@ -0,0 +1,173 @@
commit d9798f5275bb20ab88ac854ba04e6e3bdb22cf6d
Author: Lawrence Hileman <larry.hileman@xconn-tech.com>
Date: Mon Jan 17 15:24:34 2022 -0800
Fix Compile issue with CEDT and add template
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c
index 972be5f..09aca3a 100644
--- a/source/compiler/dttable1.c
+++ b/source/compiler/dttable1.c
@@ -262,6 +262,7 @@ DtCompileCedt (
while (*PFieldList)
{
+ int InsertFlag = 1; // if CFMWS and has more than one target, then set to zero later
SubtableStart = *PFieldList;
/* CEDT Header */
@@ -283,24 +284,68 @@ DtCompileCedt (
{
case ACPI_CEDT_TYPE_CHBS:
Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt0, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
break;
- case ACPI_CEDT_TYPE_CFMWS:
+ case ACPI_CEDT_TYPE_CFMWS: {
+ unsigned char *dump;
+ unsigned int idx, offset, max = 0;
+
+ // Compile table with first "Interleave target"
Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ // Look in buffer for the number of targets
+ offset = (unsigned int) ACPI_OFFSET (ACPI_CEDT_CFMWS, InterleaveWays);
+ dump = (unsigned char *) Subtable->Buffer - 4; // place at beginning of cedt1
+ max = 0x01 << dump[offset]; // 2^max, so 0=1, 1=2, 2=4, 3=8. 8 is MAX
+ if (max > 8) max=1; // Error in encoding Interleaving Ways.
+ if (max == 1) // if only one target, then break here.
+ break; // break if only one target.
+
+ // We need to add more interleave targets, so write the current Subtable.
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable); // Insert AcpiDmTableInfoCedt1 table so we can put in
+ DtPushSubtable (Subtable); // the targets > the first.
+
+ // Now, find out all interleave targets beyond the first.
+ for (idx = 1; idx < max; idx++) {
+ ParentTable = DtPeekSubtable ();
+
+ if (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1_te, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ if (Subtable)
+ {
+ DtInsertSubtable (ParentTable, Subtable); // got a target, so insert table.
+ InsertFlag = 0;
+ }
+ }
+ }
+
+ DtPopSubtable ();
+ ParentTable = DtPeekSubtable ();
break;
+ }
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "CEDT");
return (AE_ERROR);
}
- /* CEDT Subtable */
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable);
+ if (InsertFlag == 1) {
+ DtInsertSubtable (ParentTable, Subtable);
+ }
DtPopSubtable ();
}
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
index 5fdd599..a62da8b 100644
--- a/source/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
@@ -108,23 +108,58 @@ const unsigned char TemplateBoot[] =
const unsigned char TemplateCedt[] =
{
- 0x43,0x45,0x44,0x54,0x84,0x00,0x00,0x00, /* 00000000 "CEDT...." */
- 0x01,0x8B,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
- 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
- 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x05,0x01,0x21,0x20,0x00,0x00,0x20,0x00, /* 00000020 "..! .. ." */
- 0x33,0x33,0xCD,0xAB,0x01,0x00,0x00,0x00, /* 00000028 "33......" */
- 0x00,0x00,0x00,0x00,0x00,0x21,0x43,0xD5, /* 00000030 ".....!C." */
- 0x00,0x00,0x00,0x00,0x45,0x23,0x01,0x00, /* 00000038 "....E#.." */
+ 0x43,0x45,0x44,0x54,0x9c,0x01,0x00,0x00, /* 00000000 "CEDT...." */
+ 0x01,0x87,0x49,0x4e,0x54,0x45,0x4c,0x20, /* 00000008 "..INTEL " */
+ 0x54,0x45,0x4d,0x50,0x4c,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x00,0x00,0x00,0x00,0x49,0x4e,0x54,0x4c, /* 00000018 "....INTL" */
+ 0x17,0x12,0x21,0x20,0x00,0x00,0x20,0x00, /* 00000020 "..! .. ." */
+ 0x00,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000028 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, /* 00000030 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000038 "..... .." */
0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000040 "...... ." */
- 0x44,0x44,0xCD,0xAB,0x01,0x00,0x00,0x00, /* 00000048 "DD......" */
- 0x00,0x00,0x00,0x00,0x00,0x21,0x43,0xA5, /* 00000050 ".....!C." */
- 0x00,0x00,0x00,0x00,0x45,0x23,0xB1,0x00, /* 00000058 "....E#.." */
+ 0x01,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000048 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000050 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000058 "..... .." */
0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000060 "...... ." */
- 0x55,0x55,0xCD,0xAB,0x01,0x00,0x00,0x00, /* 00000068 "UU......" */
- 0x00,0x00,0x00,0x00,0x00,0x21,0x43,0xB5, /* 00000070 ".....!C." */
- 0x00,0x00,0x00,0x00,0x45,0x23,0xB1,0x00, /* 00000078 "....E#.." */
- 0x00,0x00,0x00,0x00 /* 00000080 "...." */
+ 0x02,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000068 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, /* 00000070 ".....0.." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000078 "..... .." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, /* 00000080 "...... ." */
+ 0x03,0x5e,0xba,0x00,0x00,0x00,0x00,0x00, /* 00000088 ".^......" */
+ 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, /* 00000090 ".....@.." */
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, /* 00000098 "..... .." */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x28,0x00, /* 000000a0 "......(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000a8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000b0 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000b8 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 000000c0 "........" */
+ 0x00,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 000000c8 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000d0 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000d8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000e0 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 000000e8 "........" */
+ 0x01,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 000000f0 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000f8 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000110 "........" */
+ 0x02,0x5e,0xba,0x00,0x01,0x00,0x28,0x00, /* 00000118 ".^....(." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000138 "........" */
+ 0x03,0x5e,0xba,0x00,0x01,0x00,0x2c,0x00, /* 00000140 ".^....,." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
+ 0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
+ 0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000158 "........" */
+ 0x03,0x00,0x00,0x00,0x06,0x00,0x01,0x00, /* 00000160 "........" */
+ 0x00,0x5e,0xba,0x00,0x01,0x5e,0xba,0x00, /* 00000160 ".^...^.." */
+ 0x01,0x00,0x2c,0x00,0x00,0x00,0x00,0x00, /* 00000170 "..,....." */
+ 0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, /* 00000178 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 00000180 "........" */
+ 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 00000188 "........" */
+ 0x0a,0x00,0x01,0x00,0x02,0x5e,0xba,0x00, /* 00000190 ".....^.." */
+ 0x03,0x5e,0xba,0x00 /* 00000198 ".^.." */
};
const unsigned char TemplateCpep[] =

View File

@ -0,0 +1,127 @@
commit 0914618b553d6f3366e568409cebf2656891ca69
Author: Robert Moore <Robert.Moore@intel.com>
Date: Thu Feb 17 14:24:24 2022 -0800
Automated cleanup; No functional changes
Removed some tabs and // comments.
diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c
index 6abe8bc..88b7c1b 100644
--- a/source/common/dmtbdump1.c
+++ b/source/common/dmtbdump1.c
@@ -275,14 +275,16 @@ AcpiDmDumpCedt (
ACPI_CEDT_CFMWS *ptr = (ACPI_CEDT_CFMWS *) Subtable;
unsigned int i, max = 0x01 << (ptr->InterleaveWays);
- // print out table with first "Interleave target"
+ /* print out table with first "Interleave target" */
+
Status = AcpiDmDumpTable (Length, Offset, Subtable,
Subtable->Length, AcpiDmTableInfoCedt1);
if (ACPI_FAILURE (Status)) {
return;
}
- // Now, print out any interleave targets beyond the first.
+ /* Now, print out any interleave targets beyond the first. */
+
for (i = 1; i < max; i++) {
unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET(ACPI_CEDT_CFMWS, InterleaveTargets);
unsigned int *trg = &(ptr->InterleaveTargets[i]);
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c
index 09aca3a..c1e6b98 100644
--- a/source/compiler/dttable1.c
+++ b/source/compiler/dttable1.c
@@ -262,7 +262,9 @@ DtCompileCedt (
while (*PFieldList)
{
- int InsertFlag = 1; // if CFMWS and has more than one target, then set to zero later
+ /* if CFMWS and has more than one target, then set to zero later */
+
+ int InsertFlag = 1;
SubtableStart = *PFieldList;
/* CEDT Header */
@@ -293,27 +295,30 @@ DtCompileCedt (
unsigned char *dump;
unsigned int idx, offset, max = 0;
- // Compile table with first "Interleave target"
+ /* Compile table with first "Interleave target" */
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoCedt1, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- // Look in buffer for the number of targets
+ /* Look in buffer for the number of targets */
offset = (unsigned int) ACPI_OFFSET (ACPI_CEDT_CFMWS, InterleaveWays);
- dump = (unsigned char *) Subtable->Buffer - 4; // place at beginning of cedt1
- max = 0x01 << dump[offset]; // 2^max, so 0=1, 1=2, 2=4, 3=8. 8 is MAX
- if (max > 8) max=1; // Error in encoding Interleaving Ways.
- if (max == 1) // if only one target, then break here.
- break; // break if only one target.
+ dump = (unsigned char *) Subtable->Buffer - 4; /* place at beginning of cedt1 */
+ max = 0x01 << dump[offset]; /* 2^max, so 0=1, 1=2, 2=4, 3=8. 8 is MAX */
+ if (max > 8) max=1; /* Error in encoding Interleaving Ways. */
+ if (max == 1) /* if only one target, then break here. */
+ break; /* break if only one target. */
+
+ /* We need to add more interleave targets, so write the current Subtable. */
- // We need to add more interleave targets, so write the current Subtable.
ParentTable = DtPeekSubtable ();
- DtInsertSubtable (ParentTable, Subtable); // Insert AcpiDmTableInfoCedt1 table so we can put in
- DtPushSubtable (Subtable); // the targets > the first.
+ DtInsertSubtable (ParentTable, Subtable); /* Insert AcpiDmTableInfoCedt1 table so we can put in */
+ DtPushSubtable (Subtable); /* the targets > the first. */
+
+ /* Now, find out all interleave targets beyond the first. */
- // Now, find out all interleave targets beyond the first.
for (idx = 1; idx < max; idx++) {
ParentTable = DtPeekSubtable ();
@@ -326,7 +331,7 @@ DtCompileCedt (
}
if (Subtable)
{
- DtInsertSubtable (ParentTable, Subtable); // got a target, so insert table.
+ DtInsertSubtable (ParentTable, Subtable); /* got a target, so insert table. */
InsertFlag = 0;
}
}
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 359861f..ccf7c95 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -468,19 +468,20 @@ typedef struct acpi_cedt_cfmws
typedef struct acpi_cedt_cfmws_target_element
{
UINT32 InterleaveTarget;
+
} ACPI_CEDT_CFMWS_TARGET_ELEMENT;
/* Values for Interleave Arithmetic field above */
-#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
+#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
/* Values for Restrictions field above */
-#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
-#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
-#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
-#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
-#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
+#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
+#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
+#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
/*******************************************************************************

View File

@ -0,0 +1,18 @@
commit 7021087eedb0d7156286e9e4f255e93c07816921
Author: Robert Moore <Robert.Moore@intel.com>
Date: Fri Aug 26 12:20:07 2022 -0700
Remove a duplicate of ACPI_SIG_CEDT
diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c
index b984e6a..9f84aea 100644
--- a/source/tools/acpisrc/astable.c
+++ b/source/tools/acpisrc/astable.c
@@ -541,7 +541,6 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_TABLE_CSRT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_DBG2", SRC_TYPE_STRUCT},
{"ACPI_TABLE_DBGP", SRC_TYPE_STRUCT},
- {"ACPI_TABLE_CEDT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_DMAR", SRC_TYPE_STRUCT},
{"ACPI_TABLE_DRTM", SRC_TYPE_STRUCT},
{"ACPI_TABLE_ECDT", SRC_TYPE_STRUCT},

View File

@ -1,6 +1,6 @@
Name: acpica-tools Name: acpica-tools
Version: 20210604 Version: 20210604
Release: 3%{?dist} Release: 5%{?dist}
Summary: ACPICA tools for the development and debug of ACPI tables Summary: ACPICA tools for the development and debug of ACPI tables
License: GPLv2 License: GPLv2
@ -70,6 +70,9 @@ Patch42: 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch
Patch43: 0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch Patch43: 0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch
Patch44: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch Patch44: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch
Patch45: 0046-Support-PHAT-in-a-big-endian-world.patch Patch45: 0046-Support-PHAT-in-a-big-endian-world.patch
Patch46: 0047-Support-PRMT-in-a-big-endian-world.patch
Patch47: 0048-Support-RGRT-in-a-big-endian-world.patch
Patch48: 0049-Support-SVKL-in-a-big-endian-world.patch
# other miscellaneous patches # other miscellaneous patches
Patch100: unaligned.patch Patch100: unaligned.patch
@ -90,6 +93,11 @@ Patch114: armv7-str-fixes.patch
Patch115: dbtest.patch Patch115: dbtest.patch
Patch116: ull-32bit.patch Patch116: ull-32bit.patch
Patch117: wpbt-unicode.patch Patch117: wpbt-unicode.patch
Patch118: CEDT-support_08.patch
Patch119: CEDT-support_09.patch
Patch120: CEDT-support_10.patch
Patch121: CEDT-support_11.patch
Patch122: 0050-Support-CEDT-in-a-big-endian-world.patch
BuildRequires: make BuildRequires: make
BuildRequires: bison patchutils flex gcc BuildRequires: bison patchutils flex gcc
@ -255,6 +263,17 @@ fi
%changelog %changelog
* Thu Oct 06 2022 Dean Nelson <dnelson@redhat.com> - 20210604-5
- Backport 19b11f91660b ("Add the subtable CFMWS to the CEDT table").
- Backport d9798f5275bb ("Fix Compile issue with CEDT and add template").
- Backport 0914618b553d ("Automated cleanup; No functional changes").
- Backport 7021087eedb0 ("Remove a duplicate of ACPI_SIG_CEDT").
- Add in big-endian patch for CEDT tble.
* Mon Oct 03 2022 Dean Nelson <dnelson@redhat.com> - 20210604-4
- Add in big-endian patches for PRMT, RGRT and SVKL tables.
- Fix big-endian related prmt.asl compiler errors.
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 20210604-3 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 20210604-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688