summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-09-09 18:11:59 +0000
committerjhb <jhb@FreeBSD.org>2013-09-09 18:11:59 +0000
commit04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4 (patch)
tree42d2ff2e91fcca16534848427856c6243db2126a /sys/i386/ibcs2
parent2a48fed0b32ceb1567f3b7e33835bacfdf3e0971 (diff)
downloadFreeBSD-src-04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4.zip
FreeBSD-src-04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4.tar.gz
Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use
an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib)
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r--sys/i386/ibcs2/imgact_coff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index 1e33536..a7543d7 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -128,7 +128,7 @@ load_coff_section(struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset,
if (map_len != 0) {
error = vm_map_find(&vmspace->vm_map, NULL, 0, &map_addr,
- map_len, VMFS_NO_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0);
+ map_len, 0, VMFS_NO_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0);
if (error)
return (vm_mmap_to_errno(error));
}
@@ -473,7 +473,7 @@ exec_coff_imgact(imgp)
DPRINTF(("imgact: error = %d\n", error));
vm_map_find(&vmspace->vm_map, NULL, 0,
- (vm_offset_t *)&hole, PAGE_SIZE, VMFS_NO_SPACE,
+ (vm_offset_t *)&hole, PAGE_SIZE, 0, VMFS_NO_SPACE,
VM_PROT_ALL, VM_PROT_ALL, 0);
DPRINTF(("IBCS2: start vm_dsize = 0x%x, vm_daddr = 0x%p end = 0x%p\n",
ctob(vmspace->vm_dsize), vmspace->vm_daddr,
OpenPOWER on IntegriCloud