From 4e2f9c278ad84196991fcf6f6646a3e15967fe90 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 17 Aug 2012 11:15:10 +0800 Subject: ACPICA: Headers: Add support for CSRT and DBG2 ACPI tables. These tables are defined outside of the ACPI specification. Signed-off-by: Bob Moore Signed-off-by: Feng Tang Signed-off-by: Len Brown --- include/acpi/actbl3.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/acpi/actbl3.h') diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index f65a0ed869eb..37781ab806a5 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -75,7 +75,6 @@ /* Reserved table signatures */ #define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */ -#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */ #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ -- cgit v1.2.3 From be030a576854238250d70135644cde6a0ba34b0d Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 17 Aug 2012 13:07:54 +0800 Subject: ACPICA: Add support for complex _PLD buffers. _PLD (Physical Location of Device) returns a bit-packed buffer that is difficult to parse. This change adds a new interface, AcpiDecodePldBuffer that parses the buffer into a more usable local struct. Also adds macros to both get and set individual fields within the packed _PLD buffer. Adds a new include file, acbuffer.h - which will be expanded to add structs for other ACPI names that return buffers. ACPICA BZ 954. Emit (in comments) the decoded contents of a static _PLD buffer in order to improve comprehension of this bit-packed buffer. Add multi-endian support to the _PLD decode routine. Deploy the multi-endian macros to extract data from the _PLD buffer. Signed-off-by: Bob Moore Signed-off-by: Feng Tang Signed-off-by: Len Brown --- include/acpi/actbl3.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/acpi/actbl3.h') diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 37781ab806a5..8c61b5fe42a4 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -86,9 +86,15 @@ #pragma pack(1) /* - * Note about bitfields: The u8 type is used for bitfields in ACPI tables. - * This is the only type that is even remotely portable. Anything else is not - * portable, so do not use any other bitfield types. + * Note: C bitfields are not used for this reason: + * + * "Bitfields are great and easy to read, but unfortunately the C language + * does not specify the layout of bitfields in memory, which means they are + * essentially useless for dealing with packed data in on-disk formats or + * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, + * this decision was a design error in C. Ritchie could have picked an order + * and stuck with it." Norman Ramsey. + * See http://stackoverflow.com/a/1053662/41661 */ /******************************************************************************* -- cgit v1.2.3