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