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:
Axel Dörfler 2005-03-30 06:29:27 +00:00
parent 97d05e6652
commit 9602a1c9d6

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de.
* Based on code written by Travis Geiselbrecht for NewOS.
*
* Distributed under the terms of the MIT License.
@ -57,8 +57,9 @@ struct extended_memory {
uint32 type;
};
static const uint32 kDefaultPageFlags = 0x03; // present, R/W
static const size_t kMaxKernelSize = 0x100000; // 1 MB for the kernel
static const uint32 kDefaultPageFlags = 0x03; // present, R/W
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
static uint32 *sPageDirectory = 0;
@ -122,7 +123,7 @@ add_page_table(addr_t base)
sPageTable[i] = 0;
// 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;
}