summaryrefslogtreecommitdiff
path: root/firmware/stub
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2014-07-15 16:14:21 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-19 03:48:52 +0000
commite778adae83d2ac4ab94aa10acceab328bbd3ea7b (patch)
tree003a07e04c7c581e12cce6369c923b495e1ad0c2 /firmware/stub
parente155044a7bbb9b8c6eb751af051726cfe1b411a4 (diff)
downloadvboot-e778adae83d2ac4ab94aa10acceab328bbd3ea7b.tar.gz
Change VbExEc functions to take a devidx parameterstabilize-6092.Bstabilize-6082.B
This will be used in subsequent CLs to support PD software sync. For now, only devidx=0 is used. This changes the external vboot API, so must be checked in at the same time as changes to the u-boot and depthcharge implementations. For now, those implementations should simply check if devidx=0 and fail if it's not. BUG=chrome-os-partner:30079 BRANCH=none TEST=make runtests CQ-DEPEND=CL:208195,CL:208196 Change-Id: Iad3be9d676ac224c4582669bcd67176b39f75c73 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/208210 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware/stub')
-rw-r--r--firmware/stub/vboot_api_stub.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index b11a7fe1..c9ecd9df 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -84,36 +84,36 @@ VbError_t VbExDecompress(void *inbuf, uint32_t in_size,
return VBERROR_SUCCESS;
}
-int VbExTrustEC(void)
+int VbExTrustEC(int devidx)
{
return 1;
}
-VbError_t VbExEcRunningRW(int *in_rw)
+VbError_t VbExEcRunningRW(int devidx, int *in_rw)
{
*in_rw = 0;
return VBERROR_SUCCESS;
}
-VbError_t VbExEcJumpToRW(void)
+VbError_t VbExEcJumpToRW(int devidx)
{
return VBERROR_SUCCESS;
}
-VbError_t VbExEcRebootToRO(void)
+VbError_t VbExEcRebootToRO(int devidx)
{
/* Nothing to reboot, so all we can do is return failure. */
return VBERROR_UNKNOWN;
}
-VbError_t VbExEcDisableJump(void)
+VbError_t VbExEcDisableJump(int devidx)
{
return VBERROR_SUCCESS;
}
#define SHA256_HASH_SIZE 32
-VbError_t VbExEcHashRW(const uint8_t **hash, int *hash_size)
+VbError_t VbExEcHashRW(int devidx, const uint8_t **hash, int *hash_size)
{
static const uint8_t fake_hash[32] = {1, 2, 3, 4};
@@ -122,7 +122,7 @@ VbError_t VbExEcHashRW(const uint8_t **hash, int *hash_size)
return VBERROR_SUCCESS;
}
-VbError_t VbExEcGetExpectedRW(enum VbSelectFirmware_t select,
+VbError_t VbExEcGetExpectedRW(int devidx, enum VbSelectFirmware_t select,
const uint8_t **image, int *image_size)
{
static uint8_t fake_image[64] = {5, 6, 7, 8};
@@ -131,7 +131,7 @@ VbError_t VbExEcGetExpectedRW(enum VbSelectFirmware_t select,
return VBERROR_SUCCESS;
}
-VbError_t VbExEcGetExpectedRWHash(enum VbSelectFirmware_t select,
+VbError_t VbExEcGetExpectedRWHash(int devidx, enum VbSelectFirmware_t select,
const uint8_t **hash, int *hash_size)
{
static const uint8_t fake_hash[32] = {1, 2, 3, 4};
@@ -141,12 +141,12 @@ VbError_t VbExEcGetExpectedRWHash(enum VbSelectFirmware_t select,
return VBERROR_SUCCESS;
}
-VbError_t VbExEcUpdateRW(const uint8_t *image, int image_size)
+VbError_t VbExEcUpdateRW(int devidx, const uint8_t *image, int image_size)
{
return VBERROR_SUCCESS;
}
-VbError_t VbExEcProtectRW(void)
+VbError_t VbExEcProtectRW(int devidx)
{
return VBERROR_SUCCESS;
}