From patchwork Thu Dec 13 20:30:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729873 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E10C1751 for ; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50A862BC6A for ; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 449512C8F6; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E30382BC6A for ; Thu, 13 Dec 2018 20:36:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727254AbeLMUgG (ORCPT ); Thu, 13 Dec 2018 15:36:06 -0500 Received: from mga18.intel.com ([134.134.136.126]:49811 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbeLMUgG (ORCPT ); Thu, 13 Dec 2018 15:36:06 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988688" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:05 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 01/10] ACPICA: Add "Windows 2018" string in the _OSI support Date: Thu, 13 Dec 2018 12:30:26 -0800 Message-Id: <20181213203035.12387-2-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Latest windows string. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/utosi.c | 1 + include/acpi/actypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index 64b63c81994b..f90d00e384df 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c @@ -70,6 +70,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ {"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */ + {"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */ /* Feature Group Strings */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 66ceb12ebc63..7dbd7a65e135 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1273,6 +1273,7 @@ typedef enum { #define ACPI_OSI_WIN_10_RS1 0x0E #define ACPI_OSI_WIN_10_RS2 0x0F #define ACPI_OSI_WIN_10_RS3 0x10 +#define ACPI_OSI_WIN_10_RS4 0x11 /* Definitions of getopt */ From patchwork Thu Dec 13 20:30:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729893 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C191D1751 for ; Thu, 13 Dec 2018 20:36:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFCAE2015F for ; Thu, 13 Dec 2018 20:36:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0CEB28372; Thu, 13 Dec 2018 20:36:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAF922015F for ; Thu, 13 Dec 2018 20:36:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727449AbeLMUgW (ORCPT ); Thu, 13 Dec 2018 15:36:22 -0500 Received: from mga18.intel.com ([134.134.136.126]:49811 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbeLMUgW (ORCPT ); Thu, 13 Dec 2018 15:36:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988691" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:05 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Erik Schmauss Subject: [PATCH 02/10] ACPICA: Remove defines that use deprecated flag Date: Thu, 13 Dec 2018 12:30:27 -0800 Message-Id: <20181213203035.12387-3-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit removes the use of ACPI_NO_METHOD_EXECUTE flag Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/acglobal.h | 4 ---- drivers/acpi/acpica/dsobject.c | 11 ----------- drivers/acpi/acpica/dsutils.c | 2 -- drivers/acpi/acpica/dswload.c | 6 +----- drivers/acpi/acpica/dswload2.c | 7 ------- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/excreate.c | 2 -- drivers/acpi/acpica/exutils.c | 3 --- drivers/acpi/acpica/nsload.c | 2 -- drivers/acpi/acpica/psloop.c | 2 +- drivers/acpi/acpica/utglobal.c | 3 --- 11 files changed, 3 insertions(+), 41 deletions(-) diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 1e6204518496..87d6eb01beaf 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -172,11 +172,7 @@ ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking); * ****************************************************************************/ -#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) #define NUM_PREDEFINED_NAMES 10 -#else -#define NUM_PREDEFINED_NAMES 9 -#endif ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct); ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node); diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index 6992c8d5ab43..6a9cc613adaa 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c @@ -18,7 +18,6 @@ #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsobject") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: acpi_ds_build_internal_object @@ -299,8 +298,6 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state, return_ACPI_STATUS(status); } -#endif /* ACPI_NO_METHOD_EXECUTION */ - /******************************************************************************* * * FUNCTION: acpi_ds_init_object_from_op @@ -404,9 +401,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, /* Truncate value if we are executing from a 32-bit ACPI table */ -#ifndef ACPI_NO_METHOD_EXECUTION (void)acpi_ex_truncate_for32bit_table(obj_desc); -#endif break; case AML_REVISION_OP: @@ -428,7 +423,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, obj_desc->integer.value = op->common.value.integer; -#ifndef ACPI_NO_METHOD_EXECUTION if (acpi_ex_truncate_for32bit_table(obj_desc)) { /* Warn if we found a 64-bit constant in a 32-bit table */ @@ -439,7 +433,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, value.integer), (u32)obj_desc->integer.value)); } -#endif break; default: @@ -477,7 +470,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, ((u32)opcode) - AML_FIRST_LOCAL_OP; obj_desc->reference.class = ACPI_REFCLASS_LOCAL; -#ifndef ACPI_NO_METHOD_EXECUTION status = acpi_ds_method_data_get_node(ACPI_REFCLASS_LOCAL, obj_desc->reference. @@ -487,7 +479,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, acpi_namespace_node, &obj_desc->reference. object)); -#endif break; case AML_TYPE_METHOD_ARGUMENT: @@ -498,7 +489,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, ((u32)opcode) - AML_FIRST_ARG_OP; obj_desc->reference.class = ACPI_REFCLASS_ARG; -#ifndef ACPI_NO_METHOD_EXECUTION status = acpi_ds_method_data_get_node(ACPI_REFCLASS_ARG, obj_desc-> reference.value, @@ -509,7 +499,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, &obj_desc-> reference. object)); -#endif break; default: /* Object name or Debug object */ diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c index 8d1b75400515..fb9ed5e1da89 100644 --- a/drivers/acpi/acpica/dsutils.c +++ b/drivers/acpi/acpica/dsutils.c @@ -57,7 +57,6 @@ void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state) } } -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: acpi_ds_do_implicit_return @@ -401,7 +400,6 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state) walk_state->num_operands = 0; return_VOID; } -#endif /******************************************************************************* * diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index d06c41446282..e2ef09643d50 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -73,12 +73,10 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number) /* Execution pass */ -#ifndef ACPI_NO_METHOD_EXECUTION walk_state->parse_flags |= ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE; walk_state->descending_callback = acpi_ds_exec_begin_op; walk_state->ascending_callback = acpi_ds_exec_end_op; -#endif break; default: @@ -364,7 +362,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state, /* Initialize the op */ -#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifdef ACPI_CONSTANT_EVAL_ONLY op->named.path = path; #endif @@ -422,7 +420,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) object_type = walk_state->op_info->object_type; -#ifndef ACPI_NO_METHOD_EXECUTION if (walk_state->op_info->flags & AML_FIELD) { /* * If we are executing a method, do not create any namespace objects @@ -466,7 +463,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) } } } -#endif if (op->common.aml_opcode == AML_NAME_OP) { diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index fa38bb3009d5..9a309f5c4de8 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -371,10 +371,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) struct acpi_namespace_node *node; union acpi_parse_object *arg; struct acpi_namespace_node *new_node; -#ifndef ACPI_NO_METHOD_EXECUTION u32 i; u8 region_space; -#endif ACPI_FUNCTION_TRACE(ds_load2_end_op); @@ -461,7 +459,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) arg = op->common.value.arg; switch (walk_state->op_info->type) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_TYPE_CREATE_FIELD: /* @@ -558,12 +555,10 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ case AML_TYPE_NAMED_COMPLEX: switch (op->common.aml_opcode) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_REGION_OP: case AML_DATA_REGION_OP: @@ -651,8 +646,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ - default: /* All NAMED_COMPLEX opcodes must be handled above */ diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c index c879380e5ce1..4c1ec202d5ab 100644 --- a/drivers/acpi/acpica/dswstate.c +++ b/drivers/acpi/acpica/dswstate.c @@ -530,7 +530,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, /* Init the method args/local */ -#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifndef ACPI_CONSTANT_EVAL_ONLY acpi_ds_method_data_init(walk_state); #endif diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c index e49fa3c1321a..3304c6b1e8a7 100644 --- a/drivers/acpi/acpica/excreate.c +++ b/drivers/acpi/acpica/excreate.c @@ -15,7 +15,6 @@ #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("excreate") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: acpi_ex_create_alias @@ -390,7 +389,6 @@ acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state) acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); } -#endif /******************************************************************************* * diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index 6ce307d5ce2a..bd22e27adf9b 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c @@ -34,7 +34,6 @@ ACPI_MODULE_NAME("exutils") /* Local prototypes */ static u32 acpi_ex_digits_needed(u64 value, u32 base); -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: acpi_ex_enter_interpreter @@ -409,5 +408,3 @@ u8 acpi_is_valid_space_id(u8 space_id) return (TRUE); } - -#endif diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c index e291bb8cd369..04bc73e82aed 100644 --- a/drivers/acpi/acpica/nsload.c +++ b/drivers/acpi/acpica/nsload.c @@ -24,7 +24,6 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle); static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle); #endif -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: acpi_ns_load_table @@ -297,4 +296,3 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle) return_ACPI_STATUS(status); } #endif -#endif diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 60ece8e48667..e00d1af6fa80 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c @@ -428,7 +428,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) parser_state = &walk_state->parser_state; walk_state->arg_types = 0; -#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifndef ACPI_CONSTANT_EVAL_ONLY if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index fa674e9b0e62..f8c5b49344df 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c @@ -83,10 +83,7 @@ const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = { {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR(char, 2)}, {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR(char, 1)}, - -#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR(char, 1)}, -#endif /* Table terminator */ From patchwork Thu Dec 13 20:30:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729877 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3D643E9D for ; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6DD92BC6A for ; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B57C32C0E8; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FFCE2C89E for ; Thu, 13 Dec 2018 20:36:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbeLMUgH (ORCPT ); Thu, 13 Dec 2018 15:36:07 -0500 Received: from mga18.intel.com ([134.134.136.126]:49812 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbeLMUgG (ORCPT ); Thu, 13 Dec 2018 15:36:06 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988694" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:05 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 03/10] ACPICA: add comments, no functional change Date: Thu, 13 Dec 2018 12:30:28 -0800 Message-Id: <20181213203035.12387-4-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/exoparg2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c index d5b3efd35a5b..3a477566ba1b 100644 --- a/drivers/acpi/acpica/exoparg2.c +++ b/drivers/acpi/acpica/exoparg2.c @@ -287,9 +287,9 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) * NOTE: A length of zero is ok, and will create a zero-length, null * terminated string. */ - while ((length < operand[0]->buffer.length) && - (length < operand[1]->integer.value) && - (operand[0]->buffer.pointer[length])) { + while ((length < operand[0]->buffer.length) && /* Length of input buffer */ + (length < operand[1]->integer.value) && /* Length operand */ + (operand[0]->buffer.pointer[length])) { /* Null terminator */ length++; } From patchwork Thu Dec 13 20:30:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729879 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A6EE91E for ; Thu, 13 Dec 2018 20:36:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CEE329D73 for ; Thu, 13 Dec 2018 20:36:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B8FD2BC6A; Thu, 13 Dec 2018 20:36:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 159CB29D73 for ; Thu, 13 Dec 2018 20:36:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727476AbeLMUgH (ORCPT ); Thu, 13 Dec 2018 15:36:07 -0500 Received: from mga18.intel.com ([134.134.136.126]:49812 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbeLMUgH (ORCPT ); Thu, 13 Dec 2018 15:36:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988697" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:05 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 04/10] ACPICA: Update buffer-to-string conversions Date: Thu, 13 Dec 2018 12:30:29 -0800 Message-Id: <20181213203035.12387-5-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Add "0x" prefix for hex values. Provides compatibility with other ACPI implementations. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/exconvrt.c | 49 +++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c index 98de48481776..1a70b80cc406 100644 --- a/drivers/acpi/acpica/exconvrt.c +++ b/drivers/acpi/acpica/exconvrt.c @@ -323,7 +323,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width) /* hex_length: 2 ascii hex chars per data byte */ - hex_length = ACPI_MUL_2(data_width); + hex_length = (data_width * 2); for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) { /* Get one hex digit, most significant digits first */ @@ -364,7 +364,8 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width) * * RETURN: Status * - * DESCRIPTION: Convert an ACPI Object to a string + * DESCRIPTION: Convert an ACPI Object to a string. Supports both implicit + * and explicit conversions and related rules. * ******************************************************************************/ @@ -393,9 +394,11 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, switch (type) { case ACPI_EXPLICIT_CONVERT_DECIMAL: - - /* Make room for maximum decimal number */ - + /* + * From to_decimal_string, integer source. + * + * Make room for the maximum decimal number size + */ string_length = ACPI_MAX_DECIMAL_DIGITS; base = 10; break; @@ -440,8 +443,10 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, switch (type) { case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by to_decimal_string */ /* - * From ACPI: "If Data is a buffer, it is converted to a string of - * decimal values separated by commas." + * Explicit conversion from the to_decimal_string ASL operator. + * + * From ACPI: "If the input is a buffer, it is converted to a + * a string of decimal values separated by commas." */ base = 10; @@ -462,20 +467,29 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, case ACPI_IMPLICIT_CONVERT_HEX: /* + * Implicit buffer-to-string conversion + * * From the ACPI spec: - *"The entire contents of the buffer are converted to a string of + * "The entire contents of the buffer are converted to a string of * two-character hexadecimal numbers, each separated by a space." + * + * Each hex number is prefixed with 0x (11/2018) */ separator = ' '; - string_length = (obj_desc->buffer.length * 3); + string_length = (obj_desc->buffer.length * 5); break; - case ACPI_EXPLICIT_CONVERT_HEX: /* Used by to_hex_string */ + case ACPI_EXPLICIT_CONVERT_HEX: /* + * Explicit conversion from the to_hex_string ASL operator. + * * From ACPI: "If Data is a buffer, it is converted to a string of * hexadecimal values separated by commas." + * + * Each hex number is prefixed with 0x (11/2018) */ - string_length = (obj_desc->buffer.length * 3); + separator = ','; + string_length = (obj_desc->buffer.length * 5); break; default: @@ -504,10 +518,21 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, * (separated by commas or spaces) */ for (i = 0; i < obj_desc->buffer.length; i++) { + if (base == 16) { + + /* Emit 0x prefix for explict/implicit hex conversion */ + + *new_buf++ = '0'; + *new_buf++ = 'x'; + } + new_buf += acpi_ex_convert_to_ascii((u64) obj_desc-> buffer.pointer[i], base, new_buf, 1); - *new_buf++ = separator; /* each separated by a comma or space */ + + /* Each digit is separated by either a comma or space */ + + *new_buf++ = separator; } /* From patchwork Thu Dec 13 20:30:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729881 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43E3D91E for ; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 367D228F4A for ; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3502B28F5A; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9AD129D73 for ; Thu, 13 Dec 2018 20:36:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727647AbeLMUgI (ORCPT ); Thu, 13 Dec 2018 15:36:08 -0500 Received: from mga18.intel.com ([134.134.136.126]:49812 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbeLMUgH (ORCPT ); Thu, 13 Dec 2018 15:36:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988700" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:06 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 05/10] ACPICA: Expressions in package elements are not supported Date: Thu, 13 Dec 2018 12:30:30 -0800 Message-Id: <20181213203035.12387-6-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Return AE_SUPPORT if encountered, fixes a previous fault if encountered. Note: Other ACPI implementations do not support this type of construct. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/dspkginit.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/acpi/acpica/dspkginit.c b/drivers/acpi/acpica/dspkginit.c index d703a5594a02..584853385268 100644 --- a/drivers/acpi/acpica/dspkginit.c +++ b/drivers/acpi/acpica/dspkginit.c @@ -152,6 +152,32 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, */ for (i = 0; arg && (i < element_count); i++) { if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { + if (!arg->common.node) { + /* + * This is the case where an expression has returned a value. + * The use of expressions (term_args) within individual + * package elements is not supported by the AML interpreter, + * even though the ASL grammar supports it. Example: + * + * Name (INT1, 0x1234) + * + * Name (PKG3, Package () { + * Add (INT1, 0xAAAA0000) + * }) + * + * 1) No known AML interpreter supports this type of construct + * 2) This fixes a fault if the construct is encountered + */ + ACPI_EXCEPTION((AE_INFO, AE_SUPPORT, + "Expressions within package elements are not supported")); + + /* Cleanup the return object, it is not needed */ + + acpi_ut_remove_reference(walk_state->results-> + results.obj_desc[0]); + return_ACPI_STATUS(AE_SUPPORT); + } + if (arg->common.node->type == ACPI_TYPE_METHOD) { /* * A method reference "looks" to the parser to be a method From patchwork Thu Dec 13 20:30:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729883 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 093A41751 for ; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F11A628F4A for ; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFC892BBDC; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9956228F4A for ; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727749AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 Received: from mga18.intel.com ([134.134.136.126]:49812 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbeLMUgI (ORCPT ); Thu, 13 Dec 2018 15:36:08 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988704" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:06 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Jung-uk Kim , Erik Schmauss Subject: [PATCH 06/10] ACPICA: Add "Windows 2018.2" string in the _OSI support Date: Thu, 13 Dec 2018 12:30:31 -0800 Message-Id: <20181213203035.12387-7-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jung-uk Kim Signed-off-by: Jung-uk Kim Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/utosi.c | 1 + include/acpi/actypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index f90d00e384df..902a47463abf 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c @@ -71,6 +71,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ {"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */ {"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */ + {"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */ /* Feature Group Strings */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 7dbd7a65e135..91ff73e99bbd 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1274,6 +1274,7 @@ typedef enum { #define ACPI_OSI_WIN_10_RS2 0x0F #define ACPI_OSI_WIN_10_RS3 0x10 #define ACPI_OSI_WIN_10_RS4 0x11 +#define ACPI_OSI_WIN_10_RS5 0x12 /* Definitions of getopt */ From patchwork Thu Dec 13 20:30:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729885 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E4431759 for ; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41A8828F4A for ; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 404E129D73; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E02A028F5A for ; Thu, 13 Dec 2018 20:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727455AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 Received: from mga18.intel.com ([134.134.136.126]:49815 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbeLMUgI (ORCPT ); Thu, 13 Dec 2018 15:36:08 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988708" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:06 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Erik Schmauss Subject: [PATCH 07/10] ACPICA: disassembler: disassemble OEMx tables as AML Date: Thu, 13 Dec 2018 12:30:32 -0800 Message-Id: <20181213203035.12387-8-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/utmisc.c | 3 ++- include/acpi/actbl.h | 1 + include/acpi/actypes.h | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index ed73d79b500e..afaadc73196b 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c @@ -62,7 +62,8 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table) if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) || ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) || ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) || - ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT)) { + ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) || + ACPI_IS_OEM_SIG(table->signature)) { return (TRUE); } diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 517addd6b11d..0a977eca0a74 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -38,6 +38,7 @@ #define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */ #define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */ #define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */ +#define ACPI_OEM_NAME "OEM" /* Short name for OEM, not signature */ /* * All tables and structures must be byte-packed to match the ACPI diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 91ff73e99bbd..2590627dbfcc 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -527,6 +527,10 @@ typedef u64 acpi_integer; #define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8)) #define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8)) +/* Support for OEMx signature (x can be any character) */ +#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ + strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE) + /* * Algorithm to obtain access bit width. * Can be used with access_width of struct acpi_generic_address and access_size of From patchwork Thu Dec 13 20:30:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729887 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E64C91E for ; Thu, 13 Dec 2018 20:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F9FF28372 for ; Thu, 13 Dec 2018 20:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23BF529D73; Thu, 13 Dec 2018 20:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7379B28F4A for ; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727809AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 Received: from mga18.intel.com ([134.134.136.126]:49812 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988713" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:06 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 08/10] ACPICA: Debug output: Add option to display method/object evaluation Date: Thu, 13 Dec 2018 12:30:33 -0800 Message-Id: <20181213203035.12387-9-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Adds entry/exit messages for all objects that are evaluated. Works for the kernel-level code as well as acpiexec. The "-eo" flag enables acpiexec to display these messages. The messages are very useful when debugging the flow of table initialization. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/acstruct.h | 5 ++++- drivers/acpi/acpica/dsmethod.c | 14 ++++++++++++++ drivers/acpi/acpica/nseval.c | 13 +++++++++++++ drivers/acpi/acpica/nsparse.c | 12 ++++++++++++ drivers/acpi/acpica/psparse.c | 15 +++++++++++++++ drivers/acpi/acpica/psxface.c | 6 ++++++ include/acpi/acoutput.h | 6 ++++-- 7 files changed, 68 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index acf27156dbd4..14be32961b4c 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h @@ -60,6 +60,8 @@ struct acpi_walk_state { struct acpi_parse_state parser_state; /* Current state of parser */ u32 prev_arg_types; u32 arg_count; /* push for fixed or var args */ + u16 method_nesting_depth; + u8 method_is_nested; struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */ @@ -74,7 +76,8 @@ struct acpi_walk_state { struct acpi_namespace_node *method_call_node; /* Called method Node */ union acpi_parse_object *method_call_op; /* method_call Op if running a method */ union acpi_operand_object *method_desc; /* Method descriptor if running a method */ - struct acpi_namespace_node *method_node; /* Method node if running a method. */ + struct acpi_namespace_node *method_node; /* Method node if running a method */ + char *method_pathname; /* Full pathname of running method */ union acpi_parse_object *op; /* Current parser op */ const struct acpi_opcode_info *op_info; /* Info on current opcode */ union acpi_parse_object *origin; /* Start of walk [Obsolete] */ diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index dd4deb678d13..c1a4d02fafd5 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -532,6 +532,9 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, goto cleanup; } + next_walk_state->method_nesting_depth = + this_walk_state->method_nesting_depth + 1; + /* * Delete the operands on the previous walkstate operand stack * (they were copied to new objects) @@ -549,6 +552,17 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, "**** Begin nested execution of [%4.4s] **** WalkState=%p\n", method_node->name.ascii, next_walk_state)); + this_walk_state->method_pathname = + acpi_ns_get_normalized_pathname(method_node, TRUE); + this_walk_state->method_is_nested = TRUE; + + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: %*s%s\n", " Nested method call", + next_walk_state->method_nesting_depth * 3, " ", + &this_walk_state->method_pathname[1])); + /* Invoke an internal method if necessary */ if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) { diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index 64ba80ede0ad..6390b7951ebf 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c @@ -104,6 +104,13 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) return_ACPI_STATUS(AE_NO_MEMORY); } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: %s (%s)\n", " Enter evaluation", + &info->full_pathname[1], + acpi_ut_get_type_name(info->node->type))); + /* Count the number of arguments being passed in */ info->param_count = 0; @@ -289,6 +296,12 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) info->relative_pathname)); cleanup: + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: %s\n", " Exit evaluation", + &info->full_pathname[1])); + /* * Namespace was unlocked by the handling acpi_ns* function, so we * just free the pathname and return diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c index c9ef4949869f..488ff39d86f7 100644 --- a/drivers/acpi/acpica/nsparse.c +++ b/drivers/acpi/acpica/nsparse.c @@ -107,8 +107,20 @@ acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node) goto cleanup; } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: (Definition Block level)\n", + "Module-level evaluation")); + status = acpi_ps_execute_table(info); + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: (Definition Block level)\n", + "Module-level complete")); + cleanup: if (info) { ACPI_FREE(info->full_pathname); diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c index a16a6ea5ae02..65603473b6cb 100644 --- a/drivers/acpi/acpica/psparse.c +++ b/drivers/acpi/acpica/psparse.c @@ -479,6 +479,21 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) "Completed one call to walk loop, %s State=%p\n", acpi_format_exception(status), walk_state)); + if (walk_state->method_pathname && walk_state->method_is_nested) { + + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, + "%-26s: %*s%s\n", + " Exit nested method", + (walk_state-> + method_nesting_depth + 1) * 3, + " ", + &walk_state->method_pathname[1])); + + ACPI_FREE(walk_state->method_pathname); + walk_state->method_is_nested = FALSE; + } if (status == AE_CTRL_TRANSFER) { /* * A method call was detected. diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c index f26bcbbc2c27..5743b22399a0 100644 --- a/drivers/acpi/acpica/psxface.c +++ b/drivers/acpi/acpica/psxface.c @@ -147,6 +147,9 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) goto cleanup; } + walk_state->method_pathname = info->full_pathname; + walk_state->method_is_nested = FALSE; + if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) { walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL; } @@ -267,6 +270,9 @@ acpi_status acpi_ps_execute_table(struct acpi_evaluate_info *info) goto cleanup; } + walk_state->method_pathname = info->full_pathname; + walk_state->method_is_nested = FALSE; + if (info->obj_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL) { walk_state->parse_flags |= ACPI_PARSE_MODULE_LEVEL; } diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 3a26aa7ead23..6db9a6d40c85 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -73,7 +73,8 @@ #define ACPI_LV_RESOURCES 0x00010000 #define ACPI_LV_USER_REQUESTS 0x00020000 #define ACPI_LV_PACKAGE 0x00040000 -#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS +#define ACPI_LV_EVALUATION 0x00080000 +#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS /* Trace verbosity level 2 [Function tracing and memory allocation] */ @@ -141,6 +142,7 @@ #define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS) #define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) #define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) +#define ACPI_DB_EVALUATION ACPI_DEBUG_LEVEL (ACPI_LV_EVALUATION) #define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) #define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS) @@ -148,7 +150,7 @@ /* Defaults for debug_level, debug and normal */ -#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_EVALUATION | ACPI_LV_REPAIR) #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) From patchwork Thu Dec 13 20:30:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729889 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2690991E for ; Thu, 13 Dec 2018 20:36:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19293212DB for ; Thu, 13 Dec 2018 20:36:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D7F129D73; Thu, 13 Dec 2018 20:36:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C951F212DB for ; Thu, 13 Dec 2018 20:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726813AbeLMUgK (ORCPT ); Thu, 13 Dec 2018 15:36:10 -0500 Received: from mga18.intel.com ([134.134.136.126]:49815 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727735AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988718" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:06 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Erik Schmauss Subject: [PATCH 09/10] ACPICA: change coding style to match ACPICA, no functional change Date: Thu, 13 Dec 2018 12:30:34 -0800 Message-Id: <20181213203035.12387-10-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit alters the coding style of the following commit to match ACPICA to keep divergences between Linux and ACPICA at a minimum. This is not intended to result in functional changes. ae6b3e54aa52cd29965b8e4e47000ed2c5d78eb8 Author: Hans de Goede Date: Sun Nov 18 20:25:35 2018 +0100 ACPICA: Fix handling of buffer-size in acpi_ex_write_data_to_field() Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/exserial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/exserial.c b/drivers/acpi/acpica/exserial.c index 9920fac6413f..ec61553c4483 100644 --- a/drivers/acpi/acpica/exserial.c +++ b/drivers/acpi/acpica/exserial.c @@ -244,6 +244,7 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc, { acpi_status status; u32 buffer_length; + u32 data_length; void *buffer; union acpi_operand_object *buffer_desc; u32 function; @@ -324,8 +325,9 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc, /* Copy the input buffer data to the transfer buffer */ buffer = buffer_desc->buffer.pointer; - memcpy(buffer, source_desc->buffer.pointer, - min(buffer_length, source_desc->buffer.length)); + data_length = (buffer_length < source_desc->buffer.length ? + buffer_length : source_desc->buffer.length); + memcpy(buffer, source_desc->buffer.pointer, data_length); /* Lock entire transaction if requested */ From patchwork Thu Dec 13 20:30:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 10729891 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83EA51751 for ; Thu, 13 Dec 2018 20:36:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75F7F212DB for ; Thu, 13 Dec 2018 20:36:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A16428F4A; Thu, 13 Dec 2018 20:36:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0DAC28372 for ; Thu, 13 Dec 2018 20:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727735AbeLMUgL (ORCPT ); Thu, 13 Dec 2018 15:36:11 -0500 Received: from mga18.intel.com ([134.134.136.126]:49815 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbeLMUgJ (ORCPT ); Thu, 13 Dec 2018 15:36:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:36:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="301988723" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 12:36:07 -0800 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 10/10] ACPICA: Update version to 20181213 Date: Thu, 13 Dec 2018 12:30:35 -0800 Message-Id: <20181213203035.12387-11-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213203035.12387-1-erik.schmauss@intel.com> References: <20181213203035.12387-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore Version 20181213. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 0c967d02c202..7aa38b648564 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20181031 +#define ACPI_CA_VERSION 0x20181213 #include #include