summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-02-17 00:06:15 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-02-17 00:06:31 +0100
commit3ce2dbea6ba58768506165ec86b9658f28a13f70 (patch)
tree040d9d1b60c75c194f982bbb485edf9d742cd664
parent4887b6c76dad729c956e275f6b3f2b0996308125 (diff)
mach_vm_object_pages: Print a warning if the physical address is beyond 4GiB
vpi_offset is not currently large enough to store it.
-rw-r--r--vm/vm_debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm/vm_debug.c b/vm/vm_debug.c
index 43221cff..2dff2296 100644
--- a/vm/vm_debug.c
+++ b/vm/vm_debug.c
@@ -321,6 +321,8 @@ mach_vm_object_pages(
vm_page_info_state_t state = 0;
info->vpi_offset = p->offset;
+ if (p->phys_addr != (typeof(info->vpi_phys_addr)) p->phys_addr)
+ printf("warning: physical address overflow in mach_vm_object_pages!!");
info->vpi_phys_addr = p->phys_addr;
info->vpi_wire_count = p->wire_count;
info->vpi_page_lock = p->page_lock;