diff options
author | rrs <rrs@FreeBSD.org> | 2010-01-29 04:05:17 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2010-01-29 04:05:17 +0000 |
commit | 74e6490161a1036db5c374a003c19cb3975444dd (patch) | |
tree | 984cf530e81bc7c310941f58a79c5508e3c02e34 | |
parent | 644ee9feb99476b2cfd76bebcf99caea2d27339f (diff) | |
download | FreeBSD-src-74e6490161a1036db5c374a003c19cb3975444dd.zip FreeBSD-src-74e6490161a1036db5c374a003c19cb3975444dd.tar.gz |
Its possible that our RMI box has memory extending
above 4Gig. If so when we add the base address with
the size we will wrap. So for now we just ignore
such memory and only use what we can. When we
get 64 bit working then we will be much better ;->
-rw-r--r-- | sys/mips/rmi/xlr_machdep.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/mips/rmi/xlr_machdep.c b/sys/mips/rmi/xlr_machdep.c index 1dc1b3c..f66c1b0 100644 --- a/sys/mips/rmi/xlr_machdep.c +++ b/sys/mips/rmi/xlr_machdep.c @@ -456,6 +456,9 @@ platform_start(__register_t a0 __unused, } phys_avail[1] = boot_map->physmem_map[0].addr + boot_map->physmem_map[0].size; + printf("First segment: addr:%p -> %p \n", + (void *)phys_avail[0], + (void *)phys_avail[1]); } else { /* @@ -467,9 +470,19 @@ platform_start(__register_t a0 __unused, boot_map->physmem_map[i].addr; phys_avail[j + 1] = phys_avail[j] + boot_map->physmem_map[i].size; -#if 0 /* FIXME TOD0 */ - phys_avail[j] = phys_avail[j + 1] = 0; -#endif + if (phys_avail[j + 1] < phys_avail[j] ) { + /* Houston we have an issue. Memory is + * larger than possible. Its probably in + * 64 bit > 4Gig and we are in 32 bit mode. + */ + phys_avail[j + 1] = 0xfffff000; + printf("boot map size was %llx\n", boot_map->physmem_map[i].size); + boot_map->physmem_map[i].size = phys_avail[j + 1] - phys_avail[j]; + printf("reduced to %llx\n", boot_map->physmem_map[i].size); + } + printf("Next segment : addr:%p -> %p \n", + (void *)phys_avail[j], + (void *)phys_avail[j+1]); } physsz += boot_map->physmem_map[i].size; } |