diff options
author | jmallett <jmallett@FreeBSD.org> | 2010-09-19 09:18:07 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2010-09-19 09:18:07 +0000 |
commit | 4e30ea5df6e2298289ad5356d0585005e3cadd56 (patch) | |
tree | 8f70405e1bb191a349947ddd396563314db9d2d5 /sys/mips | |
parent | fe5567c8f172d8218fb37af60118825748628d44 (diff) | |
download | FreeBSD-src-4e30ea5df6e2298289ad5356d0585005e3cadd56.zip FreeBSD-src-4e30ea5df6e2298289ad5356d0585005e3cadd56.tar.gz |
Don't use memory that can't be direct-mapped on !n64.
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/cavium/octeon_machdep.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c index 5321a78..0a1480e 100644 --- a/sys/mips/cavium/octeon_machdep.c +++ b/sys/mips/cavium/octeon_machdep.c @@ -286,6 +286,18 @@ octeon_memory_init(void) if (addr == -1) break; + /* + * The SDK needs to be able to easily map any memory that might + * come to it e.g. in the form of an mbuf. Because on !n64 we + * can't direct-map some addresses and we don't want to manage + * temporary mappings within the SDK, don't feed memory that + * can't be direct-mapped to the kernel. + */ +#if !defined(__mips_n64) + if (!MIPS_DIRECT_MAPPABLE(addr + (1 << 20) - 1)) + continue; +#endif + physmem += btoc(1 << 20); if (i > 0 && phys_avail[i - 1] == addr) { |