Also the page tables mapped my the boot loader must be accessible
to userland, as these tables might persist until the end. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12153 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004, Axel Dörfler, [email protected].
|
* Copyright 2004-2005, Axel Dörfler, [email protected].
|
||||||
* Based on code written by Travis Geiselbrecht for NewOS.
|
* Based on code written by Travis Geiselbrecht for NewOS.
|
||||||
*
|
*
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
@@ -57,8 +57,9 @@ struct extended_memory {
|
|||||||
uint32 type;
|
uint32 type;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 kDefaultPageFlags = 0x03; // present, R/W
|
static const uint32 kDefaultPageFlags = 0x03; // present, R/W
|
||||||
static const size_t kMaxKernelSize = 0x100000; // 1 MB for the kernel
|
static const uint32 kDefaultPageTableFlags = 0x07; // present, user, R/W
|
||||||
|
static const size_t kMaxKernelSize = 0x100000; // 1 MB for the kernel
|
||||||
|
|
||||||
// working page directory and page table
|
// working page directory and page table
|
||||||
static uint32 *sPageDirectory = 0;
|
static uint32 *sPageDirectory = 0;
|
||||||
@@ -122,7 +123,7 @@ add_page_table(addr_t base)
|
|||||||
sPageTable[i] = 0;
|
sPageTable[i] = 0;
|
||||||
|
|
||||||
// put the new page table into the page directory
|
// put the new page table into the page directory
|
||||||
sPageDirectory[base/(4*1024*1024)] = (uint32)sPageTable | kDefaultPageFlags;
|
sPageDirectory[base/(4*1024*1024)] = (uint32)sPageTable | kDefaultPageTableFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user