[coreboot-gerrit] New patch to review for coreboot: x86: acpi: Add function for querying GPE status

Duncan Laurie (dlaurie@chromium.org) gerrit at coreboot.org
Tue Sep 20 02:53:29 CEST 2016


Duncan Laurie (dlaurie at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16657

-gerrit

commit 1033d853bf9b7efbbd4a200f46cb3d9dfd06b68a
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Mon Sep 19 12:04:19 2016 -0700

    x86: acpi: Add function for querying GPE status
    
    Add a function that can be implemented by the SOC to read
    and clear the status of a single GPE.  This can be used
    during firmware to poll for interrupt status.
    
    BUG=chrome-os-partner:53336
    
    Change-Id: I536c2176320fefa4c186dabcdddb55880c47fbad
    Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
---
 src/arch/x86/acpi.c              | 5 +++++
 src/arch/x86/include/arch/acpi.h | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index bbeb92f..edb6835 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -1093,3 +1093,8 @@ void acpi_save_gnvs(u32 gnvs_address)
 	if (gnvs)
 		*gnvs = gnvs_address;
 }
+
+__attribute__ ((weak)) int acpi_get_gpe(int gpe)
+{
+	return -1; /* implemented by SOC */
+}
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index e81ddbf..7d29931 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -677,6 +677,9 @@ static inline int acpi_sleep_from_pm1(uint32_t pm1_cnt)
 /* Returns ACPI_Sx values. */
 int acpi_get_sleep_type(void);
 
+/* Read and clear GPE status */
+int acpi_get_gpe(int gpe);
+
 static inline int acpi_s3_resume_allowed(void)
 {
 	return IS_ENABLED(CONFIG_HAVE_ACPI_RESUME);



More information about the coreboot-gerrit mailing list