From 93d483db89da3554afe01958e9f80a76251f2477 Mon Sep 17 00:00:00 2001 From: Shelley Chen Date: Tue, 6 Oct 2020 15:14:24 -0700 Subject: mrc_cache: Change mrc_cache_load_current to return size of entry Modify mrc_cache_load current to return the size of the mrc_cache entry so that caller will know what the actual size of the data returned is. This is needed for ARM devices like trogdor, which need to know the size of the training data when populating the QcLib interface table. BUG=b:150502246 BRANCH=None TEST=./util/abuild/abuild -p none -t GOOGLE_NAMI -x -a Change-Id: Ia314717ad2a7d5232b37a19951c1aecd7f843c27 Signed-off-by: Shelley Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/46110 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/include/mrc_cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/include/mrc_cache.h') diff --git a/src/include/mrc_cache.h b/src/include/mrc_cache.h index da2bf793d3..f1e6b52010 100644 --- a/src/include/mrc_cache.h +++ b/src/include/mrc_cache.h @@ -27,11 +27,11 @@ enum { * mrc_cache_load_current * * Fill in the buffer with the latest slot data. This will be a - * common entry point for ARM platforms. Returns < 0 on error, 0 on - * success. + * common entry point for ARM platforms. Returns < 0 on error, size + * of the returned data on success. */ -int mrc_cache_load_current(int type, uint32_t version, void *buffer, - size_t buffer_size); +ssize_t mrc_cache_load_current(int type, uint32_t version, void *buffer, + size_t buffer_size); /** * mrc_cache_mmap_leak * -- cgit v1.2.3