|
|
214d7a |
Index: acpica-unix2-20210604/source/common/dmtable.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/common/dmtable.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/common/dmtable.c
|
|
|
214d7a |
@@ -979,6 +979,12 @@ AcpiDmDumpTable (
|
|
|
214d7a |
ByteLength = 128;
|
|
|
214d7a |
break;
|
|
|
214d7a |
|
|
|
214d7a |
+ case ACPI_DMT_WPBT_UNICODE:
|
|
|
214d7a |
+
|
|
|
214d7a |
+ ByteLength = SubtableLength;
|
|
|
214d7a |
+ CurrentOffset = sizeof (ACPI_TABLE_WPBT);
|
|
|
214d7a |
+ break;
|
|
|
214d7a |
+
|
|
|
214d7a |
case ACPI_DMT_UNICODE:
|
|
|
214d7a |
case ACPI_DMT_BUFFER:
|
|
|
214d7a |
case ACPI_DMT_RAW_BUFFER:
|
|
|
214d7a |
@@ -1596,6 +1602,7 @@ AcpiDmDumpTable (
|
|
|
214d7a |
break;
|
|
|
214d7a |
|
|
|
214d7a |
case ACPI_DMT_UNICODE:
|
|
|
214d7a |
+ case ACPI_DMT_WPBT_UNICODE:
|
|
|
214d7a |
|
|
|
214d7a |
if (ByteLength == 0)
|
|
|
214d7a |
{
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
214d7a |
@@ -753,8 +753,11 @@ AcpiDmDumpWpbt (
|
|
|
214d7a |
Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table);
|
|
|
214d7a |
ArgumentsLength = AcpiUtReadUint16 (&Subtable->ArgumentsLength);
|
|
|
214d7a |
|
|
|
214d7a |
- /* Dump the arguments buffer */
|
|
|
214d7a |
+ /* Dump the arguments buffer if present */
|
|
|
214d7a |
|
|
|
214d7a |
- (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength,
|
|
|
214d7a |
- AcpiDmTableInfoWpbt0);
|
|
|
214d7a |
+ if (ArgumentsLength)
|
|
|
214d7a |
+ {
|
|
|
214d7a |
+ (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength,
|
|
|
214d7a |
+ AcpiDmTableInfoWpbt0);
|
|
|
214d7a |
+ }
|
|
|
214d7a |
}
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/common/dmtbinfo3.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/common/dmtbinfo3.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/common/dmtbinfo3.c
|
|
|
214d7a |
@@ -651,7 +651,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI
|
|
|
214d7a |
|
|
|
214d7a |
ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] =
|
|
|
214d7a |
{
|
|
|
214d7a |
- {ACPI_DMT_UNICODE, sizeof (ACPI_TABLE_WPBT), "Command-line Arguments", 0},
|
|
|
214d7a |
+ {ACPI_DMT_WPBT_UNICODE, ACPI_WPBT2_OFFSET (UnicodeString), "Command-line Arguments", DT_DESCRIBES_OPTIONAL},
|
|
|
214d7a |
ACPI_DMT_TERMINATOR
|
|
|
214d7a |
};
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/compiler/dttable2.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/compiler/dttable2.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/compiler/dttable2.c
|
|
|
214d7a |
@@ -2615,13 +2615,11 @@ DtCompileWpbt (
|
|
|
214d7a |
DT_SUBTABLE *ParentTable;
|
|
|
214d7a |
ACPI_TABLE_WPBT *Table;
|
|
|
214d7a |
ACPI_STATUS Status;
|
|
|
214d7a |
- UINT16 Length;
|
|
|
214d7a |
|
|
|
214d7a |
|
|
|
214d7a |
/* Compile the main table */
|
|
|
214d7a |
|
|
|
214d7a |
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt,
|
|
|
214d7a |
- &Subtable);
|
|
|
214d7a |
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, &Subtable);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|
|
|
214d7a |
return (Status);
|
|
|
214d7a |
@@ -2629,11 +2627,23 @@ DtCompileWpbt (
|
|
|
214d7a |
|
|
|
214d7a |
ParentTable = DtPeekSubtable ();
|
|
|
214d7a |
DtInsertSubtable (ParentTable, Subtable);
|
|
|
214d7a |
+ Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
|
|
|
214d7a |
+
|
|
|
214d7a |
+ /*
|
|
|
214d7a |
+ * Exit now if there are no arguments specified. This is indicated by:
|
|
|
214d7a |
+ * The "Command-line Arguments" field has not been specified (if specified,
|
|
|
214d7a |
+ * it will be the last field in the field list -- after the main table).
|
|
|
214d7a |
+ * Set the Argument Length in the main table to zero.
|
|
|
214d7a |
+ */
|
|
|
214d7a |
+ if (!*PFieldList)
|
|
|
214d7a |
+ {
|
|
|
214d7a |
+ Table->ArgumentsLength = 0;
|
|
|
214d7a |
+ return (AE_OK);
|
|
|
214d7a |
+ }
|
|
|
214d7a |
|
|
|
214d7a |
/* Compile the argument list subtable */
|
|
|
214d7a |
|
|
|
214d7a |
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0,
|
|
|
214d7a |
- &Subtable);
|
|
|
214d7a |
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, &Subtable);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|
|
|
214d7a |
return (Status);
|
|
|
214d7a |
@@ -2641,12 +2651,8 @@ DtCompileWpbt (
|
|
|
214d7a |
|
|
|
214d7a |
/* Extract the length of the Arguments buffer, insert into main table */
|
|
|
214d7a |
|
|
|
214d7a |
- AcpiUtWriteUint (&Length, sizeof (UINT16),
|
|
|
214d7a |
+ AcpiUtWriteUint (&Table->ArgumentsLength, sizeof (UINT16),
|
|
|
214d7a |
&Subtable->TotalLength, sizeof (UINT32));
|
|
|
214d7a |
- Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
|
|
|
214d7a |
- Table->ArgumentsLength = AcpiUtReadUint16 (&Length);
|
|
|
214d7a |
-
|
|
|
214d7a |
- ParentTable = DtPeekSubtable ();
|
|
|
214d7a |
DtInsertSubtable (ParentTable, Subtable);
|
|
|
214d7a |
return (AE_OK);
|
|
|
214d7a |
}
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/compiler/dtutils.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/compiler/dtutils.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/compiler/dtutils.c
|
|
|
214d7a |
@@ -344,6 +344,7 @@ DtGetFieldType (
|
|
|
214d7a |
break;
|
|
|
214d7a |
|
|
|
214d7a |
case ACPI_DMT_UNICODE:
|
|
|
214d7a |
+ case ACPI_DMT_WPBT_UNICODE:
|
|
|
214d7a |
|
|
|
214d7a |
Type = DT_FIELD_TYPE_UNICODE;
|
|
|
214d7a |
break;
|
|
|
214d7a |
@@ -626,12 +627,13 @@ DtGetFieldLength (
|
|
|
214d7a |
break;
|
|
|
214d7a |
|
|
|
214d7a |
case ACPI_DMT_UNICODE:
|
|
|
214d7a |
+ case ACPI_DMT_WPBT_UNICODE:
|
|
|
214d7a |
|
|
|
214d7a |
Value = DtGetFieldValue (Field);
|
|
|
214d7a |
|
|
|
214d7a |
/* TBD: error if Value is NULL? (as below?) */
|
|
|
214d7a |
|
|
|
214d7a |
- ByteLength = (strlen (Value) + 1) * sizeof(UINT16);
|
|
|
214d7a |
+ ByteLength = (strlen (Value) + 1) * sizeof (UINT16);
|
|
|
214d7a |
break;
|
|
|
214d7a |
|
|
|
214d7a |
default:
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/include/acdisasm.h
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/include/acdisasm.h
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/include/acdisasm.h
|
|
|
214d7a |
@@ -175,6 +175,7 @@ typedef enum
|
|
|
214d7a |
ACPI_DMT_SRAT,
|
|
|
214d7a |
ACPI_DMT_TPM2,
|
|
|
214d7a |
ACPI_DMT_VIOT,
|
|
|
214d7a |
+ ACPI_DMT_WPBT_UNICODE,
|
|
|
214d7a |
|
|
|
214d7a |
/* Special opcodes */
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/include/actbinfo.h
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/include/actbinfo.h
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/include/actbinfo.h
|
|
|
214d7a |
@@ -97,6 +97,7 @@
|
|
|
214d7a |
#define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
|
|
|
214d7a |
#define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
|
|
|
214d7a |
#define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f)
|
|
|
214d7a |
+#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f)
|
|
|
214d7a |
#define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f)
|
|
|
214d7a |
#define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f)
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/include/actbl3.h
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/include/actbl3.h
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/include/actbl3.h
|
|
|
214d7a |
@@ -847,6 +847,12 @@ typedef struct acpi_table_wpbt
|
|
|
214d7a |
|
|
|
214d7a |
} ACPI_TABLE_WPBT;
|
|
|
214d7a |
|
|
|
214d7a |
+typedef struct acpi_wpbt_unicode
|
|
|
214d7a |
+{
|
|
|
214d7a |
+ UINT16 *UnicodeString;
|
|
|
214d7a |
+
|
|
|
214d7a |
+} ACPI_WPBT_UNICODE;
|
|
|
214d7a |
+
|
|
|
214d7a |
|
|
|
214d7a |
/*******************************************************************************
|
|
|
214d7a |
*
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/tools/acpisrc/astable.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/tools/acpisrc/astable.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/tools/acpisrc/astable.c
|
|
|
214d7a |
@@ -772,6 +772,7 @@ ACPI_TYPED_IDENTIFIER_TABLE Ac
|
|
|
214d7a |
{"ACPI_VIOT_VIRTIO_IOMMU_PCI", SRC_TYPE_STRUCT},
|
|
|
214d7a |
{"ACPI_VIOT_VIRTIO_IOMMU_MMIO", SRC_TYPE_STRUCT},
|
|
|
214d7a |
{"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT},
|
|
|
214d7a |
+ {"ACPI_WPBT_UNICODE", SRC_TYPE_STRUCT},
|
|
|
214d7a |
|
|
|
214d7a |
/* Data Table compiler */
|
|
|
214d7a |
|