Skip to content

Commit f9ef9b8

Browse files
committed
Merge branch 'acpica'
* acpica: ACPICA: Add PRMT module header to facilitate parsing ACPICA: Update version to 20210604 ACPICA: Add support for PlatformRtMechanism OperationRegion handler ACPICA: iASL: add disassembler support for PRMT ACPICA: Add the CFMWS structure definition to the CEDT table ACPICA: Add defines for the CXL Host Bridge Structure (CHBS) ACPICA: iASL: Add support for the BDAT ACPI table ACPICA: Add _PLD panel positions ACPICA: Use ACPI_FALLTHROUGH ACPICA: iASL Table Compiler: Add full support for RGRT ACPI table ACPICA: iASL: Add support for the SVKL table ACPICA: iASL: Finish support for the IVRS ACPI table ACPICA: Fix memory leak caused by _CID repair function ACPICA: Add SVKL table headers ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Mailbox Structure
2 parents 49b9441 + 9f8c7ba commit f9ef9b8

File tree

11 files changed

+259
-5
lines changed

11 files changed

+259
-5
lines changed

drivers/acpi/acpica/acutils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,8 @@ const char *acpi_ah_match_uuid(u8 *data);
737737
*/
738738
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
739739
void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);
740+
741+
acpi_status acpi_ut_convert_uuid_to_string(char *uuid_buffer, char *out_string);
740742
#endif
741743

742744
#endif /* _ACUTILS_H */

drivers/acpi/acpica/exfield.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
139139
|| obj_desc->field.region_obj->region.space_id ==
140140
ACPI_ADR_SPACE_GSBUS
141141
|| obj_desc->field.region_obj->region.space_id ==
142-
ACPI_ADR_SPACE_IPMI)) {
142+
ACPI_ADR_SPACE_IPMI
143+
|| obj_desc->field.region_obj->region.space_id ==
144+
ACPI_ADR_SPACE_PLATFORM_RT)) {
143145

144146
/* SMBus, GSBus, IPMI serial */
145147

@@ -301,7 +303,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
301303
|| obj_desc->field.region_obj->region.space_id ==
302304
ACPI_ADR_SPACE_GSBUS
303305
|| obj_desc->field.region_obj->region.space_id ==
304-
ACPI_ADR_SPACE_IPMI)) {
306+
ACPI_ADR_SPACE_IPMI
307+
|| obj_desc->field.region_obj->region.space_id ==
308+
ACPI_ADR_SPACE_PLATFORM_RT)) {
305309

306310
/* SMBus, GSBus, IPMI serial */
307311

drivers/acpi/acpica/exserial.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ acpi_ex_read_serial_bus(union acpi_operand_object *obj_desc,
195195
function = ACPI_READ | (accessor_type << 16);
196196
break;
197197

198+
case ACPI_ADR_SPACE_PLATFORM_RT:
199+
200+
buffer_length = ACPI_PRM_INPUT_BUFFER_SIZE;
201+
function = ACPI_READ;
202+
break;
203+
198204
default:
199205
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
200206
}
@@ -311,6 +317,12 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
311317
function = ACPI_WRITE | (accessor_type << 16);
312318
break;
313319

320+
case ACPI_ADR_SPACE_PLATFORM_RT:
321+
322+
buffer_length = ACPI_PRM_INPUT_BUFFER_SIZE;
323+
function = ACPI_WRITE;
324+
break;
325+
314326
default:
315327
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
316328
}

drivers/acpi/acpica/nsrepair2.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
379379

380380
(*element_ptr)->common.reference_count =
381381
original_ref_count;
382+
383+
/*
384+
* The original_element holds a reference from the package object
385+
* that represents _HID. Since a new element was created by _HID,
386+
* remove the reference from the _CID package.
387+
*/
388+
acpi_ut_remove_reference(original_element);
382389
}
383390

384391
element_ptr++;

drivers/acpi/acpica/utprint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
475475
case 'X':
476476

477477
type |= ACPI_FORMAT_UPPER;
478-
/* FALLTHROUGH */
478+
ACPI_FALLTHROUGH;
479479

480480
case 'x':
481481

drivers/acpi/acpica/utuuid.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,45 @@ void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer)
6161
1]);
6262
}
6363
}
64+
65+
/*******************************************************************************
66+
*
67+
* FUNCTION: acpi_ut_convert_uuid_to_string
68+
*
69+
* PARAMETERS: uuid_buffer - 16-byte UUID buffer
70+
* out_string - 36-byte formatted UUID string
71+
*
72+
* RETURN: Status
73+
*
74+
* DESCRIPTION: Convert 16-byte UUID buffer to 36-byte formatted UUID string
75+
* out_string must be 37 bytes to include null terminator.
76+
*
77+
******************************************************************************/
78+
79+
acpi_status acpi_ut_convert_uuid_to_string(char *uuid_buffer, char *out_string)
80+
{
81+
u32 i;
82+
83+
if (!uuid_buffer || !out_string) {
84+
return (AE_BAD_PARAMETER);
85+
}
86+
87+
for (i = 0; i < UUID_BUFFER_LENGTH; i++) {
88+
out_string[acpi_gbl_map_to_uuid_offset[i]] =
89+
acpi_ut_hex_to_ascii_char(uuid_buffer[i], 4);
90+
91+
out_string[acpi_gbl_map_to_uuid_offset[i] + 1] =
92+
acpi_ut_hex_to_ascii_char(uuid_buffer[i], 0);
93+
}
94+
95+
/* Insert required hyphens (dashes) */
96+
97+
out_string[UUID_HYPHEN1_OFFSET] =
98+
out_string[UUID_HYPHEN2_OFFSET] =
99+
out_string[UUID_HYPHEN3_OFFSET] =
100+
out_string[UUID_HYPHEN4_OFFSET] = '-';
101+
102+
out_string[UUID_STRING_LENGTH] = 0; /* Null terminate */
103+
return (AE_OK);
104+
}
64105
#endif

include/acpi/acbuffer.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,14 @@ struct acpi_pld_info {
207207
#define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)
208208
#define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */
209209

210+
/* Panel position defined in _PLD section of ACPI Specification 6.3 */
211+
212+
#define ACPI_PLD_PANEL_TOP 0
213+
#define ACPI_PLD_PANEL_BOTTOM 1
214+
#define ACPI_PLD_PANEL_LEFT 2
215+
#define ACPI_PLD_PANEL_RIGHT 3
216+
#define ACPI_PLD_PANEL_FRONT 4
217+
#define ACPI_PLD_PANEL_BACK 5
218+
#define ACPI_PLD_PANEL_UNKNOWN 6
219+
210220
#endif /* ACBUFFER_H */

include/acpi/acconfig.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@
188188
#define ACPI_MAX_GSBUS_DATA_SIZE 255
189189
#define ACPI_MAX_GSBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE
190190

191+
#define ACPI_PRM_INPUT_BUFFER_SIZE 26
192+
191193
/* _sx_d and _sx_w control methods */
192194

193195
#define ACPI_NUM_sx_d_METHODS 4

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 0x20210331
15+
#define ACPI_CA_VERSION 0x20210604
1616

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

include/acpi/actbl1.h

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,20 @@ struct acpi_cedt_header {
327327

328328
enum acpi_cedt_type {
329329
ACPI_CEDT_TYPE_CHBS = 0,
330-
ACPI_CEDT_TYPE_RESERVED = 1
330+
ACPI_CEDT_TYPE_CFMWS = 1,
331+
ACPI_CEDT_TYPE_RESERVED = 2,
331332
};
332333

334+
/* Values for version field above */
335+
336+
#define ACPI_CEDT_CHBS_VERSION_CXL11 (0)
337+
#define ACPI_CEDT_CHBS_VERSION_CXL20 (1)
338+
339+
/* Values for length field above */
340+
341+
#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)
342+
#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)
343+
333344
/*
334345
* CEDT subtables
335346
*/
@@ -345,6 +356,34 @@ struct acpi_cedt_chbs {
345356
u64 length;
346357
};
347358

359+
/* 1: CXL Fixed Memory Window Structure */
360+
361+
struct acpi_cedt_cfmws {
362+
struct acpi_cedt_header header;
363+
u32 reserved1;
364+
u64 base_hpa;
365+
u64 window_size;
366+
u8 interleave_ways;
367+
u8 interleave_arithmetic;
368+
u16 reserved2;
369+
u32 granularity;
370+
u16 restrictions;
371+
u16 qtg_id;
372+
u32 interleave_targets[];
373+
};
374+
375+
/* Values for Interleave Arithmetic field above */
376+
377+
#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
378+
379+
/* Values for Restrictions field above */
380+
381+
#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
382+
#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
383+
#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
384+
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
385+
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
386+
348387
/*******************************************************************************
349388
*
350389
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)

0 commit comments

Comments
 (0)