[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE se
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE separately |
Date: |
Fri, 8 Sep 2023 10:42:34 +0200 |
The bit positions of both registers are related. Tracing the registers
independently results in the same offsets across these registers which
eases debugging.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/acpi/core.c | 10 +++++++---
hw/acpi/trace-events | 6 ++++--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index c561845a4a..ec5e127d17 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -687,13 +687,13 @@ void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr,
uint32_t val)
{
uint8_t *cur;
- trace_acpi_gpe_ioport_writeb(addr, val);
-
cur = acpi_gpe_ioport_get_ptr(ar, addr);
if (addr < ar->gpe.len / 2) {
+ trace_acpi_gpe_sts_ioport_writeb(addr, val);
/* GPE_STS */
*cur = (*cur) & ~val;
} else if (addr < ar->gpe.len) {
+ trace_acpi_gpe_en_ioport_writeb(addr - (ar->gpe.len / 2), val);
/* GPE_EN */
*cur = val;
} else {
@@ -712,7 +712,11 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr)
val = *cur;
}
- trace_acpi_gpe_ioport_readb(addr, val);
+ if (addr < ar->gpe.len / 2) {
+ trace_acpi_gpe_sts_ioport_readb(addr, val);
+ } else {
+ trace_acpi_gpe_en_ioport_readb(addr - (ar->gpe.len / 2), val);
+ }
return val;
}
diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events
index 159937ddb9..edc93e703c 100644
--- a/hw/acpi/trace-events
+++ b/hw/acpi/trace-events
@@ -18,8 +18,10 @@ mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32"]
pc-dimm deleted"
mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm
delete failed"
# core.c
-acpi_gpe_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%" PRIx8
-acpi_gpe_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <==
0x%" PRIx8
+acpi_gpe_en_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%02" PRIx8
+acpi_gpe_en_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <==
0x%02" PRIx8
+acpi_gpe_sts_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%02" PRIx8
+acpi_gpe_sts_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 "
<== 0x%02" PRIx8
# cpu.c
cpuhp_acpi_invalid_idx_selected(uint32_t idx) "0x%"PRIx32
--
2.42.0
- [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup, Bernhard Beschow, 2023/09/08
- [PATCH v2 2/8] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback, Bernhard Beschow, 2023/09/08
- [PATCH v2 3/8] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method, Bernhard Beschow, 2023/09/08
- [PATCH v2 5/8] hw/i386: Remove now redundant TYPE_ACPI_GED_X86, Bernhard Beschow, 2023/09/08
- [PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once, Bernhard Beschow, 2023/09/08
- [PATCH v2 4/8] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h", Bernhard Beschow, 2023/09/08
- [PATCH v2 7/8] hw/acpi: Trace GPE access in all device models, not just PIIX4, Bernhard Beschow, 2023/09/08
- [PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE separately,
Bernhard Beschow <=
- [PATCH v2 1/8] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly, Bernhard Beschow, 2023/09/08
- Re: [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup, Bernhard Beschow, 2023/09/19