aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail/stage_cache.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-03-06 23:17:33 -0600
committerAaron Durbin <adurbin@chromium.org>2015-04-22 17:55:08 +0200
commitbd74a4b2d25268f7035a4478da31f27baac2aecc (patch)
tree56740c02fe396df8ccf9fc2e7401542deeebf453 /src/soc/intel/baytrail/stage_cache.c
parentcac50506238507328b8ea0f4abd458869803e6c2 (diff)
coreboot: common stage cache
Many chipsets were using a stage cache for reference code or when using a relocatable ramstage. Provide a common API for the chipsets to use while reducing code duplication. Change-Id: Ia36efa169fe6bd8a3dbe07bf57a9729c7edbdd46 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8625 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/soc/intel/baytrail/stage_cache.c')
-rw-r--r--src/soc/intel/baytrail/stage_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/baytrail/stage_cache.c b/src/soc/intel/baytrail/stage_cache.c
index d51746fbd1..a4f510d2f4 100644
--- a/src/soc/intel/baytrail/stage_cache.c
+++ b/src/soc/intel/baytrail/stage_cache.c
@@ -18,10 +18,10 @@
*/
#include <cbmem.h>
-#include <ramstage_cache.h>
+#include <stage_cache.h>
#include <soc/smm.h>
-struct ramstage_cache *ramstage_cache_location(long *size)
+void stage_cache_external_region(void **base, size_t *size)
{
char *smm_base;
/* 1MiB cache size */
@@ -31,5 +31,5 @@ struct ramstage_cache *ramstage_cache_location(long *size)
* cbmem_top(). */
smm_base = cbmem_top();
*size = cache_size;
- return (void *)&smm_base[smm_region_size() - cache_size];
+ *base = &smm_base[smm_region_size() - cache_size];
}