* [PATCH 00/16] ACPICA 20170629 Release
@ 2017-07-10 7:22 Lv Zheng
2017-07-10 7:22 ` [PATCH 01/16] ACPICA: Small indentation changes, no functional change Lv Zheng
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:22 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi
The 20170629 ACPICA kernel-resident subsystem updates are linuxized based
on the linux-pm/linux-next branch.
The patchset has passed the following build/boot tests.
Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. x86_64 + default + ACPI_DEBUGGER=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "Microsoft Surface Pro 3"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64
All "drivers/acpi" configurations
All "drivers/platform" drivers
All other drivers that link the APIs provided by ACPICA subsystem
The divergences checking result:
Before applying (20170531 Release):
369 lines
After applying (20170629 Release):
390 lines (increased due to export of acpi_tb_xxx functions)
Alex James (1):
ACPICA: iASL: Ensure that the target node is valid in
acpi_ex_create_alias
Bob Moore (2):
ACPICA: Small indentation changes, no functional change
ACPICA: Update version to 20170629
Erik Schmauss (3):
ACPICA: Tools: Deallocate memory allocated by
ac_get_all_tables_from_file via ac_delete_table_list
ACPICA: iASL compiler: allow compilation of externals with paths that
refer to existing names
ACPICA: Disassembler: skip parsing of incorrect external declarations
Ganapatrao Kulkarni (1):
ACPICA: iasl: Update to IORT SMMUv3 disassembling
Kees Cook (1):
Back port of "ACPICA: Use designated initializers"
Lv Zheng (7):
ACPICA: linuxize: cleanup typedef definitions
ACPICA: Tables: Add sanity check in acpi_put_table()
ACPICA: Tables: Cleanup table handler invokers
ACPICA: Tables: Do not validate signature for dynamic table load
ACPICA: Tables: Change table duplication check to be related to
acpi_gbl_verify_table_checksum
ACPICA: Tables: Combine checksum/duplication verification together
ACPICA: Tables: Add deferred table verification support
Robin Murphy (1):
ACPICA: IORT: Update SMMU models for revision C
drivers/acpi/acpica/acapps.h | 2 +
drivers/acpi/acpica/aclocal.h | 5 +-
drivers/acpi/acpica/acobject.h | 12 ++-
drivers/acpi/acpica/actables.h | 5 +-
drivers/acpi/acpica/excreate.c | 5 +
drivers/acpi/acpica/hwxfsleep.c | 9 +-
drivers/acpi/acpica/nsaccess.c | 6 ++
drivers/acpi/acpica/psobject.c | 26 +++++
drivers/acpi/acpica/tbdata.c | 230 +++++++++++++++++++++++++++++++++++-----
drivers/acpi/acpica/tbinstal.c | 161 ++++------------------------
drivers/acpi/acpica/tbxface.c | 39 ++++++-
drivers/acpi/acpica/tbxfload.c | 2 +-
drivers/acpi/bus.c | 3 -
drivers/acpi/tables.c | 4 +-
include/acpi/acpixf.h | 15 +--
include/acpi/actbl.h | 1 +
include/acpi/actbl2.h | 16 ++-
include/acpi/platform/acenv.h | 9 +-
include/acpi/platform/aclinux.h | 3 +
19 files changed, 356 insertions(+), 197 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 01/16] ACPICA: Small indentation changes, no functional change
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
@ 2017-07-10 7:22 ` Lv Zheng
2017-07-10 7:22 ` [PATCH 02/16] ACPICA: IORT: Update SMMU models for revision C Lv Zheng
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:22 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
From: Bob Moore <robert.moore@intel.com>
ACPICA commit bb457076d42b95b1453e261da2c8cc0c05ba4718
Fix some alignment issues
Link: https://github.com/acpica/acpica/commit/bb457076
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/aclocal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 8ddd3b2..822dbc5 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -867,7 +867,7 @@ struct acpi_parse_obj_named {
/* This version is used by the iASL compiler only */
-#define ACPI_MAX_PARSEOP_NAME 20
+#define ACPI_MAX_PARSEOP_NAME 20
struct acpi_parse_obj_asl {
ACPI_PARSE_COMMON union acpi_parse_object *child;
@@ -907,7 +907,7 @@ union acpi_parse_object {
struct asl_comment_state {
u8 comment_type;
u32 spaces_before;
- union acpi_parse_object *latest_parse_node;
+ union acpi_parse_object *latest_parse_op;
union acpi_parse_object *parsing_paren_brace_node;
u8 capture_comments;
};
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 02/16] ACPICA: IORT: Update SMMU models for revision C
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
2017-07-10 7:22 ` [PATCH 01/16] ACPICA: Small indentation changes, no functional change Lv Zheng
@ 2017-07-10 7:22 ` Lv Zheng
2017-07-10 7:22 ` [PATCH 03/16] ACPICA: Tools: Deallocate memory allocated by ac_get_all_tables_from_file via ac_delete_table_list Lv Zheng
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:22 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Robin Murphy, Bob Moore
From: Robin Murphy <robin.murphy@arm.com>
ACPICA commit d00a4eb86e64bb4fa70f57ab5e5ca0a4ca2ad8ef
IORT revision C has been published with a number of new SMMU
implementation identifiers; define them.
Link: https://github.com/acpica/acpica/commit/d00a4eb8
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/actbl2.h | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 707dda74..5829eed 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -664,7 +664,7 @@ struct acpi_ibft_target {
* IORT - IO Remapping Table
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049B, October 2015
+ * Document number: ARM DEN 0049C, May 2017
*
******************************************************************************/
@@ -779,6 +779,8 @@ struct acpi_iort_smmu {
#define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
#define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
#define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
+#define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
+#define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium thunder_x SMMUv2 */
/* Masks for Flags field above */
@@ -799,13 +801,19 @@ struct acpi_iort_smmu_v3 {
u32 flags;
u32 reserved;
u64 vatos_address;
- u32 model; /* O: generic SMMUv3 */
+ u32 model;
u32 event_gsiv;
u32 pri_gsiv;
u32 gerr_gsiv;
u32 sync_gsiv;
};
+/* Values for Model field above */
+
+#define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
+#define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* hi_silicon Hi161x SMMUv3 */
+#define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
+
/* Masks for Flags field above */
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 03/16] ACPICA: Tools: Deallocate memory allocated by ac_get_all_tables_from_file via ac_delete_table_list
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
2017-07-10 7:22 ` [PATCH 01/16] ACPICA: Small indentation changes, no functional change Lv Zheng
2017-07-10 7:22 ` [PATCH 02/16] ACPICA: IORT: Update SMMU models for revision C Lv Zheng
@ 2017-07-10 7:22 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 04/16] ACPICA: iASL compiler: allow compilation of externals with paths that refer to existing names Lv Zheng
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:22 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Erik Schmauss, Bob Moore
From: Erik Schmauss <erik.schmauss@intel.com>
ACPICA commit 8521b98ebdea450011fa62c14a77fed9affa4236
Link: https://github.com/acpica/acpica/commit/8521b98e
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/acapps.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index bb6a84b..7a1a68b 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -114,6 +114,8 @@ ac_get_all_tables_from_file(char *filename,
u8 get_only_aml_tables,
struct acpi_new_table_desc **return_list_head);
+void ac_delete_table_list(struct acpi_new_table_desc *list_head);
+
u8 ac_is_file_binary(FILE * file);
acpi_status ac_validate_table_header(FILE * file, long table_offset);
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 04/16] ACPICA: iASL compiler: allow compilation of externals with paths that refer to existing names
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (2 preceding siblings ...)
2017-07-10 7:22 ` [PATCH 03/16] ACPICA: Tools: Deallocate memory allocated by ac_get_all_tables_from_file via ac_delete_table_list Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 05/16] Back port of "ACPICA: Use designated initializers" Lv Zheng
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Erik Schmauss, Bob Moore
From: Erik Schmauss <erik.schmauss@intel.com>
ACPICA commit 9a252114197409290813bee570e9d53c22b99d32
This change allows compilation of code like the following:
definition_block (...)
{
External (ABCD.EFGH)
Device (ABCD)
{
Name (IJLK,0)
}
}
but does not allow compilation of code like the following:
definition_block (...)
{
External (ABCD)
Device (ABCD)
{
Name (EFGH,0)
}
}
Link: https://github.com/acpica/acpica/commit/9a252114
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/aclocal.h | 1 +
drivers/acpi/acpica/nsaccess.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 822dbc5..bae943b 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -199,6 +199,7 @@ struct acpi_namespace_node {
#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */
+#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */
#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index e5f4fa4..14be12f 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -634,6 +634,12 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
this_node->object;
}
}
+#ifdef ACPI_ASL_COMPILER
+ if (!acpi_gbl_disasm_flag &&
+ (this_node->flags & ANOBJ_IS_EXTERNAL)) {
+ this_node->flags |= IMPLICIT_EXTERNAL;
+ }
+#endif
}
/* Special handling for the last segment (num_segments == 0) */
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 05/16] Back port of "ACPICA: Use designated initializers"
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (3 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 04/16] ACPICA: iASL compiler: allow compilation of externals with paths that refer to existing names Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 06/16] ACPICA: linuxize: cleanup typedef definitions Lv Zheng
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Kees Cook, Bob Moore
From: Kees Cook <keescook@google.com>
ACPICA commit 47538f5f0773c0820d8f552e20f6e77104290c01
The following commit is not correctly linuxized by its ACPICA form (see
link #1 for reference):
Commit: 3d867f6c5fd6535cdeceef3170e5e84e5dd80fc1
Subject: ACPICA: Use designated initializers
Thus breaks linuxize process.
This patch is a linuxized back port result of the upstreamed ACPICA
commit (see link #2 for reference).
Link: https://github.com/acpica/acpica/pull/248/ [#1]
Link: https://github.com/acpica/acpica/commit/47538f5f [#2]
Signed-off-by: Kees Cook <keescook@google.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/hwxfsleep.c | 9 ++++++---
include/acpi/platform/acenv.h | 9 +++++----
include/acpi/platform/aclinux.h | 3 +++
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 7ef1393..e5c095c 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -72,13 +72,16 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
static struct acpi_sleep_functions acpi_sleep_dispatch[] = {
{ACPI_STRUCT_INIT(legacy_function,
ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep)),
- ACPI_STRUCT_INIT(extended_function, acpi_hw_extended_sleep) },
+ ACPI_STRUCT_INIT(extended_function,
+ acpi_hw_extended_sleep)},
{ACPI_STRUCT_INIT(legacy_function,
ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep)),
- ACPI_STRUCT_INIT(extended_function, acpi_hw_extended_wake_prep) },
+ ACPI_STRUCT_INIT(extended_function,
+ acpi_hw_extended_wake_prep)},
{ACPI_STRUCT_INIT(legacy_function,
ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake)),
- ACPI_STRUCT_INIT(extended_function, acpi_hw_extended_wake) }
+ ACPI_STRUCT_INIT(extended_function,
+ acpi_hw_extended_wake)}
};
/*
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 912563c..043fd55 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -288,6 +288,11 @@
#define ACPI_INLINE
#endif
+/* Use ordered initialization if compiler doesn't support designated. */
+#ifndef ACPI_STRUCT_INIT
+#define ACPI_STRUCT_INIT(field, value) value
+#endif
+
/*
* Configurable calling conventions:
*
@@ -382,8 +387,4 @@
#define ACPI_INIT_FUNCTION
#endif
-#ifndef ACPI_STRUCT_INIT
-#define ACPI_STRUCT_INIT(field, value) value
-#endif
-
#endif /* __ACENV_H__ */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 047f138..afd95f2 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -178,6 +178,9 @@
#define ACPI_MSG_BIOS_ERROR KERN_ERR "ACPI BIOS Error (bug): "
#define ACPI_MSG_BIOS_WARNING KERN_WARNING "ACPI BIOS Warning (bug): "
+/*
+ * Linux wants to use designated initializers for function pointer structs.
+ */
#define ACPI_STRUCT_INIT(field, value) .field = value
#else /* !__KERNEL__ */
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 06/16] ACPICA: linuxize: cleanup typedef definitions
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (4 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 05/16] Back port of "ACPICA: Use designated initializers" Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 07/16] ACPICA: Tables: Add sanity check in acpi_put_table() Lv Zheng
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 894e49ef22db354eb1685cdb6f5f991766351d3c
acpisrc now has capability to convert both the followings:
1. Form 1:
typedef struct/union foo { struct/union foo {
.... --> ...
} FOO; }
2. Form 2:
typedef struct/union foo FOO; --> typedef struct/union foo foo;
It becomes unable to handle the following:
3. Form3:
typedef struct/union foo { /* comment */
...
} FOO;
-->
strut/union foo { /* comment */
...
};
As:
1. The purpose of acpisrc is to convert formatted code (ACPICA coding
style) into linux coding style,
2. acpisrc is a very simple tool that doesn't fully handle C language.
This commit changes the definitions side in order not to regress and we
shall make "no comments in struct/union line" as a new ACPICA coding style
rule. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/894e49ef
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acobject.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index 27c3f98..549f227 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -122,7 +122,9 @@ struct acpi_object_integer {
_type *pointer; \
u32 length;
-struct acpi_object_string { /* Null terminated, ASCII characters only */
+/* Null terminated, ASCII characters only */
+
+struct acpi_object_string {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
};
@@ -211,7 +213,9 @@ struct acpi_object_method {
union acpi_operand_object *notify_list[2]; /* Handlers for system/device notifies */\
union acpi_operand_object *handler; /* Handler for Address space */
-struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+
+struct acpi_object_notify_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
struct acpi_object_device {
@@ -258,7 +262,9 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
u8 access_length; /* For serial regions/fields */
-struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+/* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+
+struct acpi_object_field_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
};
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 07/16] ACPICA: Tables: Add sanity check in acpi_put_table()
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (5 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 06/16] ACPICA: linuxize: cleanup typedef definitions Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 08/16] ACPICA: Tables: Cleanup table handler invokers Lv Zheng
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 73512384c9eb1e7f1b28d0a7372df26a3732f96b
To avoid caller to trigger unexpected warning messages (Link #1):
ACPI Warning: Table ffffffffbb461d20, Validation count is zero before decrement
Which is reported from acpi_tb_put_table(). When the table is validated, the
pointer must be non-zero. Thus the message is not suitable for invalidated
tables. This patch fixes the callee side based on this fact. Reported by
Cristian Aravena Romero, Fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/73512384
Link: https://bugzilla.kernel.org/show_bug.cgi?id=191221 [#1]
Reported-by: Cristian Aravena Romero <caravena@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/tbxface.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 010b1c43..18508b2 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -369,6 +369,10 @@ void acpi_put_table(struct acpi_table_header *table)
ACPI_FUNCTION_TRACE(acpi_put_table);
+ if (!table) {
+ return_VOID;
+ }
+
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
/* Walk the root table list */
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 08/16] ACPICA: Tables: Cleanup table handler invokers
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (6 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 07/16] ACPICA: Tables: Add sanity check in acpi_put_table() Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 09/16] ACPICA: Tables: Do not validate signature for dynamic table load Lv Zheng
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 4551f51fa8ba33a977721c3b250cb70a309e3f23
Recently, we allows the table mutex to be held in both early and late stage
APIs. This patch further cleans up the related code to reduce redundant
code related to acpi_gbl_table_handler. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/4551f51f
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/actables.h | 2 ++
drivers/acpi/acpica/tbdata.c | 43 ++++++++++++++++++++++++++++--------------
drivers/acpi/acpica/tbinstal.c | 8 ++------
3 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
index c8da453..89ed31b 100644
--- a/drivers/acpi/acpica/actables.h
+++ b/drivers/acpi/acpica/actables.h
@@ -132,6 +132,8 @@ acpi_tb_install_and_load_table(acpi_physical_address address,
acpi_status acpi_tb_unload_table(u32 table_index);
+void acpi_tb_notify_table(u32 event, void *table);
+
void acpi_tb_terminate(void);
acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index);
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index c9d6fa6..7056ca0 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -818,13 +818,9 @@ acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node)
acpi_ev_update_gpes(owner_id);
}
- /* Invoke table handler if present */
-
- if (acpi_gbl_table_handler) {
- (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table,
- acpi_gbl_table_handler_context);
- }
+ /* Invoke table handler */
+ acpi_tb_notify_table(ACPI_TABLE_EVENT_LOAD, table);
return_ACPI_STATUS(status);
}
@@ -894,15 +890,11 @@ acpi_status acpi_tb_unload_table(u32 table_index)
return_ACPI_STATUS(AE_NOT_EXIST);
}
- /* Invoke table handler if present */
+ /* Invoke table handler */
- if (acpi_gbl_table_handler) {
- status = acpi_get_table_by_index(table_index, &table);
- if (ACPI_SUCCESS(status)) {
- (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_UNLOAD,
- table,
- acpi_gbl_table_handler_context);
- }
+ status = acpi_get_table_by_index(table_index, &table);
+ if (ACPI_SUCCESS(status)) {
+ acpi_tb_notify_table(ACPI_TABLE_EVENT_UNLOAD, table);
}
/* Delete the portion of the namespace owned by this table */
@@ -918,3 +910,26 @@ acpi_status acpi_tb_unload_table(u32 table_index)
}
ACPI_EXPORT_SYMBOL(acpi_tb_unload_table)
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_tb_notify_table
+ *
+ * PARAMETERS: event - Table event
+ * table - Validated table pointer
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Notify a table event to the users.
+ *
+ ******************************************************************************/
+
+void acpi_tb_notify_table(u32 event, void *table)
+{
+ /* Invoke table handler if present */
+
+ if (acpi_gbl_table_handler) {
+ (void)acpi_gbl_table_handler(event, table,
+ acpi_gbl_table_handler_context);
+ }
+}
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 4620f3c..ee74515 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -306,14 +306,10 @@ acpi_tb_install_standard_table(acpi_physical_address address,
acpi_tb_install_table_with_override(&new_table_desc, override,
table_index);
- /* Invoke table handler if present */
+ /* Invoke table handler */
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
- if (acpi_gbl_table_handler) {
- (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_INSTALL,
- new_table_desc.pointer,
- acpi_gbl_table_handler_context);
- }
+ acpi_tb_notify_table(ACPI_TABLE_EVENT_INSTALL, new_table_desc.pointer);
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
unlock_and_exit:
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 09/16] ACPICA: Tables: Do not validate signature for dynamic table load
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (7 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 08/16] ACPICA: Tables: Cleanup table handler invokers Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 10/16] ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum Lv Zheng
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit d3c944f2cdc8c7e847b7942b1864f285189f7bce
Windows seems to allow arbitrary table signatures for Load/load_table
opcodes:
ACPI BIOS Error (bug): Table has invalid signature [PRAD] (0x44415250)
So this patch removes dynamic load signature checks. However we need to
find a way to avoid table loading against tables like MADT. This is not
covered by this commit.
This Windows behavior has been validated on link #1. An end user bug
report can also be found on link #2.
This patch also includes simple cleanup for static load signature check
code. Reported by Ye Xiaolong, Fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/d3c944f2
Link: https://github.com/acpica/acpica/pull/121 [#1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=118601 [#2]
Reported-by: Ye Xiaolong <xiaolong.ye@intel.com>
Reported-by: Olga Uhina <olga.uhina@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/tbinstal.c | 28 ----------------------------
drivers/acpi/acpica/tbxfload.c | 2 +-
2 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index ee74515..9d21296 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -222,34 +222,6 @@ acpi_tb_install_standard_table(acpi_physical_address address,
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
if (reload) {
- /*
- * Validate the incoming table signature.
- *
- * 1) Originally, we checked the table signature for "SSDT" or "PSDT".
- * 2) We added support for OEMx tables, signature "OEM".
- * 3) Valid tables were encountered with a null signature, so we just
- * gave up on validating the signature, (05/2008).
- * 4) We encountered non-AML tables such as the MADT, which caused
- * interpreter errors and kernel faults. So now, we once again allow
- * only "SSDT", "OEMx", and now, also a null signature. (05/2011).
- */
- if ((new_table_desc.signature.ascii[0] != 0x00) &&
- (!ACPI_COMPARE_NAME
- (&new_table_desc.signature, ACPI_SIG_SSDT))
- && (strncmp(new_table_desc.signature.ascii, "OEM", 3))) {
- ACPI_BIOS_ERROR((AE_INFO,
- "Table has invalid signature [%4.4s] (0x%8.8X), "
- "must be SSDT or OEMx",
- acpi_ut_valid_nameseg(new_table_desc.
- signature.
- ascii) ?
- new_table_desc.signature.
- ascii : "????",
- new_table_desc.signature.integer));
-
- status = AE_BAD_SIGNATURE;
- goto unlock_and_exit;
- }
/* Check if table is already registered */
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index b71ce3b..d81f442 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -206,7 +206,7 @@ acpi_status acpi_tb_load_namespace(void)
for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
table = &acpi_gbl_root_table_list.tables[i];
- if (!acpi_gbl_root_table_list.tables[i].address ||
+ if (!table->address ||
(!ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_SSDT)
&& !ACPI_COMPARE_NAME(table->signature.ascii,
ACPI_SIG_PSDT)
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 10/16] ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (8 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 09/16] ACPICA: Tables: Do not validate signature for dynamic table load Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 11/16] ACPICA: Tables: Combine checksum/duplication verification together Lv Zheng
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 3d837b5d4b1033942b4d91c7d3801a09c3157918
acpi_gbl_verify_table_checksum is used to avoid validating (mapping) an entire
table in OS boot stage. 2nd "Reload" check in acpi_tb_install_standard_table()
is prepared for the same purpose. So this patch combines them together
using a renamed acpi_gbl_enable_table_validation flag. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/3d837b5d
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/tbdata.c | 4 ++--
drivers/acpi/acpica/tbinstal.c | 2 +-
drivers/acpi/acpica/tbxface.c | 8 ++++++++
drivers/acpi/bus.c | 3 ---
drivers/acpi/tables.c | 4 ++--
include/acpi/acpixf.h | 15 ++++++++-------
6 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 7056ca0..24d99711 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -338,7 +338,7 @@ void acpi_tb_invalidate_table(struct acpi_table_desc *table_desc)
acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)
{
- if (!table_desc->pointer && !acpi_gbl_verify_table_checksum) {
+ if (!table_desc->pointer && !acpi_gbl_enable_table_validation) {
/*
* Only validates the header of the table.
* Note that Length contains the size of the mapping after invoking
@@ -394,7 +394,7 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)
/* Verify the checksum */
- if (acpi_gbl_verify_table_checksum) {
+ if (acpi_gbl_enable_table_validation) {
status =
acpi_tb_verify_checksum(table_desc->pointer,
table_desc->length);
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 9d21296..f7bc362 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -221,7 +221,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
- if (reload) {
+ if (acpi_gbl_enable_table_validation) {
/* Check if table is already registered */
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 18508b2..38c0104 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -194,6 +194,14 @@ acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
}
}
+ if (!acpi_gbl_enable_table_validation) {
+ /*
+ * Now it's safe to do full table validation. We can do deferred
+ * table initilization here once the flag is set.
+ */
+ acpi_gbl_enable_table_validation = TRUE;
+ }
+
acpi_gbl_root_table_list.flags |= ACPI_ROOT_ALLOW_RESIZE;
status = acpi_tb_resize_root_table_list();
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index af74b42..59f2f96 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -995,9 +995,6 @@ void __init acpi_early_init(void)
printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
- /* It's safe to verify table checksums during late stage */
- acpi_gbl_verify_table_checksum = TRUE;
-
/* enable workarounds, unless strict ACPI spec. compliance */
if (!acpi_strict)
acpi_gbl_enable_interpreter_slack = TRUE;
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index ff42539..80ce2a7 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -740,10 +740,10 @@ int __init acpi_table_init(void)
if (acpi_verify_table_checksum) {
pr_info("Early table checksum verification enabled\n");
- acpi_gbl_verify_table_checksum = TRUE;
+ acpi_gbl_enable_table_validation = TRUE;
} else {
pr_info("Early table checksum verification disabled\n");
- acpi_gbl_verify_table_checksum = FALSE;
+ acpi_gbl_enable_table_validation = FALSE;
}
status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index a59c44c..12dac84 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -160,13 +160,14 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
/*
- * Whether or not to verify the table checksum before installation. Set
- * this to TRUE to verify the table checksum before install it to the table
- * manager. Note that enabling this option causes errors to happen in some
- * OSPMs during early initialization stages. Default behavior is to do such
- * verification.
- */
-ACPI_INIT_GLOBAL(u8, acpi_gbl_verify_table_checksum, TRUE);
+ * Whether or not to validate (map) an entire table to verify
+ * checksum/duplication in early stage before install. Set this to TRUE to
+ * allow early table validation before install it to the table manager.
+ * Note that enabling this option causes errors to happen in some OSPMs
+ * during early initialization stages. Default behavior is to allow such
+ * validation.
+ */
+ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_table_validation, TRUE);
/*
* Optionally enable output from the AML Debug Object.
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 11/16] ACPICA: Tables: Combine checksum/duplication verification together
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (9 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 10/16] ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:23 ` [PATCH 12/16] ACPICA: Tables: Add deferred table verification support Lv Zheng
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 182bdffc0644f568be614a6d4debd651e29ca587
They are all mechanisms used to verify if a table is qualified to be
installed and controlled by acpi_gbl_enable_table_validation, so combine them
together. By doing so, table duplication check is applied to the statically
loaded tables (however whether it is actually enabled is still determined
by acpi_gbl_enable_table_validation). Lv Zheng.
Link: https://github.com/acpica/acpica/commit/182bdffc
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/actables.h | 3 +-
drivers/acpi/acpica/tbdata.c | 151 +++++++++++++++++++++++++++++++++++++++--
drivers/acpi/acpica/tbinstal.c | 125 ++++++----------------------------
3 files changed, 169 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
index 89ed31b..84a3ceb 100644
--- a/drivers/acpi/acpica/actables.h
+++ b/drivers/acpi/acpica/actables.h
@@ -76,7 +76,8 @@ void acpi_tb_release_temp_table(struct acpi_table_desc *table_desc);
acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc);
acpi_status
-acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature);
+acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
+ char *signature, u32 *table_index);
u8 acpi_tb_is_table_loaded(u32 table_index);
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 24d99711..577361b 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -50,6 +50,57 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME("tbdata")
+/* Local prototypes */
+static acpi_status
+acpi_tb_check_duplication(struct acpi_table_desc *table_desc, u32 *table_index);
+
+static u8
+acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index);
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_tb_compare_tables
+ *
+ * PARAMETERS: table_desc - Table 1 descriptor to be compared
+ * table_index - Index of table 2 to be compared
+ *
+ * RETURN: TRUE if both tables are identical.
+ *
+ * DESCRIPTION: This function compares a table with another table that has
+ * already been installed in the root table list.
+ *
+ ******************************************************************************/
+
+static u8
+acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index)
+{
+ acpi_status status = AE_OK;
+ u8 is_identical;
+ struct acpi_table_header *table;
+ u32 table_length;
+ u8 table_flags;
+
+ status =
+ acpi_tb_acquire_table(&acpi_gbl_root_table_list.tables[table_index],
+ &table, &table_length, &table_flags);
+ if (ACPI_FAILURE(status)) {
+ return (FALSE);
+ }
+
+ /*
+ * Check for a table match on the entire table length,
+ * not just the header.
+ */
+ is_identical = (u8)((table_desc->length != table_length ||
+ memcmp(table_desc->pointer, table, table_length)) ?
+ FALSE : TRUE);
+
+ /* Release the acquired table */
+
+ acpi_tb_release_table(table, table_length, table_flags);
+ return (is_identical);
+}
+
/*******************************************************************************
*
* FUNCTION: acpi_tb_init_table_descriptor
@@ -64,6 +115,7 @@ ACPI_MODULE_NAME("tbdata")
* DESCRIPTION: Initialize a new table descriptor
*
******************************************************************************/
+
void
acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
acpi_physical_address address,
@@ -354,12 +406,78 @@ acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)
return (acpi_tb_validate_table(table_desc));
}
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_tb_check_duplication
+ *
+ * PARAMETERS: table_desc - Table descriptor
+ * table_index - Where the table index is returned
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Avoid installing duplicated tables. However table override and
+ * user aided dynamic table load is allowed, thus comparing the
+ * address of the table is not sufficient, and checking the entire
+ * table content is required.
+ *
+ ******************************************************************************/
+
+static acpi_status
+acpi_tb_check_duplication(struct acpi_table_desc *table_desc, u32 *table_index)
+{
+ u32 i;
+
+ ACPI_FUNCTION_TRACE(tb_check_duplication);
+
+ /* Check if table is already registered */
+
+ for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
+ /*
+ * Check for a table match on the entire table length,
+ * not just the header.
+ */
+ if (!acpi_tb_compare_tables(table_desc, i)) {
+ continue;
+ }
+
+ /*
+ * Note: the current mechanism does not unregister a table if it is
+ * dynamically unloaded. The related namespace entries are deleted,
+ * but the table remains in the root table list.
+ *
+ * The assumption here is that the number of different tables that
+ * will be loaded is actually small, and there is minimal overhead
+ * in just keeping the table in case it is needed again.
+ *
+ * If this assumption changes in the future (perhaps on large
+ * machines with many table load/unload operations), tables will
+ * need to be unregistered when they are unloaded, and slots in the
+ * root table list should be reused when empty.
+ */
+ if (acpi_gbl_root_table_list.tables[i].flags &
+ ACPI_TABLE_IS_LOADED) {
+
+ /* Table is still loaded, this is an error */
+
+ return_ACPI_STATUS(AE_ALREADY_EXISTS);
+ } else {
+ *table_index = i;
+ return_ACPI_STATUS(AE_CTRL_TERMINATE);
+ }
+ }
+
+ /* Indicate no duplication to the caller */
+
+ return_ACPI_STATUS(AE_OK);
+}
+
/******************************************************************************
*
* FUNCTION: acpi_tb_verify_temp_table
*
* PARAMETERS: table_desc - Table descriptor
* signature - Table signature to verify
+ * table_index - Where the table index is returned
*
* RETURN: Status
*
@@ -369,7 +487,8 @@ acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)
*****************************************************************************/
acpi_status
-acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)
+acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
+ char *signature, u32 *table_index)
{
acpi_status status = AE_OK;
@@ -392,9 +511,10 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)
goto invalidate_and_exit;
}
- /* Verify the checksum */
-
if (acpi_gbl_enable_table_validation) {
+
+ /* Verify the checksum */
+
status =
acpi_tb_verify_checksum(table_desc->pointer,
table_desc->length);
@@ -411,9 +531,32 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)
goto invalidate_and_exit;
}
+
+ /* Avoid duplications */
+
+ if (table_index) {
+ status =
+ acpi_tb_check_duplication(table_desc, table_index);
+ if (ACPI_FAILURE(status)) {
+ if (status != AE_CTRL_TERMINATE) {
+ ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
+ "%4.4s 0x%8.8X%8.8X"
+ " Table is duplicated",
+ acpi_ut_valid_nameseg
+ (table_desc->signature.
+ ascii) ? table_desc->
+ signature.
+ ascii : "????",
+ ACPI_FORMAT_UINT64
+ (table_desc->address)));
+ }
+
+ goto invalidate_and_exit;
+ }
+ }
}
- return_ACPI_STATUS(AE_OK);
+ return_ACPI_STATUS(status);
invalidate_and_exit:
acpi_tb_invalidate_table(table_desc);
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index f7bc362..0dfc0ac 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -48,54 +48,6 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME("tbinstal")
-/* Local prototypes */
-static u8
-acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index);
-
-/*******************************************************************************
- *
- * FUNCTION: acpi_tb_compare_tables
- *
- * PARAMETERS: table_desc - Table 1 descriptor to be compared
- * table_index - Index of table 2 to be compared
- *
- * RETURN: TRUE if both tables are identical.
- *
- * DESCRIPTION: This function compares a table with another table that has
- * already been installed in the root table list.
- *
- ******************************************************************************/
-
-static u8
-acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index)
-{
- acpi_status status = AE_OK;
- u8 is_identical;
- struct acpi_table_header *table;
- u32 table_length;
- u8 table_flags;
-
- status =
- acpi_tb_acquire_table(&acpi_gbl_root_table_list.tables[table_index],
- &table, &table_length, &table_flags);
- if (ACPI_FAILURE(status)) {
- return (FALSE);
- }
-
- /*
- * Check for a table match on the entire table length,
- * not just the header.
- */
- is_identical = (u8)((table_desc->length != table_length ||
- memcmp(table_desc->pointer, table, table_length)) ?
- FALSE : TRUE);
-
- /* Release the acquired table */
-
- acpi_tb_release_table(table, table_length, table_flags);
- return (is_identical);
-}
-
/*******************************************************************************
*
* FUNCTION: acpi_tb_install_table_with_override
@@ -112,7 +64,6 @@ acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index)
* table array.
*
******************************************************************************/
-
void
acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
u8 override, u32 *table_index)
@@ -210,67 +161,29 @@ acpi_tb_install_standard_table(acpi_physical_address address,
goto release_and_exit;
}
- /* Validate and verify a table before installation */
-
- status = acpi_tb_verify_temp_table(&new_table_desc, NULL);
- if (ACPI_FAILURE(status)) {
- goto release_and_exit;
- }
-
/* Acquire the table lock */
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
- if (acpi_gbl_enable_table_validation) {
-
- /* Check if table is already registered */
-
- for (i = 0; i < acpi_gbl_root_table_list.current_table_count;
- ++i) {
- /*
- * Check for a table match on the entire table length,
- * not just the header.
- */
- if (!acpi_tb_compare_tables(&new_table_desc, i)) {
- continue;
- }
+ /* Validate and verify a table before installation */
+ status = acpi_tb_verify_temp_table(&new_table_desc, NULL, &i);
+ if (ACPI_FAILURE(status)) {
+ if (status == AE_CTRL_TERMINATE) {
/*
- * Note: the current mechanism does not unregister a table if it is
- * dynamically unloaded. The related namespace entries are deleted,
- * but the table remains in the root table list.
- *
- * The assumption here is that the number of different tables that
- * will be loaded is actually small, and there is minimal overhead
- * in just keeping the table in case it is needed again.
- *
- * If this assumption changes in the future (perhaps on large
- * machines with many table load/unload operations), tables will
- * need to be unregistered when they are unloaded, and slots in the
- * root table list should be reused when empty.
+ * Table was unloaded, allow it to be reloaded.
+ * As we are going to return AE_OK to the caller, we should
+ * take the responsibility of freeing the input descriptor.
+ * Refill the input descriptor to ensure
+ * acpi_tb_install_table_with_override() can be called again to
+ * indicate the re-installation.
*/
- if (acpi_gbl_root_table_list.tables[i].flags &
- ACPI_TABLE_IS_LOADED) {
-
- /* Table is still loaded, this is an error */
-
- status = AE_ALREADY_EXISTS;
- goto unlock_and_exit;
- } else {
- /*
- * Table was unloaded, allow it to be reloaded.
- * As we are going to return AE_OK to the caller, we should
- * take the responsibility of freeing the input descriptor.
- * Refill the input descriptor to ensure
- * acpi_tb_install_table_with_override() can be called again to
- * indicate the re-installation.
- */
- acpi_tb_uninstall_table(&new_table_desc);
- (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
- *table_index = i;
- return_ACPI_STATUS(AE_OK);
- }
+ acpi_tb_uninstall_table(&new_table_desc);
+ (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
+ *table_index = i;
+ return_ACPI_STATUS(AE_OK);
}
+ goto unlock_and_exit;
}
/* Add the table to the global root table list */
@@ -350,9 +263,11 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
finish_override:
- /* Validate and verify a table before overriding */
-
- status = acpi_tb_verify_temp_table(&new_table_desc, NULL);
+ /*
+ * Validate and verify a table before overriding, no nested table
+ * duplication check as it's too complicated and unnecessary.
+ */
+ status = acpi_tb_verify_temp_table(&new_table_desc, NULL, NULL);
if (ACPI_FAILURE(status)) {
return;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 12/16] ACPICA: Tables: Add deferred table verification support
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (10 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 11/16] ACPICA: Tables: Combine checksum/duplication verification together Lv Zheng
@ 2017-07-10 7:23 ` Lv Zheng
2017-07-10 7:24 ` [PATCH 13/16] ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias Lv Zheng
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:23 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
ACPICA commit 2dd6c151d5d5e76dacba8f7db9e259fc72982d17
ACPICA commit ffddee6638aced83be18b8bc88569586c1a43e03
This patch allows tables not verified in early stage verfied in
acpi_reallocate_root_table(). This is useful for OSPMs like linux where tables
cannot be verified in early stage due to early ioremp limitations on some
architectures. Reported by Hans de Geode, fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/2dd6c151
Link: https://github.com/acpica/acpica/commit/ffddee66
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/tbdata.c | 34 ++++++++++++++++++++++++++++------
drivers/acpi/acpica/tbxface.c | 27 ++++++++++++++++++++++-----
include/acpi/actbl.h | 1 +
3 files changed, 51 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 577361b..b19a2f0 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -432,6 +432,15 @@ acpi_tb_check_duplication(struct acpi_table_desc *table_desc, u32 *table_index)
/* Check if table is already registered */
for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
+
+ /* Do not compare with unverified tables */
+
+ if (!
+ (acpi_gbl_root_table_list.tables[i].
+ flags & ACPI_TABLE_IS_VERIFIED)) {
+ continue;
+ }
+
/*
* Check for a table match on the entire table length,
* not just the header.
@@ -483,6 +492,8 @@ acpi_tb_check_duplication(struct acpi_table_desc *table_desc, u32 *table_index)
*
* DESCRIPTION: This function is called to validate and verify the table, the
* returned table descriptor is in "VALIDATED" state.
+ * Note that 'TableIndex' is required to be set to !NULL to
+ * enable duplication check.
*
*****************************************************************************/
@@ -554,6 +565,8 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
goto invalidate_and_exit;
}
}
+
+ table_desc->flags |= ACPI_TABLE_IS_VERIFIED;
}
return_ACPI_STATUS(status);
@@ -579,6 +592,8 @@ acpi_status acpi_tb_resize_root_table_list(void)
{
struct acpi_table_desc *tables;
u32 table_count;
+ u32 current_table_count, max_table_count;
+ u32 i;
ACPI_FUNCTION_TRACE(tb_resize_root_table_list);
@@ -598,8 +613,8 @@ acpi_status acpi_tb_resize_root_table_list(void)
table_count = acpi_gbl_root_table_list.current_table_count;
}
- tables = ACPI_ALLOCATE_ZEROED(((acpi_size)table_count +
- ACPI_ROOT_TABLE_SIZE_INCREMENT) *
+ max_table_count = table_count + ACPI_ROOT_TABLE_SIZE_INCREMENT;
+ tables = ACPI_ALLOCATE_ZEROED(((acpi_size)max_table_count) *
sizeof(struct acpi_table_desc));
if (!tables) {
ACPI_ERROR((AE_INFO,
@@ -609,9 +624,16 @@ acpi_status acpi_tb_resize_root_table_list(void)
/* Copy and free the previous table array */
+ current_table_count = 0;
if (acpi_gbl_root_table_list.tables) {
- memcpy(tables, acpi_gbl_root_table_list.tables,
- (acpi_size)table_count * sizeof(struct acpi_table_desc));
+ for (i = 0; i < table_count; i++) {
+ if (acpi_gbl_root_table_list.tables[i].address) {
+ memcpy(tables + current_table_count,
+ acpi_gbl_root_table_list.tables + i,
+ sizeof(struct acpi_table_desc));
+ current_table_count++;
+ }
+ }
if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
ACPI_FREE(acpi_gbl_root_table_list.tables);
@@ -619,8 +641,8 @@ acpi_status acpi_tb_resize_root_table_list(void)
}
acpi_gbl_root_table_list.tables = tables;
- acpi_gbl_root_table_list.max_table_count =
- table_count + ACPI_ROOT_TABLE_SIZE_INCREMENT;
+ acpi_gbl_root_table_list.max_table_count = max_table_count;
+ acpi_gbl_root_table_list.current_table_count = current_table_count;
acpi_gbl_root_table_list.flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
return_ACPI_STATUS(AE_OK);
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 38c0104..26ad596 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -167,7 +167,8 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
{
acpi_status status;
- u32 i;
+ struct acpi_table_desc *table_desc;
+ u32 i, j;
ACPI_FUNCTION_TRACE(acpi_reallocate_root_table);
@@ -179,6 +180,8 @@ acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
return_ACPI_STATUS(AE_SUPPORT);
}
+ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
+
/*
* Ensure OS early boot logic, which is required by some hosts. If the
* table state is reported to be wrong, developers should fix the
@@ -186,11 +189,11 @@ acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
* early stage.
*/
for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
- if (acpi_gbl_root_table_list.tables[i].pointer) {
+ table_desc = &acpi_gbl_root_table_list.tables[i];
+ if (table_desc->pointer) {
ACPI_ERROR((AE_INFO,
"Table [%4.4s] is not invalidated during early boot stage",
- acpi_gbl_root_table_list.tables[i].
- signature.ascii));
+ table_desc->signature.ascii));
}
}
@@ -200,11 +203,25 @@ acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
* table initilization here once the flag is set.
*/
acpi_gbl_enable_table_validation = TRUE;
+ for (i = 0; i < acpi_gbl_root_table_list.current_table_count;
+ ++i) {
+ table_desc = &acpi_gbl_root_table_list.tables[i];
+ if (!(table_desc->flags & ACPI_TABLE_IS_VERIFIED)) {
+ status =
+ acpi_tb_verify_temp_table(table_desc, NULL,
+ &j);
+ if (ACPI_FAILURE(status)) {
+ acpi_tb_uninstall_table(table_desc);
+ }
+ }
+ }
}
acpi_gbl_root_table_list.flags |= ACPI_ROOT_ALLOW_RESIZE;
-
status = acpi_tb_resize_root_table_list();
+ acpi_gbl_root_table_list.flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
+
+ (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
return_ACPI_STATUS(status);
}
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index bdc55c0..89509b8 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -394,6 +394,7 @@ struct acpi_table_desc {
#define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */
#define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */
#define ACPI_TABLE_ORIGIN_MASK (3)
+#define ACPI_TABLE_IS_VERIFIED (4)
#define ACPI_TABLE_IS_LOADED (8)
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 13/16] ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (11 preceding siblings ...)
2017-07-10 7:23 ` [PATCH 12/16] ACPICA: Tables: Add deferred table verification support Lv Zheng
@ 2017-07-10 7:24 ` Lv Zheng
2017-07-10 7:24 ` [PATCH 14/16] ACPICA: Disassembler: skip parsing of incorrect external declarations Lv Zheng
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:24 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Alex James, Bob Moore
From: Alex James <theracermaster@gmail.com>
ACPICA commit 8b14afac65d983610cc5387ede6d85ea5ee075be
The following ACPI table contains an invalid target node within the
Alias operator:
definition_block ("", "SSDT", 1, "Bug", "BugTable", 0x00001000)
{
Scope (_SB)
{
Device (DEV0)
{
Name (_ADR, 1)
Device (DEV1)
{
Alias (_ADR, _ADR)
}
}
}
}
If an ACPI table contains such an invalid target node in an Alias
operator, a segmentation fault will occur when the target node is
dereferenced within acpi_ex_create_alias. Add a check for such an invalid
target node in acpi_ex_create_alias and return AE_NULL_OBJECT as suggested
by @acpibob.
Link: https://github.com/acpica/acpica/commit/8b14afac
Signed-off-by: Alex James <theracermaster@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/excreate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index d43d7da..6867586 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -87,6 +87,11 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
target_node->object);
}
+ /* Ensure that the target node is valid */
+ if (!target_node) {
+ return_ACPI_STATUS(AE_NULL_OBJECT);
+ }
+
/*
* For objects that can never change (i.e., the NS node will
* permanently point to the same object), we can simply attach
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 14/16] ACPICA: Disassembler: skip parsing of incorrect external declarations
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (12 preceding siblings ...)
2017-07-10 7:24 ` [PATCH 13/16] ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias Lv Zheng
@ 2017-07-10 7:24 ` Lv Zheng
2017-07-10 7:24 ` [PATCH 15/16] ACPICA: iasl: Update to IORT SMMUv3 disassembling Lv Zheng
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:24 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Erik Schmauss, Bob Moore
From: Erik Schmauss <erik.schmauss@intel.com>
ACPICA commit ed25461901d34120067b07ec280af30abc0458f1
Link: https://github.com/acpica/acpica/commit/ed254619
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/psobject.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index ef6384e..0bef6df 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -359,6 +359,32 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,
acpi_ps_build_named_op(walk_state, aml_op_start, op,
&named_op);
acpi_ps_free_op(op);
+
+#ifdef ACPI_ASL_COMPILER
+ if (acpi_gbl_disasm_flag
+ && walk_state->opcode == AML_EXTERNAL_OP
+ && status == AE_NOT_FOUND) {
+ /*
+ * If parsing of AML_EXTERNAL_OP's name path fails, then skip
+ * past this opcode and keep parsing. This is a much better
+ * alternative than to abort the entire disassembler. At this
+ * point, the parser_state is at the end of the namepath of the
+ * external declaration opcode. Setting walk_state->Aml to
+ * walk_state->parser_state.Aml + 2 moves increments the
+ * walk_state->Aml past the object type and the paramcount of the
+ * external opcode. For the error message, only print the AML
+ * offset. We could attempt to print the name but this may cause
+ * a segmentation fault when printing the namepath because the
+ * AML may be incorrect.
+ */
+ acpi_os_printf
+ ("// Invalid external declaration at AML offset 0x%x.\n",
+ walk_state->aml -
+ walk_state->parser_state.aml_start);
+ walk_state->aml = walk_state->parser_state.aml + 2;
+ return_ACPI_STATUS(AE_CTRL_PARSE_CONTINUE);
+ }
+#endif
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 15/16] ACPICA: iasl: Update to IORT SMMUv3 disassembling
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (13 preceding siblings ...)
2017-07-10 7:24 ` [PATCH 14/16] ACPICA: Disassembler: skip parsing of incorrect external declarations Lv Zheng
@ 2017-07-10 7:24 ` Lv Zheng
2017-07-10 7:24 ` [PATCH 16/16] ACPICA: Update version to 20170629 Lv Zheng
2017-07-21 22:02 ` [PATCH 00/16] ACPICA 20170629 Release Rafael J. Wysocki
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:24 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Ganapatrao Kulkarni, Bob Moore
From: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
ACPICA commit 8cadc4fb500e2aa52241e367c87a0f95d9760c58
ARM IORT specification has provision to define Proximity domain
in SMMUv3 IORT table. Adding required changes to decode
Proximity domain of SMMUv3 IORT table.
Link: https://github.com/acpica/acpica/commit/8cadc4fb
Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/actbl2.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 5829eed..d568948 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -806,6 +806,9 @@ struct acpi_iort_smmu_v3 {
u32 pri_gsiv;
u32 gerr_gsiv;
u32 sync_gsiv;
+ u8 pxm;
+ u8 reserved1;
+ u16 reserved2;
};
/* Values for Model field above */
@@ -818,6 +821,7 @@ struct acpi_iort_smmu_v3 {
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
+#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
/*******************************************************************************
*
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 16/16] ACPICA: Update version to 20170629
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (14 preceding siblings ...)
2017-07-10 7:24 ` [PATCH 15/16] ACPICA: iasl: Update to IORT SMMUv3 disassembling Lv Zheng
@ 2017-07-10 7:24 ` Lv Zheng
2017-07-21 22:02 ` [PATCH 00/16] ACPICA 20170629 Release Rafael J. Wysocki
16 siblings, 0 replies; 18+ messages in thread
From: Lv Zheng @ 2017-07-10 7:24 UTC (permalink / raw)
To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore
From: Bob Moore <robert.moore@intel.com>
ACPICA commit 7271c1c54c095c06ed9e7d28641f2356da840038
Version 20170629
Link: https://github.com/acpica/acpica/commit/7271c1c5
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
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 12dac84..06b87ad 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20170531
+#define ACPI_CA_VERSION 0x20170629
#include <acpi/acconfig.h>
#include <acpi/actypes.h>
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 00/16] ACPICA 20170629 Release
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
` (15 preceding siblings ...)
2017-07-10 7:24 ` [PATCH 16/16] ACPICA: Update version to 20170629 Lv Zheng
@ 2017-07-21 22:02 ` Rafael J. Wysocki
16 siblings, 0 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2017-07-21 22:02 UTC (permalink / raw)
To: Lv Zheng; +Cc: Rafael J . Wysocki, Len Brown, Lv Zheng, linux-acpi
On Monday, July 10, 2017 03:22:39 PM Lv Zheng wrote:
> The 20170629 ACPICA kernel-resident subsystem updates are linuxized based
> on the linux-pm/linux-next branch.
>
> The patchset has passed the following build/boot tests.
> Build tests are performed as follows:
> 1. i386 + allyes
> 2. i386 + allno
> 3. i386 + default + ACPI_DEBUGGER=y
> 4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> 5. i386 + default + ACPI_DEBUG=n + ACPI=y
> 6. i386 + default + ACPI=n
> 7. x86_64 + allyes
> 8. x86_64 + allno
> 9. x86_64 + default + ACPI_DEBUGGER=y
> 10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
> 12.x86_64 + default + ACPI=n
> Boot tests are performed as follows:
> 1. x86_64 + default + ACPI_DEBUGGER=y
> Where:
> 1. i386: machine named as "Dell Inspiron Mini 1010"
> 2. x86_64: machine named as "Microsoft Surface Pro 3"
> 3. default: kernel configuration with following items enabled:
> All hardware drivers related to the machines of i386/x86_64
> All "drivers/acpi" configurations
> All "drivers/platform" drivers
> All other drivers that link the APIs provided by ACPICA subsystem
>
> The divergences checking result:
> Before applying (20170531 Release):
> 369 lines
> After applying (20170629 Release):
> 390 lines (increased due to export of acpi_tb_xxx functions)
>
> Alex James (1):
> ACPICA: iASL: Ensure that the target node is valid in
> acpi_ex_create_alias
>
> Bob Moore (2):
> ACPICA: Small indentation changes, no functional change
> ACPICA: Update version to 20170629
>
> Erik Schmauss (3):
> ACPICA: Tools: Deallocate memory allocated by
> ac_get_all_tables_from_file via ac_delete_table_list
> ACPICA: iASL compiler: allow compilation of externals with paths that
> refer to existing names
> ACPICA: Disassembler: skip parsing of incorrect external declarations
>
> Ganapatrao Kulkarni (1):
> ACPICA: iasl: Update to IORT SMMUv3 disassembling
>
> Kees Cook (1):
> Back port of "ACPICA: Use designated initializers"
>
> Lv Zheng (7):
> ACPICA: linuxize: cleanup typedef definitions
> ACPICA: Tables: Add sanity check in acpi_put_table()
> ACPICA: Tables: Cleanup table handler invokers
> ACPICA: Tables: Do not validate signature for dynamic table load
> ACPICA: Tables: Change table duplication check to be related to
> acpi_gbl_verify_table_checksum
> ACPICA: Tables: Combine checksum/duplication verification together
> ACPICA: Tables: Add deferred table verification support
>
> Robin Murphy (1):
> ACPICA: IORT: Update SMMU models for revision C
>
> drivers/acpi/acpica/acapps.h | 2 +
> drivers/acpi/acpica/aclocal.h | 5 +-
> drivers/acpi/acpica/acobject.h | 12 ++-
> drivers/acpi/acpica/actables.h | 5 +-
> drivers/acpi/acpica/excreate.c | 5 +
> drivers/acpi/acpica/hwxfsleep.c | 9 +-
> drivers/acpi/acpica/nsaccess.c | 6 ++
> drivers/acpi/acpica/psobject.c | 26 +++++
> drivers/acpi/acpica/tbdata.c | 230 +++++++++++++++++++++++++++++++++++-----
> drivers/acpi/acpica/tbinstal.c | 161 ++++------------------------
> drivers/acpi/acpica/tbxface.c | 39 ++++++-
> drivers/acpi/acpica/tbxfload.c | 2 +-
> drivers/acpi/bus.c | 3 -
> drivers/acpi/tables.c | 4 +-
> include/acpi/acpixf.h | 15 +--
> include/acpi/actbl.h | 1 +
> include/acpi/actbl2.h | 16 ++-
> include/acpi/platform/acenv.h | 9 +-
> include/acpi/platform/aclinux.h | 3 +
> 19 files changed, 356 insertions(+), 197 deletions(-)
Whole series applied.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2017-07-21 22:10 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10 7:22 [PATCH 00/16] ACPICA 20170629 Release Lv Zheng
2017-07-10 7:22 ` [PATCH 01/16] ACPICA: Small indentation changes, no functional change Lv Zheng
2017-07-10 7:22 ` [PATCH 02/16] ACPICA: IORT: Update SMMU models for revision C Lv Zheng
2017-07-10 7:22 ` [PATCH 03/16] ACPICA: Tools: Deallocate memory allocated by ac_get_all_tables_from_file via ac_delete_table_list Lv Zheng
2017-07-10 7:23 ` [PATCH 04/16] ACPICA: iASL compiler: allow compilation of externals with paths that refer to existing names Lv Zheng
2017-07-10 7:23 ` [PATCH 05/16] Back port of "ACPICA: Use designated initializers" Lv Zheng
2017-07-10 7:23 ` [PATCH 06/16] ACPICA: linuxize: cleanup typedef definitions Lv Zheng
2017-07-10 7:23 ` [PATCH 07/16] ACPICA: Tables: Add sanity check in acpi_put_table() Lv Zheng
2017-07-10 7:23 ` [PATCH 08/16] ACPICA: Tables: Cleanup table handler invokers Lv Zheng
2017-07-10 7:23 ` [PATCH 09/16] ACPICA: Tables: Do not validate signature for dynamic table load Lv Zheng
2017-07-10 7:23 ` [PATCH 10/16] ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum Lv Zheng
2017-07-10 7:23 ` [PATCH 11/16] ACPICA: Tables: Combine checksum/duplication verification together Lv Zheng
2017-07-10 7:23 ` [PATCH 12/16] ACPICA: Tables: Add deferred table verification support Lv Zheng
2017-07-10 7:24 ` [PATCH 13/16] ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias Lv Zheng
2017-07-10 7:24 ` [PATCH 14/16] ACPICA: Disassembler: skip parsing of incorrect external declarations Lv Zheng
2017-07-10 7:24 ` [PATCH 15/16] ACPICA: iasl: Update to IORT SMMUv3 disassembling Lv Zheng
2017-07-10 7:24 ` [PATCH 16/16] ACPICA: Update version to 20170629 Lv Zheng
2017-07-21 22:02 ` [PATCH 00/16] ACPICA 20170629 Release Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).