summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/wilco/acpi/ec_ram.asl2
-rw-r--r--src/ec/google/wilco/commands.c8
-rw-r--r--src/ec/google/wilco/commands.h11
3 files changed, 21 insertions, 0 deletions
diff --git a/src/ec/google/wilco/acpi/ec_ram.asl b/src/ec/google/wilco/acpi/ec_ram.asl
index 59bd78e656..0de39475bc 100644
--- a/src/ec/google/wilco/acpi/ec_ram.asl
+++ b/src/ec/google/wilco/acpi/ec_ram.asl
@@ -123,6 +123,8 @@ Name (OERL, Package () { 0x3a, 0x02, RD }) /* Event: Rotation Lock */
Name (BCCY, Package () { 0x3e, 0xffff, RD }) /* BCACHE: Cycle Count */
+Name (ESGN, Package () { 0x5c, 0xff, RD }) /* Indicate EC uses signed FW */
+
/*
* EC RAM WRITE
*/
diff --git a/src/ec/google/wilco/commands.c b/src/ec/google/wilco/commands.c
index 1c7646106c..da04e2759b 100644
--- a/src/ec/google/wilco/commands.c
+++ b/src/ec/google/wilco/commands.c
@@ -14,6 +14,7 @@
*/
#include <console/console.h>
+#include <ec/acpi/ec.h>
#include <stdint.h>
#include <string.h>
@@ -167,3 +168,10 @@ int wilco_ec_change_wake(uint8_t source, enum ec_wake_change change)
wake_source, ARRAY_SIZE(wake_source),
NULL, 0);
}
+
+int wilco_ec_signed_fw(void)
+{
+ ec_set_ports(CONFIG_EC_BASE_ACPI_COMMAND,
+ CONFIG_EC_BASE_ACPI_DATA);
+ return !!ec_read(EC_RAM_SIGNED_FW);
+}
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h
index 9c1685b293..42bb4f2edd 100644
--- a/src/ec/google/wilco/commands.h
+++ b/src/ec/google/wilco/commands.h
@@ -51,6 +51,8 @@ enum {
};
enum ec_ram_addr {
+ /* Indicate if EC uses signed firmware */
+ EC_RAM_SIGNED_FW = 0x5c,
/* Indicate support for S0ix */
EC_RAM_S0IX_SUPPORT = 0xb8,
};
@@ -285,4 +287,13 @@ enum ec_acpi_wake_events {
EC_ACPI_WAKE_RTC = BIT(5), /* Wake up by RTC */
};
+/**
+ * wilco_ec_signed_fw
+ *
+ * Indicate if the EC uses signed firmware.
+ *
+ * Returns 1 if EC uses signed firmware, otherwise returns 0
+ */
+int wilco_ec_signed_fw(void);
+
#endif /* EC_GOOGLE_WILCO_COMMANDS_H */