Aaron Durbin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44489 )
Change subject: soc/amd/common: add GPE event logs ......................................................................
soc/amd/common: add GPE event logs
GPE events were not be recorded in the eventlog. Add those to the eventlog when the status register indicates those events.
BUG=b:159947207
Signed-off-by: Aaron Durbin adurbin@chromium.org Change-Id: Ifb3167fd24f2171b2baf1a65eb81a318eb3e7a86 --- M src/soc/amd/common/block/acpi/acpi.c 1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/44489/1
diff --git a/src/soc/amd/common/block/acpi/acpi.c b/src/soc/amd/common/block/acpi/acpi.c index 17c0ed1..28fa678 100644 --- a/src/soc/amd/common/block/acpi/acpi.c +++ b/src/soc/amd/common/block/acpi/acpi.c @@ -83,6 +83,17 @@ elog_add_event_wake(ELOG_WAKE_SOURCE_PCIE, 0); }
+static void log_and_gpe_events(const struct acpi_pm_gpe_state *state) +{ + int i; + uint32_t valid_gpe = state->gpe0_sts & state->gpe0_en; + + for (i = 0; i <= 31; i++) { + if (valid_gpe & (1U << i)) + elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); + } +} + void acpi_fill_pm_gpe_state(struct acpi_pm_gpe_state *state) { state->pm1_sts = acpi_read16(MMIO_ACPI_PM1_STS); @@ -97,6 +108,7 @@ { log_pm1_status(state->pm1_sts); print_pm1_status(state->pm1_sts); + log_and_gpe_events(state); }
void acpi_clear_pm_gpe_status(void)
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44489 )
Change subject: soc/amd/common: add GPE event logs ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44489/1/src/soc/amd/common/block/ac... File src/soc/amd/common/block/acpi/acpi.c:
https://review.coreboot.org/c/coreboot/+/44489/1/src/soc/amd/common/block/ac... PS1, Line 111: and What's the 'and' for?
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44489 )
Change subject: soc/amd/common: add GPE event logs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44489/1/src/soc/amd/common/block/ac... File src/soc/amd/common/block/acpi/acpi.c:
https://review.coreboot.org/c/coreboot/+/44489/1/src/soc/amd/common/block/ac... PS1, Line 111: and
What's the 'and' for?
Leftover thought, it seems. I'll remove it.
Hello build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44489
to look at the new patch set (#2).
Change subject: soc/amd/common: add GPE event logs ......................................................................
soc/amd/common: add GPE event logs
GPE events were not be recorded in the eventlog. Add those to the eventlog when the status register indicates those events.
BUG=b:159947207
Signed-off-by: Aaron Durbin adurbin@chromium.org Change-Id: Ifb3167fd24f2171b2baf1a65eb81a318eb3e7a86 --- M src/soc/amd/common/block/acpi/acpi.c 1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/44489/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44489 )
Change subject: soc/amd/common: add GPE event logs ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44489/2/src/soc/amd/common/block/ac... File src/soc/amd/common/block/acpi/acpi.c:
https://review.coreboot.org/c/coreboot/+/44489/2/src/soc/amd/common/block/ac... PS2, Line 69: if (!CONFIG(ELOG)) : return; nit: Not for this change, but I think we can drop this since elog_add_event_*() calls do the right thing depending upon whether CONFIG_ELOG is selected or not.
Aaron Durbin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44489 )
Change subject: soc/amd/common: add GPE event logs ......................................................................
soc/amd/common: add GPE event logs
GPE events were not be recorded in the eventlog. Add those to the eventlog when the status register indicates those events.
BUG=b:159947207
Signed-off-by: Aaron Durbin adurbin@chromium.org Change-Id: Ifb3167fd24f2171b2baf1a65eb81a318eb3e7a86 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44489 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/common/block/acpi/acpi.c 1 file changed, 12 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/soc/amd/common/block/acpi/acpi.c b/src/soc/amd/common/block/acpi/acpi.c index 17c0ed1..2d75ec0 100644 --- a/src/soc/amd/common/block/acpi/acpi.c +++ b/src/soc/amd/common/block/acpi/acpi.c @@ -83,6 +83,17 @@ elog_add_event_wake(ELOG_WAKE_SOURCE_PCIE, 0); }
+static void log_gpe_events(const struct acpi_pm_gpe_state *state) +{ + int i; + uint32_t valid_gpe = state->gpe0_sts & state->gpe0_en; + + for (i = 0; i <= 31; i++) { + if (valid_gpe & (1U << i)) + elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i); + } +} + void acpi_fill_pm_gpe_state(struct acpi_pm_gpe_state *state) { state->pm1_sts = acpi_read16(MMIO_ACPI_PM1_STS); @@ -97,6 +108,7 @@ { log_pm1_status(state->pm1_sts); print_pm1_status(state->pm1_sts); + log_gpe_events(state); }
void acpi_clear_pm_gpe_status(void)