summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-12-01 19:14:09 -0800
committerMartin Roth <martinroth@google.com>2016-02-04 17:21:04 +0100
commite2cea4f4582dad7f202a3f6d4fc884b01ec1d52d (patch)
treedf4f4315bc15d4c7ca54b4e712bdce5c16e15774 /src/ec/google/chromeec/ec.h
parenteb31685bbba0b58aea0cd6900ed59eae76c80ad4 (diff)
google/chromeec: Add temporary storage interface
Add support functions for the Chrome EC temporary storage interface. BUG=chrome-os-partner:46049 BRANCH=none TEST=tested on glados with modified coreboot Change-Id: Id2bc46df9cb2d82b15e3309e78d07407a622b6f0 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: a7e6f693666b162e11eb0611715f10a8f465ad88 Original-Change-Id: Ieefabfc5bcb9d8a5064f0da967c46d0f377ca320 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/315217 Original-Commit-Ready: Aaron Durbin <adurbin@chromium.org> Original-Tested-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13572 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 6693b3c6d1..7f52362f2d 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -19,6 +19,7 @@
#define _EC_GOOGLE_CHROMEEC_EC_H
#include <stddef.h>
#include <stdint.h>
+#include "ec_commands.h"
#ifndef __PRE_RAM__
int google_chromeec_i2c_xfer(uint8_t chip, uint8_t addr, int alen,
@@ -41,6 +42,7 @@ void google_chromeec_check_ec_image(int expected_type);
void google_chromeec_check_pd_image(int expected_type);
#endif
+int google_chromeec_check_feature(int feature);
uint8_t google_chromeec_calc_checksum(const uint8_t *data, int size);
u16 google_chromeec_get_board_version(void);
u32 google_chromeec_get_events_b(void);
@@ -51,6 +53,12 @@ void google_chromeec_log_events(u32 mask);
int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len);
uint8_t google_chromeec_get_switches(void);
+/* Temporary secure storage commands */
+int google_chromeec_vstore_supported(void);
+int google_chromeec_vstore_info(uint32_t *locked);
+int google_chromeec_vstore_read(int slot, uint8_t *data);
+int google_chromeec_vstore_write(int slot, uint8_t *data, size_t size);
+
/* For MEC, access ranges 0x800 thru 0x9ff using EMI interface instead of LPC */
#define MEC_EMI_RANGE_START EC_HOST_CMD_REGION0
#define MEC_EMI_RANGE_END (EC_LPC_ADDR_MEMMAP + EC_MEMMAP_SIZE)