MFV: r325668
Merge ACPICA 20171110.
This commit is contained in:
parent
3d7c1807db
commit
c365b08003
@ -1,3 +1,56 @@
|
||||
----------------------------------------
|
||||
10 November 2017. Summary of changes for version 20171110:
|
||||
|
||||
|
||||
1) ACPICA kernel-resident subsystem:
|
||||
|
||||
This release implements full support for ACPI 6.2A:
|
||||
NFIT - Added a new subtable, "Platform Capabilities Structure"
|
||||
No other changes to ACPICA were required, since ACPI 6.2A is primarily an
|
||||
errata release of the specification.
|
||||
|
||||
Other ACPI table changes:
|
||||
IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo
|
||||
PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy
|
||||
Linton
|
||||
|
||||
Utilities: Modified the string/integer conversion functions to use
|
||||
internal 64-bit divide support instead of a native divide. On 32-bit
|
||||
platforms, a 64-bit divide typically requires a library function which
|
||||
may not be present in the build (kernel or otherwise).
|
||||
|
||||
Implemented a targeted error message for timeouts returned from the
|
||||
Embedded Controller device driver. This is seen frequently enough to
|
||||
special-case an AE_TIME returned from an EC operation region access:
|
||||
"Timeout from EC hardware or EC device driver"
|
||||
|
||||
Changed the "ACPI Exception" message prefix to "ACPI Error" so that all
|
||||
runtime error messages have the identical prefix.
|
||||
|
||||
|
||||
2) iASL Compiler/Disassembler and Tools:
|
||||
|
||||
AcpiXtract: Fixed a problem with table header detection within the
|
||||
acpidump file. Processing a table could be ended early if a 0x40 (@)
|
||||
appears in the original binary table, resulting in the @ symbol appearing
|
||||
in the decoded ASCII field at the end of the acpidump text line. The
|
||||
symbol caused acpixtract to incorrectly think it had reached the end of
|
||||
the current table and the beginning of a new table.
|
||||
|
||||
AcpiXtract: Added an option (-f) to ignore some errors during table
|
||||
extraction. This initial implementation ignores non-ASCII and non-
|
||||
printable characters found in the acpidump text file.
|
||||
|
||||
TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics
|
||||
for ASLTS. This feature is used to track memory allocations from
|
||||
different memory caches within the ACPICA code. At the end of an ASLTS
|
||||
run, these memory statistics are recorded and stored in a log file.
|
||||
|
||||
Debugger (user-space version): Implemented a simple "Background" command.
|
||||
Creates a new thread to execute a control method in the background, while
|
||||
control returns to the debugger prompt to allow additional commands.
|
||||
Syntax: Background <Namepath> [Arguments]
|
||||
|
||||
----------------------------------------
|
||||
29 September 2017. Summary of changes for version 20170929:
|
||||
|
||||
|
@ -356,6 +356,7 @@ static const char *AcpiDmNfitSubnames[] =
|
||||
"NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
|
||||
"NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
|
||||
"Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
|
||||
"Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
|
||||
"Unknown Subtable Type" /* Reserved */
|
||||
};
|
||||
|
||||
|
@ -3061,6 +3061,11 @@ AcpiDmDumpNfit (
|
||||
FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
|
||||
break;
|
||||
|
||||
case ACPI_NFIT_TYPE_CAPABILITIES: /* ACPI 6.0A */
|
||||
|
||||
InfoTable = AcpiDmTableInfoNfit7;
|
||||
break;
|
||||
|
||||
default:
|
||||
AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n",
|
||||
Subtable->Type);
|
||||
|
@ -336,6 +336,7 @@
|
||||
#define ACPI_NFIT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CONTROL_REGION,f)
|
||||
#define ACPI_NFIT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f)
|
||||
#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
|
||||
#define ACPI_NFIT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f)
|
||||
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
|
||||
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
|
||||
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
|
||||
@ -419,6 +420,7 @@
|
||||
#define ACPI_NFIT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f,o)
|
||||
#define ACPI_NFIT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_MEMORY_MAP,f,o)
|
||||
#define ACPI_NFIT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o)
|
||||
#define ACPI_NFIT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CAPABILITIES,f,o)
|
||||
#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
|
||||
#define ACPI_PCCT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
|
||||
#define ACPI_PCCT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
|
||||
@ -1861,6 +1863,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] =
|
||||
{ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0},
|
||||
{ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0},
|
||||
{ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (IdMappingIndex), "Device ID Mapping Index", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
@ -2564,6 +2567,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[] =
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_NFIT7_OFFSET (HighestCapability), "Highest Capability", 0},
|
||||
{ACPI_DMT_UINT24, ACPI_NFIT7_OFFSET (Reserved[0]), "Reserved", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Capabilities), "Capabilities (decoded below)", DT_FLAG},
|
||||
{ACPI_DMT_FLAG0, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Cache Flush to NVDIMM", 0},
|
||||
{ACPI_DMT_FLAG1, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Flush to MVDIMM", 0},
|
||||
{ACPI_DMT_FLAG2, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Mirroring", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Reserved2), "Reserved", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
@ -162,7 +162,7 @@
|
||||
#define ASL_CREATOR_ID "INTL"
|
||||
#define ASL_DEFINE "__IASL__"
|
||||
#define ASL_PREFIX "iASL: "
|
||||
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.2"
|
||||
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.2A"
|
||||
|
||||
|
||||
/* Configuration constants */
|
||||
|
@ -697,6 +697,11 @@ DtCompileNfit (
|
||||
InfoTable = AcpiDmTableInfoNfit6;
|
||||
break;
|
||||
|
||||
case ACPI_NFIT_TYPE_CAPABILITIES:
|
||||
|
||||
InfoTable = AcpiDmTableInfoNfit7;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "NFIT");
|
||||
@ -740,7 +745,6 @@ DtCompileNfit (
|
||||
}
|
||||
|
||||
Interleave->LineCount = Count;
|
||||
DtPopSubtable ();
|
||||
break;
|
||||
|
||||
case ACPI_NFIT_TYPE_SMBIOS:
|
||||
@ -786,7 +790,6 @@ DtCompileNfit (
|
||||
}
|
||||
|
||||
Hint->HintCount = (UINT16) Count;
|
||||
DtPopSubtable ();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -696,53 +696,56 @@ const unsigned char TemplateHpet[] =
|
||||
|
||||
const unsigned char TemplateIort[] =
|
||||
{
|
||||
0x49,0x4F,0x52,0x54,0x74,0x01,0x00,0x00, /* 00000000 "IORTt..." */
|
||||
0x00,0xD2,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
|
||||
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
|
||||
0x49,0x4F,0x52,0x54,0x90,0x01,0x00,0x00, /* 00000000 "IORT...." */
|
||||
0x00,0x5F,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "._INTEL " */
|
||||
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
|
||||
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
|
||||
0x19,0x01,0x17,0x20,0x05,0x00,0x00,0x00, /* 00000020 "... ...." */
|
||||
0x31,0x08,0x17,0x20,0x05,0x00,0x00,0x00, /* 00000020 "1.. ...." */
|
||||
0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "4......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00, /* 00000030 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */
|
||||
0x00,0x00,0x00,0x00,0x01,0x44,0x00,0x00, /* 00000048 ".....D.." */
|
||||
0x00,0x00,0x00,0x00,0x01,0x58,0x00,0x00, /* 00000048 ".....X.." */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000050 "........" */
|
||||
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "0......." */
|
||||
0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "D......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
|
||||
0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43, /* 00000068 ".\_SB.PC" */
|
||||
0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00, /* 00000070 "I0.DEV0." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
|
||||
0x02,0x34,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 ".4......" */
|
||||
0x01,0x00,0x00,0x00,0x20,0x00,0x00,0x00, /* 00000098 ".... ..." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
|
||||
0x00,0x00,0x00,0x00,0x02,0x34,0x00,0x00, /* 000000A0 ".....4.." */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000A8 "........" */
|
||||
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 " ......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x00, /* 000000C0 ".....`.." */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000C8 "........" */
|
||||
0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "L......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, /* 000000E8 "....<..." */
|
||||
0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 000000F0 "....L..." */
|
||||
0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 000000F8 "....L..." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */
|
||||
0x03,0x60,0x00,0x01,0x00,0x00,0x00,0x00, /* 000000D8 ".`......" */
|
||||
0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 000000E0 "....L..." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
|
||||
0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "<......." */
|
||||
0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "L......." */
|
||||
0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "L......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */
|
||||
0x00,0x00,0x00,0x00,0x04,0x50,0x00,0x00, /* 00000120 ".....P.." */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000128 "........" */
|
||||
0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "<......." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000138 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
|
||||
0x04,0x58,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000138 ".X......" */
|
||||
0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 00000140 "....D..." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */
|
||||
0x00,0x00,0x00,0x00 /* 00000170 "...." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000188 "........" */
|
||||
};
|
||||
|
||||
const unsigned char TemplateIvrs[] =
|
||||
@ -939,11 +942,11 @@ const unsigned char TemplateMsct[] =
|
||||
|
||||
const unsigned char TemplateNfit[] =
|
||||
{
|
||||
0x4E,0x46,0x49,0x54,0x70,0x01,0x00,0x00, /* 00000000 "NFITp..." */
|
||||
0x01,0x53,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".SINTEL " */
|
||||
0x4E,0x46,0x49,0x54,0x80,0x01,0x00,0x00, /* 00000000 "NFIT...." */
|
||||
0x01,0x07,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
|
||||
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
|
||||
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
|
||||
0x10,0x04,0x15,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
|
||||
0x29,0x09,0x17,0x20,0x00,0x00,0x00,0x00, /* 00000020 ").. ...." */
|
||||
0x00,0x00,0x38,0x00,0x01,0x00,0x00,0x00, /* 00000028 "..8....." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
|
||||
0x30,0x05,0xAF,0x91,0x86,0x5D,0x0E,0x47, /* 00000038 "0....].G" */
|
||||
@ -984,7 +987,9 @@ const unsigned char TemplateNfit[] =
|
||||
0x06,0x00,0x20,0x00,0x01,0x00,0x00,0x00, /* 00000150 ".. ....." */
|
||||
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
|
||||
0x00,0x00,0x00,0x18,0x04,0x00,0x00,0x00, /* 00000160 "........" */
|
||||
0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00 /* 00000168 "........" */
|
||||
0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00, /* 00000168 "........" */
|
||||
0x07,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* 00000170 "........" */
|
||||
0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000178 "........" */
|
||||
};
|
||||
|
||||
const unsigned char TemplateMtmr[] =
|
||||
|
@ -187,6 +187,10 @@ AcpiDbExecutionWalk (
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
static void ACPI_SYSTEM_XFACE
|
||||
AcpiDbSingleExecutionThread (
|
||||
void *Context);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -366,7 +370,7 @@ AcpiDbExecuteSetup (
|
||||
ACPI_FUNCTION_NAME (DbExecuteSetup);
|
||||
|
||||
|
||||
/* Catenate the current scope to the supplied name */
|
||||
/* Concatenate the current scope to the supplied name */
|
||||
|
||||
Info->Pathname[0] = 0;
|
||||
if ((Info->Name[0] != '\\') &&
|
||||
@ -789,6 +793,124 @@ AcpiDbMethodThread (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbSingleExecutionThread
|
||||
*
|
||||
* PARAMETERS: Context - Method info struct
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Create one thread and execute a method
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void ACPI_SYSTEM_XFACE
|
||||
AcpiDbSingleExecutionThread (
|
||||
void *Context)
|
||||
{
|
||||
ACPI_DB_METHOD_INFO *Info = Context;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
Status = AcpiDbExecuteMethod (Info, &ReturnObj);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s During evaluation of %s\n",
|
||||
AcpiFormatException (Status), Info->Pathname);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Display a return object, if any */
|
||||
|
||||
if (ReturnObj.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Evaluation of %s returned object %p, "
|
||||
"external buffer length %X\n",
|
||||
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
|
||||
(UINT32) ReturnObj.Length);
|
||||
|
||||
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\nBackground thread completed\n%c ",
|
||||
ACPI_DEBUGGER_COMMAND_PROMPT);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbCreateExecutionThread
|
||||
*
|
||||
* PARAMETERS: MethodNameArg - Control method to execute
|
||||
* Arguments - Array of arguments to the method
|
||||
* Types - Corresponding array of object types
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Create a single thread to evaluate a namespace object. Handles
|
||||
* arguments passed on command line for control methods.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDbCreateExecutionThread (
|
||||
char *MethodNameArg,
|
||||
char **Arguments,
|
||||
ACPI_OBJECT_TYPE *Types)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
memset (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
|
||||
AcpiGbl_DbMethodInfo.Name = MethodNameArg;
|
||||
AcpiGbl_DbMethodInfo.InitArgs = 1;
|
||||
AcpiGbl_DbMethodInfo.Args = AcpiGbl_DbMethodInfo.Arguments;
|
||||
AcpiGbl_DbMethodInfo.Types = AcpiGbl_DbMethodInfo.ArgTypes;
|
||||
|
||||
/* Setup method arguments, up to 7 (0-6) */
|
||||
|
||||
for (i = 0; (i < ACPI_METHOD_NUM_ARGS) && *Arguments; i++)
|
||||
{
|
||||
AcpiGbl_DbMethodInfo.Arguments[i] = *Arguments;
|
||||
Arguments++;
|
||||
|
||||
AcpiGbl_DbMethodInfo.ArgTypes[i] = *Types;
|
||||
Types++;
|
||||
}
|
||||
|
||||
Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the NS node, determines existence also */
|
||||
|
||||
Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname,
|
||||
&AcpiGbl_DbMethodInfo.Method);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s Could not get handle for %s\n",
|
||||
AcpiFormatException (Status), AcpiGbl_DbMethodInfo.Pathname);
|
||||
return;
|
||||
}
|
||||
|
||||
Status = AcpiOsExecute (OSL_DEBUGGER_EXEC_THREAD,
|
||||
AcpiDbSingleExecutionThread, &AcpiGbl_DbMethodInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\nBackground thread started\n");
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbCreateExecutionThreads
|
||||
|
@ -258,6 +258,7 @@ enum AcpiExDebuggerCommands
|
||||
CMD_UNLOAD,
|
||||
|
||||
CMD_TERMINATE,
|
||||
CMD_BACKGROUND,
|
||||
CMD_THREADS,
|
||||
|
||||
CMD_TEST,
|
||||
@ -336,6 +337,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
|
||||
{"UNLOAD", 1},
|
||||
|
||||
{"TERMINATE", 0},
|
||||
{"BACKGROUND", 1},
|
||||
{"THREADS", 3},
|
||||
|
||||
{"TEST", 1},
|
||||
@ -346,102 +348,113 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
|
||||
/*
|
||||
* Help for all debugger commands. First argument is the number of lines
|
||||
* of help to output for the command.
|
||||
*
|
||||
* Note: Some commands are not supported by the kernel-level version of
|
||||
* the debugger.
|
||||
*/
|
||||
static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
|
||||
{
|
||||
{0, "\nGeneral-Purpose Commands:", "\n"},
|
||||
{1, " Allocations", "Display list of current memory allocations\n"},
|
||||
{2, " Dump <Address>|<Namepath>", "\n"},
|
||||
{0, " [Byte|Word|Dword|Qword]", "Display ACPI objects or memory\n"},
|
||||
{1, " Handlers", "Info about global handlers\n"},
|
||||
{1, " Help [Command]", "This help screen or individual command\n"},
|
||||
{1, " History", "Display command history buffer\n"},
|
||||
{1, " Level <DebugLevel>] [console]", "Get/Set debug level for file or console\n"},
|
||||
{1, " Locks", "Current status of internal mutexes\n"},
|
||||
{1, " Osi [Install|Remove <name>]", "Display or modify global _OSI list\n"},
|
||||
{1, " Quit or Exit", "Exit this command\n"},
|
||||
{8, " Stats <SubCommand>", "Display namespace and memory statistics\n"},
|
||||
{1, " Allocations", "Display list of current memory allocations\n"},
|
||||
{1, " Memory", "Dump internal memory lists\n"},
|
||||
{1, " Misc", "Namespace search and mutex stats\n"},
|
||||
{1, " Objects", "Summary of namespace objects\n"},
|
||||
{1, " Sizes", "Sizes for each of the internal objects\n"},
|
||||
{1, " Stack", "Display CPU stack usage\n"},
|
||||
{1, " Tables", "Info about current ACPI table(s)\n"},
|
||||
{1, " Tables", "Display info about loaded ACPI tables\n"},
|
||||
{1, " ! <CommandNumber>", "Execute command from history buffer\n"},
|
||||
{1, " !!", "Execute last command again\n"},
|
||||
{0, "\nNamespace Access:", "\n"},
|
||||
{1, " Businfo", "Display system bus info\n"},
|
||||
{1, " Disassemble <Method>", "Disassemble a control method\n"},
|
||||
{1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"},
|
||||
{1, " Integrity", "Validate namespace integrity\n"},
|
||||
{1, " Methods", "Display list of loaded control methods\n"},
|
||||
{1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"},
|
||||
{1, " Notify <Object> <Value>", "Send a notification on Object\n"},
|
||||
{1, " Objects [ObjectType]", "Display summary of all objects or just given type\n"},
|
||||
{1, " Owner <OwnerId> [Depth]", "Display loaded namespace by object owner\n"},
|
||||
{1, " Paths", "Display full pathnames of namespace objects\n"},
|
||||
{1, " Predefined", "Check all predefined names\n"},
|
||||
{1, " Prefix [<Namepath>]", "Set or Get current execution prefix\n"},
|
||||
{1, " References <Addr>", "Find all references to object at addr\n"},
|
||||
{1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"},
|
||||
{1, " Set N <NamedObject> <Value>", "Set value for named integer\n"},
|
||||
{1, " Template <Object>", "Format/dump a Buffer/ResourceTemplate\n"},
|
||||
{1, " Type <Object>", "Display object type\n"},
|
||||
|
||||
{0, "\nNamespace Access Commands:", "\n"},
|
||||
{1, " Businfo", "Display system bus info\n"},
|
||||
{1, " Disassemble <Method>", "Disassemble a control method\n"},
|
||||
{1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"},
|
||||
{1, " Integrity", "Validate namespace integrity\n"},
|
||||
{1, " Methods", "Display list of loaded control methods\n"},
|
||||
{1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"},
|
||||
{1, " Notify <Object> <Value>", "Send a notification on Object\n"},
|
||||
{1, " Objects [ObjectType]", "Display summary of all objects or just given type\n"},
|
||||
{1, " Owner <OwnerId> [Depth]", "Display loaded namespace by object owner\n"},
|
||||
{1, " Paths", "Display full pathnames of namespace objects\n"},
|
||||
{1, " Predefined", "Check all predefined names\n"},
|
||||
{1, " Prefix [<Namepath>]", "Set or Get current execution prefix\n"},
|
||||
{1, " References <Addr>", "Find all references to object at addr\n"},
|
||||
{1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"},
|
||||
{1, " Set N <NamedObject> <Value>", "Set value for named integer\n"},
|
||||
{1, " Template <Object>", "Format/dump a Buffer/ResourceTemplate\n"},
|
||||
{1, " Type <Object>", "Display object type\n"},
|
||||
{0, "\nControl Method Execution:", "\n"},
|
||||
{1, " Evaluate <Namepath> [Arguments]", "Evaluate object or control method\n"},
|
||||
{1, " Execute <Namepath> [Arguments]", "Synonym for Evaluate\n"},
|
||||
#ifdef ACPI_APPLICATION
|
||||
{1, " Background <Namepath> [Arguments]", "Evaluate object/method in a separate thread\n"},
|
||||
{1, " Thread <Threads><Loops><NamePath>", "Spawn threads to execute method(s)\n"},
|
||||
#endif
|
||||
{1, " Debug <Namepath> [Arguments]", "Single-Step a control method\n"},
|
||||
{7, " [Arguments] formats:", "Control method argument formats\n"},
|
||||
{1, " Hex Integer", "Integer\n"},
|
||||
{1, " \"Ascii String\"", "String\n"},
|
||||
{1, " (Hex Byte List)", "Buffer\n"},
|
||||
{1, " (01 42 7A BF)", "Buffer example (4 bytes)\n"},
|
||||
{1, " [Package Element List]", "Package\n"},
|
||||
{1, " [0x01 0x1234 \"string\"]", "Package example (3 elements)\n"},
|
||||
|
||||
{0, "\nControl Method Execution Commands:","\n"},
|
||||
{1, " Arguments (or Args)", "Display method arguments\n"},
|
||||
{1, " Breakpoint <AmlOffset>", "Set an AML execution breakpoint\n"},
|
||||
{1, " Call", "Run to next control method invocation\n"},
|
||||
{1, " Debug <Namepath> [Arguments]", "Single Step a control method\n"},
|
||||
{6, " Evaluate", "Synonym for Execute\n"},
|
||||
{5, " Execute <Namepath> [Arguments]", "Execute control method\n"},
|
||||
{1, " Hex Integer", "Integer method argument\n"},
|
||||
{1, " \"Ascii String\"", "String method argument\n"},
|
||||
{1, " (Hex Byte List)", "Buffer method argument\n"},
|
||||
{1, " [Package Element List]", "Package method argument\n"},
|
||||
{5, " Execute predefined", "Execute all predefined (public) methods\n"},
|
||||
{1, " Go", "Allow method to run to completion\n"},
|
||||
{1, " Information", "Display info about the current method\n"},
|
||||
{1, " Into", "Step into (not over) a method call\n"},
|
||||
{1, " List [# of Aml Opcodes]", "Display method ASL statements\n"},
|
||||
{1, " Locals", "Display method local variables\n"},
|
||||
{1, " Results", "Display method result stack\n"},
|
||||
{1, " Set <A|L> <#> <Value>", "Set method data (Arguments/Locals)\n"},
|
||||
{1, " Stop", "Terminate control method\n"},
|
||||
{5, " Trace <State> [<Namepath>] [Once]", "Trace control method execution\n"},
|
||||
{1, " Enable", "Enable all messages\n"},
|
||||
{1, " Disable", "Disable tracing\n"},
|
||||
{1, " Method", "Enable method execution messages\n"},
|
||||
{1, " Opcode", "Enable opcode execution messages\n"},
|
||||
{1, " Tree", "Display control method calling tree\n"},
|
||||
{1, " <Enter>", "Single step next AML opcode (over calls)\n"},
|
||||
{0, "\nMiscellaneous:", "\n"},
|
||||
{1, " Allocations", "Display list of current memory allocations\n"},
|
||||
{2, " Dump <Address>|<Namepath>", "\n"},
|
||||
{0, " [Byte|Word|Dword|Qword]", "Display ACPI objects or memory\n"},
|
||||
{1, " Handlers", "Info about global handlers\n"},
|
||||
{1, " Help [Command]", "This help screen or individual command\n"},
|
||||
{1, " History", "Display command history buffer\n"},
|
||||
{1, " Level <DebugLevel>] [console]", "Get/Set debug level for file or console\n"},
|
||||
{1, " Locks", "Current status of internal mutexes\n"},
|
||||
{1, " Osi [Install|Remove <name>]", "Display or modify global _OSI list\n"},
|
||||
{1, " Quit or Exit", "Exit this command\n"},
|
||||
{8, " Stats <SubCommand>", "Display namespace and memory statistics\n"},
|
||||
{1, " Allocations", "Display list of current memory allocations\n"},
|
||||
{1, " Memory", "Dump internal memory lists\n"},
|
||||
{1, " Misc", "Namespace search and mutex stats\n"},
|
||||
{1, " Objects", "Summary of namespace objects\n"},
|
||||
{1, " Sizes", "Sizes for each of the internal objects\n"},
|
||||
{1, " Stack", "Display CPU stack usage\n"},
|
||||
{1, " Tables", "Info about current ACPI table(s)\n"},
|
||||
{1, " Tables", "Display info about loaded ACPI tables\n"},
|
||||
#ifdef ACPI_APPLICATION
|
||||
{1, " Terminate", "Delete namespace and all internal objects\n"},
|
||||
#endif
|
||||
{1, " ! <CommandNumber>", "Execute command from history buffer\n"},
|
||||
{1, " !!", "Execute last command again\n"},
|
||||
|
||||
{0, "\nMethod and Namespace Debugging:", "\n"},
|
||||
{5, " Trace <State> [<Namepath>] [Once]", "Trace control method execution\n"},
|
||||
{1, " Enable", "Enable all messages\n"},
|
||||
{1, " Disable", "Disable tracing\n"},
|
||||
{1, " Method", "Enable method execution messages\n"},
|
||||
{1, " Opcode", "Enable opcode execution messages\n"},
|
||||
{3, " Test <TestName>", "Invoke a debug test\n"},
|
||||
{1, " Objects", "Read/write/compare all namespace data objects\n"},
|
||||
{1, " Predefined", "Validate all ACPI predefined names (_STA, etc.)\n"},
|
||||
{1, " Execute predefined", "Execute all predefined (public) methods\n"},
|
||||
|
||||
{0, "\nControl Method Single-Step Execution:","\n"},
|
||||
{1, " Arguments (or Args)", "Display method arguments\n"},
|
||||
{1, " Breakpoint <AmlOffset>", "Set an AML execution breakpoint\n"},
|
||||
{1, " Call", "Run to next control method invocation\n"},
|
||||
{1, " Go", "Allow method to run to completion\n"},
|
||||
{1, " Information", "Display info about the current method\n"},
|
||||
{1, " Into", "Step into (not over) a method call\n"},
|
||||
{1, " List [# of Aml Opcodes]", "Display method ASL statements\n"},
|
||||
{1, " Locals", "Display method local variables\n"},
|
||||
{1, " Results", "Display method result stack\n"},
|
||||
{1, " Set <A|L> <#> <Value>", "Set method data (Arguments/Locals)\n"},
|
||||
{1, " Stop", "Terminate control method\n"},
|
||||
{1, " Tree", "Display control method calling tree\n"},
|
||||
{1, " <Enter>", "Single step next AML opcode (over calls)\n"},
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
{0, "\nHardware Simulation Commands:", "\n"},
|
||||
{1, " EnableAcpi", "Enable ACPI (hardware) mode\n"},
|
||||
{1, " Event <F|G> <Value>", "Generate AcpiEvent (Fixed/GPE)\n"},
|
||||
{1, " Gpe <GpeNum> [GpeBlockDevice]", "Simulate a GPE\n"},
|
||||
{1, " Gpes", "Display info on all GPE devices\n"},
|
||||
{1, " Sci", "Generate an SCI\n"},
|
||||
{1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"},
|
||||
{0, "\nFile Operations:", "\n"},
|
||||
{1, " Close", "Close debug output file\n"},
|
||||
{1, " Load <Input Filename>", "Load ACPI table from a file\n"},
|
||||
{1, " Open <Output Filename>", "Open a file for debug output\n"},
|
||||
{1, " Unload <Namepath>", "Unload an ACPI table via namespace object\n"},
|
||||
|
||||
{0, "\nFile I/O Commands:", "\n"},
|
||||
{1, " Close", "Close debug output file\n"},
|
||||
{1, " Load <Input Filename>", "Load ACPI table from a file\n"},
|
||||
{1, " Open <Output Filename>", "Open a file for debug output\n"},
|
||||
{1, " Unload <Namepath>", "Unload an ACPI table via namespace object\n"},
|
||||
|
||||
{0, "\nUser Space Commands:", "\n"},
|
||||
{1, " Terminate", "Delete namespace and all internal objects\n"},
|
||||
{1, " Thread <Threads><Loops><NamePath>", "Spawn threads to execute method(s)\n"},
|
||||
|
||||
{0, "\nDebug Test Commands:", "\n"},
|
||||
{3, " Test <TestName>", "Invoke a debug test\n"},
|
||||
{1, " Objects", "Read/write/compare all namespace data objects\n"},
|
||||
{1, " Predefined", "Execute all ACPI predefined names (_STA, etc.)\n"},
|
||||
{0, "\nHardware Simulation:", "\n"},
|
||||
{1, " EnableAcpi", "Enable ACPI (hardware) mode\n"},
|
||||
{1, " Event <F|G> <Value>", "Generate AcpiEvent (Fixed/GPE)\n"},
|
||||
{1, " Gpe <GpeNum> [GpeBlockDevice]", "Simulate a GPE\n"},
|
||||
{1, " Gpes", "Display info on all GPE devices\n"},
|
||||
{1, " Sci", "Generate an SCI\n"},
|
||||
{1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"},
|
||||
#endif
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
@ -571,11 +584,15 @@ AcpiDbDisplayHelp (
|
||||
{
|
||||
/* No argument to help, display help for all commands */
|
||||
|
||||
AcpiOsPrintf ("\nSummary of AML Debugger Commands\n\n");
|
||||
|
||||
while (Next->Invocation)
|
||||
{
|
||||
AcpiOsPrintf ("%-38s%s", Next->Invocation, Next->Description);
|
||||
Next++;
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1258,6 +1275,12 @@ AcpiDbCommandDispatch (
|
||||
/* AcpiInitialize (NULL); */
|
||||
break;
|
||||
|
||||
case CMD_BACKGROUND:
|
||||
|
||||
AcpiDbCreateExecutionThread (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2],
|
||||
&AcpiGbl_DbArgTypes[2]);
|
||||
break;
|
||||
|
||||
case CMD_THREADS:
|
||||
|
||||
AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
|
||||
|
@ -340,7 +340,8 @@ AcpiDsCreateBufferField (
|
||||
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -524,7 +525,8 @@ AcpiDsGetFieldNames (
|
||||
WalkState, &Info->ConnectionNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Child->Common.Value.Name, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Child->Common.Value.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -540,7 +542,8 @@ AcpiDsGetFieldNames (
|
||||
WalkState, &Info->FieldNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
(char *) &Arg->Named.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
else
|
||||
@ -639,7 +642,8 @@ AcpiDsCreateField (
|
||||
#endif
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -769,7 +773,8 @@ AcpiDsInitFieldObjects (
|
||||
Flags, WalkState, &Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
(char *) &Arg->Named.Name, Status);
|
||||
if (Status != AE_ALREADY_EXISTS)
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -834,7 +839,8 @@ AcpiDsCreateBankField (
|
||||
#endif
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -847,7 +853,8 @@ AcpiDsCreateBankField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -920,7 +927,8 @@ AcpiDsCreateIndexField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -932,7 +940,8 @@ AcpiDsCreateIndexField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,8 @@ AcpiDsBuildInternalObject (
|
||||
ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Op->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Op->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
@ -732,7 +732,8 @@ AcpiDsCreateOperand (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (NameString, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
NameString, Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ AcpiDsLoad1BeginOp (
|
||||
#endif
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Path, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Path, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ AcpiDsLoad1BeginOp (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Path, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Path, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
@ -304,10 +304,12 @@ AcpiDsLoad2BeginOp (
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (BufferPtr, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
BufferPtr, Status);
|
||||
}
|
||||
#else
|
||||
ACPI_ERROR_NAMESPACE (BufferPtr, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
BufferPtr, Status);
|
||||
#endif
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
@ -462,7 +464,8 @@ AcpiDsLoad2BeginOp (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (BufferPtr, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
BufferPtr, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -844,7 +847,8 @@ AcpiDsLoad2EndOp (
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
|
||||
Arg->Common.Value.String, Status);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -423,6 +423,17 @@ AcpiEvAddressSpaceDispatch (
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "Returned by Handler for [%s]",
|
||||
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
|
||||
|
||||
/*
|
||||
* Special case for an EC timeout. These are seen so frequently
|
||||
* that an additional error message is helpful
|
||||
*/
|
||||
if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
|
||||
(Status == AE_TIME))
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Timeout from EC hardware or EC device driver"));
|
||||
}
|
||||
}
|
||||
|
||||
if (!(HandlerDesc->AddressSpace.HandlerFlags &
|
||||
|
@ -644,7 +644,8 @@ AcpiNsConvertToReference (
|
||||
{
|
||||
/* Check if we are resolving a named reference within a package */
|
||||
|
||||
ACPI_ERROR_NAMESPACE (OriginalObject->String.Pointer, Status);
|
||||
ACPI_ERROR_NAMESPACE (&ScopeInfo,
|
||||
OriginalObject->String.Pointer, Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
|
@ -158,6 +158,12 @@
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
ACPI_MODULE_NAME ("nsnames")
|
||||
|
||||
/* Local Prototypes */
|
||||
|
||||
static void
|
||||
AcpiNsNormalizePathname (
|
||||
char *OriginalPath);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -507,3 +513,169 @@ AcpiNsGetNormalizedPathname (
|
||||
|
||||
return_PTR (NameBuffer);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsBuildPrefixedPathname
|
||||
*
|
||||
* PARAMETERS: PrefixScope - Scope/Path that prefixes the internal path
|
||||
* InternalPath - Name or path of the namespace node
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Construct a fully qualified pathname from a concatenation of:
|
||||
* 1) Path associated with the PrefixScope namespace node
|
||||
* 2) External path representation of the Internal path
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
char *
|
||||
AcpiNsBuildPrefixedPathname (
|
||||
ACPI_GENERIC_STATE *PrefixScope,
|
||||
const char *InternalPath)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
char *FullPath = NULL;
|
||||
char *ExternalPath = NULL;
|
||||
char *PrefixPath = NULL;
|
||||
UINT32 PrefixPathLength = 0;
|
||||
|
||||
|
||||
/* If there is a prefix, get the pathname to it */
|
||||
|
||||
if (PrefixScope && PrefixScope->Scope.Node)
|
||||
{
|
||||
PrefixPath = AcpiNsGetNormalizedPathname (PrefixScope->Scope.Node, TRUE);
|
||||
if (PrefixPath)
|
||||
{
|
||||
PrefixPathLength = strlen (PrefixPath);
|
||||
}
|
||||
}
|
||||
|
||||
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalPath,
|
||||
NULL, &ExternalPath);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Merge the prefix path and the path. 2 is for one dot and trailing null */
|
||||
|
||||
FullPath = ACPI_ALLOCATE_ZEROED (
|
||||
PrefixPathLength + strlen (ExternalPath) + 2);
|
||||
if (!FullPath)
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Don't merge if the External path is already fully qualified */
|
||||
|
||||
if (PrefixPath &&
|
||||
(*ExternalPath != '\\') &&
|
||||
(*ExternalPath != '^'))
|
||||
{
|
||||
strcat (FullPath, PrefixPath);
|
||||
if (PrefixPath[1])
|
||||
{
|
||||
strcat (FullPath, ".");
|
||||
}
|
||||
}
|
||||
|
||||
AcpiNsNormalizePathname (ExternalPath);
|
||||
strcat (FullPath, ExternalPath);
|
||||
|
||||
Cleanup:
|
||||
if (PrefixPath)
|
||||
{
|
||||
ACPI_FREE (PrefixPath);
|
||||
}
|
||||
if (ExternalPath)
|
||||
{
|
||||
ACPI_FREE (ExternalPath);
|
||||
}
|
||||
|
||||
return (FullPath);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsNormalizePathname
|
||||
*
|
||||
* PARAMETERS: OriginalPath - Path to be normalized, in External format
|
||||
*
|
||||
* RETURN: The original path is processed in-place
|
||||
*
|
||||
* DESCRIPTION: Remove trailing underscores from each element of a path.
|
||||
*
|
||||
* For example: \A___.B___.C___ becomes \A.B.C
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
AcpiNsNormalizePathname (
|
||||
char *OriginalPath)
|
||||
{
|
||||
char *InputPath = OriginalPath;
|
||||
char *NewPathBuffer;
|
||||
char *NewPath;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Allocate a temp buffer in which to construct the new path */
|
||||
|
||||
NewPathBuffer = ACPI_ALLOCATE_ZEROED (strlen (InputPath) + 1);
|
||||
NewPath = NewPathBuffer;
|
||||
if (!NewPathBuffer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Special characters may appear at the beginning of the path */
|
||||
|
||||
if (*InputPath == '\\')
|
||||
{
|
||||
*NewPath = *InputPath;
|
||||
NewPath++;
|
||||
InputPath++;
|
||||
}
|
||||
|
||||
while (*InputPath == '^')
|
||||
{
|
||||
*NewPath = *InputPath;
|
||||
NewPath++;
|
||||
InputPath++;
|
||||
}
|
||||
|
||||
/* Remainder of the path */
|
||||
|
||||
while (*InputPath)
|
||||
{
|
||||
/* Do one nameseg at a time */
|
||||
|
||||
for (i = 0; (i < ACPI_NAME_SIZE) && *InputPath; i++)
|
||||
{
|
||||
if ((i == 0) || (*InputPath != '_')) /* First char is allowed to be underscore */
|
||||
{
|
||||
*NewPath = *InputPath;
|
||||
NewPath++;
|
||||
}
|
||||
|
||||
InputPath++;
|
||||
}
|
||||
|
||||
/* Dot means that there are more namesegs to come */
|
||||
|
||||
if (*InputPath == '.')
|
||||
{
|
||||
*NewPath = *InputPath;
|
||||
NewPath++;
|
||||
InputPath++;
|
||||
}
|
||||
}
|
||||
|
||||
*NewPath = 0;
|
||||
strcpy (OriginalPath, NewPathBuffer);
|
||||
ACPI_FREE (NewPathBuffer);
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ AcpiPsGetNextNamepath (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR_NAMESPACE (Path, Status);
|
||||
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Path, Status);
|
||||
|
||||
if ((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) ==
|
||||
ACPI_PARSE_EXECUTE)
|
||||
|
@ -558,11 +558,6 @@ AcpiUtGetReferenceName (
|
||||
}
|
||||
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
/*
|
||||
* Strings and procedures used for debug only
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtGetMutexName
|
||||
@ -601,6 +596,12 @@ AcpiUtGetMutexName (
|
||||
}
|
||||
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
|
||||
/*
|
||||
* Strings and procedures used for debug only
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtGetNotifyName
|
||||
|
@ -311,6 +311,82 @@ AcpiUtPredefinedBiosError (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtPrefixedNamespaceError
|
||||
*
|
||||
* PARAMETERS: ModuleName - Caller's module name (for error output)
|
||||
* LineNumber - Caller's line number (for error output)
|
||||
* PrefixScope - Scope/Path that prefixes the internal path
|
||||
* InternalPath - Name or path of the namespace node
|
||||
* LookupStatus - Exception code from NS lookup
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Print error message with the full pathname constructed this way:
|
||||
*
|
||||
* PrefixScopeNodeFullPath.ExternalizedInternalPath
|
||||
*
|
||||
* NOTE: 10/2017: Treat the major NsLookup errors as firmware errors
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiUtPrefixedNamespaceError (
|
||||
const char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
ACPI_GENERIC_STATE *PrefixScope,
|
||||
const char *InternalPath,
|
||||
ACPI_STATUS LookupStatus)
|
||||
{
|
||||
char *FullPath;
|
||||
const char *Message;
|
||||
|
||||
|
||||
/*
|
||||
* Main cases:
|
||||
* 1) Object creation, object must not already exist
|
||||
* 2) Object lookup, object must exist
|
||||
*/
|
||||
switch (LookupStatus)
|
||||
{
|
||||
case AE_ALREADY_EXISTS:
|
||||
|
||||
AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
|
||||
Message = "Failure creating";
|
||||
break;
|
||||
|
||||
case AE_NOT_FOUND:
|
||||
|
||||
AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
|
||||
Message = "Failure looking up";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
AcpiOsPrintf (ACPI_MSG_ERROR);
|
||||
Message = "Failure looking up";
|
||||
break;
|
||||
}
|
||||
|
||||
/* Concatenate the prefix path and the internal path */
|
||||
|
||||
FullPath = AcpiNsBuildPrefixedPathname (PrefixScope, InternalPath);
|
||||
|
||||
AcpiOsPrintf ("%s [%s], %s", Message,
|
||||
FullPath ? FullPath : "Could not get pathname",
|
||||
AcpiFormatException (LookupStatus));
|
||||
|
||||
if (FullPath)
|
||||
{
|
||||
ACPI_FREE (FullPath);
|
||||
}
|
||||
|
||||
ACPI_MSG_SUFFIX;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __OBSOLETE_FUNCTION
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtNamespaceError
|
||||
@ -378,7 +454,7 @@ AcpiUtNamespaceError (
|
||||
ACPI_MSG_SUFFIX;
|
||||
ACPI_MSG_REDIRECT_END;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
@ -432,8 +432,8 @@ AcpiUtAcquireMutex (
|
||||
else
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"Thread %u could not acquire Mutex [0x%X]",
|
||||
(UINT32) ThisThreadId, MutexId));
|
||||
"Thread %u could not acquire Mutex [%s] (0x%X)",
|
||||
(UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId), MutexId));
|
||||
}
|
||||
|
||||
return (Status);
|
||||
@ -473,7 +473,8 @@ AcpiUtReleaseMutex (
|
||||
if (AcpiGbl_MutexInfo[MutexId].ThreadId == ACPI_MUTEX_NOT_ACQUIRED)
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Mutex [0x%X] is not acquired, cannot release", MutexId));
|
||||
"Mutex [%s] (0x%X) is not acquired, cannot release",
|
||||
AcpiUtGetMutexName (MutexId), MutexId));
|
||||
|
||||
return (AE_NOT_ACQUIRED);
|
||||
}
|
||||
|
@ -167,13 +167,13 @@ AcpiUtInsertDigit (
|
||||
static ACPI_STATUS
|
||||
AcpiUtStrtoulMultiply64 (
|
||||
UINT64 Multiplicand,
|
||||
UINT64 Multiplier,
|
||||
UINT32 Base,
|
||||
UINT64 *OutProduct);
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiUtStrtoulAdd64 (
|
||||
UINT64 Addend1,
|
||||
UINT64 Addend2,
|
||||
UINT32 Digit,
|
||||
UINT64 *OutSum);
|
||||
|
||||
|
||||
@ -518,7 +518,7 @@ AcpiUtInsertDigit (
|
||||
* FUNCTION: AcpiUtStrtoulMultiply64
|
||||
*
|
||||
* PARAMETERS: Multiplicand - Current accumulated converted integer
|
||||
* Multiplier - Base/Radix
|
||||
* Base - Base/Radix
|
||||
* OutProduct - Where the product is returned
|
||||
*
|
||||
* RETURN: Status and 64-bit product
|
||||
@ -532,28 +532,36 @@ AcpiUtInsertDigit (
|
||||
static ACPI_STATUS
|
||||
AcpiUtStrtoulMultiply64 (
|
||||
UINT64 Multiplicand,
|
||||
UINT64 Multiplier,
|
||||
UINT32 Base,
|
||||
UINT64 *OutProduct)
|
||||
{
|
||||
UINT64 Product;
|
||||
UINT64 Quotient;
|
||||
|
||||
|
||||
/* Exit if either operand is zero */
|
||||
|
||||
*OutProduct = 0;
|
||||
if (!Multiplicand || !Multiplier)
|
||||
if (!Multiplicand || !Base)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Check for 64-bit overflow before the actual multiplication */
|
||||
|
||||
if (Multiplicand > (ACPI_UINT64_MAX / Multiplier))
|
||||
/*
|
||||
* Check for 64-bit overflow before the actual multiplication.
|
||||
*
|
||||
* Notes: 64-bit division is often not supported on 32-bit platforms
|
||||
* (it requires a library function), Therefore ACPICA has a local
|
||||
* 64-bit divide function. Also, Multiplier is currently only used
|
||||
* as the radix (8/10/16), to the 64/32 divide will always work.
|
||||
*/
|
||||
AcpiUtShortDivide (ACPI_UINT64_MAX, Base, &Quotient, NULL);
|
||||
if (Multiplicand > Quotient)
|
||||
{
|
||||
return (AE_NUMERIC_OVERFLOW);
|
||||
}
|
||||
|
||||
Product = Multiplicand * Multiplier;
|
||||
Product = Multiplicand * Base;
|
||||
|
||||
/* Check for 32-bit overflow if necessary */
|
||||
|
||||
@ -572,7 +580,7 @@ AcpiUtStrtoulMultiply64 (
|
||||
* FUNCTION: AcpiUtStrtoulAdd64
|
||||
*
|
||||
* PARAMETERS: Addend1 - Current accumulated converted integer
|
||||
* Addend2 - New hex value/char
|
||||
* Digit - New hex value/char
|
||||
* OutSum - Where sum is returned (Accumulator)
|
||||
*
|
||||
* RETURN: Status and 64-bit sum
|
||||
@ -586,7 +594,7 @@ AcpiUtStrtoulMultiply64 (
|
||||
static ACPI_STATUS
|
||||
AcpiUtStrtoulAdd64 (
|
||||
UINT64 Addend1,
|
||||
UINT64 Addend2,
|
||||
UINT32 Digit,
|
||||
UINT64 *OutSum)
|
||||
{
|
||||
UINT64 Sum;
|
||||
@ -594,12 +602,12 @@ AcpiUtStrtoulAdd64 (
|
||||
|
||||
/* Check for 64-bit overflow before the actual addition */
|
||||
|
||||
if ((Addend1 > 0) && (Addend2 > (ACPI_UINT64_MAX - Addend1)))
|
||||
if ((Addend1 > 0) && (Digit > (ACPI_UINT64_MAX - Addend1)))
|
||||
{
|
||||
return (AE_NUMERIC_OVERFLOW);
|
||||
}
|
||||
|
||||
Sum = Addend1 + Addend2;
|
||||
Sum = Addend1 + Digit;
|
||||
|
||||
/* Check for 32-bit overflow if necessary */
|
||||
|
||||
|
@ -891,7 +891,7 @@ AcpiUtDumpAllocations (
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO, "%u(0x%X) Outstanding allocations",
|
||||
ACPI_ERROR ((AE_INFO, "%u (0x%X) Outstanding cache allocations",
|
||||
NumOutstanding, NumOutstanding));
|
||||
}
|
||||
|
||||
|
@ -214,8 +214,8 @@ ACPI_EXPORT_SYMBOL (AcpiError)
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Print "ACPI Exception" message with module/line/version info
|
||||
* and decoded ACPI_STATUS.
|
||||
* DESCRIPTION: Print an "ACPI Error" message with module/line/version
|
||||
* info as well as decoded ACPI_STATUS.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -236,12 +236,12 @@ AcpiException (
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiOsPrintf (ACPI_MSG_EXCEPTION);
|
||||
AcpiOsPrintf (ACPI_MSG_ERROR);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ",
|
||||
AcpiOsPrintf (ACPI_MSG_ERROR "%s, ",
|
||||
AcpiFormatException (Status));
|
||||
}
|
||||
|
||||
|
@ -451,6 +451,12 @@ AcpiDbExecute (
|
||||
ACPI_OBJECT_TYPE *Types,
|
||||
UINT32 Flags);
|
||||
|
||||
void
|
||||
AcpiDbCreateExecutionThread (
|
||||
char *MethodNameArg,
|
||||
char **Arguments,
|
||||
ACPI_OBJECT_TYPE *Types);
|
||||
|
||||
void
|
||||
AcpiDbCreateExecutionThreads (
|
||||
char *NumThreadsArg,
|
||||
|
@ -504,6 +504,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit4[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit5[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[];
|
||||
|
@ -1532,16 +1532,17 @@ typedef struct acpi_db_method_info
|
||||
ACPI_OBJECT_TYPE *Types;
|
||||
|
||||
/*
|
||||
* Arguments to be passed to method for the command
|
||||
* Threads -
|
||||
* the Number of threads, ID of current thread and
|
||||
* Index of current thread inside all them created.
|
||||
* Arguments to be passed to method for the commands Threads and
|
||||
* Background. Note, ACPI specifies a maximum of 7 arguments (0 - 6).
|
||||
*
|
||||
* For the Threads command, the Number of threads, ID of current
|
||||
* thread and Index of current thread inside all them created.
|
||||
*/
|
||||
char InitArgs;
|
||||
#ifdef ACPI_DEBUGGER
|
||||
ACPI_OBJECT_TYPE ArgTypes[4];
|
||||
ACPI_OBJECT_TYPE ArgTypes[ACPI_METHOD_NUM_ARGS];
|
||||
#endif
|
||||
char *Arguments[4];
|
||||
char *Arguments[ACPI_METHOD_NUM_ARGS];
|
||||
char NumThreadsStr[11];
|
||||
char IdOfThreadStr[11];
|
||||
char IndexOfThreadStr[11];
|
||||
|
@ -567,7 +567,7 @@
|
||||
* the plist contains a set of parens to allow variable-length lists.
|
||||
* These macros are used for both the debug and non-debug versions of the code.
|
||||
*/
|
||||
#define ACPI_ERROR_NAMESPACE(s, e) AcpiUtNamespaceError (AE_INFO, s, e);
|
||||
#define ACPI_ERROR_NAMESPACE(s, p, e) AcpiUtPrefixedNamespaceError (AE_INFO, s, p, e);
|
||||
#define ACPI_ERROR_METHOD(s, n, p, e) AcpiUtMethodError (AE_INFO, s, n, p, e);
|
||||
#define ACPI_WARN_PREDEFINED(plist) AcpiUtPredefinedWarning plist
|
||||
#define ACPI_INFO_PREDEFINED(plist) AcpiUtPredefinedInfo plist
|
||||
|
@ -488,6 +488,11 @@ AcpiNsGetNormalizedPathname (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
BOOLEAN NoTrailing);
|
||||
|
||||
char *
|
||||
AcpiNsBuildPrefixedPathname (
|
||||
ACPI_GENERIC_STATE *PrefixScope,
|
||||
const char *InternalPath);
|
||||
|
||||
char *
|
||||
AcpiNsNameOfCurrentScope (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
@ -154,7 +154,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20170929
|
||||
#define ACPI_CA_VERSION 0x20171110
|
||||
|
||||
#include <contrib/dev/acpica/include/acconfig.h>
|
||||
#include <contrib/dev/acpica/include/actypes.h>
|
||||
|
@ -1449,7 +1449,8 @@ enum AcpiNfitType
|
||||
ACPI_NFIT_TYPE_CONTROL_REGION = 4,
|
||||
ACPI_NFIT_TYPE_DATA_REGION = 5,
|
||||
ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
|
||||
ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
|
||||
ACPI_NFIT_TYPE_CAPABILITIES = 7,
|
||||
ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1463,7 +1464,7 @@ typedef struct acpi_nfit_system_address
|
||||
ACPI_NFIT_HEADER Header;
|
||||
UINT16 RangeIndex;
|
||||
UINT16 Flags;
|
||||
UINT32 Reserved; /* Reseved, must be zero */
|
||||
UINT32 Reserved; /* Reserved, must be zero */
|
||||
UINT32 ProximityDomain;
|
||||
UINT8 RangeGuid[16];
|
||||
UINT64 Address;
|
||||
@ -1602,6 +1603,75 @@ typedef struct acpi_nfit_flush_address
|
||||
} ACPI_NFIT_FLUSH_ADDRESS;
|
||||
|
||||
|
||||
/* 7: Platform Capabilities Structure */
|
||||
|
||||
typedef struct acpi_nfit_capabilities
|
||||
{
|
||||
ACPI_NFIT_HEADER Header;
|
||||
UINT8 HighestCapability;
|
||||
UINT8 Reserved[3]; /* Reserved, must be zero */
|
||||
UINT32 Capabilities;
|
||||
UINT32 Reserved2;
|
||||
|
||||
} ACPI_NFIT_CAPABILITIES;
|
||||
|
||||
/* Capabilities Flags */
|
||||
|
||||
#define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */
|
||||
#define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */
|
||||
#define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */
|
||||
|
||||
|
||||
/*
|
||||
* NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM
|
||||
*/
|
||||
typedef struct nfit_device_handle
|
||||
{
|
||||
UINT32 Handle;
|
||||
|
||||
} NFIT_DEVICE_HANDLE;
|
||||
|
||||
/* Device handle construction and extraction macros */
|
||||
|
||||
#define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F
|
||||
#define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0
|
||||
#define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00
|
||||
#define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000
|
||||
#define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000
|
||||
|
||||
#define ACPI_NFIT_DIMM_NUMBER_OFFSET 0
|
||||
#define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4
|
||||
#define ACPI_NFIT_MEMORY_ID_OFFSET 8
|
||||
#define ACPI_NFIT_SOCKET_ID_OFFSET 12
|
||||
#define ACPI_NFIT_NODE_ID_OFFSET 16
|
||||
|
||||
/* Macro to construct a NFIT/NVDIMM device handle */
|
||||
|
||||
#define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \
|
||||
((dimm) | \
|
||||
((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \
|
||||
((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \
|
||||
((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \
|
||||
((node) << ACPI_NFIT_NODE_ID_OFFSET))
|
||||
|
||||
/* Macros to extract individual fields from a NFIT/NVDIMM device handle */
|
||||
|
||||
#define ACPI_NFIT_GET_DIMM_NUMBER(handle) \
|
||||
((handle) & ACPI_NFIT_DIMM_NUMBER_MASK)
|
||||
|
||||
#define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \
|
||||
(((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET)
|
||||
|
||||
#define ACPI_NFIT_GET_MEMORY_ID(handle) \
|
||||
(((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET)
|
||||
|
||||
#define ACPI_NFIT_GET_SOCKET_ID(handle) \
|
||||
(((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET)
|
||||
|
||||
#define ACPI_NFIT_GET_NODE_ID(handle) \
|
||||
(((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* PDTT - Platform Debug Trigger Table (ACPI 6.2)
|
||||
@ -1634,7 +1704,7 @@ typedef struct acpi_pdtt_channel
|
||||
/* Flags for above */
|
||||
|
||||
#define ACPI_PDTT_RUNTIME_TRIGGER (1)
|
||||
#define ACPI_PPTT_WAIT_COMPLETION (1<<1)
|
||||
#define ACPI_PDTT_WAIT_COMPLETION (1<<1)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -1712,6 +1782,19 @@ typedef struct acpi_pptt_cache
|
||||
#define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */
|
||||
#define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */
|
||||
|
||||
/* Attributes describing cache */
|
||||
#define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */
|
||||
#define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */
|
||||
#define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */
|
||||
#define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */
|
||||
|
||||
#define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */
|
||||
#define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */
|
||||
|
||||
#define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */
|
||||
#define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */
|
||||
|
||||
/* 2: ID Structure */
|
||||
|
||||
|
@ -1048,6 +1048,7 @@ typedef struct acpi_iort_smmu_v3
|
||||
UINT8 Pxm;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 IdMappingIndex;
|
||||
|
||||
} ACPI_IORT_SMMU_V3;
|
||||
|
||||
|
@ -227,9 +227,6 @@ extern const char *AcpiGbl_PtypDecode[];
|
||||
#ifndef ACPI_MSG_ERROR
|
||||
#define ACPI_MSG_ERROR "ACPI Error: "
|
||||
#endif
|
||||
#ifndef ACPI_MSG_EXCEPTION
|
||||
#define ACPI_MSG_EXCEPTION "ACPI Exception: "
|
||||
#endif
|
||||
#ifndef ACPI_MSG_WARNING
|
||||
#define ACPI_MSG_WARNING "ACPI Warning: "
|
||||
#endif
|
||||
@ -238,10 +235,10 @@ extern const char *AcpiGbl_PtypDecode[];
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_MSG_BIOS_ERROR
|
||||
#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
|
||||
#define ACPI_MSG_BIOS_ERROR "Firmware Error (ACPI): "
|
||||
#endif
|
||||
#ifndef ACPI_MSG_BIOS_WARNING
|
||||
#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
|
||||
#define ACPI_MSG_BIOS_WARNING "Firmware Warning (ACPI): "
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -394,12 +391,12 @@ ACPI_STATUS
|
||||
AcpiUtInitGlobals (
|
||||
void);
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
|
||||
const char *
|
||||
AcpiUtGetMutexName (
|
||||
UINT32 MutexId);
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
|
||||
const char *
|
||||
AcpiUtGetNotifyName (
|
||||
UINT32 NotifyValue,
|
||||
@ -1215,9 +1212,10 @@ AcpiUtPredefinedBiosError (
|
||||
...);
|
||||
|
||||
void
|
||||
AcpiUtNamespaceError (
|
||||
AcpiUtPrefixedNamespaceError (
|
||||
const char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
ACPI_GENERIC_STATE *PrefixScope,
|
||||
const char *InternalName,
|
||||
ACPI_STATUS LookupStatus);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user