Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fa4e1f88
Commit
fa4e1f88
authored
Dec 08, 2022
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back ACPICA changes for 6.2-rc1
parents
76dcd734
470188b0
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
602 additions
and
263 deletions
+602
-263
arch/loongarch/include/asm/acpi.h
arch/loongarch/include/asm/acpi.h
+0
-142
drivers/acpi/acpica/Makefile
drivers/acpi/acpica/Makefile
+1
-0
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/acglobal.h
+1
-0
drivers/acpi/acpica/actables.h
drivers/acpi/acpica/actables.h
+0
-5
drivers/acpi/acpica/acutils.h
drivers/acpi/acpica/acutils.h
+13
-0
drivers/acpi/acpica/dsmethod.c
drivers/acpi/acpica/dsmethod.c
+8
-2
drivers/acpi/acpica/evevent.c
drivers/acpi/acpica/evevent.c
+11
-0
drivers/acpi/acpica/evregion.c
drivers/acpi/acpica/evregion.c
+9
-0
drivers/acpi/acpica/exconfig.c
drivers/acpi/acpica/exconfig.c
+2
-2
drivers/acpi/acpica/exfield.c
drivers/acpi/acpica/exfield.c
+6
-2
drivers/acpi/acpica/exserial.c
drivers/acpi/acpica/exserial.c
+6
-0
drivers/acpi/acpica/hwsleep.c
drivers/acpi/acpica/hwsleep.c
+14
-0
drivers/acpi/acpica/tbdata.c
drivers/acpi/acpica/tbdata.c
+1
-1
drivers/acpi/acpica/tbfadt.c
drivers/acpi/acpica/tbfadt.c
+1
-1
drivers/acpi/acpica/tbprint.c
drivers/acpi/acpica/tbprint.c
+2
-75
drivers/acpi/acpica/tbutils.c
drivers/acpi/acpica/tbutils.c
+1
-1
drivers/acpi/acpica/tbxfroot.c
drivers/acpi/acpica/tbxfroot.c
+22
-10
drivers/acpi/acpica/utcksum.c
drivers/acpi/acpica/utcksum.c
+170
-0
drivers/acpi/acpica/utcopy.c
drivers/acpi/acpica/utcopy.c
+0
-7
drivers/acpi/acpica/utglobal.c
drivers/acpi/acpica/utglobal.c
+4
-0
drivers/acpi/acpica/utstring.c
drivers/acpi/acpica/utstring.c
+5
-5
include/acpi/acconfig.h
include/acpi/acconfig.h
+2
-0
include/acpi/acpixf.h
include/acpi/acpixf.h
+1
-1
include/acpi/actbl1.h
include/acpi/actbl1.h
+149
-2
include/acpi/actbl2.h
include/acpi/actbl2.h
+158
-4
include/acpi/actypes.h
include/acpi/actypes.h
+9
-1
include/acpi/acuuid.h
include/acpi/acuuid.h
+2
-1
tools/power/acpi/tools/acpidump/Makefile
tools/power/acpi/tools/acpidump/Makefile
+1
-0
tools/power/acpi/tools/acpidump/apdump.c
tools/power/acpi/tools/acpidump/apdump.c
+3
-1
No files found.
arch/loongarch/include/asm/acpi.h
View file @
fa4e1f88
...
@@ -31,148 +31,6 @@ static inline bool acpi_has_cpu_in_madt(void)
...
@@ -31,148 +31,6 @@ static inline bool acpi_has_cpu_in_madt(void)
extern
struct
list_head
acpi_wakeup_device_list
;
extern
struct
list_head
acpi_wakeup_device_list
;
/*
* Temporary definitions until the core ACPICA code gets updated (see
* 1656837932-18257-1-git-send-email-lvjianmin@loongson.cn and its
* follow-ups for the "rationale").
*
* Once the "legal reasons" are cleared and that the code is merged,
* this can be dropped entierely.
*/
#if (ACPI_CA_VERSION == 0x20220331 && !defined(LOONGARCH_ACPICA_EXT))
#define LOONGARCH_ACPICA_EXT 1
#define ACPI_MADT_TYPE_CORE_PIC 17
#define ACPI_MADT_TYPE_LIO_PIC 18
#define ACPI_MADT_TYPE_HT_PIC 19
#define ACPI_MADT_TYPE_EIO_PIC 20
#define ACPI_MADT_TYPE_MSI_PIC 21
#define ACPI_MADT_TYPE_BIO_PIC 22
#define ACPI_MADT_TYPE_LPC_PIC 23
/* Values for Version field above */
enum
acpi_madt_core_pic_version
{
ACPI_MADT_CORE_PIC_VERSION_NONE
=
0
,
ACPI_MADT_CORE_PIC_VERSION_V1
=
1
,
ACPI_MADT_CORE_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_lio_pic_version
{
ACPI_MADT_LIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_LIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_LIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_eio_pic_version
{
ACPI_MADT_EIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_EIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_EIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_ht_pic_version
{
ACPI_MADT_HT_PIC_VERSION_NONE
=
0
,
ACPI_MADT_HT_PIC_VERSION_V1
=
1
,
ACPI_MADT_HT_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_bio_pic_version
{
ACPI_MADT_BIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_BIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_BIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_msi_pic_version
{
ACPI_MADT_MSI_PIC_VERSION_NONE
=
0
,
ACPI_MADT_MSI_PIC_VERSION_V1
=
1
,
ACPI_MADT_MSI_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
enum
acpi_madt_lpc_pic_version
{
ACPI_MADT_LPC_PIC_VERSION_NONE
=
0
,
ACPI_MADT_LPC_PIC_VERSION_V1
=
1
,
ACPI_MADT_LPC_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
#pragma pack(1)
/* Core Interrupt Controller */
struct
acpi_madt_core_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u32
processor_id
;
u32
core_id
;
u32
flags
;
};
/* Legacy I/O Interrupt Controller */
struct
acpi_madt_lio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
[
2
];
u32
cascade_map
[
2
];
};
/* Extend I/O Interrupt Controller */
struct
acpi_madt_eio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u8
cascade
;
u8
node
;
u64
node_map
;
};
/* HT Interrupt Controller */
struct
acpi_madt_ht_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
[
8
];
};
/* Bridge I/O Interrupt Controller */
struct
acpi_madt_bio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u16
id
;
u16
gsi_base
;
};
/* MSI Interrupt Controller */
struct
acpi_madt_msi_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
msg_address
;
u32
start
;
u32
count
;
};
/* LPC Interrupt Controller */
struct
acpi_madt_lpc_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
;
};
#pragma pack()
#endif
#endif
/* !CONFIG_ACPI */
#endif
/* !CONFIG_ACPI */
#define ACPI_TABLE_UPGRADE_MAX_PHYS ARCH_LOW_ADDRESS_LIMIT
#define ACPI_TABLE_UPGRADE_MAX_PHYS ARCH_LOW_ADDRESS_LIMIT
...
...
drivers/acpi/acpica/Makefile
View file @
fa4e1f88
...
@@ -155,6 +155,7 @@ acpi-y += \
...
@@ -155,6 +155,7 @@ acpi-y += \
utalloc.o
\
utalloc.o
\
utascii.o
\
utascii.o
\
utbuffer.o
\
utbuffer.o
\
utcksum.o
\
utcopy.o
\
utcopy.o
\
utexcep.o
\
utexcep.o
\
utdebug.o
\
utdebug.o
\
...
...
drivers/acpi/acpica/acglobal.h
View file @
fa4e1f88
...
@@ -24,6 +24,7 @@ ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);
...
@@ -24,6 +24,7 @@ ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);
ACPI_GLOBAL
(
struct
acpi_table_header
*
,
acpi_gbl_DSDT
);
ACPI_GLOBAL
(
struct
acpi_table_header
*
,
acpi_gbl_DSDT
);
ACPI_GLOBAL
(
struct
acpi_table_header
,
acpi_gbl_original_dsdt_header
);
ACPI_GLOBAL
(
struct
acpi_table_header
,
acpi_gbl_original_dsdt_header
);
ACPI_INIT_GLOBAL
(
char
*
,
acpi_gbl_CDAT
,
NULL
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_dsdt_index
,
ACPI_INVALID_TABLE_INDEX
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_dsdt_index
,
ACPI_INVALID_TABLE_INDEX
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_facs_index
,
ACPI_INVALID_TABLE_INDEX
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_facs_index
,
ACPI_INVALID_TABLE_INDEX
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_xfacs_index
,
ACPI_INVALID_TABLE_INDEX
);
ACPI_INIT_GLOBAL
(
u32
,
acpi_gbl_xfacs_index
,
ACPI_INVALID_TABLE_INDEX
);
...
...
drivers/acpi/acpica/actables.h
View file @
fa4e1f88
...
@@ -124,11 +124,6 @@ void
...
@@ -124,11 +124,6 @@ void
acpi_tb_print_table_header
(
acpi_physical_address
address
,
acpi_tb_print_table_header
(
acpi_physical_address
address
,
struct
acpi_table_header
*
header
);
struct
acpi_table_header
*
header
);
u8
acpi_tb_checksum
(
u8
*
buffer
,
u32
length
);
acpi_status
acpi_tb_verify_checksum
(
struct
acpi_table_header
*
table
,
u32
length
);
void
acpi_tb_check_dsdt_header
(
void
);
void
acpi_tb_check_dsdt_header
(
void
);
struct
acpi_table_header
*
acpi_tb_copy_dsdt
(
u32
table_index
);
struct
acpi_table_header
*
acpi_tb_copy_dsdt
(
u32
table_index
);
...
...
drivers/acpi/acpica/acutils.h
View file @
fa4e1f88
...
@@ -158,6 +158,19 @@ u8 acpi_ut_valid_name_char(char character, u32 position);
...
@@ -158,6 +158,19 @@ u8 acpi_ut_valid_name_char(char character, u32 position);
void
acpi_ut_check_and_repair_ascii
(
u8
*
name
,
char
*
repaired_name
,
u32
count
);
void
acpi_ut_check_and_repair_ascii
(
u8
*
name
,
char
*
repaired_name
,
u32
count
);
/*
* utcksum - Checksum utilities
*/
u8
acpi_ut_generate_checksum
(
void
*
table
,
u32
length
,
u8
original_checksum
);
u8
acpi_ut_checksum
(
u8
*
buffer
,
u32
length
);
acpi_status
acpi_ut_verify_cdat_checksum
(
struct
acpi_table_cdat
*
cdat_table
,
u32
length
);
acpi_status
acpi_ut_verify_checksum
(
struct
acpi_table_header
*
table
,
u32
length
);
/*
/*
* utnonansi - Non-ANSI C library functions
* utnonansi - Non-ANSI C library functions
*/
*/
...
...
drivers/acpi/acpica/dsmethod.c
View file @
fa4e1f88
...
@@ -517,7 +517,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -517,7 +517,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
info
=
ACPI_ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_evaluate_info
));
info
=
ACPI_ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_evaluate_info
));
if
(
!
info
)
{
if
(
!
info
)
{
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
cleanup
;
goto
pop_walk_state
;
}
}
info
->
parameters
=
&
this_walk_state
->
operands
[
0
];
info
->
parameters
=
&
this_walk_state
->
operands
[
0
];
...
@@ -529,7 +529,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -529,7 +529,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
ACPI_FREE
(
info
);
ACPI_FREE
(
info
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
goto
pop_walk_state
;
}
}
next_walk_state
->
method_nesting_depth
=
next_walk_state
->
method_nesting_depth
=
...
@@ -575,6 +575,12 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -575,6 +575,12 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
pop_walk_state:
/* On error, pop the walk state to be deleted from thread */
acpi_ds_pop_walk_state
(
thread
);
cleanup:
cleanup:
/* On error, we must terminate the method properly */
/* On error, we must terminate the method properly */
...
...
drivers/acpi/acpica/evevent.c
View file @
fa4e1f88
...
@@ -142,6 +142,9 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
...
@@ -142,6 +142,9 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
status
=
status
=
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
[
i
].
enable_register_id
,
[
i
].
enable_register_id
,
(
i
==
ACPI_EVENT_PCIE_WAKE
)
?
ACPI_ENABLE_EVENT
:
ACPI_DISABLE_EVENT
);
ACPI_DISABLE_EVENT
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
return
(
status
);
...
@@ -185,6 +188,11 @@ u32 acpi_ev_fixed_event_detect(void)
...
@@ -185,6 +188,11 @@ u32 acpi_ev_fixed_event_detect(void)
return
(
int_status
);
return
(
int_status
);
}
}
if
(
fixed_enable
&
ACPI_BITMASK_PCIEXP_WAKE_DISABLE
)
fixed_enable
&=
~
ACPI_BITMASK_PCIEXP_WAKE_DISABLE
;
else
fixed_enable
|=
ACPI_BITMASK_PCIEXP_WAKE_DISABLE
;
ACPI_DEBUG_PRINT
((
ACPI_DB_INTERRUPTS
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INTERRUPTS
,
"Fixed Event Block: Enable %08X Status %08X
\n
"
,
"Fixed Event Block: Enable %08X Status %08X
\n
"
,
fixed_enable
,
fixed_status
));
fixed_enable
,
fixed_status
));
...
@@ -250,6 +258,9 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
...
@@ -250,6 +258,9 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
if
(
!
acpi_gbl_fixed_event_handlers
[
event
].
handler
)
{
if
(
!
acpi_gbl_fixed_event_handlers
[
event
].
handler
)
{
(
void
)
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
[
event
].
(
void
)
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
[
event
].
enable_register_id
,
enable_register_id
,
(
event
==
ACPI_EVENT_PCIE_WAKE
)
?
ACPI_ENABLE_EVENT
:
ACPI_DISABLE_EVENT
);
ACPI_DISABLE_EVENT
);
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
...
...
drivers/acpi/acpica/evregion.c
View file @
fa4e1f88
...
@@ -172,6 +172,15 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -172,6 +172,15 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
ctx
->
subspace_id
=
(
u8
)
region_obj
->
region
.
address
;
ctx
->
subspace_id
=
(
u8
)
region_obj
->
region
.
address
;
}
}
if
(
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_FIXED_HARDWARE
)
{
struct
acpi_ffh_info
*
ctx
=
handler_desc
->
address_space
.
context
;
ctx
->
length
=
region_obj
->
region
.
length
;
ctx
->
offset
=
region_obj
->
region
.
address
;
}
/*
/*
* We must exit the interpreter because the region setup will
* We must exit the interpreter because the region setup will
* potentially execute control methods (for example, the _REG method
* potentially execute control methods (for example, the _REG method
...
...
drivers/acpi/acpica/exconfig.c
View file @
fa4e1f88
...
@@ -295,8 +295,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -295,8 +295,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
target
));
target
));
}
}
if
(
target
->
common
.
type
!=
ACPI_TYPE_INTEGER
)
{
if
(
target
->
common
.
type
!=
ACPI_TYPE_INTEGER
)
{
ACPI_E
XCEPTION
((
AE_INFO
,
AE_TYPE
,
ACPI_E
RROR
((
AE_INFO
,
"Type not integer: %X"
,
"Type not integer: %X
\n
"
,
target
->
common
.
type
));
target
->
common
.
type
));
return_ACPI_STATUS
(
AE_AML_OPERAND_TYPE
);
return_ACPI_STATUS
(
AE_AML_OPERAND_TYPE
);
}
}
...
...
drivers/acpi/acpica/exfield.c
View file @
fa4e1f88
...
@@ -141,7 +141,9 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
...
@@ -141,7 +141,9 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_IPMI
ACPI_ADR_SPACE_IPMI
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_PLATFORM_RT
))
{
ACPI_ADR_SPACE_PLATFORM_RT
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_FIXED_HARDWARE
))
{
/* SMBus, GSBus, IPMI serial */
/* SMBus, GSBus, IPMI serial */
...
@@ -305,7 +307,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
...
@@ -305,7 +307,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_IPMI
ACPI_ADR_SPACE_IPMI
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_PLATFORM_RT
))
{
ACPI_ADR_SPACE_PLATFORM_RT
||
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_FIXED_HARDWARE
))
{
/* SMBus, GSBus, IPMI serial */
/* SMBus, GSBus, IPMI serial */
...
...
drivers/acpi/acpica/exserial.c
View file @
fa4e1f88
...
@@ -323,6 +323,12 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
...
@@ -323,6 +323,12 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
function
=
ACPI_WRITE
;
function
=
ACPI_WRITE
;
break
;
break
;
case
ACPI_ADR_SPACE_FIXED_HARDWARE
:
buffer_length
=
ACPI_FFH_INPUT_BUFFER_SIZE
;
function
=
ACPI_WRITE
;
break
;
default:
default:
return_ACPI_STATUS
(
AE_AML_INVALID_SPACE_ID
);
return_ACPI_STATUS
(
AE_AML_INVALID_SPACE_ID
);
}
}
...
...
drivers/acpi/acpica/hwsleep.c
View file @
fa4e1f88
...
@@ -311,6 +311,20 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
...
@@ -311,6 +311,20 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
[
ACPI_EVENT_SLEEP_BUTTON
].
[
ACPI_EVENT_SLEEP_BUTTON
].
status_register_id
,
ACPI_CLEAR_STATUS
);
status_register_id
,
ACPI_CLEAR_STATUS
);
/* Enable pcie wake event if support */
if
((
acpi_gbl_FADT
.
flags
&
ACPI_FADT_PCI_EXPRESS_WAKE
))
{
(
void
)
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
[
ACPI_EVENT_PCIE_WAKE
].
enable_register_id
,
ACPI_DISABLE_EVENT
);
(
void
)
acpi_write_bit_register
(
acpi_gbl_fixed_event_info
[
ACPI_EVENT_PCIE_WAKE
].
status_register_id
,
ACPI_CLEAR_STATUS
);
}
acpi_hw_execute_sleep_method
(
METHOD_PATHNAME__SST
,
ACPI_SST_WORKING
);
acpi_hw_execute_sleep_method
(
METHOD_PATHNAME__SST
,
ACPI_SST_WORKING
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
...
drivers/acpi/acpica/tbdata.c
View file @
fa4e1f88
...
@@ -522,7 +522,7 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
...
@@ -522,7 +522,7 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
/* Verify the checksum */
/* Verify the checksum */
status
=
status
=
acpi_
tb
_verify_checksum
(
table_desc
->
pointer
,
acpi_
ut
_verify_checksum
(
table_desc
->
pointer
,
table_desc
->
length
);
table_desc
->
length
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_NO_MEMORY
,
ACPI_EXCEPTION
((
AE_INFO
,
AE_NO_MEMORY
,
...
...
drivers/acpi/acpica/tbfadt.c
View file @
fa4e1f88
...
@@ -298,7 +298,7 @@ void acpi_tb_parse_fadt(void)
...
@@ -298,7 +298,7 @@ void acpi_tb_parse_fadt(void)
* Validate the FADT checksum before we copy the table. Ignore
* Validate the FADT checksum before we copy the table. Ignore
* checksum error as we want to try to get the DSDT and FACS.
* checksum error as we want to try to get the DSDT and FACS.
*/
*/
(
void
)
acpi_
tb
_verify_checksum
(
table
,
length
);
(
void
)
acpi_
ut
_verify_checksum
(
table
,
length
);
/* Create a local copy of the FADT in common ACPI 2.0+ format */
/* Create a local copy of the FADT in common ACPI 2.0+ format */
...
...
drivers/acpi/acpica/tbprint.c
View file @
fa4e1f88
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include "accommon.h"
#include "accommon.h"
#include "actables.h"
#include "actables.h"
#include "acutils.h"
#define _COMPONENT ACPI_TABLES
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME
(
"tbprint"
)
ACPI_MODULE_NAME
(
"tbprint"
)
...
@@ -39,7 +40,7 @@ static void acpi_tb_fix_string(char *string, acpi_size length)
...
@@ -39,7 +40,7 @@ static void acpi_tb_fix_string(char *string, acpi_size length)
{
{
while
(
length
&&
*
string
)
{
while
(
length
&&
*
string
)
{
if
(
!
isprint
((
int
)
*
string
))
{
if
(
!
isprint
((
int
)
(
u8
)
*
string
))
{
*
string
=
'?'
;
*
string
=
'?'
;
}
}
...
@@ -135,77 +136,3 @@ acpi_tb_print_table_header(acpi_physical_address address,
...
@@ -135,77 +136,3 @@ acpi_tb_print_table_header(acpi_physical_address address,
local_header
.
asl_compiler_revision
));
local_header
.
asl_compiler_revision
));
}
}
}
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_validate_checksum
*
* PARAMETERS: table - ACPI table to verify
* length - Length of entire table
*
* RETURN: Status
*
* DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
* exception on bad checksum.
*
******************************************************************************/
acpi_status
acpi_tb_verify_checksum
(
struct
acpi_table_header
*
table
,
u32
length
)
{
u8
checksum
;
/*
* FACS/S3PT:
* They are the odd tables, have no standard ACPI header and no checksum
*/
if
(
ACPI_COMPARE_NAMESEG
(
table
->
signature
,
ACPI_SIG_S3PT
)
||
ACPI_COMPARE_NAMESEG
(
table
->
signature
,
ACPI_SIG_FACS
))
{
return
(
AE_OK
);
}
/* Compute the checksum on the table */
checksum
=
acpi_tb_checksum
(
ACPI_CAST_PTR
(
u8
,
table
),
length
);
/* Checksum ok? (should be zero) */
if
(
checksum
)
{
ACPI_BIOS_WARNING
((
AE_INFO
,
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
"should be 0x%2.2X"
,
table
->
signature
,
table
->
checksum
,
(
u8
)(
table
->
checksum
-
checksum
)));
#if (ACPI_CHECKSUM_ABORT)
return
(
AE_BAD_CHECKSUM
);
#endif
}
return
(
AE_OK
);
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_checksum
*
* PARAMETERS: buffer - Pointer to memory region to be checked
* length - Length of this memory region
*
* RETURN: Checksum (u8)
*
* DESCRIPTION: Calculates circular checksum of memory region.
*
******************************************************************************/
u8
acpi_tb_checksum
(
u8
*
buffer
,
u32
length
)
{
u8
sum
=
0
;
u8
*
end
=
buffer
+
length
;
while
(
buffer
<
end
)
{
sum
=
(
u8
)(
sum
+
*
(
buffer
++
));
}
return
(
sum
);
}
drivers/acpi/acpica/tbutils.c
View file @
fa4e1f88
...
@@ -299,7 +299,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
...
@@ -299,7 +299,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
/* Validate the root table checksum */
/* Validate the root table checksum */
status
=
acpi_
tb
_verify_checksum
(
table
,
length
);
status
=
acpi_
ut
_verify_checksum
(
table
,
length
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_os_unmap_memory
(
table
,
length
);
acpi_os_unmap_memory
(
table
,
length
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
...
drivers/acpi/acpica/tbxfroot.c
View file @
fa4e1f88
...
@@ -74,14 +74,14 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
...
@@ -74,14 +74,14 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
/* Check the standard checksum */
/* Check the standard checksum */
if
(
acpi_
tb_checksum
((
u8
*
)
rsdp
,
ACPI_RSDP_CHECKSUM_LENGTH
)
!=
0
)
{
if
(
acpi_
ut_checksum
((
u8
*
)
rsdp
,
ACPI_RSDP_CHECKSUM_LENGTH
)
!=
0
)
{
return
(
AE_BAD_CHECKSUM
);
return
(
AE_BAD_CHECKSUM
);
}
}
/* Check extended checksum if table version >= 2 */
/* Check extended checksum if table version >= 2 */
if
((
rsdp
->
revision
>=
2
)
&&
if
((
rsdp
->
revision
>=
2
)
&&
(
acpi_
tb_checksum
((
u8
*
)
rsdp
,
ACPI_RSDP_XCHECKSUM_LENGTH
)
!=
0
))
{
(
acpi_
ut_checksum
((
u8
*
)
rsdp
,
ACPI_RSDP_XCHECKSUM_LENGTH
)
!=
0
))
{
return
(
AE_BAD_CHECKSUM
);
return
(
AE_BAD_CHECKSUM
);
}
}
...
@@ -114,6 +114,7 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
...
@@ -114,6 +114,7 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
u8
*
table_ptr
;
u8
*
table_ptr
;
u8
*
mem_rover
;
u8
*
mem_rover
;
u32
physical_address
;
u32
physical_address
;
u32
ebda_window_size
;
ACPI_FUNCTION_TRACE
(
acpi_find_root_pointer
);
ACPI_FUNCTION_TRACE
(
acpi_find_root_pointer
);
...
@@ -139,26 +140,37 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
...
@@ -139,26 +140,37 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
/* EBDA present? */
/* EBDA present? */
if
(
physical_address
>
0x400
)
{
/*
/*
* 1b) Search EBDA paragraphs (EBDA is required to be a
* Check that the EBDA pointer from memory is sane and does not point
* minimum of 1K length)
* above valid low memory
*/
if
(
physical_address
>
0x400
&&
physical_address
<
0xA0000
)
{
/*
* Calculate the scan window size
* The EBDA is not guaranteed to be larger than a ki_b and in case
* that it is smaller, the scanning function would leave the low
* memory and continue to the VGA range.
*/
ebda_window_size
=
ACPI_MIN
(
ACPI_EBDA_WINDOW_SIZE
,
0xA0000
-
physical_address
);
/*
* 1b) Search EBDA paragraphs
*/
*/
table_ptr
=
acpi_os_map_memory
((
acpi_physical_address
)
table_ptr
=
acpi_os_map_memory
((
acpi_physical_address
)
physical_address
,
physical_address
,
ACPI_EBDA_WINDOW_SIZE
);
ebda_window_size
);
if
(
!
table_ptr
)
{
if
(
!
table_ptr
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Could not map memory at 0x%8.8X for length %u"
,
"Could not map memory at 0x%8.8X for length %u"
,
physical_address
,
ACPI_EBDA_WINDOW_SIZE
));
physical_address
,
ebda_window_size
));
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
mem_rover
=
mem_rover
=
acpi_tb_scan_memory_for_rsdp
(
table_ptr
,
acpi_tb_scan_memory_for_rsdp
(
table_ptr
,
ebda_window_size
);
ACPI_EBDA_WINDOW_SIZE
);
acpi_os_unmap_memory
(
table_ptr
,
ebda_window_size
);
acpi_os_unmap_memory
(
table_ptr
,
ACPI_EBDA_WINDOW_SIZE
);
if
(
mem_rover
)
{
if
(
mem_rover
)
{
...
...
drivers/acpi/acpica/utcksum.c
0 → 100644
View file @
fa4e1f88
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/******************************************************************************
*
* Module Name: utcksum - Support generating table checksums
*
* Copyright (C) 2000 - 2022, Intel Corp.
*
*****************************************************************************/
#include <acpi/acpi.h>
#include "accommon.h"
#include "acutils.h"
/* This module used for application-level code only */
#define _COMPONENT ACPI_CA_DISASSEMBLER
ACPI_MODULE_NAME
(
"utcksum"
)
/*******************************************************************************
*
* FUNCTION: acpi_ut_verify_checksum
*
* PARAMETERS: table - ACPI table to verify
* length - Length of entire table
*
* RETURN: Status
*
* DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
* exception on bad checksum.
* Note: We don't have to check for a CDAT here, since CDAT is
* not in the RSDT/XSDT, and the CDAT table is never installed
* via ACPICA.
*
******************************************************************************/
acpi_status
acpi_ut_verify_checksum
(
struct
acpi_table_header
*
table
,
u32
length
)
{
u8
checksum
;
/*
* FACS/S3PT:
* They are the odd tables, have no standard ACPI header and no checksum
*/
if
(
ACPI_COMPARE_NAMESEG
(
table
->
signature
,
ACPI_SIG_S3PT
)
||
ACPI_COMPARE_NAMESEG
(
table
->
signature
,
ACPI_SIG_FACS
))
{
return
(
AE_OK
);
}
/* Compute the checksum on the table */
length
=
table
->
length
;
checksum
=
acpi_ut_generate_checksum
(
ACPI_CAST_PTR
(
u8
,
table
),
length
,
table
->
checksum
);
/* Computed checksum matches table? */
if
(
checksum
!=
table
->
checksum
)
{
ACPI_BIOS_WARNING
((
AE_INFO
,
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
"should be 0x%2.2X"
,
table
->
signature
,
table
->
checksum
,
table
->
checksum
-
checksum
));
#if (ACPI_CHECKSUM_ABORT)
return
(
AE_BAD_CHECKSUM
);
#endif
}
return
(
AE_OK
);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_verify_cdat_checksum
*
* PARAMETERS: table - CDAT ACPI table to verify
* length - Length of entire table
*
* RETURN: Status
*
* DESCRIPTION: Verifies that the CDAT table checksums to zero. Optionally
* returns an exception on bad checksum.
*
******************************************************************************/
acpi_status
acpi_ut_verify_cdat_checksum
(
struct
acpi_table_cdat
*
cdat_table
,
u32
length
)
{
u8
checksum
;
/* Compute the checksum on the table */
checksum
=
acpi_ut_generate_checksum
(
ACPI_CAST_PTR
(
u8
,
cdat_table
),
cdat_table
->
length
,
cdat_table
->
checksum
);
/* Computed checksum matches table? */
if
(
checksum
!=
cdat_table
->
checksum
)
{
ACPI_BIOS_WARNING
((
AE_INFO
,
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
"should be 0x%2.2X"
,
acpi_gbl_CDAT
,
cdat_table
->
checksum
,
checksum
));
#if (ACPI_CHECKSUM_ABORT)
return
(
AE_BAD_CHECKSUM
);
#endif
}
cdat_table
->
checksum
=
checksum
;
return
(
AE_OK
);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_generate_checksum
*
* PARAMETERS: table - Pointer to table to be checksummed
* length - Length of the table
* original_checksum - Value of the checksum field
*
* RETURN: 8 bit checksum of buffer
*
* DESCRIPTION: Computes an 8 bit checksum of the table.
*
******************************************************************************/
u8
acpi_ut_generate_checksum
(
void
*
table
,
u32
length
,
u8
original_checksum
)
{
u8
checksum
;
/* Sum the entire table as-is */
checksum
=
acpi_ut_checksum
((
u8
*
)
table
,
length
);
/* Subtract off the existing checksum value in the table */
checksum
=
(
u8
)(
checksum
-
original_checksum
);
/* Compute and return the final checksum */
checksum
=
(
u8
)(
0
-
checksum
);
return
(
checksum
);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_checksum
*
* PARAMETERS: buffer - Pointer to memory region to be checked
* length - Length of this memory region
*
* RETURN: Checksum (u8)
*
* DESCRIPTION: Calculates circular checksum of memory region.
*
******************************************************************************/
u8
acpi_ut_checksum
(
u8
*
buffer
,
u32
length
)
{
u8
sum
=
0
;
u8
*
end
=
buffer
+
length
;
while
(
buffer
<
end
)
{
sum
=
(
u8
)(
sum
+
*
(
buffer
++
));
}
return
(
sum
);
}
drivers/acpi/acpica/utcopy.c
View file @
fa4e1f88
...
@@ -916,13 +916,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
...
@@ -916,13 +916,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
status
=
acpi_ut_walk_package_tree
(
source_obj
,
dest_obj
,
status
=
acpi_ut_walk_package_tree
(
source_obj
,
dest_obj
,
acpi_ut_copy_ielement_to_ielement
,
acpi_ut_copy_ielement_to_ielement
,
walk_state
);
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
/* On failure, delete the destination package object */
acpi_ut_remove_reference
(
dest_obj
);
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
...
drivers/acpi/acpica/utglobal.c
View file @
fa4e1f88
...
@@ -186,6 +186,10 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
...
@@ -186,6 +186,10 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
ACPI_BITREG_RT_CLOCK_ENABLE
,
ACPI_BITREG_RT_CLOCK_ENABLE
,
ACPI_BITMASK_RT_CLOCK_STATUS
,
ACPI_BITMASK_RT_CLOCK_STATUS
,
ACPI_BITMASK_RT_CLOCK_ENABLE
},
ACPI_BITMASK_RT_CLOCK_ENABLE
},
/* ACPI_EVENT_PCIE_WAKE */
{
ACPI_BITREG_PCIEXP_WAKE_STATUS
,
ACPI_BITREG_PCIEXP_WAKE_DISABLE
,
ACPI_BITMASK_PCIEXP_WAKE_STATUS
,
ACPI_BITMASK_PCIEXP_WAKE_DISABLE
},
};
};
#endif
/* !ACPI_REDUCED_HARDWARE */
#endif
/* !ACPI_REDUCED_HARDWARE */
...
...
drivers/acpi/acpica/utstring.c
View file @
fa4e1f88
...
@@ -145,7 +145,7 @@ void acpi_ut_repair_name(char *name)
...
@@ -145,7 +145,7 @@ void acpi_ut_repair_name(char *name)
return
;
return
;
}
}
ACPI_COPY_NAMESEG
(
&
original_name
,
name
);
ACPI_COPY_NAMESEG
(
&
original_name
,
&
name
[
0
]
);
/* Check each character in the name */
/* Check each character in the name */
...
@@ -156,10 +156,10 @@ void acpi_ut_repair_name(char *name)
...
@@ -156,10 +156,10 @@ void acpi_ut_repair_name(char *name)
/*
/*
* Replace a bad character with something printable, yet technically
* Replace a bad character with something printable, yet technically
*
still invalid
. This prevents any collisions with existing "good"
*
"odd"
. This prevents any collisions with existing "good"
* names in the namespace.
* names in the namespace.
*/
*/
name
[
i
]
=
'
*
'
;
name
[
i
]
=
'
_
'
;
found_bad_char
=
TRUE
;
found_bad_char
=
TRUE
;
}
}
...
@@ -169,8 +169,8 @@ void acpi_ut_repair_name(char *name)
...
@@ -169,8 +169,8 @@ void acpi_ut_repair_name(char *name)
if
(
!
acpi_gbl_enable_interpreter_slack
)
{
if
(
!
acpi_gbl_enable_interpreter_slack
)
{
ACPI_WARNING
((
AE_INFO
,
ACPI_WARNING
((
AE_INFO
,
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]"
,
"Invalid character(s) in name (0x%.8X)
%p
, repaired: [%4.4s]"
,
original_name
,
name
));
original_name
,
name
,
&
name
[
0
]
));
}
else
{
}
else
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]"
,
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]"
,
...
...
include/acpi/acconfig.h
View file @
fa4e1f88
...
@@ -190,6 +190,8 @@
...
@@ -190,6 +190,8 @@
#define ACPI_PRM_INPUT_BUFFER_SIZE 26
#define ACPI_PRM_INPUT_BUFFER_SIZE 26
#define ACPI_FFH_INPUT_BUFFER_SIZE 256
/* _sx_d and _sx_w control methods */
/* _sx_d and _sx_w control methods */
#define ACPI_NUM_sx_d_METHODS 4
#define ACPI_NUM_sx_d_METHODS 4
...
...
include/acpi/acpixf.h
View file @
fa4e1f88
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x2022
0331
#define ACPI_CA_VERSION 0x2022
1020
#include <acpi/acconfig.h>
#include <acpi/acconfig.h>
#include <acpi/actypes.h>
#include <acpi/actypes.h>
...
...
include/acpi/actbl1.h
View file @
fa4e1f88
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#define ACPI_SIG_HMAT "HMAT"
/* Heterogeneous Memory Attributes Table */
#define ACPI_SIG_HMAT "HMAT"
/* Heterogeneous Memory Attributes Table */
#define ACPI_SIG_HPET "HPET"
/* High Precision Event Timer table */
#define ACPI_SIG_HPET "HPET"
/* High Precision Event Timer table */
#define ACPI_SIG_IBFT "IBFT"
/* iSCSI Boot Firmware Table */
#define ACPI_SIG_IBFT "IBFT"
/* iSCSI Boot Firmware Table */
#define ACPI_SIG_MSCT "MSCT"
/* Maximum System Characteristics Table */
#define ACPI_SIG_S3PT "S3PT"
/* S3 Performance (sub)Table */
#define ACPI_SIG_S3PT "S3PT"
/* S3 Performance (sub)Table */
#define ACPI_SIG_PCCS "PCC"
/* PCC Shared Memory Region */
#define ACPI_SIG_PCCS "PCC"
/* PCC Shared Memory Region */
...
@@ -303,12 +304,125 @@ struct acpi_table_boot {
...
@@ -303,12 +304,125 @@ struct acpi_table_boot {
u8
reserved
[
3
];
u8
reserved
[
3
];
};
};
/*******************************************************************************
*
* CDAT - Coherent Device Attribute Table
* Version 1
*
* Conforms to the "Coherent Device Attribute Table (CDAT) Specification
" (Revision 1.01, October 2020.)
*
******************************************************************************/
struct
acpi_table_cdat
{
u32
length
;
/* Length of table in bytes, including this header */
u8
revision
;
/* ACPI Specification minor version number */
u8
checksum
;
/* To make sum of entire table == 0 */
u8
reserved
[
6
];
u32
sequence
;
/* Used to detect runtime CDAT table changes */
};
/* CDAT common subtable header */
struct
acpi_cdat_header
{
u8
type
;
u8
reserved
;
u16
length
;
};
/* Values for Type field above */
enum
acpi_cdat_type
{
ACPI_CDAT_TYPE_DSMAS
=
0
,
ACPI_CDAT_TYPE_DSLBIS
=
1
,
ACPI_CDAT_TYPE_DSMSCIS
=
2
,
ACPI_CDAT_TYPE_DSIS
=
3
,
ACPI_CDAT_TYPE_DSEMTS
=
4
,
ACPI_CDAT_TYPE_SSLBIS
=
5
,
ACPI_CDAT_TYPE_RESERVED
=
6
/* 6 through 0xFF are reserved */
};
/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
struct
acpi_cadt_dsmas
{
u8
dsmad_handle
;
u8
flags
;
u16
reserved
;
u64
dpa_base_address
;
u64
dpa_length
;
};
/* Flags for subtable above */
#define ACPI_CEDT_DSMAS_NON_VOLATILE (1 << 2)
/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
struct
acpi_cdat_dslbis
{
u8
handle
;
u8
flags
;
/* If Handle matches a DSMAS handle, the definition of this field matches
* Flags field in HMAT System Locality Latency */
u8
data_type
;
u8
reserved
;
u64
entry_base_unit
;
u16
entry
[
3
];
u16
reserved2
;
};
/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
struct
acpi_cdat_dsmscis
{
u8
dsmas_handle
;
u8
reserved
[
3
];
u64
side_cache_size
;
u32
cache_attributes
;
};
/* Subtable 3: Device Scoped Initiator Structure (DSIS) */
struct
acpi_cdat_dsis
{
u8
flags
;
u8
handle
;
u16
reserved
;
};
/* Flags for above subtable */
#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0)
/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
struct
acpi_cdat_dsemts
{
u8
dsmas_handle
;
u8
memory_type
;
u16
reserved
;
u64
dpa_offset
;
u64
range_length
;
};
/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
struct
acpi_cdat_sslbis
{
u8
data_type
;
u8
reserved
[
3
];
u64
entry_base_unit
;
};
/* Sub-subtable for above, sslbe_entries field */
struct
acpi_cdat_sslbe
{
u16
portx_id
;
u16
porty_id
;
u16
latency_or_bandwidth
;
u16
reserved
;
};
/*******************************************************************************
/*******************************************************************************
*
*
* CEDT - CXL Early Discovery Table
* CEDT - CXL Early Discovery Table
* Version 1
* Version 1
*
*
* Conforms to the "CXL Early Discovery Table" (CXL 2.0)
* Conforms to the "CXL Early Discovery Table" (CXL 2.0
, October 2020
)
*
*
******************************************************************************/
******************************************************************************/
...
@@ -329,7 +443,9 @@ struct acpi_cedt_header {
...
@@ -329,7 +443,9 @@ struct acpi_cedt_header {
enum
acpi_cedt_type
{
enum
acpi_cedt_type
{
ACPI_CEDT_TYPE_CHBS
=
0
,
ACPI_CEDT_TYPE_CHBS
=
0
,
ACPI_CEDT_TYPE_CFMWS
=
1
,
ACPI_CEDT_TYPE_CFMWS
=
1
,
ACPI_CEDT_TYPE_RESERVED
=
2
,
ACPI_CEDT_TYPE_CXIMS
=
2
,
ACPI_CEDT_TYPE_RDPAS
=
3
,
ACPI_CEDT_TYPE_RESERVED
=
4
,
};
};
/* Values for version field above */
/* Values for version field above */
...
@@ -380,6 +496,7 @@ struct acpi_cedt_cfmws_target_element {
...
@@ -380,6 +496,7 @@ struct acpi_cedt_cfmws_target_element {
/* Values for Interleave Arithmetic field above */
/* Values for Interleave Arithmetic field above */
#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1)
/* Values for Restrictions field above */
/* Values for Restrictions field above */
...
@@ -389,6 +506,36 @@ struct acpi_cedt_cfmws_target_element {
...
@@ -389,6 +506,36 @@ struct acpi_cedt_cfmws_target_element {
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
/* 2: CXL XOR Interleave Math Structure */
struct
acpi_cedt_cxims
{
struct
acpi_cedt_header
header
;
u16
reserved1
;
u8
hbig
;
u8
nr_xormaps
;
u64
xormap_list
[];
};
/* 3: CXL RCEC Downstream Port Association Structure */
struct
acpi_cedt_rdpas
{
struct
acpi_cedt_header
header
;
u8
reserved1
;
u16
length
;
u16
segment
;
u16
bdf
;
u8
protocol
;
u64
address
;
};
/* Masks for bdf field above */
#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00
#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8
#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007
#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0)
#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1)
/*******************************************************************************
/*******************************************************************************
*
*
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)
...
...
include/acpi/actbl2.h
View file @
fa4e1f88
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#define ACPI_SIG_AGDI "AGDI"
/* Arm Generic Diagnostic Dump and Reset Device Interface */
#define ACPI_SIG_AGDI "AGDI"
/* Arm Generic Diagnostic Dump and Reset Device Interface */
#define ACPI_SIG_APMT "APMT"
/* Arm Performance Monitoring Unit table */
#define ACPI_SIG_APMT "APMT"
/* Arm Performance Monitoring Unit table */
#define ACPI_SIG_BDAT "BDAT"
/* BIOS Data ACPI Table */
#define ACPI_SIG_BDAT "BDAT"
/* BIOS Data ACPI Table */
#define ACPI_SIG_CCEL "CCEL"
/* CC Event Log Table */
#define ACPI_SIG_CDAT "CDAT"
/* Coherent Device Attribute Table */
#define ACPI_SIG_IORT "IORT"
/* IO Remapping Table */
#define ACPI_SIG_IORT "IORT"
/* IO Remapping Table */
#define ACPI_SIG_IVRS "IVRS"
/* I/O Virtualization Reporting Structure */
#define ACPI_SIG_IVRS "IVRS"
/* I/O Virtualization Reporting Structure */
#define ACPI_SIG_LPIT "LPIT"
/* Low Power Idle Table */
#define ACPI_SIG_LPIT "LPIT"
/* Low Power Idle Table */
...
@@ -34,7 +36,6 @@
...
@@ -34,7 +36,6 @@
#define ACPI_SIG_MCFG "MCFG"
/* PCI Memory Mapped Configuration table */
#define ACPI_SIG_MCFG "MCFG"
/* PCI Memory Mapped Configuration table */
#define ACPI_SIG_MCHI "MCHI"
/* Management Controller Host Interface table */
#define ACPI_SIG_MCHI "MCHI"
/* Management Controller Host Interface table */
#define ACPI_SIG_MPST "MPST"
/* Memory Power State Table */
#define ACPI_SIG_MPST "MPST"
/* Memory Power State Table */
#define ACPI_SIG_MSCT "MSCT"
/* Maximum System Characteristics Table */
#define ACPI_SIG_MSDM "MSDM"
/* Microsoft Data Management Table */
#define ACPI_SIG_MSDM "MSDM"
/* Microsoft Data Management Table */
#define ACPI_SIG_NFIT "NFIT"
/* NVDIMM Firmware Interface Table */
#define ACPI_SIG_NFIT "NFIT"
/* NVDIMM Firmware Interface Table */
#define ACPI_SIG_NHLT "NHLT"
/* Non HD Audio Link Table */
#define ACPI_SIG_NHLT "NHLT"
/* Non HD Audio Link Table */
...
@@ -352,12 +353,29 @@ struct acpi_table_bdat {
...
@@ -352,12 +353,29 @@ struct acpi_table_bdat {
struct
acpi_generic_address
gas
;
struct
acpi_generic_address
gas
;
};
};
/*******************************************************************************
*
* CCEL - CC-Event Log
* From: "Guest-Host-Communication Interface (GHCI) for Intel
* Trust Domain Extensions (Intel TDX)". Feb 2022
*
******************************************************************************/
struct
acpi_table_ccel
{
struct
acpi_table_header
header
;
/* Common ACPI table header */
u8
CCtype
;
u8
Ccsub_type
;
u16
reserved
;
u64
log_area_minimum_length
;
u64
log_area_start_address
;
};
/*******************************************************************************
/*******************************************************************************
*
*
* IORT - IO Remapping Table
* IORT - IO Remapping Table
*
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
* Conforms to "IO Remapping Table System Software on ARM Platforms",
* Document number: ARM DEN 0049E.
d, Feb
2022
* Document number: ARM DEN 0049E.
e, Sep
2022
*
*
******************************************************************************/
******************************************************************************/
...
@@ -528,6 +546,7 @@ struct acpi_iort_smmu_v3 {
...
@@ -528,6 +546,7 @@ struct acpi_iort_smmu_v3 {
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
#define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4)
struct
acpi_iort_pmcg
{
struct
acpi_iort_pmcg
{
u64
page0_base_address
;
u64
page0_base_address
;
...
@@ -865,7 +884,14 @@ enum acpi_madt_type {
...
@@ -865,7 +884,14 @@ enum acpi_madt_type {
ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR
=
14
,
ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR
=
14
,
ACPI_MADT_TYPE_GENERIC_TRANSLATOR
=
15
,
ACPI_MADT_TYPE_GENERIC_TRANSLATOR
=
15
,
ACPI_MADT_TYPE_MULTIPROC_WAKEUP
=
16
,
ACPI_MADT_TYPE_MULTIPROC_WAKEUP
=
16
,
ACPI_MADT_TYPE_RESERVED
=
17
,
/* 17 to 0x7F are reserved */
ACPI_MADT_TYPE_CORE_PIC
=
17
,
ACPI_MADT_TYPE_LIO_PIC
=
18
,
ACPI_MADT_TYPE_HT_PIC
=
19
,
ACPI_MADT_TYPE_EIO_PIC
=
20
,
ACPI_MADT_TYPE_MSI_PIC
=
21
,
ACPI_MADT_TYPE_BIO_PIC
=
22
,
ACPI_MADT_TYPE_LPC_PIC
=
23
,
ACPI_MADT_TYPE_RESERVED
=
24
,
/* 24 to 0x7F are reserved */
ACPI_MADT_TYPE_OEM_RESERVED
=
0x80
/* 0x80 to 0xFF are reserved for OEM use */
ACPI_MADT_TYPE_OEM_RESERVED
=
0x80
/* 0x80 to 0xFF are reserved for OEM use */
};
};
...
@@ -1096,7 +1122,135 @@ struct acpi_madt_multiproc_wakeup_mailbox {
...
@@ -1096,7 +1122,135 @@ struct acpi_madt_multiproc_wakeup_mailbox {
#define ACPI_MP_WAKE_COMMAND_WAKEUP 1
#define ACPI_MP_WAKE_COMMAND_WAKEUP 1
/* 17: OEM data */
/* 17: CPU Core Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_core_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u32
processor_id
;
u32
core_id
;
u32
flags
;
};
/* Values for Version field above */
enum
acpi_madt_core_pic_version
{
ACPI_MADT_CORE_PIC_VERSION_NONE
=
0
,
ACPI_MADT_CORE_PIC_VERSION_V1
=
1
,
ACPI_MADT_CORE_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 18: Legacy I/O Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_lio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
[
2
];
u32
cascade_map
[
2
];
};
/* Values for Version field above */
enum
acpi_madt_lio_pic_version
{
ACPI_MADT_LIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_LIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_LIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 19: HT Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_ht_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
[
8
];
};
/* Values for Version field above */
enum
acpi_madt_ht_pic_version
{
ACPI_MADT_HT_PIC_VERSION_NONE
=
0
,
ACPI_MADT_HT_PIC_VERSION_V1
=
1
,
ACPI_MADT_HT_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 20: Extend I/O Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_eio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u8
cascade
;
u8
node
;
u64
node_map
;
};
/* Values for Version field above */
enum
acpi_madt_eio_pic_version
{
ACPI_MADT_EIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_EIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_EIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 21: MSI Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_msi_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
msg_address
;
u32
start
;
u32
count
;
};
/* Values for Version field above */
enum
acpi_madt_msi_pic_version
{
ACPI_MADT_MSI_PIC_VERSION_NONE
=
0
,
ACPI_MADT_MSI_PIC_VERSION_V1
=
1
,
ACPI_MADT_MSI_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 22: Bridge I/O Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_bio_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u16
id
;
u16
gsi_base
;
};
/* Values for Version field above */
enum
acpi_madt_bio_pic_version
{
ACPI_MADT_BIO_PIC_VERSION_NONE
=
0
,
ACPI_MADT_BIO_PIC_VERSION_V1
=
1
,
ACPI_MADT_BIO_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 23: LPC Interrupt Controller (ACPI 6.5) */
struct
acpi_madt_lpc_pic
{
struct
acpi_subtable_header
header
;
u8
version
;
u64
address
;
u16
size
;
u8
cascade
;
};
/* Values for Version field above */
enum
acpi_madt_lpc_pic_version
{
ACPI_MADT_LPC_PIC_VERSION_NONE
=
0
,
ACPI_MADT_LPC_PIC_VERSION_V1
=
1
,
ACPI_MADT_LPC_PIC_VERSION_RESERVED
=
2
/* 2 and greater are reserved */
};
/* 80: OEM data */
struct
acpi_madt_oem_data
{
struct
acpi_madt_oem_data
{
u8
oem_data
[
0
];
u8
oem_data
[
0
];
...
...
include/acpi/actypes.h
View file @
fa4e1f88
...
@@ -723,7 +723,8 @@ typedef u32 acpi_event_type;
...
@@ -723,7 +723,8 @@ typedef u32 acpi_event_type;
#define ACPI_EVENT_POWER_BUTTON 2
#define ACPI_EVENT_POWER_BUTTON 2
#define ACPI_EVENT_SLEEP_BUTTON 3
#define ACPI_EVENT_SLEEP_BUTTON 3
#define ACPI_EVENT_RTC 4
#define ACPI_EVENT_RTC 4
#define ACPI_EVENT_MAX 4
#define ACPI_EVENT_PCIE_WAKE 5
#define ACPI_EVENT_MAX 5
#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1
#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1
/*
/*
...
@@ -1115,6 +1116,13 @@ struct acpi_pcc_info {
...
@@ -1115,6 +1116,13 @@ struct acpi_pcc_info {
u8
*
internal_buffer
;
u8
*
internal_buffer
;
};
};
/* Special Context data for FFH Opregion (ACPI 6.5) */
struct
acpi_ffh_info
{
u64
offset
;
u64
length
;
};
typedef
typedef
acpi_status
(
*
acpi_adr_space_setup
)
(
acpi_handle
region_handle
,
acpi_status
(
*
acpi_adr_space_setup
)
(
acpi_handle
region_handle
,
u32
function
,
u32
function
,
...
...
include/acpi/acuuid.h
View file @
fa4e1f88
...
@@ -69,5 +69,6 @@
...
@@ -69,5 +69,6 @@
#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a"
#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a"
#define UUID_1ST_FUNCTION_ID "893f00a6-660c-494e-bcfd-3043f4fb67c0"
#define UUID_2ND_FUNCTION_ID "107ededd-d381-4fd7-8da9-08e9a6c79644"
#endif
/* __ACUUID_H__ */
#endif
/* __ACUUID_H__ */
tools/power/acpi/tools/acpidump/Makefile
View file @
fa4e1f88
...
@@ -28,6 +28,7 @@ TOOL_OBJS = \
...
@@ -28,6 +28,7 @@ TOOL_OBJS = \
tbxfroot.o
\
tbxfroot.o
\
utascii.o
\
utascii.o
\
utbuffer.o
\
utbuffer.o
\
utcksum.o
\
utdebug.o
\
utdebug.o
\
utexcep.o
\
utexcep.o
\
utglobal.o
\
utglobal.o
\
...
...
tools/power/acpi/tools/acpidump/apdump.c
View file @
fa4e1f88
...
@@ -78,7 +78,9 @@ u8 ap_is_valid_checksum(struct acpi_table_header *table)
...
@@ -78,7 +78,9 @@ u8 ap_is_valid_checksum(struct acpi_table_header *table)
rsdp
=
ACPI_CAST_PTR
(
struct
acpi_table_rsdp
,
table
);
rsdp
=
ACPI_CAST_PTR
(
struct
acpi_table_rsdp
,
table
);
status
=
acpi_tb_validate_rsdp
(
rsdp
);
status
=
acpi_tb_validate_rsdp
(
rsdp
);
}
else
{
}
else
{
status
=
acpi_tb_verify_checksum
(
table
,
table
->
length
);
/* We don't have to check for a CDAT here, since CDAT is not in the RSDT/XSDT */
status
=
acpi_ut_verify_checksum
(
table
,
table
->
length
);
}
}
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment