diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-13 19:12:41 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-13 19:12:41 +0200 |
commit | 3b36daa2bb8c0f4169455baf829b9695b520c5fc (patch) | |
tree | 9da4980fe24b4464e4e8d4c9698afcd1b9549c0e /sys/src/9/bcm/mmu.c | |
parent | 157d7ebdbd7479b271e7b1df744b2dfc6b5816e9 (diff) |
bcm, bcm64: preserve memsize across reboots, avoid trashing atags while parsing cmdline
we override atag memory on reboot, so preserve
the memsize learned from atag as *maxmem plan9
variable. the global memsize variable is not
needed anymore.
avoid trashing the following atag when zero
terminating the cmdline string.
zero memory after plan9.ini variables.
Diffstat (limited to 'sys/src/9/bcm/mmu.c')
-rw-r--r-- | sys/src/9/bcm/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/bcm/mmu.c b/sys/src/9/bcm/mmu.c index 9d2e3709c..614a6fb4f 100644 --- a/sys/src/9/bcm/mmu.c +++ b/sys/src/9/bcm/mmu.c @@ -304,8 +304,8 @@ mmuuncache(void* v, usize size) uintptr cankaddr(uintptr pa) { - if(pa < PHYSDRAM + memsize) /* assumes PHYSDRAM is 0 */ - return PHYSDRAM + memsize - pa; + if(pa < PHYSDRAM+soc.dramsize) + return PHYSDRAM+soc.dramsize - pa; return 0; } |