Blame SOURCES/CEDT-support_10.patch

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