* Added area creation "lock" constant B_32_BIT_MEMORY for physically
contiguous memory < 4 GB. * vm_create_anonymous_area(): Implemented support for B_LOMEM and B_32_BIT_MEMORY. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37200 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
02507604e7
commit
be87d0a03e
@ -68,7 +68,8 @@ typedef struct area_info {
|
|||||||
#define B_LAZY_LOCK 1
|
#define B_LAZY_LOCK 1
|
||||||
#define B_FULL_LOCK 2
|
#define B_FULL_LOCK 2
|
||||||
#define B_CONTIGUOUS 3
|
#define B_CONTIGUOUS 3
|
||||||
#define B_LOMEM 4
|
#define B_LOMEM 4 /* B_CONTIGUOUS, < 16 MB physical address */
|
||||||
|
#define B_32_BIT_MEMORY 5 /* B_CONTIGUOUS, < 4 GB physical address */
|
||||||
|
|
||||||
/* address spec for create_area(), and clone_area() */
|
/* address spec for create_area(), and clone_area() */
|
||||||
#define B_ANY_ADDRESS 0
|
#define B_ANY_ADDRESS 0
|
||||||
|
@ -1101,6 +1101,7 @@ vm_create_anonymous_area(team_id team, const char *name, addr_t size,
|
|||||||
wiring = B_CONTIGUOUS;
|
wiring = B_CONTIGUOUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
physical_address_restrictions stackPhysicalRestrictions;
|
||||||
bool doReserveMemory = false;
|
bool doReserveMemory = false;
|
||||||
switch (wiring) {
|
switch (wiring) {
|
||||||
case B_NO_LOCK:
|
case B_NO_LOCK:
|
||||||
@ -1113,11 +1114,25 @@ vm_create_anonymous_area(team_id team, const char *name, addr_t size,
|
|||||||
case B_ALREADY_WIRED:
|
case B_ALREADY_WIRED:
|
||||||
break;
|
break;
|
||||||
case B_LOMEM:
|
case B_LOMEM:
|
||||||
//case B_SLOWMEM:
|
{
|
||||||
dprintf("B_LOMEM/SLOWMEM is not yet supported!\n");
|
stackPhysicalRestrictions = *physicalAddressRestrictions;
|
||||||
wiring = B_FULL_LOCK;
|
stackPhysicalRestrictions.high_address = 16 * 1024 * 1024;
|
||||||
|
physicalAddressRestrictions = &stackPhysicalRestrictions;
|
||||||
|
wiring = B_CONTIGUOUS;
|
||||||
doReserveMemory = true;
|
doReserveMemory = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case B_32_BIT_MEMORY:
|
||||||
|
{
|
||||||
|
#if B_HAIKU_PHYSICAL_BITS > 32
|
||||||
|
stackPhysicalRestrictions = *physicalAddressRestrictions;
|
||||||
|
stackPhysicalRestrictions.high_address = 0x100000000LL;
|
||||||
|
physicalAddressRestrictions = &stackPhysicalRestrictions;
|
||||||
|
#endif
|
||||||
|
wiring = B_CONTIGUOUS;
|
||||||
|
doReserveMemory = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user