Now correctly handles B_BASE_ADDRESS, and probably B_ANY_KERNEL_BLOCK_ADDRESS,
too. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+11
-9
@@ -253,6 +253,8 @@ find_and_insert_region_slot(vm_virtual_map *map, addr_t start, addr_t size, addr
|
|||||||
switch (addr_type) {
|
switch (addr_type) {
|
||||||
case B_ANY_ADDRESS:
|
case B_ANY_ADDRESS:
|
||||||
case B_ANY_KERNEL_ADDRESS:
|
case B_ANY_KERNEL_ADDRESS:
|
||||||
|
case B_ANY_KERNEL_BLOCK_ADDRESS:
|
||||||
|
case B_BASE_ADDRESS:
|
||||||
// find a hole big enough for a new region
|
// find a hole big enough for a new region
|
||||||
if (!last_r) {
|
if (!last_r) {
|
||||||
// see if we can build it at the beginning of the virtual map
|
// see if we can build it at the beginning of the virtual map
|
||||||
@@ -428,11 +430,13 @@ map_backing_store(vm_address_space *aspace, vm_store *store, void **vaddr,
|
|||||||
switch (addr_type) {
|
switch (addr_type) {
|
||||||
case B_EXACT_ADDRESS:
|
case B_EXACT_ADDRESS:
|
||||||
case B_EXACT_KERNEL_ADDRESS:
|
case B_EXACT_KERNEL_ADDRESS:
|
||||||
|
case B_BASE_ADDRESS:
|
||||||
search_addr = (addr_t)*vaddr;
|
search_addr = (addr_t)*vaddr;
|
||||||
search_end = (addr_t)*vaddr + size;
|
search_end = (addr_t)*vaddr + size;
|
||||||
break;
|
break;
|
||||||
case B_ANY_ADDRESS:
|
case B_ANY_ADDRESS:
|
||||||
case B_ANY_KERNEL_ADDRESS:
|
case B_ANY_KERNEL_ADDRESS:
|
||||||
|
case B_ANY_KERNEL_BLOCK_ADDRESS:
|
||||||
search_addr = aspace->virtual_map.base;
|
search_addr = aspace->virtual_map.base;
|
||||||
search_end = aspace->virtual_map.base + (aspace->virtual_map.size - 1);
|
search_end = aspace->virtual_map.base + (aspace->virtual_map.size - 1);
|
||||||
break;
|
break;
|
||||||
@@ -503,14 +507,9 @@ vm_create_anonymous_region(aspace_id aid, const char *name, void **address,
|
|||||||
switch (addr_type) {
|
switch (addr_type) {
|
||||||
case B_ANY_ADDRESS:
|
case B_ANY_ADDRESS:
|
||||||
case B_EXACT_ADDRESS:
|
case B_EXACT_ADDRESS:
|
||||||
//case B_BASE_ADDRESS:
|
|
||||||
case B_ANY_KERNEL_ADDRESS:
|
|
||||||
case B_ANY_KERNEL_BLOCK_ADDRESS:
|
|
||||||
case B_EXACT_KERNEL_ADDRESS:
|
|
||||||
break;
|
|
||||||
case B_BASE_ADDRESS:
|
case B_BASE_ADDRESS:
|
||||||
dprintf("create_area: B_BASE_ADDRESS demanded (switch to B_ANY_ADDRESS)!\n");
|
case B_ANY_KERNEL_ADDRESS:
|
||||||
addr_type = B_ANY_ADDRESS;
|
case B_EXACT_KERNEL_ADDRESS:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -525,7 +524,8 @@ vm_create_anonymous_region(aspace_id aid, const char *name, void **address,
|
|||||||
case B_ALREADY_WIRED:
|
case B_ALREADY_WIRED:
|
||||||
break;
|
break;
|
||||||
case B_LOMEM:
|
case B_LOMEM:
|
||||||
dprintf("B_LOMEM is not yet supported!\n");
|
//case B_SLOWMEM:
|
||||||
|
dprintf("B_LOMEM/SLOWMEM is not yet supported!\n");
|
||||||
wiring = B_FULL_LOCK;
|
wiring = B_FULL_LOCK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -673,7 +673,9 @@ vm_create_anonymous_region(aspace_id aid, const char *name, void **address,
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
region_id vm_map_physical_memory(aspace_id aid, const char *name, void **_address,
|
|
||||||
|
region_id
|
||||||
|
vm_map_physical_memory(aspace_id aid, const char *name, void **_address,
|
||||||
int addr_type, addr_t size, int lock, addr_t phys_addr)
|
int addr_type, addr_t size, int lock, addr_t phys_addr)
|
||||||
{
|
{
|
||||||
vm_region *region;
|
vm_region *region;
|
||||||
|
|||||||
Reference in New Issue
Block a user