1/*
2 * Copyright 2010, Ithamar R. Adema, ithamar.adema@team-embedded.nl
3 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Copyright 2005-2009, Axel D��rfler, axeld@pinc-software.de.
5 * Distributed under the terms of the MIT License.
6 *
7 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
8 * Distributed under the terms of the NewOS License.
9 */
10#ifndef _KERNEL_ARCH_ARM_PAGING_32_BIT_PAGING_H
11#define _KERNEL_ARCH_ARM_PAGING_32_BIT_PAGING_H
12
13
14#include <SupportDefs.h>
15
16#include <int.h>
17#include <kernel.h>
18
19#include <arm_mmu.h>
20
21
22#define FIRST_USER_PGDIR_ENT    (VADDR_TO_PDENT(USER_BASE))
23#define NUM_USER_PGDIR_ENTS     (VADDR_TO_PDENT(ROUNDUP(USER_SIZE, \
24					B_PAGE_SIZE * ARM_MMU_L2_COARSE_ENTRY_COUNT)))
25#define FIRST_KERNEL_PGDIR_ENT  (VADDR_TO_PDENT(KERNEL_BASE))
26#define NUM_KERNEL_PGDIR_ENTS   (VADDR_TO_PDENT(KERNEL_SIZE))
27
28
29static const size_t kPageTableAlignment = ARM_MMU_L2_COARSE_ENTRY_COUNT * B_PAGE_SIZE;
30
31
32typedef uint32 page_table_entry;
33typedef uint32 page_directory_entry;
34
35
36#endif	// _KERNEL_ARCH_ARM_PAGING_32_BIT_PAGING_H
37