diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-02 00:32:46 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-02 00:32:46 +0100 |
commit | 2020190f945dbc264963abec22659df95cd61f04 (patch) | |
tree | b3e0817a3ee9d7ed0ab3438bcf9515b290cd7fc3 /sys/src/9/pc64 | |
parent | 153f96ebc6b8a155f2a619faa54cfe11163f75c2 (diff) |
pc, pc64: more sanity checking for lowraminit()
Diffstat (limited to 'sys/src/9/pc64')
-rw-r--r-- | sys/src/9/pc64/memory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/pc64/memory.c b/sys/src/9/pc64/memory.c index 27e01de64..a4ff047d6 100644 --- a/sys/src/9/pc64/memory.c +++ b/sys/src/9/pc64/memory.c @@ -386,6 +386,8 @@ lowraminit(void) x = PADDR(CPU0END); bda = (uchar*)KADDR(0x400); pa = ((bda[0x14]<<8)|bda[0x13])*KB; + if(pa > 640*KB) + pa = 640*KB; if(x < pa){ mapfree(&rmapram, x, pa-x); memset(KADDR(x), 0, pa-x); /* keep us honest */ |