Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
Merge ACPICA material for 6.4-rc1:

 - Delete bogus node_array array of pointers from AEST table (Jessica
   Clarke).

 - Add support for trace buffer extension in GICC to the ACPI MADT
   parser (Xiongfeng Wang).

 - Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID()
   (Xiongfeng Wang).

 - Add missing tables to astable (Pedro Falcato).

 - Add support for 64 bit loong_arch compilation to ACPICA (Huacai
   Chen).

 - Add support for ASPT table in disassembler to ACPICA (Jeremi
   Piotrowski).

 - Add support for Arm's MPAM ACPI table version 2 (Hesham Almatary).

 - Update all copyrights/signons in ACPICA to 2023 (Bob Moore).

 - Add support for ClockInput resource (v6.5) (Niyas Sait).

 - Add RISC-V INTC interrupt controller definition to the list of
   supported interrupt controllers for MADT (Sunil V L).

 - Add structure definitions for the RISC-V RHCT ACPI table (Sunil V L).

 - Address several cases in which the ACPICA code might lead to
   undefined behavior (Tamir Duberstein).

 - Make ACPICA code support flexible arrays properly (Kees Cook).

 - Check null return of ACPI_ALLOCATE_ZEROED in
   acpi_db_display_objects() (void0red).

 - Add os specific support for Zephyr RTOS to ACPICA (Najumon).

 - Update version to 20230331 (Bob Moore).

* acpica: (32 commits)
  ACPICA: Update version to 20230331
  ACPICA: add os specific support for Zephyr RTOS
  ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
  ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array
  ACPICA: acpi_madt_oem_data: Fix flexible array member definition
  ACPICA: acpi_dmar_andd: Replace 1-element array with flexible array
  ACPICA: acpi_pci_routing_table: Replace fixed-size array with flex array member
  ACPICA: struct acpi_resource_dma: Replace 1-element array with flexible array
  ACPICA: Introduce ACPI_FLEX_ARRAY
  ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array
  ACPICA: actbl2: Replace 1-element arrays with flexible arrays
  ACPICA: actbl1: Replace 1-element arrays with flexible arrays
  ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array
  ACPICA: Avoid undefined behavior: load of misaligned address
  ACPICA: Avoid undefined behavior: member access within misaligned address
  ACPICA: Avoid undefined behavior: member access within misaligned address
  ACPICA: Avoid undefined behavior: member access within misaligned address
  ACPICA: Avoid undefined behavior: member access within misaligned address
  ACPICA: Avoid undefined behavior: member access within null pointer
  ACPICA: Avoid undefined behavior: applying zero offset to null pointer
  ...
  • Loading branch information
rafaeljw committed Apr 24, 2023
2 parents 03c57b0 + df22866 commit c90b29c
Show file tree
Hide file tree
Showing 187 changed files with 733 additions and 243 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acapps - common include for ACPI applications/tools
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/accommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: accommon.h - Common include files for generation of ACPICA source
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acconvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acapps - common include for ACPI applications/tools
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acdebug.h - ACPI/AML debugger
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acevents.h - Event subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acglobal.h - Declarations for global variables
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/achware.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: achware.h -- hardware specific interfaces
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
5 changes: 3 additions & 2 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -1122,7 +1122,8 @@ struct acpi_port_info {
#define ACPI_RESOURCE_NAME_PIN_GROUP 0x90
#define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91
#define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x92
#define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x94

/*****************************************************************************
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acmacros.h - C macros for the entire subsystem.
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acopcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acpredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acpredef - Information table for ACPI predefined methods and objects
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/acpica/acresrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acresrc.h - Resource Manager function prototypes
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -306,6 +306,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_config[];
extern struct acpi_rsconvert_info acpi_rs_convert_clock_input[];

/* These resources require separate get/set tables */

Expand Down Expand Up @@ -361,6 +362,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_pin_config[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_config[];
extern struct acpi_rsdump_info acpi_rs_dump_clock_input[];
#endif

#endif /* __ACRESRC_H__ */
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acstruct.h - Internal structs
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: actables.h - ACPI table management
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -53,6 +53,8 @@ extern const char *acpi_gbl_sb_decode[];
extern const char *acpi_gbl_fc_decode[];
extern const char *acpi_gbl_pt_decode[];
extern const char *acpi_gbl_ptyp_decode[];
extern const char *acpi_gbl_clock_input_mode[];
extern const char *acpi_gbl_clock_input_scale[];
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/amlcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
24 changes: 22 additions & 2 deletions drivers/acpi/acpica/amlresrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: amlresrc.h - AML resource descriptors
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -70,6 +70,8 @@
#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */
#define ACPI_RESTAG_VENDORDATA "_VEN"
#define ACPI_RESTAG_FQN "_FQN"
#define ACPI_RESTAG_FQD "_FQD"

/* Default sizes for "small" resource descriptors */

Expand Down Expand Up @@ -259,7 +261,10 @@ struct aml_resource_address16 {
struct aml_resource_extended_irq {
AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
u8 interrupt_count;
u32 interrupts[1];
union {
u32 interrupt;
ACPI_FLEX_ARRAY(u32, interrupts);
};
/* res_source_index, res_source optional fields follow */
};

Expand Down Expand Up @@ -427,6 +432,20 @@ struct aml_resource_pin_config {
*/
};

#define AML_RESOURCE_CLOCK_INPUT_REVISION 1 /* ACPI 6.5 */

struct aml_resource_clock_input {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u16 frequency_divisor;
u32 frequency_numerator;
/*
* Optional fields follow immediately:
* 1) Resource Source index
* 2) Resource Source String
*/
};

#define AML_RESOURCE_PIN_CONFIG_REVISION 1 /* ACPI 6.2 */

struct aml_resource_pin_group {
Expand Down Expand Up @@ -533,6 +552,7 @@ union aml_resource {
struct aml_resource_pin_group pin_group;
struct aml_resource_pin_group_function pin_group_function;
struct aml_resource_pin_group_config pin_group_config;
struct aml_resource_clock_input clock_input;

/* Utility overlays */

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dbhistry.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dbhistry - debugger HISTORY command
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
3 changes: 3 additions & 0 deletions drivers/acpi/acpica/dbnames.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg)
object_info =
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info));

if (!object_info)
return (AE_NO_MEMORY);

/* Walk the namespace from the root */

(void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Module Name: dsargs - Support for execution of dynamic arguments for static
* objects (regions, fields, buffer fields, etc.)
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dscontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Module Name: dscontrol - Support for execution control opcodes -
* if/else/while/return
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsdebug - Parser/Interpreter interface - debugging
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsfield - Dispatcher field routines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsinit - Object initialization namespace walk
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsobject - Dispatcher object management routines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dsopcode - Dispatcher support for regions and fields
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dspkginit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: dspkginit - Completion of deferred package initialization
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dswexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
Loading

0 comments on commit c90b29c

Please sign in to comment.