Skip to content

Commit fd03605

Browse files
committed
Merge branch 'acpica'
* 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
2 parents 696ac2e + 6461e59 commit fd03605

File tree

15 files changed

+115
-31
lines changed

15 files changed

+115
-31
lines changed

drivers/acpi/acpica/acnamesp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ u32
256256
acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
257257
char *full_path, u32 path_size, u8 no_trailing);
258258

259+
void acpi_ns_normalize_pathname(char *original_path);
260+
259261
char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
260262
u8 no_trailing);
261263

drivers/acpi/acpica/dbinput.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,14 @@ char *acpi_db_get_next_token(char *string,
468468
return (NULL);
469469
}
470470

471-
/* Remove any spaces at the beginning */
471+
/* Remove any spaces at the beginning, ignore blank lines */
472472

473-
if (*string == ' ') {
474-
while (*string && (*string == ' ')) {
475-
string++;
476-
}
473+
while (*string && isspace(*string)) {
474+
string++;
475+
}
477476

478-
if (!(*string)) {
479-
return (NULL);
480-
}
477+
if (!(*string)) {
478+
return (NULL);
481479
}
482480

483481
switch (*string) {
@@ -570,7 +568,7 @@ char *acpi_db_get_next_token(char *string,
570568

571569
/* Find end of token */
572570

573-
while (*string && (*string != ' ')) {
571+
while (*string && !isspace(*string)) {
574572
string++;
575573
}
576574
break;

drivers/acpi/acpica/dbxface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ acpi_status acpi_initialize_debugger(void)
409409
acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;
410410

411411
acpi_gbl_db_opt_no_ini_methods = FALSE;
412+
acpi_gbl_db_opt_no_region_support = FALSE;
412413

413414
acpi_gbl_db_buffer = acpi_os_allocate(ACPI_DEBUG_BUFFER_SIZE);
414415
if (!acpi_gbl_db_buffer) {

drivers/acpi/acpica/dswexec.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#include "acinterp.h"
1717
#include "acnamesp.h"
1818
#include "acdebug.h"
19+
#ifdef ACPI_EXEC_APP
20+
#include "aecommon.h"
21+
#endif
1922

2023
#define _COMPONENT ACPI_DISPATCHER
2124
ACPI_MODULE_NAME("dswexec")
@@ -329,6 +332,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
329332
u32 op_class;
330333
union acpi_parse_object *next_op;
331334
union acpi_parse_object *first_arg;
335+
#ifdef ACPI_EXEC_APP
336+
char *namepath;
337+
union acpi_operand_object *obj_desc;
338+
#endif
332339

333340
ACPI_FUNCTION_TRACE_PTR(ds_exec_end_op, walk_state);
334341

@@ -537,6 +544,32 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
537544

538545
status =
539546
acpi_ds_eval_buffer_field_operands(walk_state, op);
547+
if (ACPI_FAILURE(status)) {
548+
break;
549+
}
550+
#ifdef ACPI_EXEC_APP
551+
/*
552+
* acpi_exec support for namespace initialization file (initialize
553+
* buffer_fields in this code.)
554+
*/
555+
namepath =
556+
acpi_ns_get_external_pathname(op->common.node);
557+
status = ae_lookup_init_file_entry(namepath, &obj_desc);
558+
if (ACPI_SUCCESS(status)) {
559+
status =
560+
acpi_ex_write_data_to_field(obj_desc,
561+
op->common.
562+
node->object,
563+
NULL);
564+
if ACPI_FAILURE
565+
(status) {
566+
ACPI_EXCEPTION((AE_INFO, status,
567+
"While writing to buffer field"));
568+
}
569+
}
570+
ACPI_FREE(namepath);
571+
status = AE_OK;
572+
#endif
540573
break;
541574

542575
case AML_TYPE_CREATE_OBJECT:

drivers/acpi/acpica/dswload.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "acdispat.h"
1515
#include "acinterp.h"
1616
#include "acnamesp.h"
17-
1817
#ifdef ACPI_ASL_COMPILER
1918
#include "acdisasm.h"
2019
#endif
@@ -399,7 +398,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
399398
union acpi_parse_object *op;
400399
acpi_object_type object_type;
401400
acpi_status status = AE_OK;
402-
403401
#ifdef ACPI_ASL_COMPILER
404402
u8 param_count;
405403
#endif

drivers/acpi/acpica/dswload2.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#include "acinterp.h"
1616
#include "acnamesp.h"
1717
#include "acevents.h"
18+
#ifdef ACPI_EXEC_APP
19+
#include "aecommon.h"
20+
#endif
1821

1922
#define _COMPONENT ACPI_DISPATCHER
2023
ACPI_MODULE_NAME("dswload2")
@@ -373,6 +376,10 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
373376
struct acpi_namespace_node *new_node;
374377
u32 i;
375378
u8 region_space;
379+
#ifdef ACPI_EXEC_APP
380+
union acpi_operand_object *obj_desc;
381+
char *namepath;
382+
#endif
376383

377384
ACPI_FUNCTION_TRACE(ds_load2_end_op);
378385

@@ -466,6 +473,11 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
466473
* be evaluated later during the execution phase
467474
*/
468475
status = acpi_ds_create_buffer_field(op, walk_state);
476+
if (ACPI_FAILURE(status)) {
477+
ACPI_EXCEPTION((AE_INFO, status,
478+
"CreateBufferField failure"));
479+
goto cleanup;
480+
}
469481
break;
470482

471483
case AML_TYPE_NAMED_FIELD:
@@ -604,6 +616,29 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
604616
case AML_NAME_OP:
605617

606618
status = acpi_ds_create_node(walk_state, node, op);
619+
if (ACPI_FAILURE(status)) {
620+
goto cleanup;
621+
}
622+
#ifdef ACPI_EXEC_APP
623+
/*
624+
* acpi_exec support for namespace initialization file (initialize
625+
* Name opcodes in this code.)
626+
*/
627+
namepath = acpi_ns_get_external_pathname(node);
628+
status = ae_lookup_init_file_entry(namepath, &obj_desc);
629+
if (ACPI_SUCCESS(status)) {
630+
631+
/* Detach any existing object, attach new object */
632+
633+
if (node->object) {
634+
acpi_ns_detach_object(node);
635+
}
636+
acpi_ns_attach_object(node, obj_desc,
637+
obj_desc->common.type);
638+
}
639+
ACPI_FREE(namepath);
640+
status = AE_OK;
641+
#endif
607642
break;
608643

609644
case AML_METHOD_OP:

drivers/acpi/acpica/nsnames.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
#define _COMPONENT ACPI_NAMESPACE
1414
ACPI_MODULE_NAME("nsnames")
1515

16-
/* Local Prototypes */
17-
static void acpi_ns_normalize_pathname(char *original_path);
18-
1916
/*******************************************************************************
2017
*
2118
* FUNCTION: acpi_ns_get_external_pathname
@@ -30,7 +27,6 @@ static void acpi_ns_normalize_pathname(char *original_path);
3027
* for error and debug statements.
3128
*
3229
******************************************************************************/
33-
3430
char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
3531
{
3632
char *name_buffer;
@@ -411,7 +407,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
411407
*
412408
******************************************************************************/
413409

414-
static void acpi_ns_normalize_pathname(char *original_path)
410+
void acpi_ns_normalize_pathname(char *original_path)
415411
{
416412
char *input_path = original_path;
417413
char *new_path_buffer;

drivers/acpi/acpica/utdecode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
7878
"IPMI", /* 0x07 */
7979
"GeneralPurposeIo", /* 0x08 */
8080
"GenericSerialBus", /* 0x09 */
81-
"PlatformCommChannel" /* 0x0A */
81+
"PCC" /* 0x0A */
8282
};
8383

8484
const char *acpi_ut_get_region_name(u8 space_id)

drivers/acpi/acpica/utdelete.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,13 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
452452
*
453453
* FUNCTION: acpi_ut_update_object_reference
454454
*
455-
* PARAMETERS: object - Increment ref count for this object
456-
* and all sub-objects
455+
* PARAMETERS: object - Increment or decrement the ref count for
456+
* this object and all sub-objects
457457
* action - Either REF_INCREMENT or REF_DECREMENT
458458
*
459459
* RETURN: Status
460460
*
461-
* DESCRIPTION: Increment the object reference count
461+
* DESCRIPTION: Increment or decrement the object reference count
462462
*
463463
* Object references are incremented when:
464464
* 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)
492492
}
493493

494494
/*
495-
* All sub-objects must have their reference count incremented
495+
* All sub-objects must have their reference count updated
496496
* also. Different object types have different subobjects.
497497
*/
498498
switch (object->common.type) {
@@ -559,6 +559,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
559559
break;
560560
}
561561
}
562+
562563
next_object = NULL;
563564
break;
564565

drivers/acpi/acpica/utprint.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,12 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
332332
int i;
333333

334334
pos = string;
335-
end = string + size;
335+
336+
if (size != ACPI_UINT32_MAX) {
337+
end = string + size;
338+
} else {
339+
end = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
340+
}
336341

337342
for (; *format; ++format) {
338343
if (*format != '%') {

drivers/acpi/tables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static const char * const table_sigs[] = {
501501
ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
502502
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
503503
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
504-
NULL };
504+
ACPI_SIG_NHLT, NULL };
505505

506506
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
507507

include/acpi/acpixf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/* Current ACPICA subsystem version in YYYYMMDD format */
1414

15-
#define ACPI_CA_VERSION 0x20200214
15+
#define ACPI_CA_VERSION 0x20200326
1616

1717
#include <acpi/acconfig.h>
1818
#include <acpi/actypes.h>

include/acpi/actbl2.h

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
4444
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
4545
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
46+
#define ACPI_SIG_NHLT "NHLT" /* Non-HDAudio Link Table */
4647

4748
/*
4849
* All tables must be byte-packed to match the ACPI specification, since
@@ -274,7 +275,8 @@ struct acpi_ivrs_header {
274275
/* Values for subtable Type above */
275276

276277
enum acpi_ivrs_type {
277-
ACPI_IVRS_TYPE_HARDWARE = 0x10,
278+
ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
279+
ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
278280
ACPI_IVRS_TYPE_MEMORY1 = 0x20,
279281
ACPI_IVRS_TYPE_MEMORY2 = 0x21,
280282
ACPI_IVRS_TYPE_MEMORY3 = 0x22
@@ -301,13 +303,26 @@ enum acpi_ivrs_type {
301303

302304
/* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
303305

304-
struct acpi_ivrs_hardware {
306+
struct acpi_ivrs_hardware_10 {
305307
struct acpi_ivrs_header header;
306308
u16 capability_offset; /* Offset for IOMMU control fields */
307309
u64 base_address; /* IOMMU control registers */
308310
u16 pci_segment_group;
309311
u16 info; /* MSI number and unit ID */
310-
u32 reserved;
312+
u32 feature_reporting;
313+
};
314+
315+
/* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */
316+
317+
struct acpi_ivrs_hardware_11 {
318+
struct acpi_ivrs_header header;
319+
u16 capability_offset; /* Offset for IOMMU control fields */
320+
u64 base_address; /* IOMMU control registers */
321+
u16 pci_segment_group;
322+
u16 info; /* MSI number and unit ID */
323+
u32 attributes;
324+
u64 efr_register_image;
325+
u64 reserved;
311326
};
312327

313328
/* Masks for Info field above */

include/acpi/actbl3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
4040
#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
4141
#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
42-
#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */
42+
#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */
4343
#define ACPI_SIG_XENV "XENV" /* Xen Environment table */
4444
#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
4545

@@ -673,10 +673,10 @@ struct acpi_table_wpbt {
673673

674674
/*******************************************************************************
675675
*
676-
* WSMT - Windows SMM Security Migrations Table
676+
* WSMT - Windows SMM Security Mitigations Table
677677
* Version 1
678678
*
679-
* Conforms to "Windows SMM Security Migrations Table",
679+
* Conforms to "Windows SMM Security Mitigations Table",
680680
* Version 1.0, April 18, 2016
681681
*
682682
******************************************************************************/

include/acpi/acuuid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@
5757
#define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"
5858
#define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
5959

60-
#endif /* __AUUID_H__ */
60+
#endif /* __ACUUID_H__ */

0 commit comments

Comments
 (0)