aboutsummaryrefslogtreecommitdiff
path: root/src/ec/google/wilco/commands.h
diff options
context:
space:
mode:
authorEric Lai <ericr_lai@compal.corp-partner.google.com>2020-01-23 14:43:08 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-01-27 07:43:06 +0000
commitf74b6e351c921f2505691f5ece834b280e500395 (patch)
tree22137a1ecd25e2cd790ddbff68f089f12160e44a /src/ec/google/wilco/commands.h
parentec430ee343bdceaf21a7be462e8f856102bd2c09 (diff)
ec/google/wilco: add ec command set cpu id
Add new mailbox command support. Set CPU ID and cores to EC. EC will according to different CPU to set different power table. BUG=b:148126144 Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com> Change-Id: I135d2421d2106934be996a1780786f6bb0bf6b34 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38526 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
Diffstat (limited to 'src/ec/google/wilco/commands.h')
-rw-r--r--src/ec/google/wilco/commands.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h
index 9a185805af..3d2ae46fae 100644
--- a/src/ec/google/wilco/commands.h
+++ b/src/ec/google/wilco/commands.h
@@ -52,6 +52,8 @@ enum {
KB_BIOS_PROGRESS = 0xc2,
/* Inform the EC that a fatal error occurred */
KB_ERR_CODE = 0x7b,
+ /* Set CPU ID */
+ KB_CPU_ID = 0xbf,
};
enum ec_ram_addr {
@@ -337,4 +339,18 @@ int wilco_ec_signed_fw(void);
*/
void wilco_ec_save_post_code(uint8_t post_code);
+/**
+ * wilco_ec_set_cpuid
+ *
+ * Set CPU ID to EC.
+ *
+ * @cpuid: read CPU ID from cpu_eax(1)
+ * @cpu_cores: cores of CPU
+ * @gpu_cores: cores of GPU
+ *
+ * Returns 0 if EC command was successful
+ * Returns -1 if EC command failed
+ */
+int wilco_ec_set_cpuid(uint32_t cpuid, uint8_t cpu_cores, uint8_t gpu_cores);
+
#endif /* EC_GOOGLE_WILCO_COMMANDS_H */