Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica Adjust to new acpica
details: https://anonhg.NetBSD.org/src/rev/d0d186bf8f84
branches: trunk
changeset: 348863:d0d186bf8f84
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 11 21:11:30 2016 +0000
description:
Adjust to new acpica
diffstat:
sys/external/bsd/acpica/conf/files.acpica | 3 +-
sys/external/bsd/acpica/dist/common/dmtbdump.c | 194 +-
sys/external/bsd/acpica/dist/common/dmtbinfo.c | 41 +-
sys/external/bsd/acpica/dist/compiler/aslcompiler.h | 7 +-
sys/external/bsd/acpica/dist/compiler/aslutils.c | 67 +-
sys/external/bsd/acpica/dist/compiler/aslxref.c | 6 +-
sys/external/bsd/acpica/dist/compiler/dtfield.c | 51 +-
sys/external/bsd/acpica/dist/compiler/dtparser.y | 6 +-
sys/external/bsd/acpica/dist/compiler/dttable.c | 70 +-
sys/external/bsd/acpica/dist/compiler/dtutils.c | 93 +-
sys/external/bsd/acpica/dist/compiler/prparser.y | 4 +-
sys/external/bsd/acpica/dist/debugger/dbexec.c | 67 +-
sys/external/bsd/acpica/dist/debugger/dbinput.c | 1 +
sys/external/bsd/acpica/dist/debugger/dbmethod.c | 145 +
sys/external/bsd/acpica/dist/disassembler/dmbuffer.c | 68 +-
sys/external/bsd/acpica/dist/disassembler/dmcstyle.c | 91 +
sys/external/bsd/acpica/dist/disassembler/dmresrcl.c | 15 +-
sys/external/bsd/acpica/dist/events/evrgnini.c | 3 +-
sys/external/bsd/acpica/dist/executer/exconfig.c | 136 +-
sys/external/bsd/acpica/dist/include/acapps.h | 14 +-
sys/external/bsd/acpica/dist/include/acdebug.h | 4 +-
sys/external/bsd/acpica/dist/include/acdisasm.h | 7 +-
sys/external/bsd/acpica/dist/include/acglobal.h | 6 +-
sys/external/bsd/acpica/dist/include/aclocal.h | 31 +-
sys/external/bsd/acpica/dist/include/acnamesp.h | 12 +
sys/external/bsd/acpica/dist/include/acpiosxf.h | 67 +-
sys/external/bsd/acpica/dist/include/acpixf.h | 48 +-
sys/external/bsd/acpica/dist/include/actables.h | 19 +-
sys/external/bsd/acpica/dist/include/actypes.h | 67 +-
sys/external/bsd/acpica/dist/include/acutils.h | 61 +-
sys/external/bsd/acpica/dist/include/platform/acgcc.h | 4 +
sys/external/bsd/acpica/dist/include/platform/acnetbsd.h | 6 +-
sys/external/bsd/acpica/dist/include/platform/acwinex.h | 52 -
sys/external/bsd/acpica/dist/os_specific/service_layers/osefitbl.c | 1033 ---------
sys/external/bsd/acpica/dist/os_specific/service_layers/osefixf.c | 1091 ----------
sys/external/bsd/acpica/dist/os_specific/service_layers/oslibcfs.c | 258 --
sys/external/bsd/acpica/dist/tables/tbdata.c | 165 +-
sys/external/bsd/acpica/dist/tables/tbfadt.c | 116 +-
sys/external/bsd/acpica/dist/tables/tbinstal.c | 79 +-
sys/external/bsd/acpica/dist/tables/tbutils.c | 2 +-
sys/external/bsd/acpica/dist/tables/tbxface.c | 4 +-
sys/external/bsd/acpica/dist/tables/tbxfload.c | 75 +-
sys/external/bsd/acpica/dist/tables/tbxfroot.c | 4 +-
sys/external/bsd/acpica/dist/tools/acpidump/apfiles.c | 43 +-
sys/external/bsd/acpica/dist/utilities/utdebug.c | 30 -
sys/external/bsd/acpica/dist/utilities/utosi.c | 22 +-
sys/external/bsd/acpica/dist/utilities/utprint.c | 5 +-
sys/external/bsd/acpica/dist/utilities/uttrack.c | 6 +-
48 files changed, 1019 insertions(+), 3380 deletions(-)
diffs (truncated from 5777 to 300 lines):
diff -r 934c8366f050 -r d0d186bf8f84 sys/external/bsd/acpica/conf/files.acpica
--- a/sys/external/bsd/acpica/conf/files.acpica Fri Nov 11 21:11:03 2016 +0000
+++ b/sys/external/bsd/acpica/conf/files.acpica Fri Nov 11 21:11:30 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.acpica,v 1.14 2016/05/04 19:27:57 christos Exp $
+# $NetBSD: files.acpica,v 1.15 2016/11/11 21:11:30 christos Exp $
define acpica
makeoptions acpi CPPFLAGS+="-I$S/external/bsd/acpica/dist/include"
@@ -204,6 +204,7 @@
file utilities/utresrc.c acpica
file utilities/utstate.c acpica
file utilities/utstring.c acpica
+file utilities/utstrtoul64.c acpica
file utilities/uttrack.c acpica
file utilities/utuuid.c acpica
file utilities/utxface.c acpica
diff -r 934c8366f050 -r d0d186bf8f84 sys/external/bsd/acpica/dist/common/dmtbdump.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump.c Fri Nov 11 21:11:03 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump.c Fri Nov 11 21:11:30 2016 +0000
@@ -52,12 +52,31 @@
ACPI_MODULE_NAME ("dmtbdump")
-/* Local prototypes */
-
-static void
-AcpiDmValidateFadtLength (
- UINT32 Revision,
- UINT32 Length);
+/* Table of revision-dependent FADT sizes */
+
+static const UINT32 FadtRevisionLength [ACPI_FADT_MAX_VERSION + 1] =
+{
+ 0, /* 0 - illegal */
+ ACPI_FADT_V1_SIZE, /* 1 - ACPI 1.0 */
+ 0, /* 2 - illegal */
+ ACPI_FADT_V3_SIZE, /* 3 - ACPI 2.0 */
+ ACPI_FADT_V4_SIZE, /* 4 - ACPI 3.0 and ACPI 4.0 */
+ ACPI_FADT_V5_SIZE, /* 5 - ACPI 5.0 */
+ ACPI_FADT_V6_SIZE /* 6 - ACPI 6.0 */
+};
+
+/* Table of revision-dependent FADT info tables */
+
+ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1] =
+{
+ NULL, /* 0 - illegal */
+ AcpiDmTableInfoFadt1, /* 1 - ACPI 1.0 */
+ NULL, /* 2 - illegal */
+ AcpiDmTableInfoFadt3, /* 3 - ACPI 2.0 */
+ AcpiDmTableInfoFadt4, /* 4 - ACPI 3.0 and ACPI 4.0 */
+ AcpiDmTableInfoFadt5, /* 5 - ACPI 5.0 */
+ AcpiDmTableInfoFadt6 /* 6 - ACPI 6.0 */
+};
/*******************************************************************************
@@ -347,6 +366,11 @@
*
* DESCRIPTION: Format the contents of a FADT
*
+ * Check the FADT revision against the expected table length for
+ * that revision. Issue a warning if the length is not what was
+ * expected. This seems to be such a common BIOS bug that the
+ * FADT revision has been rendered virtually meaningless.
+ *
* NOTE: We cannot depend on the FADT version to indicate the actual
* contents of the FADT because of BIOS bugs. The table length
* is the only reliable indicator.
@@ -358,142 +382,72 @@
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
-
-
- /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */
-
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt1);
- if (ACPI_FAILURE (Status))
+ UINT8 FadtRevision;
+ UINT32 ExpectedLength;
+ UINT32 i;
+
+
+ FadtRevision = Table->Revision;
+
+ /* FADT revision/length validation */
+
+ if ((FadtRevision == 0) ||
+ (FadtRevision == 2))
{
+ AcpiOsPrintf (
+ "// ACPI Warning: Invalid or unsupported FADT revision: %u\n",
+ FadtRevision);
return;
}
- /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */
-
- if ((Table->Length > ACPI_FADT_V1_SIZE) &&
- (Table->Length <= ACPI_FADT_V2_SIZE))
+ if (FadtRevision > ACPI_FADT_MAX_VERSION)
+ {
+ AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, "
+ "disassembling known fields (up to revision %u)\n\n",
+ FadtRevision, ACPI_FADT_MAX_VERSION);
+ }
+ else
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt2);
- if (ACPI_FAILURE (Status))
+ ExpectedLength = FadtRevisionLength[FadtRevision];
+ if (Table->Length != ExpectedLength)
{
- return;
+ AcpiOsPrintf (
+ "// ACPI Warning: Input FADT revision %X does not match "
+ "expected length: found 0x%X expected 0x%X\n",
+ FadtRevision, Table->Length, ExpectedLength);
}
}
- /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
-
- else if (Table->Length > ACPI_FADT_V2_SIZE)
+ /*
+ * Dump the input table on a per-version basis, but is actually
+ * based upon the length of the table. Table length must
+ * be larger than the required length of the previous version.
+ */
+ for (i = 1; i <= ACPI_FADT_MAX_VERSION; i++)
{
+ if (!FadtRevisionLength[i]) /* Skip any empty slots */
+ {
+ continue;
+ }
+
+ /* Dump the fields specific to FADT revision[i] */
+
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt3);
+ FadtRevisionInfo[i]);
if (ACPI_FAILURE (Status))
{
return;
}
- /* Check for FADT revision 5 fields and up (ACPI 5.0+) */
-
- if (Table->Length > ACPI_FADT_V3_SIZE)
+ if (Table->Length <= FadtRevisionLength[i])
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt5);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
- }
-
- /* Check for FADT revision 6 fields and up (ACPI 6.0+) */
-
- if (Table->Length > ACPI_FADT_V3_SIZE)
- {
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt6);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
+ break; /* End of table */
}
}
- /* Validate various fields in the FADT, including length */
+ /* Build a local FADT to test some FADT values */
AcpiTbCreateLocalFadt (Table, Table->Length);
-
- /* Validate FADT length against the revision */
-
- AcpiDmValidateFadtLength (Table->Revision, Table->Length);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDmValidateFadtLength
- *
- * PARAMETERS: Revision - FADT revision (Header->Revision)
- * Length - FADT length (Header->Length
- *
- * RETURN: None
- *
- * DESCRIPTION: Check the FADT revision against the expected table length for
- * that revision. Issue a warning if the length is not what was
- * expected. This seems to be such a common BIOS bug that the
- * FADT revision has been rendered virtually meaningless.
- *
- ******************************************************************************/
-
-static void
-AcpiDmValidateFadtLength (
- UINT32 Revision,
- UINT32 Length)
-{
- UINT32 ExpectedLength;
-
-
- switch (Revision)
- {
- case 0:
-
- AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
- return;
-
- case 1:
-
- ExpectedLength = ACPI_FADT_V1_SIZE;
- break;
-
- case 2:
-
- ExpectedLength = ACPI_FADT_V2_SIZE;
- break;
-
- case 3:
- case 4:
-
- ExpectedLength = ACPI_FADT_V3_SIZE;
- break;
-
- case 5:
-
- ExpectedLength = ACPI_FADT_V5_SIZE;
- break;
-
- default:
-
- return;
- }
-
- if (Length == ExpectedLength)
- {
- return;
- }
-
- AcpiOsPrintf (
- "\n// ACPI Warning: FADT revision %X does not match length: "
- "found %X expected %X\n",
- Revision, Length, ExpectedLength);
}
diff -r 934c8366f050 -r d0d186bf8f84 sys/external/bsd/acpica/dist/common/dmtbinfo.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c Fri Nov 11 21:11:03 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c Fri Nov 11 21:11:30 2016 +0000
@@ -106,6 +106,7 @@
#define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f)
#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
+#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f)
#define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
#define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
#define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
@@ -399,7 +400,7 @@
*
******************************************************************************/
-/* ACPI 1.0 FADT (Version 1) */
+/* FADT version 1 (ACPI 1.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{
@@ -485,18 +486,7 @@
ACPI_DMT_TERMINATOR
};
-/* ACPI 1.0 MS Extensions (FADT version 2) */
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] =
-{
- {ACPI_DMT_GAS, ACPI_FADT_OFFSET (ResetRegister), "Reset Register", 0},
- {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (ResetValue), "Value to cause reset", 0},
- {ACPI_DMT_UINT16, ACPI_FADT_OFFSET (ArmBootFlags), "Reserved", 0},
- {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (MinorRevision), "Reserved", 0},
- ACPI_DMT_TERMINATOR
-};
-
-/* ACPI 2.0+ Extensions (FADT version 3, 4, and 5) */
+/* FADT version 3 (ACPI 2.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
{
@@ -520,16 +510,23 @@
ACPI_DMT_TERMINATOR
};
Home |
Main Index |
Thread Index |
Old Index