aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/mmap_boot.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-06-21 12:50:13 -0700
committerFurquan Shaikh <furquan@google.com>2016-06-22 22:20:57 +0200
commit8065bd4ce111c3ff64e0093c7726a76a31dbc29f (patch)
tree83c797e9807718ba4f3aacb84d42bc26687d366d /src/soc/intel/apollolake/mmap_boot.c
parent14b2a4d574bbdb069369b81af31d87c5b1016f25 (diff)
intel/apollolake: Add API for get_bios_size and use it
get_bios_size returns the value of bios_size. Use this function to calculate bios_size for caching in bootblock. BUG=chrome-os-partner:54563 Change-Id: I2e592b1c52138bd4623ad2acd05c744224a8e50b Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15292 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/apollolake/mmap_boot.c')
-rw-r--r--src/soc/intel/apollolake/mmap_boot.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/soc/intel/apollolake/mmap_boot.c b/src/soc/intel/apollolake/mmap_boot.c
index d3c39ec393..d434cfacda 100644
--- a/src/soc/intel/apollolake/mmap_boot.c
+++ b/src/soc/intel/apollolake/mmap_boot.c
@@ -23,6 +23,7 @@
#include <console/console.h>
#include <fmap.h>
#include <soc/intel/common/nvm.h>
+#include <soc/mmap_boot.h>
#include <soc/spi.h>
/*
@@ -87,11 +88,6 @@ static void bios_mmap_init(void)
SPIBAR_BFPREG_PRL_SHIFT) + 1) * 4 * KiB;
size = bios_end - start;
- printk(BIOS_INFO, "IFD BIOS region info loaded from FLREG%d\n",
- (val & SPIBAR_BFPREG_SBRS) ? 6 : 1);
- printk(BIOS_INFO, "IFD BIOS Start: 0x%zx\n", start);
- printk(BIOS_INFO, "IFD BIOS End : 0x%zx\n", bios_end);
-
/* BIOS region is mapped right below 4G. */
base = 4ULL * GiB - size;
@@ -167,3 +163,9 @@ uint32_t nvm_mmio_to_flash_offset(void *p)
*/
return (uintptr_t)p - (4ULL * GiB - size) + start;
}
+
+size_t get_bios_size(void)
+{
+ bios_mmap_init();
+ return car_get_var(bios_size);
+}