aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail/northcluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/baytrail/northcluster.c')
-rw-r--r--src/soc/intel/baytrail/northcluster.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/soc/intel/baytrail/northcluster.c b/src/soc/intel/baytrail/northcluster.c
index eca122c056..e259163616 100644
--- a/src/soc/intel/baytrail/northcluster.c
+++ b/src/soc/intel/baytrail/northcluster.c
@@ -23,6 +23,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <baytrail/iomap.h>
#include <baytrail/iosf.h>
#include <baytrail/pci_devs.h>
#include <baytrail/ramstage.h>
@@ -64,6 +65,11 @@
*/
#define RES_IN_KiB(r) ((r) >> 10)
+uint32_t nc_read_top_of_low_memory(void)
+{
+ return iosf_bunit_read(BUNIT_BMBOUND) & ~((1 << 27) - 1);
+}
+
static void nc_read_resources(device_t dev)
{
unsigned long mmconf;
@@ -107,7 +113,7 @@ static void nc_read_resources(device_t dev)
reserved_ram_resource(dev, index++, smmrrl, smmrrh - smmrrl);
/* All address space between bmbound and smmrrh is unusable. */
- bmbound = RES_IN_KiB(iosf_bunit_read(BUNIT_BMBOUND) & ~((1 << 27) - 1));
+ bmbound = RES_IN_KiB(nc_read_top_of_low_memory());
mmio_resource(dev, index++, smmrrh, bmbound - smmrrh);
/* The BMBOUND_HI register matches register bits of 31:24 with address