]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'acpica'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 6 Apr 2020 14:23:31 +0000 (16:23 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 6 Apr 2020 14:23:31 +0000 (16:23 +0200)
* acpica:
  ACPICA: Update version 20200326
  ACPICA: Fixes for acpiExec namespace init file
  ACPICA: Add NHLT table signature
  ACPICA: WSMT: Fix typo, no functional change
  ACPICA: utilities: fix sprintf()
  ACPICA: acpiexec: remove redeclaration of acpi_gbl_db_opt_no_region_support
  ACPICA: Change PlatformCommChannel ASL keyword to PCC
  ACPICA: Fix IVRS IVHD type 10h reserved field name
  ACPICA: Implement IVRS IVHD type 11h parsing
  ACPICA: Fix a typo in a comment field

15 files changed:
drivers/acpi/acpica/acnamesp.h
drivers/acpi/acpica/dbinput.c
drivers/acpi/acpica/dbxface.c
drivers/acpi/acpica/dswexec.c
drivers/acpi/acpica/dswload.c
drivers/acpi/acpica/dswload2.c
drivers/acpi/acpica/nsnames.c
drivers/acpi/acpica/utdecode.c
drivers/acpi/acpica/utdelete.c
drivers/acpi/acpica/utprint.c
drivers/acpi/tables.c
include/acpi/acpixf.h
include/acpi/actbl2.h
include/acpi/actbl3.h
include/acpi/acuuid.h

index e618ddfab2fd1aa5b3b3a320a5aa7b81c81a1095..40f6a3c33a1505251bb32f4fc0599c602cbfa389 100644 (file)
@@ -256,6 +256,8 @@ u32
 acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
                              char *full_path, u32 path_size, u8 no_trailing);
 
+void acpi_ns_normalize_pathname(char *original_path);
+
 char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
                                      u8 no_trailing);
 
index aa71f65395d25863e787315137a59b26f7c5bcf8..ee6a1b77af3f126707ce7c08a54982708145bd91 100644 (file)
@@ -468,16 +468,14 @@ char *acpi_db_get_next_token(char *string,
                return (NULL);
        }
 
-       /* Remove any spaces at the beginning */
+       /* Remove any spaces at the beginning, ignore blank lines */
 
-       if (*string == ' ') {
-               while (*string && (*string == ' ')) {
-                       string++;
-               }
+       while (*string && isspace(*string)) {
+               string++;
+       }
 
-               if (!(*string)) {
-                       return (NULL);
-               }
+       if (!(*string)) {
+               return (NULL);
        }
 
        switch (*string) {
@@ -570,7 +568,7 @@ char *acpi_db_get_next_token(char *string,
 
                /* Find end of token */
 
-               while (*string && (*string != ' ')) {
+               while (*string && !isspace(*string)) {
                        string++;
                }
                break;
index 3eb45ea93e5e98d0b7ef3fb0429c8a6cec254b97..9dfd693cda3e71656fd708710ad22519d2be7057 100644 (file)
@@ -409,6 +409,7 @@ acpi_status acpi_initialize_debugger(void)
        acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;
 
        acpi_gbl_db_opt_no_ini_methods = FALSE;
+       acpi_gbl_db_opt_no_region_support = FALSE;
 
        acpi_gbl_db_buffer = acpi_os_allocate(ACPI_DEBUG_BUFFER_SIZE);
        if (!acpi_gbl_db_buffer) {
index 5e81a1ae44cff9bb52e8f65244e318858e3bcd60..1d4f8c81028c29120d2087f3d1e51ab4cb29214c 100644 (file)
@@ -16,6 +16,9 @@
 #include "acinterp.h"
 #include "acnamesp.h"
 #include "acdebug.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dswexec")
@@ -329,6 +332,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
        u32 op_class;
        union acpi_parse_object *next_op;
        union acpi_parse_object *first_arg;
+#ifdef ACPI_EXEC_APP
+       char *namepath;
+       union acpi_operand_object *obj_desc;
+#endif
 
        ACPI_FUNCTION_TRACE_PTR(ds_exec_end_op, walk_state);
 
@@ -537,6 +544,32 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
 
                        status =
                            acpi_ds_eval_buffer_field_operands(walk_state, op);
+                       if (ACPI_FAILURE(status)) {
+                               break;
+                       }
+#ifdef ACPI_EXEC_APP
+                       /*
+                        * acpi_exec support for namespace initialization file (initialize
+                        * buffer_fields in this code.)
+                        */
+                       namepath =
+                           acpi_ns_get_external_pathname(op->common.node);
+                       status = ae_lookup_init_file_entry(namepath, &obj_desc);
+                       if (ACPI_SUCCESS(status)) {
+                               status =
+                                   acpi_ex_write_data_to_field(obj_desc,
+                                                               op->common.
+                                                               node->object,
+                                                               NULL);
+                               if ACPI_FAILURE
+                                       (status) {
+                                       ACPI_EXCEPTION((AE_INFO, status,
+                                                       "While writing to buffer field"));
+                                       }
+                       }
+                       ACPI_FREE(namepath);
+                       status = AE_OK;
+#endif
                        break;
 
                case AML_TYPE_CREATE_OBJECT:
index 697974e37edfbc1fda6b031d111828dd8c2774bf..27069325b6de0efc0a68828fea12a9807a815c51 100644 (file)
@@ -14,7 +14,6 @@
 #include "acdispat.h"
 #include "acinterp.h"
 #include "acnamesp.h"
-
 #ifdef ACPI_ASL_COMPILER
 #include "acdisasm.h"
 #endif
@@ -399,7 +398,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
        union acpi_parse_object *op;
        acpi_object_type object_type;
        acpi_status status = AE_OK;
-
 #ifdef ACPI_ASL_COMPILER
        u8 param_count;
 #endif
index b31457ca926cc8ec0a4a0eaab9cff87ef0d3e9d3..edadbe1465069651221d81b6b1d2d1153481f7bd 100644 (file)
@@ -15,6 +15,9 @@
 #include "acinterp.h"
 #include "acnamesp.h"
 #include "acevents.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dswload2")
@@ -373,6 +376,10 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
        struct acpi_namespace_node *new_node;
        u32 i;
        u8 region_space;
+#ifdef ACPI_EXEC_APP
+       union acpi_operand_object *obj_desc;
+       char *namepath;
+#endif
 
        ACPI_FUNCTION_TRACE(ds_load2_end_op);
 
@@ -466,6 +473,11 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
                 * be evaluated later during the execution phase
                 */
                status = acpi_ds_create_buffer_field(op, walk_state);
+               if (ACPI_FAILURE(status)) {
+                       ACPI_EXCEPTION((AE_INFO, status,
+                                       "CreateBufferField failure"));
+                       goto cleanup;
+                       }
                break;
 
        case AML_TYPE_NAMED_FIELD:
@@ -604,6 +616,29 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
                case AML_NAME_OP:
 
                        status = acpi_ds_create_node(walk_state, node, op);
+                       if (ACPI_FAILURE(status)) {
+                               goto cleanup;
+                       }
+#ifdef ACPI_EXEC_APP
+                       /*
+                        * acpi_exec support for namespace initialization file (initialize
+                        * Name opcodes in this code.)
+                        */
+                       namepath = acpi_ns_get_external_pathname(node);
+                       status = ae_lookup_init_file_entry(namepath, &obj_desc);
+                       if (ACPI_SUCCESS(status)) {
+
+                               /* Detach any existing object, attach new object */
+
+                               if (node->object) {
+                                       acpi_ns_detach_object(node);
+                               }
+                               acpi_ns_attach_object(node, obj_desc,
+                                                     obj_desc->common.type);
+                       }
+                       ACPI_FREE(namepath);
+                       status = AE_OK;
+#endif
                        break;
 
                case AML_METHOD_OP:
index d4d26147610ec153459b1c5f12afad09c0f9c5f3..d91153f6570053b8d372c892f996c335e7d1607c 100644 (file)
@@ -13,9 +13,6 @@
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsnames")
 
-/* Local Prototypes */
-static void acpi_ns_normalize_pathname(char *original_path);
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_get_external_pathname
@@ -30,7 +27,6 @@ static void acpi_ns_normalize_pathname(char *original_path);
  *              for error and debug statements.
  *
  ******************************************************************************/
-
 char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
 {
        char *name_buffer;
@@ -411,7 +407,7 @@ cleanup:
  *
  ******************************************************************************/
 
-static void acpi_ns_normalize_pathname(char *original_path)
+void acpi_ns_normalize_pathname(char *original_path)
 {
        char *input_path = original_path;
        char *new_path_buffer;
index befdd13b403b7c0091aaf97cde1d0f7832ac0d6f..177ab88d95de561be5efa939ed166ef8b203aa01 100644 (file)
@@ -78,7 +78,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
        "IPMI",                 /* 0x07 */
        "GeneralPurposeIo",     /* 0x08 */
        "GenericSerialBus",     /* 0x09 */
-       "PlatformCommChannel"   /* 0x0A */
+       "PCC"                   /* 0x0A */
 };
 
 const char *acpi_ut_get_region_name(u8 space_id)
index eee263cb7beb00989e79c4abd662c3bc7a90f3a0..c365faf4e6cd414a51c6b9caa8a42c0e85bd82eb 100644 (file)
@@ -452,13 +452,13 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
  *
  * FUNCTION:    acpi_ut_update_object_reference
  *
- * PARAMETERS:  object              - Increment ref count for this object
- *                                    and all sub-objects
+ * PARAMETERS:  object              - Increment or decrement the ref count for
+ *                                    this object and all sub-objects
  *              action              - Either REF_INCREMENT or REF_DECREMENT
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Increment the object reference count
+ * DESCRIPTION: Increment or decrement the object reference count
  *
  * Object references are incremented when:
  * 1) An object is attached to a Node (namespace object)
@@ -492,7 +492,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
                }
 
                /*
-                * All sub-objects must have their reference count incremented
+                * All sub-objects must have their reference count updated
                 * also. Different object types have different subobjects.
                 */
                switch (object->common.type) {
@@ -559,6 +559,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
                                        break;
                                }
                        }
+
                        next_object = NULL;
                        break;
 
index a874dac7db5cc9ec46b97b422826d8506c15be62..681c11f4af4e89ed2d1f8e02b6c89244fa2646be 100644 (file)
@@ -332,7 +332,12 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
        int i;
 
        pos = string;
-       end = string + size;
+
+       if (size != ACPI_UINT32_MAX) {
+               end = string + size;
+       } else {
+               end = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
+       }
 
        for (; *format; ++format) {
                if (*format != '%') {
index 180ac432976316f1193f65ac071d557fae911487..0e905c3d16451c2685ff1978dd820c243c10ff68 100644 (file)
@@ -501,7 +501,7 @@ static const char * const table_sigs[] = {
        ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
        ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
        ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
-       NULL };
+       ACPI_SIG_NHLT, NULL };
 
 #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
 
index 87fc14e97d2b11dd16cdd4ceeec2d3a60373069f..49b519f36b6950a9cdd2f58ae44483dbba178652 100644 (file)
@@ -12,7 +12,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20200214
+#define ACPI_CA_VERSION                 0x20200326
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
index b818ba60e19d55a1299788714dde4a13d70c72c9..ec66779cb19342e78f862685814b46dbed484b72 100644 (file)
@@ -43,6 +43,7 @@
 #define ACPI_SIG_SBST           "SBST" /* Smart Battery Specification Table */
 #define ACPI_SIG_SDEI           "SDEI" /* Software Delegated Exception Interface Table */
 #define ACPI_SIG_SDEV           "SDEV" /* Secure Devices table */
+#define ACPI_SIG_NHLT           "NHLT" /* Non-HDAudio Link Table */
 
 /*
  * All tables must be byte-packed to match the ACPI specification, since
@@ -274,7 +275,8 @@ struct acpi_ivrs_header {
 /* Values for subtable Type above */
 
 enum acpi_ivrs_type {
-       ACPI_IVRS_TYPE_HARDWARE = 0x10,
+       ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
+       ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
        ACPI_IVRS_TYPE_MEMORY1 = 0x20,
        ACPI_IVRS_TYPE_MEMORY2 = 0x21,
        ACPI_IVRS_TYPE_MEMORY3 = 0x22
@@ -301,13 +303,26 @@ enum acpi_ivrs_type {
 
 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
 
-struct acpi_ivrs_hardware {
+struct acpi_ivrs_hardware_10 {
        struct acpi_ivrs_header header;
        u16 capability_offset;  /* Offset for IOMMU control fields */
        u64 base_address;       /* IOMMU control registers */
        u16 pci_segment_group;
        u16 info;               /* MSI number and unit ID */
-       u32 reserved;
+       u32 feature_reporting;
+};
+
+/* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */
+
+struct acpi_ivrs_hardware_11 {
+       struct acpi_ivrs_header header;
+       u16 capability_offset;  /* Offset for IOMMU control fields */
+       u64 base_address;       /* IOMMU control registers */
+       u16 pci_segment_group;
+       u16 info;               /* MSI number and unit ID */
+       u32 attributes;
+       u64 efr_register_image;
+       u64 reserved;
 };
 
 /* Masks for Info field above */
index 2bf3baf819bbed9afc9ac7fdebb91a63afa1bc7e..b0b163b9efc6d0b2b14e12c322bde0ef534acf42 100644 (file)
@@ -39,7 +39,7 @@
 #define ACPI_SIG_WDDT           "WDDT" /* Watchdog Timer Description Table */
 #define ACPI_SIG_WDRT           "WDRT" /* Watchdog Resource Table */
 #define ACPI_SIG_WPBT           "WPBT" /* Windows Platform Binary Table */
-#define ACPI_SIG_WSMT           "WSMT" /* Windows SMM Security Migrations Table */
+#define ACPI_SIG_WSMT           "WSMT" /* Windows SMM Security Mitigations Table */
 #define ACPI_SIG_XENV           "XENV" /* Xen Environment table */
 #define ACPI_SIG_XXXX           "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
 
@@ -673,10 +673,10 @@ struct acpi_table_wpbt {
 
 /*******************************************************************************
  *
- * WSMT - Windows SMM Security Migrations Table
+ * WSMT - Windows SMM Security Mitigations Table
  *        Version 1
  *
- * Conforms to "Windows SMM Security Migrations Table",
+ * Conforms to "Windows SMM Security Mitigations Table",
  * Version 1.0, April 18, 2016
  *
  ******************************************************************************/
index 9dd4689a39cf8427dfee12e72fae06d5fc823b26..9e1367b19069997282a7410138fa25bae0c15ce1 100644 (file)
@@ -57,4 +57,4 @@
 #define UUID_THERMAL_EXTENSIONS         "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"
 #define UUID_DEVICE_PROPERTIES          "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
 
-#endif                         /* __AUUID_H__ */
+#endif                         /* __ACUUID_H__ */