Device configuration structures are plenty so declare a struct for each
known variant. While these kind of duplicate few types present in
actbl2.h already, change is motivated by usage improvements - simplicity
and shorten wording. Intention is to have them replacing the existing
members in the future.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
The RHCT table is updated with new nodes via ECR (#2382).
Add compile and dump functionality for these new structures.
The codefirst ECR is approved by UEFI forum and will
be part of next ACPI spec version.
Reference: Mantis ID: 2382
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Update RHCT table with below details.
1) Add additional structure to describe the Cache Management
Operation (CMO) related information.
2) Add structure to describe MMU type.
3) Convert the current reserved field to flags and define
a flag to indicate timer capability.
This codefirst ECR is approved by UEFI forum and will
be part of next ACPI spec version.
Reference: Mantis: 2382
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
RISC-V interrupt controller definitions are added in MADT.
Add dump and compile support for them.
These codefirst ECRs are approved by UEFI forum and will
be part of next ACPI spec version.
Reference: Mantis ID: 2348 and 2381
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
This adds 3 different external interrupt controller
definitions in MADT for RISC-V.
1) RISC-V PLIC is a platform interrupt controller for
handling wired interrupt in a RISC-V systems.
2) RISC-V IMSIC is MSI interrupt controller to
support MSI interrupts.
3) RISC-V APLIC has dual functionality. First it can
act like PLIC and direct all wired interrupts to
the CPU which doesn't have MSI controller. Second,
when the CPU has MSI controller (IMSIC), it will
act as a converter from wired interrupts to MSI.
Update the existing RINTC structure also to support
these external interrupt controllers.
This codefirst ECR is approved by UEFI forum and will
be part of next ACPI spec version.
Reference: Mantis ID: 2381
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Co-developed-by: Haibo, Xu <haibo1.xu@intel.com>
Signed-off-by: Haibo, Xu <haibo1.xu@intel.com>
According to the ACPI specification 19.6.134, no argument is required to be passed for ASL Timer instruction. For taking care of no argument, AML_NO_OPERAND_RESOLVE flag is added to ASL Timer instruction opcode.
When ASL timer instruction interpreted by ACPI interpreter, getting error. After adding AML_NO_OPERAND_RESOLVE flag to ASL Timer instruction opcode, issue is not observed.
=============================================================
UBSAN: array-index-out-of-bounds in acpica/dswexec.c:401:12 index -1 is out of range for type 'acpi_operand_object *[9]'
CPU: 37 PID: 1678 Comm: cat Not tainted
6.0.0-dev-th500-6.0.y-1+bcf8c46459e407-generic-64k
HW name: NVIDIA BIOS v1.1.1-d7acbfc-dirty 12/19/2022 Call trace:
dump_backtrace+0xe0/0x130
show_stack+0x20/0x60
dump_stack_lvl+0x68/0x84
dump_stack+0x18/0x34
ubsan_epilogue+0x10/0x50
__ubsan_handle_out_of_bounds+0x80/0x90
acpi_ds_exec_end_op+0x1bc/0x6d8
acpi_ps_parse_loop+0x57c/0x618
acpi_ps_parse_aml+0x1e0/0x4b4
acpi_ps_execute_method+0x24c/0x2b8
acpi_ns_evaluate+0x3a8/0x4bc
acpi_evaluate_object+0x15c/0x37c
acpi_evaluate_integer+0x54/0x15c
show_power+0x8c/0x12c [acpi_power_meter]
Signed-off-by: Abhishek Mainkar <abmainkar@nvidia.com>
'object' is known to be NULL at this point. There is little value to log it twice in the error message.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
This commit add the Interrupt command to acpiexec.
The Interrupt command simulates an interrupt with a IntID (GSIV)
equal to the first argument of the call.
The acpiexec code simulates the behaviour by OSPM: execute the _EVT
method of the GED device associated with that IntID.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
The GED device is described by a _HID of ACPI0013.
This code traverses the namespace identifying all GED devices.
For each GED device in the namespace we record 1) the Interrupt objects
and the _EVT method.
This information is used when an interrupt is simulate.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Avoid trailing semicolons in macro, and it's not readable to put macro ACPI_STATE_COMMON and other
variables in the same line.
So modify the macro and just put it in a single line.
Signed-off-by: George Guo <guodongtai@kylinos.cn>
remove SEEK_SET/SEEK_END duplicate macro on zephyr header which through
error while run zephyr CI jobs.
Signed-off-by: Najumon B.A <najumon.ba@intel.com>
Avoid trailing semicolons in macro, and it's not readable to put macro ACPI_STATE_COMMON and other
variables in the same line.
So modify the macro and just put it in a single line.
Signed-off-by: George Guo <guodongtai@kylinos.cn>
We're storing a persistent pointer to an ephemeral local variable
which technically is a dangling pointer and the compiler is correct.
However, since we never indirect the pointer, this is a safe
operation and we can suppress the warning.
Also, some C run-times (like MUSL) aren't including <stdint.h>
indirectly so we must include it explicitly or we won't have the
type definition for uintptr_t.
Fixes issue #867.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>