kernel/arm/paging: zero out the bottom portion of the new pgdir
Change-Id: I899f288f451dd4c413403cd0e14a855f68355050 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4866 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com> Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
parent
933430df22
commit
b57ffe4006
@ -65,11 +65,10 @@ ARMPagingStructures32Bit::Init(page_directory_entry* virtualPageDir,
|
|||||||
pgdir_virt = virtualPageDir;
|
pgdir_virt = virtualPageDir;
|
||||||
pgdir_phys = physicalPageDir;
|
pgdir_phys = physicalPageDir;
|
||||||
|
|
||||||
#if 0 // IRA: handle UART better; identity map of DEVICE_BASE from loader gets wiped here
|
|
||||||
// zero out the bottom portion of the new pgdir
|
// zero out the bottom portion of the new pgdir
|
||||||
memset(pgdir_virt + FIRST_USER_PGDIR_ENT, 0,
|
memset(pgdir_virt + FIRST_USER_PGDIR_ENT, 0,
|
||||||
NUM_USER_PGDIR_ENTS * sizeof(page_directory_entry));
|
NUM_USER_PGDIR_ENTS * sizeof(page_directory_entry));
|
||||||
#endif
|
|
||||||
// insert this new map into the map list
|
// insert this new map into the map list
|
||||||
{
|
{
|
||||||
int state = disable_interrupts();
|
int state = disable_interrupts();
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
#define FIRST_USER_PGDIR_ENT (VADDR_TO_PDENT(USER_BASE))
|
#define FIRST_USER_PGDIR_ENT (VADDR_TO_PDENT(USER_BASE))
|
||||||
#define NUM_USER_PGDIR_ENTS (VADDR_TO_PDENT(ROUNDUP(USER_SIZE, \
|
#define NUM_USER_PGDIR_ENTS (VADDR_TO_PDENT(ROUNDUP(USER_SIZE, \
|
||||||
B_PAGE_SIZE * 1024)))
|
B_PAGE_SIZE * ARM_MMU_L2_COARSE_ENTRY_COUNT)))
|
||||||
#define FIRST_KERNEL_PGDIR_ENT (VADDR_TO_PDENT(KERNEL_BASE))
|
#define FIRST_KERNEL_PGDIR_ENT (VADDR_TO_PDENT(KERNEL_BASE))
|
||||||
#define NUM_KERNEL_PGDIR_ENTS (VADDR_TO_PDENT(KERNEL_SIZE))
|
#define NUM_KERNEL_PGDIR_ENTS (VADDR_TO_PDENT(KERNEL_SIZE))
|
||||||
|
|
||||||
|
|
||||||
static const size_t kPageTableAlignment = 1024 * B_PAGE_SIZE;
|
static const size_t kPageTableAlignment = ARM_MMU_L2_COARSE_ENTRY_COUNT * B_PAGE_SIZE;
|
||||||
|
|
||||||
|
|
||||||
typedef uint32 page_table_entry;
|
typedef uint32 page_table_entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user