diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-08-17 14:49:53 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-08-17 17:04:14 +1000 |
commit | bc4d8e0f9708cb1afedfe4aa72499f16eb30959d (patch) | |
tree | 535b77e9c31fc173e699355113ad3fde75dd827c /hw | |
parent | 58033e44b927c80257a72037aeed2cab682e0c85 (diff) | |
download | skiboot-bc4d8e0f9708cb1afedfe4aa72499f16eb30959d.zip skiboot-bc4d8e0f9708cb1afedfe4aa72499f16eb30959d.tar.gz skiboot-bc4d8e0f9708cb1afedfe4aa72499f16eb30959d.tar.bz2 |
hw/homer: Don't re-reserve homer ranges
Hostboot is going to cover these ranges with its own reservations (to
allow access from the HBRT image), so don't overwrite reservations
with our own.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/homer.c | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -72,7 +72,12 @@ static void homer_init_chip(struct proc_chip *chip) if (read_pba_bar(chip, 0, &hbase, &hsize)) { prlog(PR_DEBUG, " HOMER Image at 0x%llx size %lldMB\n", hbase, hsize / 0x100000); - mem_reserve_hw("ibm,homer-image", hbase, hsize); + + if (!mem_range_is_reserved(hbase, hsize)) { + prlog(PR_WARNING, + "HOMER image is not reserved! Reserving\n"); + mem_reserve_hw("ibm,homer-image", hbase, hsize); + } chip->homer_base = hbase; chip->homer_size = hsize; @@ -90,9 +95,13 @@ static void homer_init_chip(struct proc_chip *chip) * Only reserve it if we have no homer image or if it * doesn't fit in it (only check the base). */ - if (sbase < hbase || sbase > (hbase + hsize) || - (hbase == 0 && sbase > 0)) + if ((sbase < hbase || sbase > (hbase + hsize) || + (hbase == 0 && sbase > 0)) && + !mem_range_is_reserved(sbase, ssize)) { + prlog(PR_WARNING, + "SLW image is not reserved! Reserving\n"); mem_reserve_hw("ibm,slw-image", sbase, ssize); + } chip->slw_base = sbase; chip->slw_bar_size = ssize; @@ -132,9 +141,15 @@ void homer_init(void) chip = next_chip(NULL); if (chip->homer_base && chip->occ_common_base) { - /* Reserve OCC comman area from BAR */ - mem_reserve_hw("ibm,occ-common-area", chip->occ_common_base, + /* Reserve OCC common area from BAR */ + if (!mem_range_is_reserved(chip->occ_common_base, + chip->occ_common_size)) { + prlog(PR_WARNING, + "OCC common area is not reserved! Reserving\n"); + mem_reserve_hw("ibm,occ-common-area", + chip->occ_common_base, chip->occ_common_size); + } } else { /* Allocate memory for HOMER and OCC common area */ host_services_occ_base_setup(); |