summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-06-18 13:37:05 -0700
committerGerrit <chrome-bot@google.com>2012-06-18 15:21:30 -0700
commit592567e95612cdfa679b9b9fd3e4afe0579b1210 (patch)
tree1b092cb00f84ce495b92fff5686b4881172138d8
parentacd6f4688abb9a0253bb469a8a52046c97281347 (diff)
downloadvboot-592567e95612cdfa679b9b9fd3e4afe0579b1210.tar.gz
Remove VbExTrustEC() from vboot, so it can go into BIOS.
The VbExTrustEC function should be implemented in the BIOS, not the vboot library. Also, weak references don't seem to work with our linker, so we'll have to just require it always. BUG=chrome-os-partner:9953 TEST=none This must go in with a simultaneous change to U-Boot. The only test is whether or not everything continues to compile. Change-Id: I8a5ccb167eec3bcacbe892cf0bdcfe550a1f57d6 Reviewed-on: https://gerrit.chromium.org/gerrit/25557 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--firmware/include/vboot_api.h7
-rw-r--r--firmware/lib/vboot_api_kernel.c7
-rw-r--r--firmware/stub/vboot_api_stub.c4
3 files changed, 11 insertions, 7 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 50d0f816..8cb3620b 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -617,4 +617,11 @@ VbError_t VbExDecompress(void *inbuf, uint32_t in_size,
uint32_t compression_type,
void *outbuf, uint32_t *out_size);
+
+/* This is called only if the system implements a keyboard-based (virtual)
+ * developer switch. It must return true only if the system has an embedded
+ * controller which is provably running in its RO firmware at the time the
+ * function is called. */
+int VbExTrustEC(void);
+
#endif /* VBOOT_REFERENCE_VBOOT_API_H_ */
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 6e02380e..df9f57ce 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -209,13 +209,6 @@ fallout:
}
-/* FIXME(crosbug.com/p/9953): The platform BIOS should implement this! */
-/* And not here: somewhere outside of vboot with the other VbEx functions */
-int VbExTrustEC(void) {
- /* Only return true if the EC is running in its RO firmware *right now*. */
- return 1;
-}
-
/* Ask the user to confirm changing the virtual dev-mode switch. If they confirm
* we'll change it and return a reason to reboot. */
static VbError_t VbConfirmChangeDevMode(VbCommonParams* cparams, int to_dev) {
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index 78eb7649..9a13448f 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -141,3 +141,7 @@ VbError_t VbExDecompress(void *inbuf, uint32_t in_size,
void *outbuf, uint32_t *out_size) {
return VBERROR_SUCCESS;
}
+
+int VbExTrustEC(void) {
+ return 1;
+}