ACPICA release 20120711 linuxized patches
Subsystems (2)
Hi Len,
ACPICA release 20120711 linuxized patches attached. Applied on top of your acpi/next branch.
[PATCH 01/10] ACPICA: Split exception code utilities to a new file, [PATCH 02/10] ACPICA: Add new interfaces for BIOS(firmware) errors [PATCH 03/10] ACPICA: Table manager: deploy new firmware [PATCH 04/10] ACPICA: Fix some comment fields
[PATCH 05/10] ACPICA: Add PCC address space to space ID decode [PATCH 06/10] ACPICA: Split file: tbxface.c -> tbxfload.c [PATCH 07/10] ACPICA: Add new ACPI table load/unload external [PATCH 08/10] ACPICA: Update header files copyrights to 2012 [PATCH 09/10] ACPICA: AcpiSrc: Fix some translation issues for Linux [PATCH 10/10] ACPICA: Update to version 20120711
Regards,
Lin Ming
Quoted 5 lines · Lin Ming
Hi Len,
ACPICA release 20120711 linuxized patches attached. Applied on top of your acpi/next branch.
Quoted 10 lines
[PATCH 01/10] ACPICA: Split exception code utilities to a new file, [PATCH 02/10] ACPICA: Add new interfaces for BIOS(firmware) errors [PATCH 03/10] ACPICA: Table manager: deploy new firmware [PATCH 04/10] ACPICA: Fix some comment fields
[PATCH 05/10] ACPICA: Add PCC address space to space ID decode [PATCH 06/10] ACPICA: Split file:tbxface.c->tbxfload.c[PATCH 07/10] ACPICA: Add new ACPI table load/unload external [PATCH 08/10] ACPICA: Update header files copyrights to 2012 [PATCH 09/10] ACPICA: AcpiSrc: Fix some translation issues for Linux [PATCH 10/10] ACPICA: Update to version 20120711
Hi Len,
Please use the attached updated patches.
PATCH 02 and 07 were updated.
In PATCH 07, sgi_hotplug.c was changed to use the new interface acpi_unload_parent_table.
Quoted 4 lines
Regards,
Lin Ming
ACPICA release 20120816 linuxized patches
In reply to Lin MingHi Len,
Here are the 20120816 ACPICA linuxized patches based on your acpi/next branch, please review.
[PATCH 01/12] ACPI: delelte more BFS/GTS related definition and code [PATCH 02/12] ACPICA: Enable Scope change to root during module-level code execution. [PATCH 03/12] ACPICA: Split ACPICA initialization functions to new file, utxfinit.c [PATCH 04/12] ACPICA: Comment update: Fix some typos in actble.h
[PATCH 05/12] ACPICA: Add Windows8/Server2012 string for _OSI method. [PATCH 06/12] ACPICA: GPE Support: Update debug info for GPE tracing. [PATCH 07/12] ACPICA: Debug output: Update output for Processor object. [PATCH 08/12] ACPICA: GPE support: Remove extraneous parameter from low-level function. [PATCH 09/12] ACPICA: Headers: Add support for CSRT and DBG2 ACPI tables. [PATCH 10/12] ACPICA: Add support for complex _PLD buffers.
[PATCH 11/12] ACPICA: Add struct header support for _FDE, _GRT, _GTM, and _SRT names. [PATCH 12/12] ACPICA: Update version to 20120816.
Thanks,
Feng
From 44cc14b4b1d02e652b80d06f9c31fb4957ed542f Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Wed, 8 Aug 2012 10:20:44 +0800
Subject: [PATCH 01/12] ACPI: delelte more BFS/GTS related definition and code
This is a follow on for commmit 3f6f49c7 "ACPI: delete _GTS/_BFS support" to do more cleanup.
--- drivers/acpi/acpica/hwxfsleep.c | 1 - include/acpi/acnames.h | 2 -- include/acpi/actypes.h | 7 ------- 3 files changed, 0 insertions(+), 10 deletions(-)
drivers/acpi/acpica/hwxfsleep.c +0 -1
@@ -381,7 +381,6 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)* FUNCTION: acpi_leave_sleep_state_prep * * PARAMETERS: sleep_state - Which sleep state we are exiting -* flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status *
include/acpi/acnames.h +0 -2
@@ -66,8 +66,6 @@/* Method names - these methods must appear at the namespace root */ -#define METHOD_PATHNAME__BFS "\\_BFS" -#define METHOD_PATHNAME__GTS "\\_GTS"#define METHOD_PATHNAME__PTS "\\_PTS"#define METHOD_PATHNAME__SST "\\_SI._SST"#define METHOD_PATHNAME__WAK "\\_WAK"
include/acpi/actypes.h +0 -7
@@ -519,13 +519,6 @@ typedef u64 acpi_integer;#define ACPI_SLEEP_TYPE_INVALID 0xFF/* -* Sleep/Wake flags -*/ -#define ACPI_NO_OPTIONAL_METHODS 0x00/* Do not execute any optional methods */ -#define ACPI_EXECUTE_GTS 0x01/* For enter sleep interface */ -#define ACPI_EXECUTE_BFS 0x02/* For leave sleep prep interface */ - -/* * Standard notify values */ #define ACPI_NOTIFY_BUS_CHECK (u8) 0x00
Signature · 18 lines
1.7.1 From 88ecc6107a3fd31853d3d94068fa64a42ffe667f Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:30:28 +0800 Subject: [PATCH 02/12] ACPICA: Enable Scope change to root during module-level code execution. Allows constructs like this: If (XXXX) Scope (\) ... Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/dswload.c | 14 ++++++++++++++ drivers/acpi/acpica/dswload2.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-)
drivers/acpi/acpica/dswload.c +14 -0
@@ -230,6 +230,20 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, walk_state->scope_info->common.value =ACPI_TYPE_ANY ;break ; +case ACPI_TYPE_METHOD : + +/* +* Allow scope change to root during execution of module-level +* code. Root is typed METHOD during this time. +*/ +if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags &ACPI_PARSE_MODULE_LEVEL )) { +break ; + } + +/*lint -fallthrough */ +default :/* All other types are an error */
drivers/acpi/acpica/dswload2.c +14 -0
@@ -230,6 +230,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, walk_state->scope_info->common.value =ACPI_TYPE_ANY ;break ; +case ACPI_TYPE_METHOD : + +/* +* Allow scope change to root during execution of module-level +* code. Root is typed METHOD during this time. +*/ +if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags &ACPI_PARSE_MODULE_LEVEL )) { +break ; + } + +/*lint -fallthrough */ +default :/* All other types are an error */
Signature · 17 lines
1.7.1 From 28608ec2323569b649d2a5fb289af285c3a808f5 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:51:47 +0800 Subject: [PATCH 03/12] ACPICA: Split ACPICA initialization functions to new file, utxfinit.c Split utxface.c to improve modularity and reduce file size. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/utxface.c | 267 +--------------------------------- drivers/acpi/acpica/utxfinit.c | 317 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 319 insertions(+), 266 deletions(-) create mode 100644 drivers/acpi/acpica/utxfinit.c
drivers/acpi/acpica/Makefile +1 -0
@@ -158,5 +158,6 @@ acpi-y += \ utresrc.o \ utstate.o \ utxface.o \ + utxfinit.o \ utxferror.o \ utxfmutex.o
drivers/acpi/acpica/utxface.c +1 -266
278 lines not on this page · raw message
drivers/acpi/acpica/utxfinit.c new file +317 -0
317 lines not on this page · raw message
Signature · 14 lines
1.7.1 From bbe70016c0388668f3d66c52f9d05bff37d5601d Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:54:43 +0800 Subject: [PATCH 04/12] ACPICA: Comment update: Fix some typos in actble.h No functional change. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- include/acpi/actbl.h | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-)
include/acpi/actbl.h +24 -24
106 lines not on this page · raw message
Signature · 19 lines
1.7.1 From 9197e03d8d41d80e42308b2ea9e6e4a43489ec66 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:55:02 +0800 Subject: [PATCH 05/12] ACPICA: Add Windows8/Server2012 string for _OSI method. This change adds a new _OSI string, "Windows 2012" for both Windows 8 and Windows Server 2012. From Microsoft document "How to Identify the Windows Version in ACPI by Using _OSI", July 13, 2012. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/aclocal.h | 1 + drivers/acpi/acpica/utosi.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/acpi/acpica/aclocal.h +1 -0
@@ -932,6 +932,7 @@ struct acpi_bit_register_info {#define ACPI_OSI_WIN_VISTA_SP1 0x09#define ACPI_OSI_WIN_VISTA_SP2 0x0A#define ACPI_OSI_WIN_7 0x0B +#define ACPI_OSI_WIN_8 0x0C#define ACPI_ALWAYS_ILLEGAL 0x00
drivers/acpi/acpica/utosi.c +1 -0
@@ -73,6 +73,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2006 SP1", NULL, 0, ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */ {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ + {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ /* Feature Group Strings */
Signature · 14 lines
1.7.1 From 007405e88d9c0d61a6701de2d7080b89cfbc9406 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:55:14 +0800 Subject: [PATCH 06/12] ACPICA: GPE Support: Update debug info for GPE tracing. Add additional debug info to assist with GPE debugging. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/evgpe.c | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-)
drivers/acpi/acpica/evgpe.c +19 -2
@@ -379,6 +379,18 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)*/ if (!(gpe_register_info->enable_for_run | gpe_register_info->enable_for_wake)) { +ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS , +"Ignore disabled registers for GPE%02X-GPE%02X: " +"RunEnable=%02X, WakeEnable=%02X\n" , + gpe_register_info-> + base_gpe_number, + gpe_register_info-> + base_gpe_number + + (ACPI_GPE_REGISTER_WIDTH -1 ), + gpe_register_info-> + enable_for_run, + gpe_register_info-> + enable_for_wake));continue ; }
@@ -401,9 +413,14 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) }ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS , -"Read GPE Register at GPE%02X: Status=%02X, Enable=%02X\n" , +"Read registers for GPE%02X-GPE%02X: Status=%02X, Enable=%02X, " +"RunEnable=%02X, WakeEnable=%02X\n" , gpe_register_info->base_gpe_number, - status_reg, enable_reg)); + gpe_register_info->base_gpe_number + + (ACPI_GPE_REGISTER_WIDTH -1 ), + status_reg, enable_reg, + gpe_register_info->enable_for_run, + gpe_register_info->enable_for_wake));/* Check if there is anything active at all in this register */
Signature · 14 lines
1.7.1 From 5bf9bd225e6893ab55e7a78a630b183c4ddd4146 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 10:55:32 +0800 Subject: [PATCH 07/12] ACPICA: Debug output: Update output for Processor object. Cleanup output for Processor(). Length is a byte, not a word. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/nsdump.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/nsdump.c +1 -1
@@ -264,7 +264,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,switch (type) {case ACPI_TYPE_PROCESSOR : - acpi_os_printf("ID %X Len %.4X Addr %p\n", + acpi_os_printf("ID %02X Len %02X Addr %p\n", obj_desc->processor.proc_id, obj_desc->processor.length, ACPI_CAST_PTR(void,
Signature · 18 lines
1.7.1 From 867a01ec81b38891c52a9a560a21fed7a97f9571 Mon Sep 17 00:00:00 2001 From: Feng Tang <[email protected]> Date: Fri, 17 Aug 2012 11:10:02 +0800 Subject: [PATCH 08/12] ACPICA: GPE support: Remove extraneous parameter from low-level function. The gpe_register_info argument is no longer needed, reduce it to make code simpler. Signed-off-by: Feng Tang <[email protected]> Signed-off-by: Bob Moore <[email protected]> --- drivers/acpi/acpica/achware.h | 3 +-- drivers/acpi/acpica/evgpe.c | 3 +-- drivers/acpi/acpica/evxfgpe.c | 3 +-- drivers/acpi/acpica/hwgpe.c | 15 +++++---------- 4 files changed, 8 insertions(+), 16 deletions(-)
drivers/acpi/acpica/achware.h +1 -2
@@ -110,8 +110,7 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width);/* * hwgpe - GPE support */ -u32 acpi_hw_get_gpe_register_bit (struct acpi_gpe_event_info *gpe_event_info, -struct acpi_gpe_register_info *gpe_register_info); +u32 acpi_hw_get_gpe_register_bit (struct acpi_gpe_event_info *gpe_event_info);acpi_status acpi_hw_low_set_gpe (struct acpi_gpe_event_info *gpe_event_info,u32 action);
drivers/acpi/acpica/evgpe.c +1 -2
@@ -80,8 +80,7 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)return_ACPI_STATUS (AE_NOT_EXIST ); } - register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info, - gpe_register_info); + register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info);/* Clear the run bit up front */
drivers/acpi/acpica/evxfgpe.c +1 -2
@@ -357,8 +357,7 @@ acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 ac goto unlock_and_exit; } - register_bit = -acpi_hw_get_gpe_register_bit (gpe_event_info, gpe_register_info); + register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info);/* Perform the action */
drivers/acpi/acpica/hwgpe.c +5 -10
@@ -60,7 +60,6 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,* FUNCTION: acpi_hw_get_gpe_register_bit * * PARAMETERS: gpe_event_info - Info block for the GPE -* gpe_register_info - Info block for the GPE register * * RETURN: Register mask with a one in the GPE bit position *
@@ -69,11 +68,10 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,* ******************************************************************************/ -u32 acpi_hw_get_gpe_register_bit (struct acpi_gpe_event_info *gpe_event_info, -struct acpi_gpe_register_info *gpe_register_info) +u32 acpi_hw_get_gpe_register_bit (struct acpi_gpe_event_info *gpe_event_info) {return (u32 )1 << (gpe_event_info->gpe_number - - gpe_register_info->base_gpe_number); + gpe_event_info->register_info->base_gpe_number); }/******************************************************************************
@@ -115,8 +113,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)/* Set or clear just the bit that corresponds to this GPE */ - register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info, - gpe_register_info); + register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info);switch (action) {case ACPI_GPE_CONDITIONAL_ENABLE :
@@ -178,8 +175,7 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)* Write a one to the appropriate bit in the status register to * clear this GPE. */ - register_bit = -acpi_hw_get_gpe_register_bit (gpe_event_info, gpe_register_info); + register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info); status =acpi_hw_write (register_bit, &gpe_register_info->status_address);
@@ -222,8 +218,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,/* Get the register bitmask for this GPE */ - register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info, - gpe_register_info); + register_bit =acpi_hw_get_gpe_register_bit (gpe_event_info);/* GPE currently enabled? (enabled for runtime?) */
Signature · 15 lines
1.7.1 From 5922f7d60867b53a84993a11eb9ef8fab39f3a01 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 11:15:10 +0800 Subject: [PATCH 09/12] ACPICA: Headers: Add support for CSRT and DBG2 ACPI tables. These tables are defined outside of the ACPI specification. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- include/acpi/actbl2.h | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ include/acpi/actbl3.h | 1 - 2 files changed, 111 insertions(+), 1 deletions(-)
include/acpi/actbl2.h +111 -0
123 lines not on this page · raw message
include/acpi/actbl3.h +0 -1
@@ -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 */
Signature · 36 lines
1.7.1 From 251119cb62619e6830298fd2a0b517506ce10ac7 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 13:07:54 +0800 Subject: [PATCH 10/12] 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 <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- drivers/acpi/acpica/aclocal.h | 22 +++-- drivers/acpi/acpica/acmacros.h | 29 ++++++- drivers/acpi/acpica/utxface.c | 87 ++++++++++++++++++ include/acpi/acbuffer.h | 192 ++++++++++++++++++++++++++++++++++++++++ include/acpi/acnames.h | 1 + include/acpi/acpixf.h | 5 + include/acpi/actbl.h | 12 ++- include/acpi/actbl1.h | 12 ++- include/acpi/actbl2.h | 12 ++- include/acpi/actbl3.h | 12 ++- 10 files changed, 360 insertions(+), 24 deletions(-) create mode 100644 include/acpi/acbuffer.h
drivers/acpi/acpica/aclocal.h +13 -9
@@ -707,15 +707,18 @@ union acpi_parse_value {u8 disasm_opcode;/* Subtype used for disassembly */ \ char aml_op_name[16]) /* Op name (debug only) */ -#define ACPI_DASM_BUFFER 0x00 -#define ACPI_DASM_RESOURCE 0x01 -#define ACPI_DASM_STRING 0x02 -#define ACPI_DASM_UNICODE 0x03 -#define ACPI_DASM_EISAID 0x04 -#define ACPI_DASM_MATCHOP 0x05 -#define ACPI_DASM_LNOT_PREFIX 0x06 -#define ACPI_DASM_LNOT_SUFFIX 0x07 -#define ACPI_DASM_IGNORE 0x08 +/* Flags for disasm_flags field above */ + +#define ACPI_DASM_BUFFER 0x00/* Buffer is a simple data buffer */ +#define ACPI_DASM_RESOURCE 0x01/* Buffer is a Resource Descriptor */ +#define ACPI_DASM_STRING 0x02/* Buffer is a ASCII string */ +#define ACPI_DASM_UNICODE 0x03/* Buffer is a Unicode string */ +#define ACPI_DASM_PLD_METHOD 0x04/* Buffer is a _PLD method bit-packed buffer */ +#define ACPI_DASM_EISAID 0x05/* Integer is an EISAID */ +#define ACPI_DASM_MATCHOP 0x06/* Parent opcode is a Match() operator */ +#define ACPI_DASM_LNOT_PREFIX 0x07/* Start of a Lnot_equal (etc.) pair of opcodes */ +#define ACPI_DASM_LNOT_SUFFIX 0x08/* End of a Lnot_equal (etc.) pair of opcodes */ +#define ACPI_DASM_IGNORE 0x09/* Not used at this time */ /* * Generic operation (for example: If, While, Store)
@@ -1025,6 +1028,7 @@ struct acpi_port_info {****************************************************************************/ struct acpi_db_method_info { +acpi_handle method;acpi_handle main_thread_gate;acpi_handle thread_complete_gate;acpi_thread_id *threads;
drivers/acpi/acpica/acmacros.h +26 -3
@@ -277,10 +277,33 @@/* Bitfields within ACPI registers */ -#define ACPI_REGISTER_PREPARE_BITS (val, pos, mask) ((val << pos) & mask) -#define ACPI_REGISTER_INSERT_VALUE (reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) +#define ACPI_REGISTER_PREPARE_BITS (val, pos, mask) \ + ((val << pos) & mask) -#define ACPI_INSERT_BITS (target, mask, source) target = ((target & (~(mask))) | (source & mask)) +#define ACPI_REGISTER_INSERT_VALUE (reg, pos, mask, val) \ + reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) + +#define ACPI_INSERT_BITS (target, mask, source) \ + target = ((target & (~(mask))) | (source & mask)) + +/* Generic bitfield macros and masks */ + +#define ACPI_GET_BITS (source_ptr, position, mask) \ + ((*source_ptr >> position) & mask) + +#define ACPI_SET_BITS (target_ptr, position, mask, value) \ + (*target_ptr |= ((value & mask) << position)) + +#define ACPI_1BIT_MASK 0x00000001 +#define ACPI_2BIT_MASK 0x00000003 +#define ACPI_3BIT_MASK 0x00000007 +#define ACPI_4BIT_MASK 0x0000000F +#define ACPI_5BIT_MASK 0x0000001F +#define ACPI_6BIT_MASK 0x0000003F +#define ACPI_7BIT_MASK 0x0000007F +#define ACPI_8BIT_MASK 0x000000FF +#define ACPI_16BIT_MASK 0x0000FFFF +#define ACPI_24BIT_MASK 0x00FFFFFF/* * An object of type struct acpi_namespace_node can appear in some contexts
drivers/acpi/acpica/utxface.c +87 -0
90 lines not on this page · raw message
include/acpi/acbuffer.h new file +192 -0
192 lines not on this page · raw message
include/acpi/acnames.h +1 -0
@@ -63,6 +63,7 @@#define METHOD_NAME__PRW "_PRW"#define METHOD_NAME__SRS "_SRS"#define METHOD_NAME__CBA "_CBA" +#define METHOD_NAME__PLD "_PLD"/* Method names - these methods must appear at the namespace root */
include/acpi/acpixf.h +5 -0
@@ -52,6 +52,7 @@#include "acconfig.h" #include "actypes.h" #include "actbl.h" +#include "acbuffer.h" extern u8 acpi_gbl_permanent_mmap;
@@ -144,6 +145,10 @@ acpi_check_address_range(acpi_adr_space_type space_id,acpi_physical_address address, acpi_size length, u8 warn); +acpi_status +acpi_decode_pld_buffer (u8 *in_buffer, +acpi_size length,struct acpi_pld_info **return_buffer); +/* * ACPI Memory management */
include/acpi/actbl.h +9 -3
@@ -79,9 +79,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 */ /*******************************************************************************
include/acpi/actbl1.h +9 -3
@@ -79,9 +79,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 */ /*******************************************************************************
include/acpi/actbl2.h +9 -3
@@ -98,9 +98,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 */ /*******************************************************************************
include/acpi/actbl3.h +9 -3
@@ -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 */ /*******************************************************************************
Signature · 15 lines
1.7.1 From 587313074cec969bbd64a184d0a84a5ce267cc94 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 13:08:33 +0800 Subject: [PATCH 11/12] ACPICA: Add struct header support for _FDE, _GRT, _GTM, and _SRT names. Added structs for the buffers related to these predefined names, in acbuffer.h Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- include/acpi/acbuffer.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-)
include/acpi/acbuffer.h +43 -0
55 lines not on this page · raw message
Signature · 14 lines
1.7.1 From 0330200fcfb5807405af0c53bffd88bda6422cc7 Mon Sep 17 00:00:00 2001 From: Bob Moore <[email protected]> Date: Fri, 17 Aug 2012 13:08:56 +0800 Subject: [PATCH 12/12] ACPICA: Update version to 20120816. Version 20120816. Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- include/acpi/acpixf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120711 +#define ACPI_CA_VERSION 0x20120816#include "acconfig.h" #include "actypes.h"
Signature · 1 line
1.7.1
Len Brown
reviewerRe: ACPICA release 20120816 linuxized patches
Thanks for the series, Feng.
We are not doing as well here on checkpatch.pl compliance as I'd like -- something perhaps we can improve going forward?
thanks,
-Len
Quoted 21 lines · Feng
Hi Len,
Here are the 20120816 ACPICA linuxized patches based on your acpi/next branch, please review.
[PATCH 01/12] ACPI: delelte more BFS/GTS related definition and code [PATCH 02/12] ACPICA: Enable Scope change to root during module-level code execution. [PATCH 03/12] ACPICA: Split ACPICA initialization functions to new file,
utxfinit.c[PATCH 04/12] ACPICA: Comment update: Fix some typos inactble.h
[PATCH 05/12] ACPICA: Add Windows8/Server2012 string for_OSImethod. [PATCH 06/12] ACPICA: GPE Support: Update debug info for GPE tracing. [PATCH 07/12] ACPICA: Debug output: Update output for Processor object. [PATCH 08/12] ACPICA: GPE support: Remove extraneous parameter from low-level function. [PATCH 09/12] ACPICA: Headers: Add support for CSRT and DBG2 ACPI tables. [PATCH 10/12] ACPICA: Add support for complex_PLDbuffers.
[PATCH 11/12] ACPICA: Add struct header support for_FDE,_GRT,_GTM, and_SRTnames. [PATCH 12/12] ACPICA: Update version to 20120816.Thanks,
Feng
Re: ACPICA release 20120816 linuxized patches
Hi Len
Quoted 4 lines · On Fri, 21 Sep 2012 12:29:14 +0800 Len Brown <[email protected]> wrote:
Thanks for the series, Feng.
We are not doing as well here on checkpatch.pl compliance as I'd like -- something perhaps we can improve going forward?
Sure, will keep that in mind. thanks,
- Feng
RE: ACPICA release 20120816 linuxized patches
Len,
Can you give us some ideas of the biggest issues, perhaps in a priority order?
Thanks,
Bob
Quoted 20 lines
-----Original Message-----
From: Tang, Feng
Sent: Thursday, September 20, 2012 9:51 PM
To: Len Brown
Cc: linux-acpi; Moore, Robert; Zheng, Lv
Subject: Re: ACPICA release 20120816 linuxized patchesHi Len
Quoted 4 lines · On Fri, 21 Sep 2012 12:29:14 +0800 Len Brown <[email protected]> wrote:
Thanks for the series, Feng.
We are not doing as well here on checkpatch.pl compliance as I'd like -- something perhaps we can improve going forward?
Sure, will keep that in mind. thanks,
- Feng