ACPICA: Release 20240827
Subsystems (2)
cover ACPICA: Release 20240827
Hi All,
These are ACPICA 20240827 changes ported to Linux, except for some patches that have been applied already or are going to be routed through other maintainer trees.
The following changes are included:
Adam Lackorzynski (1):
ACPICA: Avoid warning for Dump Functions
Adam Young (1):
ACPICA: Allow PCC Data Type in MCTP resource.
Adrien Destugues (1):
ACPICA: haiku: Fix invalid value used for semaphores
Aleksandrs Vinarskis (1):
ACPICA: iasl: handle empty connection_node
Armin Wolf (6):
ACPICA: Fix memory leak if acpi_ps_get_next_namepath() fails
ACPICA: Fix memory leak if acpi_ps_get_next_field() fails
ACPICA: Allow for supressing leading zeros when using acpi_ex_convert_to_ascii()
ACPICA: Add support for supressing leading zeros in hex strings
ACPICA: Update integer-to-hex-string conversions
ACPICA: Add support for Windows 11 22H2 _OSI string
Dave Jiang (1):
ACPICA: HMAT: Add extended linear address mode to MSCIS
Jose Marinho (1):
ACPICA: Implement the Dword_PCC Resource Descriptor Macro
Punit Agrawal (1):
ACPICA: MPAM: Correct the typo in struct acpi_mpam_msc_node member
Saket Dumbre (2):
ACPICA: Allow for more flexibility in _DSM args
ACPICA: Setup for ACPICA release 20240827
Sia Jee Heng (2):
ACPICA: SPCR: Update the SPCR table to version 4
ACPICA: Headers: Add RISC-V SBI Subtype to DBG2
Vasily Khoruzhick (2):
ACPICA: Implement ACPI_WARNING_ONCE and ACPI_ERROR_ONCE
ACPICA: executer/exsystem: Don't nag user about every Stall() violating the spec
Zhang Rui (1):
ACPICA: Complete CXL 3.0 CXIMS structures
Thanks!
PATCH 1/20 ACPICA: haiku: Fix invalid value used for semaphores
From: Adrien Destugues <[email protected]>
ACPICA commit 49fe4f25483feec2f685b204ef19e28d92979e95
In Haiku, semaphores are represented by integers, not pointers. So, we can't use NULL as the invalid/destroyed value, the correct value is -1. Introduce a platform overridable define to allow this.
Fixes #162 (which was closed after coming to the conclusion that this should be done, but the change was never done).
--- drivers/acpi/acpica/utdelete.c | 4 ++-- drivers/acpi/acpica/utinit.c | 2 +- include/acpi/platform/acenv.h | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-)
drivers/acpi/acpica/utdelete.c +2 -2
@@ -140,7 +140,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) (void )acpi_os_delete_semaphore (acpi_gbl_global_lock_semaphore); - acpi_gbl_global_lock_semaphore =NULL ; + acpi_gbl_global_lock_semaphore =ACPI_SEMAPHORE_NULL ;acpi_os_delete_mutex (object->mutex.os_mutex); acpi_gbl_global_lock_mutex =NULL ;
@@ -157,7 +157,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) object, object->event.os_semaphore)); (void )acpi_os_delete_semaphore (object->event.os_semaphore); - object->event.os_semaphore =NULL ; + object->event.os_semaphore =ACPI_SEMAPHORE_NULL ;break ;case ACPI_TYPE_METHOD :
drivers/acpi/acpica/utinit.c +1 -1
@@ -154,7 +154,7 @@ acpi_status acpi_ut_init_globals(void)/* Global Lock support */ - acpi_gbl_global_lock_semaphore =NULL ; + acpi_gbl_global_lock_semaphore =ACPI_SEMAPHORE_NULL ; acpi_gbl_global_lock_mutex =NULL ; acpi_gbl_global_lock_acquired = FALSE; acpi_gbl_global_lock_handle =0 ;
include/acpi/platform/acenv.h +6 -0
@@ -252,6 +252,12 @@#define ACPI_RELEASE_GLOBAL_LOCK (Glptr, pending) pending = 0#endif +/* NULL/invalid value to use for destroyed or not-yet-created semaphores. */ + +#ifndef ACPI_SEMAPHORE_NULL +#define ACPI_SEMAPHORE_NULL NULL +#endif +/* Flush CPU cache - used when going to sleep. Wbinvd or similar. */ #ifndef ACPI_FLUSH_CPU_CACHE
Signature · 1 line
2.43.0
PATCH 2/20 ACPICA: Complete CXL 3.0 CXIMS structures
In reply to Rafael J. WysockiFrom: Zhang Rui <[email protected]>
ACPICA commit eb2a2ff303416fb3f6c425d519dbcd6988dbd91f
Commit 2d8dc0383d3c9 ("Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table") introduces basic support for CXL XOR Interleave Math Structure (CXIMS).
Complete the CXIMS structures.
No functional change.
--- include/acpi/actbl1.h | 4 ++++ 1 file changed, 4 insertions(+)
include/acpi/actbl1.h +4 -0
@@ -567,6 +567,10 @@ struct acpi_cedt_cxims {u64 xormap_list[]; }; +struct acpi_cedt_cxims_target_element { +u64 xormap; +}; +/* 3: CXL RCEC Downstream Port Association Structure */ struct acpi_cedt_rdpas {
Signature · 1 line
2.43.0
PATCH 3/20 ACPICA: SPCR: Update the SPCR table to version 4
In reply to Rafael J. WysockiFrom: Sia Jee Heng <[email protected]>
ACPICA commit 1eeff52124a45d5cd887ba5687bbad0116e4d211
The Microsoft Serial Port Console Redirection (SPCR) specification revision 1.09 comprises additional fields [1]. The newly added fields are:
- RISC-V SBI
- Precise Baud Rate
- namespace_string_length
- namespace_string_offset
- namespace_string
Additionaly, this code will support up to SPCR revision 1.10, as it includes only minor wording changes.
--- include/acpi/actbl3.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
include/acpi/actbl3.h +8 -4
@@ -92,10 +92,10 @@ struct acpi_table_slit {/******************************************************************************* * * SPCR - Serial Port Console Redirection table -* Version 2 +* Version 4 * * Conforms to "Serial Port Console Redirection Table", -* Version 1.03, August 10, 2015 +* Version 1.10, Jan 5, 2023 * ******************************************************************************/
@@ -112,7 +112,7 @@ struct acpi_table_spcr {u8 stop_bits;u8 flow_control;u8 terminal_type; -u8 reserved1; +u8 language;u16 pci_device_id;u16 pci_vendor_id;u8 pci_bus;
@@ -120,7 +120,11 @@ struct acpi_table_spcr {u8 pci_function;u32 pci_flags;u8 pci_segment; -u32 reserved2; +u32 uart_clk_freq; +u32 precise_baudrate; +u16 name_space_string_length; +u16 name_space_string_offset; +char name_space_string[]; };/* Masks for pci_flags field above */
Signature · 1 line
2.43.0
PATCH 4/20 ACPICA: Headers: Add RISC-V SBI Subtype to DBG2
In reply to Rafael J. WysockiFrom: Sia Jee Heng <[email protected]>
ACPICA commit 6f4c900bcf9ca065129353f17a83773aa58095aa
Include the RISC-V SBI debugging subtype as documented in DBG2 dated April 10, 2023 [1].
--- include/acpi/actbl1.h | 1 + 1 file changed, 1 insertion(+)
include/acpi/actbl1.h +1 -0
@@ -755,6 +755,7 @@ struct acpi_dbg2_device {#define ACPI_DBG2_16550_WITH_GAS 0x0012#define ACPI_DBG2_SDM845_7_372MHZ 0x0013#define ACPI_DBG2_INTEL_LPSS 0x0014 +#define ACPI_DBG2_RISCV_SBI_CON 0x0015#define ACPI_DBG2_1394_STANDARD 0x0000
Signature · 1 line
2.43.0
PATCH 5/20 ACPICA: Implement the Dword_PCC Resource Descriptor Macro
In reply to Rafael J. WysockiFrom: Jose Marinho <[email protected]>
ACPICA commit 1209ecf682e03d9ef0c22f4986a2e53b03bd2985
The Dword_pcc (alongside word_pcc and Qword_pcc) were accepted to ACPI inclusion via a code-first process.
This patch implements support in iASL for Dword_pcc.
--- drivers/acpi/acpica/aclocal.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpica/aclocal.h +2 -0
@@ -1090,6 +1090,8 @@ struct acpi_port_info {#define ACPI_ADDRESS_TYPE_IO_RANGE 1#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 +#define ACPI_ADDRESS_TYPE_PCC_NUMBER 0xA +/* Resource descriptor types and masks */ #define ACPI_RESOURCE_NAME_LARGE 0x80
Signature · 1 line
2.43.0
PATCH 6/20 ACPICA: MPAM: Correct the typo in struct acpi_mpam_msc_node member
In reply to Rafael J. WysockiFrom: Punit Agrawal <[email protected]>
ACPICA commit 3da3f7d776d17e9bfbb15de88317de8d7397ce38
A member of the struct acpi_mpam_msc_node that represents a Memory System Controller node structure - num_resource_nodes has a typo. Fix the typo
No functional change.
--- include/acpi/actbl2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/actbl2.h +1 -1
@@ -1607,7 +1607,7 @@ struct acpi_mpam_msc_node {u32 max_nrdy_usec;u64 hardware_id_linked_device;u32 instance_id_linked_device; -u32 num_resouce_nodes; +u32 num_resource_nodes; };struct acpi_table_mpam {
Signature · 1 line
2.43.0
PATCH 7/20 ACPICA: Implement ACPI_WARNING_ONCE and ACPI_ERROR_ONCE
In reply to Rafael J. WysockiFrom: Vasily Khoruzhick <[email protected]>
ACPICA commit 2ad4e6e7c4118f4cdfcad321c930b836cec77406
In some cases it is not practical nor useful to nag user about some firmware errors that they cannot fix. Add a macro that will print a warning or error only once to be used in these cases.
--- include/acpi/acoutput.h | 5 +++++ 1 file changed, 5 insertions(+)
include/acpi/acoutput.h +5 -0
@@ -193,6 +193,7 @@*/ #ifndef ACPI_NO_ERROR_MESSAGES #define AE_INFO _acpi_module_name, __LINE__ +#define ACPI_ONCE (_fn, _plist) { static char _done; if (!_done) { _done = 1; _fn _plist; } }/* * Error reporting. Callers module and line number are inserted by AE_INFO,
@@ -201,8 +202,10 @@*/ #define ACPI_INFO (plist) acpi_info plist#define ACPI_WARNING (plist) acpi_warning plist +#define ACPI_WARNING_ONCE (plist) ACPI_ONCE(acpi_warning, plist)#define ACPI_EXCEPTION (plist) acpi_exception plist#define ACPI_ERROR (plist) acpi_error plist +#define ACPI_ERROR_ONCE (plist) ACPI_ONCE(acpi_error, plist)#define ACPI_BIOS_WARNING (plist) acpi_bios_warning plist#define ACPI_BIOS_EXCEPTION (plist) acpi_bios_exception plist#define ACPI_BIOS_ERROR (plist) acpi_bios_error plist
@@ -214,8 +217,10 @@#define ACPI_INFO (plist)#define ACPI_WARNING (plist) +#define ACPI_WARNING_ONCE (plist)#define ACPI_EXCEPTION (plist)#define ACPI_ERROR (plist) +#define ACPI_ERROR_ONCE (plist)#define ACPI_BIOS_WARNING (plist)#define ACPI_BIOS_EXCEPTION (plist)#define ACPI_BIOS_ERROR (plist)
Signature · 1 line
2.43.0
PATCH 8/20 ACPICA: executer/exsystem: Don't nag user about every Stall() violating the spec
In reply to Rafael J. WysockiFrom: Vasily Khoruzhick <[email protected]>
ACPICA commit 129b75516fc49fe1fd6b8c5798f86c13854630b3
Stop nagging user about every Stall() that violates the spec
On my Dell XPS 15 7590 I get hundreds of these warnings after few hours of uptime:
$ dmesg | grep "fix the firmware" | wc -l 261
I cannot fix the firmware and I doubt that Dell cares about 4 year old laptop either
--- drivers/acpi/acpica/exsystem.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/acpi/acpica/exsystem.c +6 -5
@@ -133,14 +133,15 @@ acpi_status acpi_ex_system_do_stall(u32 how_long_us)* (ACPI specifies 100 usec as max, but this gives some slack in * order to support existing BIOSs) */ -ACPI_ERROR ((AE_INFO , -"Time parameter is too large (%u)" , how_long_us)); +ACPI_ERROR_ONCE ((AE_INFO , +"Time parameter is too large (%u)" , + how_long_us)); status =AE_AML_OPERAND_VALUE ; }else {if (how_long_us >100 ) { -ACPI_WARNING ((AE_INFO , -"Time parameter %u us > 100 us violating ACPI spec, please fix the firmware." , - how_long_us)); +ACPI_WARNING_ONCE ((AE_INFO , +"Time parameter %u us > 100 us violating ACPI spec, please fix the firmware." , + how_long_us)); }acpi_os_stall (how_long_us); }
Signature · 1 line
2.43.0
PATCH 9/20 ACPICA: Allow PCC Data Type in MCTP resource
In reply to Rafael J. WysockiFrom: Adam Young <[email protected]>
ACPICA commit f0776a465cc2c20393bec534c16bdee4a78f7bb7
Explicitly allow QWord address space description type
to be 0xA to indicate it refers to a Platform Communication channel IAW ACPI_ECR_PCC_DESCRIPTORS_CF_V2
An entity in a DSDT or in SSDTs that requires a platform communication channel table (PCCT) entry to communicate with a remote service will have a single value that is the index of the entry in the PCCT.
This data type with have a resource_type value of 0xA.
This value indicates that the type shares the same footprint as a Dword_space section.
--- drivers/acpi/acpica/rsaddr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpica/rsaddr.c +2 -1
@@ -282,7 +282,8 @@ acpi_rs_get_address_common(struct acpi_resource *resource,/* Validate the Resource Type */ -if ((address.resource_type >2 ) && (address.resource_type <0xC0 )) { +if ((address.resource_type >2 ) && + (address.resource_type <0xC0 ) && (address.resource_type !=0x0A )) {return (FALSE); }
Signature · 1 line
2.43.0
PATCH 10/20 ACPICA: Fix memory leak if acpi_ps_get_next_namepath() fails
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit 2802af722bbde7bf1a7ac68df68e179e2555d361
If acpi_ps_get_next_namepath() fails, the previously allocated union acpi_parse_object needs to be freed before returning the status code.
The issue was first being reported on the Linux ACPI mailing list:
--- drivers/acpi/acpica/psargs.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/acpica/psargs.c +8 -0
@@ -820,6 +820,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,acpi_ps_get_next_namepath (walk_state, parser_state, arg,ACPI_NOT_METHOD_CALL ); +if (ACPI_FAILURE (status)) { +acpi_ps_free_op (arg); +return_ACPI_STATUS (status); + } }else {/* Single complex argument, nothing returned */
@@ -854,6 +858,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,acpi_ps_get_next_namepath (walk_state, parser_state, arg,ACPI_POSSIBLE_METHOD_CALL ); +if (ACPI_FAILURE (status)) { +acpi_ps_free_op (arg); +return_ACPI_STATUS (status); + }if (arg->common.aml_opcode ==AML_INT_METHODCALL_OP ) {
Signature · 1 line
2.43.0
PATCH 11/20 ACPICA: Fix memory leak if acpi_ps_get_next_field() fails
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit 1280045754264841b119a5ede96cd005bc09b5a7
If acpi_ps_get_next_field() fails, the previously created field list needs to be properly disposed before returning the status code.
--- drivers/acpi/acpica/psargs.c | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
drivers/acpi/acpica/psargs.c +39 -0
@@ -25,6 +25,8 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state);static union acpi_parse_object *acpi_ps_get_next_field (struct acpi_parse_state *parser_state); +static void acpi_ps_free_field_list (union acpi_parse_object *start); +/******************************************************************************* * * FUNCTION: acpi_ps_get_next_package_length
@@ -683,6 +685,39 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_statereturn_PTR (field); } +/******************************************************************************* +* +* FUNCTION: acpi_ps_free_field_list +* +* PARAMETERS: start - First Op in field list +* +* RETURN: None. +* +* DESCRIPTION: Free all Op objects inside a field list. +* +******************************************************************************/ + +static void acpi_ps_free_field_list (union acpi_parse_object *start) +{ +union acpi_parse_object *cur = start; +union acpi_parse_object *next; +union acpi_parse_object *arg; + +while (cur) { + next = cur->common.next; + +/* AML_INT_CONNECTION_OP can have a single argument */ + + arg =acpi_ps_get_arg (cur,0 ); +if (arg) { +acpi_ps_free_op (arg); + } + +acpi_ps_free_op (cur); + cur = next; + } +} +/******************************************************************************* * * FUNCTION: acpi_ps_get_next_arg
@@ -751,6 +786,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,while (parser_state->aml < parser_state->pkg_end) { field =acpi_ps_get_next_field (parser_state);if (!field) { +if (arg) { +acpi_ps_free_field_list (arg); + } +return_ACPI_STATUS (AE_NO_MEMORY ); }
Signature · 1 line
2.43.0
PATCH 12/20 ACPICA: Allow for supressing leading zeros when using acpi_ex_convert_to_ascii()
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit 792a337104ce2c1729d33d76241b42b3214aa60f
Allow to specifiy wether leading zeros should be supressed ot not when using acpi_ex_convert_to_ascii().
--- drivers/acpi/acpica/exconvrt.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
drivers/acpi/acpica/exconvrt.c +16 -6
@@ -17,7 +17,8 @@ ACPI_MODULE_NAME("exconvrt")/* Local prototypes */ static u32 -acpi_ex_convert_to_ascii (u64 integer,u16 base,u8 *string,u8 max_length); +acpi_ex_convert_to_ascii (u64 integer, +u16 base,u8 *string,u8 max_length,u8 leading_zeros);/******************************************************************************* *
@@ -249,6 +250,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,* base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX * string - Where the string is returned * data_width - Size of data item to be converted, in bytes +* leading_zeros - Allow leading zeros * * RETURN: Actual string length *
@@ -257,7 +259,8 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,******************************************************************************/ static u32 -acpi_ex_convert_to_ascii (u64 integer,u16 base,u8 *string,u8 data_width) +acpi_ex_convert_to_ascii (u64 integer, +u16 base,u8 *string,u8 data_width,u8 leading_zeros) {u64 digit;u32 i;
@@ -266,7 +269,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)u32 hex_length;u32 decimal_length;u32 remainder; -u8 supress_zeros; +u8 supress_zeros = !leading_zeros;ACPI_FUNCTION_ENTRY ();
@@ -293,7 +296,6 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)break ; } - supress_zeros = TRUE;/* No leading zeros */ remainder =0 ;for (i = decimal_length; i >0 ; i--) {
@@ -379,6 +381,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,u32 string_length =0 ;u16 base =16 ;u8 separator =',' ; +u8 leading_zeros;ACPI_FUNCTION_TRACE_PTR (ex_convert_to_string, obj_desc);
@@ -400,6 +403,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* Make room for the maximum decimal number size */ string_length =ACPI_MAX_DECIMAL_DIGITS ; + leading_zeros = FALSE; base =10 ;break ;
@@ -408,6 +412,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,/* Two hex string characters for each integer byte */ string_length =ACPI_MUL_2 (acpi_gbl_integer_byte_width); + leading_zeros = TRUE;break ; }
@@ -428,7 +433,8 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, string_length =acpi_ex_convert_to_ascii (obj_desc->integer.value, base, new_buf, - acpi_gbl_integer_byte_width); + acpi_gbl_integer_byte_width, + leading_zeros);/* Null terminate at the correct place */
@@ -448,6 +454,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* From ACPI: "If the input is a buffer, it is converted to a * a string of decimal values separated by commas." */ + leading_zeros = FALSE; base =10 ;/*
@@ -475,6 +482,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* * Each hex number is prefixed with 0x (11/2018) */ + leading_zeros = TRUE; separator =' ' ; string_length = (obj_desc->buffer.length *5 );break ;
@@ -488,6 +496,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* * Each hex number is prefixed with 0x (11/2018) */ + leading_zeros = TRUE; separator =',' ; string_length = (obj_desc->buffer.length *5 );break ;
@@ -528,7 +537,8 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, new_buf +=acpi_ex_convert_to_ascii ((u64 ) obj_desc-> buffer.pointer[i], - base, new_buf,1 ); + base, new_buf,1 , + leading_zeros);/* Each digit is separated by either a comma or space */
Signature · 1 line
2.43.0
PATCH 13/20 ACPICA: Add support for supressing leading zeros in hex strings
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit 86289439d9f8b9eda28c249da66ae230d6439491
Currently the leading_zeros argument has no effect when converting hex integers. Fix that.
--- drivers/acpi/acpica/exconvrt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/acpi/acpica/exconvrt.c +11 -1
@@ -270,6 +270,7 @@ acpi_ex_convert_to_ascii(u64 integer,u32 decimal_length;u32 remainder;u8 supress_zeros = !leading_zeros; +u8 hex_char;ACPI_FUNCTION_ENTRY ();
@@ -330,8 +331,17 @@ acpi_ex_convert_to_ascii(u64 integer,/* Get one hex digit, most significant digits first */ - string[k] = (u8 ) + hex_char = (u8 )acpi_ut_hex_to_ascii_char (integer,ACPI_MUL_4 (j)); + +/* Supress leading zeros until the first non-zero character */ + +if (hex_char ==ACPI_ASCII_ZERO && supress_zeros) { +continue ; + } + + supress_zeros = FALSE; + string[k] = hex_char; k++; }break ;
Signature · 1 line
2.43.0
PATCH 14/20 ACPICA: Update integer-to-hex-string conversions
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit f2cb44f6deb6325a6b348b225fc82f565a870899
Add "0x" prefix for explicitly converted integers and suppress leading zeros in such a case. Provides compatibility with other ACPI implementations.
--- drivers/acpi/acpica/exconvrt.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/acpi/acpica/exconvrt.c +24 -0
@@ -417,6 +417,16 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, base =10 ;break ; +case ACPI_EXPLICIT_CONVERT_HEX : +/* +* From to_hex_string. +* +* Supress leading zeros and append "0x" +*/ + string_length = +ACPI_MUL_2 (acpi_gbl_integer_byte_width) +2 ; + leading_zeros = FALSE; +break ;default :/* Two hex string characters for each integer byte */
@@ -437,6 +447,13 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, } new_buf = return_desc->buffer.pointer; +if (type ==ACPI_EXPLICIT_CONVERT_HEX ) { + +/* Append "0x" prefix for explicit hex conversion */ + + *new_buf++ ='0' ; + *new_buf++ ='x' ; + }/* Convert integer to string */
@@ -449,6 +466,13 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,/* Null terminate at the correct place */ return_desc->string.length = string_length; +if (type ==ACPI_EXPLICIT_CONVERT_HEX ) { + +/* Take "0x" prefix into account */ + + return_desc->string.length +=2 ; + } + new_buf[string_length] =0 ;break ;
Signature · 1 line
2.43.0
PATCH 15/20 ACPICA: Add support for Windows 11 22H2 _OSI string
In reply to Rafael J. WysockiFrom: Armin Wolf <[email protected]>
ACPICA commit f56218c4e4dc1d1f699662d0726ad9e7a0d58548
--- drivers/acpi/acpica/utosi.c | 1 + include/acpi/actypes.h | 1 + 2 files changed, 2 insertions(+)
drivers/acpi/acpica/utosi.c +1 -0
@@ -75,6 +75,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */ {"Windows 2020", NULL, 0, ACPI_OSI_WIN_10_20H1}, /* Windows 10 version 2004 - Added 08/2021 */ {"Windows 2021", NULL, 0, ACPI_OSI_WIN_11}, /* Windows 11 - Added 01/2022 */ + {"Windows 2022", NULL, 0, ACPI_OSI_WIN_11_22H2}, /* Windows 11 version 22H2 - Added 04/2024 */ /* Feature Group Strings */
include/acpi/actypes.h +1 -0
@@ -1311,6 +1311,7 @@ typedef enum {#define ACPI_OSI_WIN_10_19H1 0x14#define ACPI_OSI_WIN_10_20H1 0x15#define ACPI_OSI_WIN_11 0x16 +#define ACPI_OSI_WIN_11_22H2 0x17/* Definitions of getopt */
Signature · 1 line
2.43.0
PATCH 16/20 ACPICA: Avoid warning for Dump Functions
In reply to Rafael J. WysockiFrom: Adam Lackorzynski <[email protected]>
ACPICA commit 6031b34b5dbabfaaebe80e57e8e415790b51d285
Only include the functions acpi_rs_dump_resource_list() and acpi_rs_dump_irq_list() if ACPI_DEBUGGER is defined, as specified in the header.
This avoids a compiler warning by adding the ifdef for ACPI_DEBUGGER.
--- drivers/acpi/acpica/rsdump.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpica/rsdump.c +2 -0
@@ -48,6 +48,7 @@ static void acpi_rs_dump_address_common(union acpi_resource_data *resource);static void acpi_rs_dump_descriptor (void *resource,struct acpi_rsdump_info *table); +#ifdef ACPI_DEBUGGER /******************************************************************************* * * FUNCTION: acpi_rs_dump_resource_list
@@ -160,6 +161,7 @@ void acpi_rs_dump_irq_list(u8 *route_table) prt_element, prt_element->length); } } +#endif /******************************************************************************* *
Signature · 1 line
2.43.0
PATCH 17/20 ACPICA: HMAT: Add extended linear address mode to MSCIS
In reply to Rafael J. WysockiFrom: Dave Jiang <[email protected]>
ACPICA commit aaa08569b81aa4d9ff59f91f00e589e98d499e6c
Redefine the 2 reserved bytes at offset 28 of Memory Side Cache Information Structure as "Address Mode" and add defines of the new value.
* 0 - Reserved (Unkown Address Mode)
* 1 - Extended-linear (N direct-map aliases linearly mapped)
* 2..65535 - Reserved (Unknown Address Mode)
--- include/acpi/actbl1.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/acpi/actbl1.h +4 -1
@@ -1796,7 +1796,7 @@ struct acpi_hmat_cache {u32 reserved1;u64 cache_size;u32 cache_attributes; -u16 reserved2; +u16 address_mode;u16 number_of_SMBIOShandles; };
@@ -1808,6 +1808,9 @@ struct acpi_hmat_cache {#define ACPI_HMAT_WRITE_POLICY (0x0000F000)#define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000) +#define ACPI_HMAT_CACHE_MODE_UNKNOWN (0) +#define ACPI_HMAT_CACHE_MODE_EXTENDED_LINEAR (1) +/* Values for cache associativity flag */ #define ACPI_HMAT_CA_NONE (0)
Signature · 1 line
2.43.0
PATCH 18/20 ACPICA: iasl: handle empty connection_node
In reply to Rafael J. WysockiFrom: Aleksandrs Vinarskis <[email protected]>
ACPICA commit 6c551e2c9487067d4b085333e7fe97e965a11625
--- drivers/acpi/acpica/exprep.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/acpi/acpica/exprep.c +3 -0
@@ -437,6 +437,9 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)if (info->connection_node) { second_desc = info->connection_node->object; +if (second_desc ==NULL ) { +break ; + }if (!(second_desc->common.flags &AOPOBJ_DATA_VALID )) { status =acpi_ds_get_buffer_arguments (second_desc);
Signature · 1 line
2.43.0
PATCH 19/20 ACPICA: Allow for more flexibility in _DSM args
In reply to Rafael J. WysockiFrom: Saket Dumbre <[email protected]>
ACPICA commit fbb651249ced5e19cc9c4452fec1408f595aa702
To eliminate annoying driver-side warnings.
ASWG ECR to follow soon.
--- drivers/acpi/acpica/acpredef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/acpredef.h +1 -1
@@ -450,7 +450,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { {{"_DSM" ,METHOD_4ARGS (ACPI_TYPE_BUFFER ,ACPI_TYPE_INTEGER ,ACPI_TYPE_INTEGER , -ACPI_TYPE_PACKAGE ), +ACPI_TYPE_ANY ) |ARG_COUNT_IS_MINIMUM , METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */ {{"_DSS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
Signature · 1 line
2.43.0
PATCH 20/20 ACPICA: Setup for ACPICA release 20240827
In reply to Rafael J. WysockiFrom: Saket Dumbre <[email protected]>
ACPICA commit 86c762afe5bf915e8101a0455513368e2a60dd80
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -12,7 +12,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20240322 +#define ACPI_CA_VERSION 0x20240827#include <acpi/acconfig.h> #include <acpi/actypes.h>
Signature · 1 line
2.43.0