summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-01 08:56:35 +0300
committerSubrata Banik <subrata.banik@intel.com>2019-08-02 04:40:39 +0000
commitc47c6405e8a0213df4f48925b1acca4910d7a123 (patch)
treef77da280e3b5675817251498545834016f4dfb2b /src/include
parent06cc764483d1220aeed28ff1097e6d517f51b0dd (diff)
stage_cache: Add more empty stubs functions
Added for symmetry with other stage_cache_add() command variants, currently for amd/stoneyridge. Change-Id: I580054104a61f1b03ba36a7c97ad4411c3d29855 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34651 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Subrata Banik <subrata.banik@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/stage_cache.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/stage_cache.h b/src/include/stage_cache.h
index 192cfb9014..3483c0cf30 100644
--- a/src/include/stage_cache.h
+++ b/src/include/stage_cache.h
@@ -38,15 +38,20 @@ enum {
void stage_cache_add(int stage_id, const struct prog *stage);
/* Load the cached stage at given location returning the stage entry point. */
void stage_cache_load_stage(int stage_id, struct prog *stage);
+/* Cache non-specific data or code. */
+void stage_cache_add_raw(int stage_id, const void *base, const size_t size);
+/* Get a pointer to cached raw data and its size. */
+void stage_cache_get_raw(int stage_id, void **base, size_t *size);
+
#else /* CONFIG_NO_STAGE_CACHE */
+
static inline void stage_cache_add(int stage_id, const struct prog *stage) {}
static inline void stage_cache_load_stage(int stage_id, struct prog *stage) {}
+static inline void stage_cache_add_raw(int stage_id, const void *base, const size_t size) {}
+static inline void stage_cache_get_raw(int stage_id, void **base, size_t *size) {}
+
#endif
-/* Cache non-specific data or code. */
-void stage_cache_add_raw(int stage_id, const void *base, const size_t size);
-/* Get a pointer to cached raw data and its size. */
-void stage_cache_get_raw(int stage_id, void **base, size_t *size);
/* Fill in parameters for the external stage cache, if utilized. */
void stage_cache_external_region(void **base, size_t *size);