From 4cdf1a562bfb5852954aadbe8515557b8acc8168 Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Wed, 3 Mar 2010 16:28:28 +0800 Subject: ACPICA: Enhance configuration for output of AML Debug Object This change will enable debug object output via a global variable, acpi_gbl_enable_aml_debug_object. This will help with remote machine debugging. Also, moved all debug object support code to a new file, exdebug.c. Entire debug object module can now be configured out of the ACPICA build if desired. Signed-off-by: Lin Ming Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acoutput.h | 2 ++ include/acpi/acpixf.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index d772668..5e95226 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -206,6 +206,7 @@ #define ACPI_WARNING(plist) acpi_warning plist #define ACPI_EXCEPTION(plist) acpi_exception plist #define ACPI_ERROR(plist) acpi_error plist +#define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) #else @@ -215,6 +216,7 @@ #define ACPI_WARNING(plist) #define ACPI_EXCEPTION(plist) #define ACPI_ERROR(plist) +#define ACPI_DEBUG_OBJECT(obj,l,i) #endif /* ACPI_NO_ERROR_MESSAGES */ diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 4447a04..4969862 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -67,6 +67,7 @@ extern u8 acpi_gbl_leave_wake_gpes_disabled; extern u8 acpi_gbl_use_default_register_widths; extern acpi_name acpi_gbl_trace_method_name; extern u32 acpi_gbl_trace_flags; +extern u8 acpi_gbl_enable_aml_debug_object; extern u32 acpi_current_gpe_count; extern struct acpi_table_fadt acpi_gbl_FADT; -- cgit v1.1 From 0e264f0bc22207b99f33ee06e614186480682f15 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Wed, 3 Mar 2010 16:30:35 +0800 Subject: ACPICA: Add support for MCHI table Disassembler and header file support for MCHI - Managment Controller Host Interface table. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/actbl2.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 5b02e30..95f4d0e 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -69,6 +69,7 @@ #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ +#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ @@ -679,6 +680,32 @@ struct acpi_mcfg_allocation { /******************************************************************************* * + * MCHI - Management Controller Host Interface Table + * Version 1 + * + * Conforms to "Management Component Transport Protocol (MCTP) Host + * Interface Specification", Revision 1.0.0a, October 13, 2009 + * + ******************************************************************************/ + +struct acpi_table_mchi { + struct acpi_table_header header; /* Common ACPI table header */ + u8 interface_type; + u8 protocol; + u64 protocol_data; + u8 interrupt_type; + u8 gpe; + u8 pci_device_flag; + u32 global_interrupt; + struct acpi_generic_address control_register; + u8 pci_segment; + u8 pci_bus; + u8 pci_device; + u8 pci_function; +}; + +/******************************************************************************* + * * SPCR - Serial Port Console Redirection table * Version 1 * -- cgit v1.1 From 21e44ba85b0bc9ec970dd2ddb37966ef8c23ad24 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 5 Mar 2010 18:01:03 +0800 Subject: ACPICA: Update version to 20100304 Version 20100304. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 4969862..f753222 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100121 +#define ACPI_CA_VERSION 0x20100304 #include "actypes.h" #include "actbl.h" -- cgit v1.1 From 69ec87efa815d69140423014bb5f91e034faac22 Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Thu, 1 Apr 2010 11:14:12 +0800 Subject: ACPICA: Add subsystem option to force copy of DSDT to local memory Optionally copy the entire DSDT to local memory (instead of simply mapping it.) There are some BIOSs that corrupt or replace the original DSDT, creating the need for this option. Default is FALSE, do not copy the DSDT. https://bugzilla.kernel.org/show_bug.cgi?id=14679 Signed-off-by: Lin Ming Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acpixf.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index f753222..fd815f6 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -68,6 +68,7 @@ extern u8 acpi_gbl_use_default_register_widths; extern acpi_name acpi_gbl_trace_method_name; extern u32 acpi_gbl_trace_flags; extern u8 acpi_gbl_enable_aml_debug_object; +extern u8 acpi_gbl_copy_dsdt_locally; extern u32 acpi_current_gpe_count; extern struct acpi_table_fadt acpi_gbl_FADT; -- cgit v1.1 From 0f849d2cc6863c7874889ea60a871fb71399dd3f Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Tue, 6 Apr 2010 14:52:37 +0800 Subject: ACPICA: Minimize the differences between linux GPE code and ACPICA code base We have ported Rafael's major GPE changes (ACPI: Use GPE reference counting to support shared GPEs) into ACPICA code base. But the port and Rafael's original patch have some differences, so we made below patch to make linux GPE code consistent with ACPICA code base. Most changes are about comments and coding styles. Other noticeable changes are based on: Rafael: Reduce code duplication related to GPE lookup https://patchwork.kernel.org/patch/86237/ Rafael: Always use the same lock for GPE locking https://patchwork.kernel.org/patch/90471/ A new field gpe_count in struct acpi_gpe_block_info to record the number of individual GPEs in block. Rename acpi_ev_save_method_info to acpi_ev_match_gpe_method. Signed-off-by: Rafael J. Wysocki Signed-off-by: Robert Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acexcep.h | 2 +- include/acpi/acpixf.h | 11 ++++++----- include/acpi/actypes.h | 42 ++++++++++++++++++++---------------------- 3 files changed, 27 insertions(+), 28 deletions(-) (limited to 'include') diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 5b2e5e8..5958d78 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -87,7 +87,7 @@ #define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL) #define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL) #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) -#define AE_WAKE_ONLY_GPE (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) +#define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) #define AE_CODE_ENV_MAX 0x001B diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index fd815f6..be16f97 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -285,16 +285,17 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); */ acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action); -acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type); +acpi_status +acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type); -acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type); +acpi_status +acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type); -acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); +acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); acpi_status acpi_get_gpe_status(acpi_handle gpe_device, - u32 gpe_number, - u32 flags, acpi_event_status * event_status); + u32 gpe_number, acpi_event_status *event_status); acpi_status acpi_disable_all_gpes(void); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 3f08e64..de5e99a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -663,44 +663,42 @@ typedef u32 acpi_event_status; #define ACPI_GPE_MAX 0xFF #define ACPI_NUM_GPE 256 +/* Actions for acpi_set_gpe */ + #define ACPI_GPE_ENABLE 0 #define ACPI_GPE_DISABLE 1 +/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */ + +#define ACPI_GPE_TYPE_WAKE (u8) 0x01 +#define ACPI_GPE_TYPE_RUNTIME (u8) 0x02 +#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x03 + /* * GPE info flags - Per GPE - * +-+-+-+---+-+-+-+ - * |7|6|5|4:3|2|1|0| - * +-+-+-+---+-+-+-+ - * | | | | | | | - * | | | | | | +--- Interrupt type: Edge or Level Triggered - * | | | | | +--- GPE can wake the system - * | | | | +--- Unused - * | | | +--- Type of dispatch -- to method, handler, or none - * | | +--- Unused - * | +--- Unused - * +--- Unused + * +-------+---+-+-+ + * | 7:4 |3:2|1|0| + * +-------+---+-+-+ + * | | | | + * | | | +--- Interrupt type: edge or level triggered + * | | +----- GPE can wake the system + * | +-------- Type of dispatch:to method, handler, or none + * +-------------- */ #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01 #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 -#define ACPI_GPE_TYPE_MASK (u8) 0x06 -#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 -#define ACPI_GPE_TYPE_WAKE (u8) 0x02 -#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ #define ACPI_GPE_CAN_WAKE (u8) 0x02 -#define ACPI_GPE_DISPATCH_MASK (u8) 0x18 -#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 -#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 -#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ +#define ACPI_GPE_DISPATCH_MASK (u8) 0x0C +#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x04 +#define ACPI_GPE_DISPATCH_METHOD (u8) 0x08 +#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* * Flags for GPE and Lock interfaces */ -#define ACPI_EVENT_WAKE_ENABLE 0x2 /* acpi_gpe_enable */ -#define ACPI_EVENT_WAKE_DISABLE 0x2 /* acpi_gpe_disable */ - #define ACPI_NOT_ISR 0x1 #define ACPI_ISR 0x0 -- cgit v1.1 From e4eb0450c5d61dd0064ef0904d74088d35284ae2 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Thu, 8 Apr 2010 14:57:43 +0800 Subject: ACPICA: Update version to 20100331. Version 20100331. Signed-off-by: Robert Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index be16f97..e5bce4c 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100304 +#define ACPI_CA_VERSION 0x20100331 #include "actypes.h" #include "actbl.h" -- cgit v1.1 From b47cf58edfa15cb8f384a4a5e7e7d65babb602f6 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 27 Apr 2010 11:54:40 +0800 Subject: ACPICA: Update/clarify some parameter names associated with acpi_handle Simple rename of some parameters to standardize them. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpiosxf.h | 4 ++-- include/acpi/acpixf.h | 28 +++++++++++----------------- include/acpi/actypes.h | 2 +- 3 files changed, 14 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index b396854..29bf945 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -233,8 +233,8 @@ acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, * Interim function needed for PCI IRQ routing */ void -acpi_os_derive_pci_id(acpi_handle rhandle, - acpi_handle chandle, struct acpi_pci_id **pci_id); +acpi_os_derive_pci_id(acpi_handle device, + acpi_handle region, struct acpi_pci_id **pci_id); /* * Miscellaneous diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index e5bce4c..5366edf 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -166,7 +166,7 @@ acpi_get_devices(const char *HID, void *context, void **return_value); acpi_status -acpi_get_name(acpi_handle handle, +acpi_get_name(acpi_handle object, u32 name_type, struct acpi_buffer *ret_path_ptr); acpi_status @@ -174,14 +174,12 @@ acpi_get_handle(acpi_handle parent, acpi_string pathname, acpi_handle * ret_handle); acpi_status -acpi_attach_data(acpi_handle obj_handle, - acpi_object_handler handler, void *data); +acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data); -acpi_status -acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler); +acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); acpi_status -acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data); +acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); acpi_status acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); @@ -203,7 +201,7 @@ acpi_evaluate_object_typed(acpi_handle object, acpi_object_type return_type); acpi_status -acpi_get_object_info(acpi_handle handle, +acpi_get_object_info(acpi_handle object, struct acpi_device_info **return_buffer); acpi_status acpi_install_method(u8 *buffer); @@ -318,33 +316,29 @@ acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, void *context); acpi_status -acpi_get_vendor_resource(acpi_handle device_handle, +acpi_get_vendor_resource(acpi_handle device, char *name, struct acpi_vendor_uuid *uuid, struct acpi_buffer *ret_buffer); acpi_status -acpi_get_current_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer); +acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer); #ifdef ACPI_FUTURE_USAGE acpi_status -acpi_get_possible_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer); +acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); #endif acpi_status -acpi_walk_resources(acpi_handle device_handle, +acpi_walk_resources(acpi_handle device, char *name, acpi_walk_resource_callback user_function, void *context); acpi_status -acpi_set_current_resources(acpi_handle device_handle, - struct acpi_buffer *in_buffer); +acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer); acpi_status -acpi_get_irq_routing_table(acpi_handle bus_device_handle, - struct acpi_buffer *ret_buffer); +acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer); acpi_status acpi_resource_to_address64(struct acpi_resource *resource, diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index de5e99a..bade172 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -951,7 +951,7 @@ acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, #define ACPI_REGION_DEACTIVATE 1 typedef -acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, +acpi_status(*acpi_walk_callback) (acpi_handle object, u32 nesting_level, void *context, void **return_value); -- cgit v1.1 From 2aae2d918d88fdf0f8c066520cda0a30409db23f Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Thu, 6 May 2010 13:59:07 +0800 Subject: ACPICA: Update version to 20100428. Version 20100428. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 5366edf..0e4ab1f 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100331 +#define ACPI_CA_VERSION 0x20100428 #include "actypes.h" #include "actbl.h" -- cgit v1.1