diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-06-06 14:43:24 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-06-06 14:43:24 +0200 |
commit | 21e4d88a51303bc41cc28aba77d8f65d7776e39e (patch) | |
tree | b271ba195089c9b24911f0d7fae9e9cbee748d07 /sys/src/9/pc64/mmu.c | |
parent | 5f3e72eb844582693e1b0bd4f73be59ab822531e (diff) |
pc, pc64: use 64-bit physical addresses for vmap() and upaalloc()
Diffstat (limited to 'sys/src/9/pc64/mmu.c')
-rw-r--r-- | sys/src/9/pc64/mmu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/src/9/pc64/mmu.c b/sys/src/9/pc64/mmu.c index 970d0f262..58663a9f1 100644 --- a/sys/src/9/pc64/mmu.c +++ b/sys/src/9/pc64/mmu.c @@ -579,14 +579,17 @@ kunmap(KMap *k) * synchronization is being done. */ void* -vmap(uintptr pa, int size) +vmap(uvlong pa, int size) { uintptr va; int o; - if(pa+size > VMAPSIZE) - return 0; + if(pa < BY2PG || size <= 0 || -pa < size || pa+size > VMAPSIZE){ + print("vmap pa=%llux size=%d pc=%#p\n", pa, size, getcallerpc(&pa)); + return nil; + } va = pa+VMAP; + /* * might be asking for less than a page. */ |