summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-08-22 20:26:24 +0200
committerchrome-bot <chrome-bot@chromium.org>2017-08-30 03:58:28 -0700
commitf1dfc4cbac2140f51f4a40fec790755ca7d4fafe (patch)
tree8bfd0c526430ea8dd4ec070603f5d979333a0a33 /include/ec_commands.h
parent6844e4c2793b736b873f97510238ae6ed03c0772 (diff)
downloadchrome-ec-f1dfc4cbac2140f51f4a40fec790755ca7d4fafe.tar.gz
acpi: Map EC features into ACPI EC memory space
Reserve EC address space offset 0x0a-0x0d for device features. Same value as with the host command, just different way to access it. BUG=b:64705535 BRANCH=none TEST=none Change-Id: I420aed1ae8d0fb7da477fc72ac55ea75a9f9350b Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/626976 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 8be7a4df8a..633640defd 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -326,6 +326,27 @@
#define EC_ACPI_MEM_DEVICE_TABLET_MODE 0x01
/*
+ * Report device features. Uses the same format as the host command, except:
+ *
+ * bit 0 (EC_FEATURE_LIMITED) changes meaning from "EC code has a limited set
+ * of features", which is of limited interest when the system is already
+ * interpreting ACPI bytecode, to "EC_FEATURES[0-7] is not supported". Since
+ * these are supported, it defaults to 0.
+ * This allows detecting the presence of this field since older versions of
+ * the EC codebase would simply return 0xff to that unknown address. Check
+ * FEATURES0 != 0xff (or FEATURES0[0] == 0) to make sure that the other bits
+ * are valid.
+ */
+#define EC_ACPI_MEM_DEVICE_FEATURES0 0x0a
+#define EC_ACPI_MEM_DEVICE_FEATURES1 0x0b
+#define EC_ACPI_MEM_DEVICE_FEATURES2 0x0c
+#define EC_ACPI_MEM_DEVICE_FEATURES3 0x0d
+#define EC_ACPI_MEM_DEVICE_FEATURES4 0x0e
+#define EC_ACPI_MEM_DEVICE_FEATURES5 0x0f
+#define EC_ACPI_MEM_DEVICE_FEATURES6 0x10
+#define EC_ACPI_MEM_DEVICE_FEATURES7 0x11
+
+/*
* ACPI addresses 0x20 - 0xff map to EC_MEMMAP offset 0x00 - 0xdf. This data
* is read-only from the AP. Added in EC_ACPI_MEM_VERSION 2.
*/