Skip to content

Commit

Permalink
ACPI 6.1: Add full support for this version of ACPI spec
Browse files Browse the repository at this point in the history
Small changes:
1) A couple new predefined names
2) New _HID values
3) New subtable for HEST
  • Loading branch information
acpibob committed Feb 3, 2016
1 parent 19f84c2 commit 5f21bdd
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 20 deletions.
5 changes: 5 additions & 0 deletions source/common/ahids.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ const AH_DEVICE_ID AslDeviceIds[] =
{"ACPI000D", "Power Meter Device"},
{"ACPI000E", "Time and Alarm Device"},
{"ACPI000F", "User Presence Detection Device"},
{"ACPI0010", "Processor Container Device"},
{"ACPI0011", "Generic Buttons Device"},
{"ACPI0012", "NVDIMM Root Device"},
{"ACPI0013", "Generic Event Device"},
{"ADMA0F28", "Intel Audio DMA"},
{"AMCR0F28", "Intel Audio Machine Driver"},
{"ATK4001", "Asus Radio Control Button"},
Expand Down Expand Up @@ -257,6 +261,7 @@ const AH_DEVICE_ID AslDeviceIds[] =
{"PNP0C12", "Device Bay Controller"},
{"PNP0C14", "Windows Management Instrumentation Device"},
{"PNP0C15", "Docking Station"},
{"PNP0C33", "Error Device"},
{"PNP0C40", "Standard Button Controller"},
{"PNP0C50", "HID Protocol Device (I2C bus)"},
{"PNP0C60", "Display Sensor Device"},
Expand Down
5 changes: 4 additions & 1 deletion source/common/ahpredef.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_FDI", "Floppy Drive Information", "Returns a floppy drive information block"),
AH_PREDEF ("_FDM", "Floppy Drive Mode", "Sets a floppy drive speed"),
AH_PREDEF ("_FIF", "Fan Information", "Returns fan device information"),
AH_PREDEF ("_FIT", "Firmware Interface Table", "Returns a list of NFIT structures"),
AH_PREDEF ("_FIX", "Fixed Register Resource Provider", "Returns a list of devices that implement FADT register blocks"),
AH_PREDEF ("_FLC", "Flow Control", "Flow control, Resource Descriptor field"),
AH_PREDEF ("_FPS", "Fan Performance States", "Returns a list of supported fan performance states"),
Expand Down Expand Up @@ -404,8 +405,10 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"),
AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"),
AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"),
AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"),
AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"),
AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"),
AH_PREDEF ("_WPC", "Wireless Power Calibration", "Calibrate power and notify wireless device"),
AH_PREDEF ("_WPP", "Wireless Power Polling", "Get recommended polling interval"),
AH_PREDEF (NULL, NULL, NULL)
};

Expand Down
1 change: 1 addition & 0 deletions source/common/dmtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ static const char *AcpiDmHestSubnames[] =
"PCI Express AER (AER Endpoint)",
"PCI Express/PCI-X Bridge AER",
"Generic Hardware Error Source",
"Generic Hardware Error Source V2",
"Unknown Subtable Type" /* Reserved */
};

Expand Down
6 changes: 6 additions & 0 deletions source/common/dmtbdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,12 @@ AcpiDmDumpHest (
SubTableLength = sizeof (ACPI_HEST_GENERIC);
break;

case ACPI_HEST_TYPE_GENERIC_ERROR_V2:

InfoTable = AcpiDmTableInfoHest10;
SubTableLength = sizeof (ACPI_HEST_GENERIC_V2);
break;

default:

/* Cannot continue on unknown type - no length */
Expand Down
22 changes: 22 additions & 0 deletions source/common/dmtbinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
#define ACPI_HEST7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f)
#define ACPI_HEST8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
#define ACPI_HEST9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
#define ACPI_HEST10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC_V2,f)
#define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
#define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
#define ACPI_IORT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ITS_GROUP,f)
Expand Down Expand Up @@ -1414,6 +1415,26 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[] =
ACPI_DMT_TERMINATOR
};

/* 10: Generic Hardware Error Source - Version 2 */

ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[] =
{
ACPI_DM_HEST_HEADER,
{ACPI_DMT_UINT16, ACPI_HEST10_OFFSET (RelatedSourceId), "Related Source Id", 0},
{ACPI_DMT_UINT8, ACPI_HEST10_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT8, ACPI_HEST10_OFFSET (Enabled), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
{ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record", 0},
{ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (MaxRawDataLength), "Max Raw Data Length", 0},
{ACPI_DMT_GAS, ACPI_HEST10_OFFSET (ErrorStatusAddress), "Error Status Address", 0},
{ACPI_DMT_HESTNTFY, ACPI_HEST10_OFFSET (Notify), "Notify", 0},
{ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (ErrorBlockLength), "Error Status Block Length", 0},
{ACPI_DMT_GAS, ACPI_HEST10_OFFSET (ReadAckRegister), "Read Ack Register", 0},
{ACPI_DMT_UINT64, ACPI_HEST10_OFFSET (ReadAckPreserve), "Read Ack Preserve", 0},
{ACPI_DMT_UINT64, ACPI_HEST10_OFFSET (ReadAckWrite), "Read Ack Write", 0},
ACPI_DMT_TERMINATOR
};

ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[] =
{
{ACPI_DMT_HESTNTYP, ACPI_HESTN_OFFSET (Type), "Notify Type", 0},
Expand Down Expand Up @@ -2213,6 +2234,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit1[] =
{ACPI_DMT_FLAG3, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Device not armed", 0},
{ACPI_DMT_FLAG4, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Health events observed", 0},
{ACPI_DMT_FLAG5, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Health events enabled", 0},
{ACPI_DMT_FLAG6, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Mapping failed", 0},
{ACPI_DMT_UINT16, ACPI_NFIT1_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
Expand Down
2 changes: 1 addition & 1 deletion source/compiler/asldefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
#define ASL_CREATOR_ID "INTL"
#define ASL_DEFINE "__IASL__"

#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.0"
#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.1"


/* Configuration constants */
Expand Down
29 changes: 16 additions & 13 deletions source/components/utilities/utdecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ AcpiUtGetMutexName (

/* Names for Notify() values, used for debug output */

static const char *AcpiGbl_GenericNotify[ACPI_NOTIFY_MAX + 1] =
static const char *AcpiGbl_GenericNotify[ACPI_GENERIC_NOTIFY_MAX + 1] =
{
/* 00 */ "Bus Check",
/* 01 */ "Device Check",
Expand All @@ -592,32 +592,35 @@ static const char *AcpiGbl_GenericNotify[ACPI_NOTIFY_MAX + 1] =
/* 09 */ "Device PLD Check",
/* 0A */ "Reserved",
/* 0B */ "System Locality Update",
/* 0C */ "Shutdown Request",
/* 0C */ "Shutdown Request", /* Reserved in ACPI 6.0 */
/* 0D */ "System Resource Affinity Update"
};

static const char *AcpiGbl_DeviceNotify[4] =
static const char *AcpiGbl_DeviceNotify[5] =
{
/* 80 */ "Status Change",
/* 81 */ "Information Change",
/* 82 */ "Device-Specific Change",
/* 83 */ "Device-Specific Change"
/* 83 */ "Device-Specific Change",
/* 84 */ "Reserved"
};

static const char *AcpiGbl_ProcessorNotify[4] =
static const char *AcpiGbl_ProcessorNotify[5] =
{
/* 80 */ "Performance Capability Change",
/* 81 */ "C-State Change",
/* 82 */ "Throttling Capability Change",
/* 83 */ "Device-Specific Change"
/* 83 */ "Guaranteed Change",
/* 84 */ "Minimum Excursion"
};

static const char *AcpiGbl_ThermalNotify[4] =
static const char *AcpiGbl_ThermalNotify[5] =
{
/* 80 */ "Thermal Status Change",
/* 81 */ "Thermal Trip Point Change",
/* 82 */ "Thermal Device List Change",
/* 83 */ "Thermal Relationship Change"
/* 83 */ "Thermal Relationship Change",
/* 84 */ "Reserved"
};


Expand All @@ -627,23 +630,23 @@ AcpiUtGetNotifyName (
ACPI_OBJECT_TYPE Type)
{

/* 00 - 0D are common to all object types */
/* 00 - 0D are "common to all object types" (from ACPI Spec) */

if (NotifyValue <= ACPI_NOTIFY_MAX)
if (NotifyValue <= ACPI_GENERIC_NOTIFY_MAX)
{
return (AcpiGbl_GenericNotify[NotifyValue]);
}

/* 0D - 7F are reserved */
/* 0E - 7F are reserved */

if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
{
return ("Reserved");
}

/* 80 - 83 are per-object-type */
/* 80 - 84 are per-object-type */

if (NotifyValue <= 0x83)
if (NotifyValue <= ACPI_SPECIFIC_NOTIFY_MAX)
{
switch (Type)
{
Expand Down
1 change: 1 addition & 0 deletions source/include/acdisasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest7[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest8[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestBank[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
Expand Down
9 changes: 9 additions & 0 deletions source/include/acpredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,9 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] =
METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4,0,0,0),

{{"_FIT", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, /* ACPI 6.0 */

{{"_FIX", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints) */
PACKAGE_INFO (ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0,0,0,0),
Expand Down Expand Up @@ -1102,6 +1105,12 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] =
{{"_WED", METHOD_1ARGS (ACPI_TYPE_INTEGER),
METHOD_RETURNS (ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER)}},

{{"_WPC", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* ACPI 6.1 */

{{"_WPP", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* ACPI 6.1 */

PACKAGE_INFO (0,0,0,0,0,0) /* Table terminator */
};
#else
Expand Down
2 changes: 1 addition & 1 deletion source/include/actbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ typedef struct acpi_table_facs
/*******************************************************************************
*
* FADT - Fixed ACPI Description Table (Signature "FACP")
* Version 4
* Version 6
*
******************************************************************************/

Expand Down
32 changes: 29 additions & 3 deletions source/include/actbl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ enum AcpiEinjActions
ACPI_EINJ_CHECK_BUSY_STATUS = 6,
ACPI_EINJ_GET_COMMAND_STATUS = 7,
ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */
ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
};

Expand Down Expand Up @@ -469,7 +470,8 @@ enum AcpiErstActions
ACPI_ERST_GET_ERROR_RANGE = 13,
ACPI_ERST_GET_ERROR_LENGTH = 14,
ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
ACPI_ERST_EXECUTE_TIMINGS = 16,
ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
};

/* Values for Instruction field above */
Expand Down Expand Up @@ -561,7 +563,8 @@ enum AcpiHestTypes
ACPI_HEST_TYPE_AER_ENDPOINT = 7,
ACPI_HEST_TYPE_AER_BRIDGE = 8,
ACPI_HEST_TYPE_GENERIC_ERROR = 9,
ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */
};


Expand Down Expand Up @@ -769,6 +772,27 @@ typedef struct acpi_hest_generic
} ACPI_HEST_GENERIC;


/* 10: Generic Hardware Error Source, version 2 */

typedef struct acpi_hest_generic_v2
{
ACPI_HEST_HEADER Header;
UINT16 RelatedSourceId;
UINT8 Reserved;
UINT8 Enabled;
UINT32 RecordsToPreallocate;
UINT32 MaxSectionsPerRecord;
UINT32 MaxRawDataLength;
ACPI_GENERIC_ADDRESS ErrorStatusAddress;
ACPI_HEST_NOTIFY Notify;
UINT32 ErrorBlockLength;
ACPI_GENERIC_ADDRESS ReadAckRegister;
UINT64 ReadAckPreserve;
UINT64 ReadAckWrite;

} ACPI_HEST_GENERIC_V2;


/* Generic Error Status block */

typedef struct acpi_hest_generic_status
Expand Down Expand Up @@ -802,6 +826,7 @@ typedef struct acpi_hest_generic_data
UINT32 ErrorDataLength;
UINT8 FruId[16];
UINT8 FruText[20];
UINT64 TimeStamp;

} ACPI_HEST_GENERIC_DATA;

Expand Down Expand Up @@ -1259,6 +1284,7 @@ typedef struct acpi_nfit_memory_map
#define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
#define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
#define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
#define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */


/* 2: Interleave Structure */
Expand Down
3 changes: 2 additions & 1 deletion source/include/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C
#define ACPI_NOTIFY_AFFINITY_UPDATE (UINT8) 0x0D

#define ACPI_NOTIFY_MAX 0x0D
#define ACPI_GENERIC_NOTIFY_MAX 0x0D
#define ACPI_SPECIFIC_NOTIFY_MAX 0x84

/*
* Types associated with ACPI names and objects. The first group of
Expand Down
1 change: 1 addition & 0 deletions source/tools/acpisrc/astable.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_HEST_AER", SRC_TYPE_STRUCT},
{"ACPI_HEST_AER_BRIDGE", SRC_TYPE_STRUCT},
{"ACPI_HEST_GENERIC", SRC_TYPE_STRUCT},
{"ACPI_HEST_GENERIC_V2", SRC_TYPE_STRUCT},
{"ACPI_HEST_GENERIC_STATUS", SRC_TYPE_STRUCT},
{"ACPI_HEST_GENERIC_DATA", SRC_TYPE_STRUCT},
{"ACPI_IBFT_HEADER", SRC_TYPE_STRUCT},
Expand Down

0 comments on commit 5f21bdd

Please sign in to comment.