1/**
2 * \file
3 * \brief Define generics for arch specific definitions
4 */
5
6/*
7 * Copyright (c) 2010, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#ifndef ARCH_X86_32_BARRELFISH_KPI_PAGING_H
16#define ARCH_X86_32_BARRELFISH_KPI_PAGING_H
17
18#include <target/x86_32/barrelfish_kpi/paging_target.h>
19
20// A number of configuration assertions that have to hold
21#if !defined(CONFIG_PAE) && defined(CONFIG_NXE)
22#       error NXE is only supported with PAE!
23#endif
24
25/**
26 * Information about page sizes
27 */
28#define BASE_PAGE_BITS      X86_32_BASE_PAGE_BITS
29#define BASE_PAGE_SIZE      X86_32_BASE_PAGE_SIZE
30#define BASE_PAGE_MASK      X86_32_BASE_PAGE_MASK
31#define BASE_PAGE_OFFSET    X86_32_BASE_PAGE_OFFSET
32
33#define LARGE_PAGE_BITS      X86_32_LARGE_PAGE_BITS
34#define LARGE_PAGE_SIZE      X86_32_LARGE_PAGE_SIZE
35#define LARGE_PAGE_MASK      X86_32_LARGE_PAGE_MASK
36#define LARGE_PAGE_OFFSET    X86_32_LARGE_PAGE_OFFSET
37
38/**
39 * Bits within the various page directories and tables.
40 */
41#define PTABLE_EXECUTE_DISABLE  X86_32_PTABLE_EXECUTE_DISABLE
42#define PTABLE_GLOBAL_PAGE      X86_32_PTABLE_GLOBAL_PAGE
43#define PTABLE_ATTR_INDEX       X86_32_PTABLE_ATTR_INDEX
44#define PTABLE_DIRTY            X86_32_PTABLE_DIRTY
45#define PTABLE_ACCESSED         X86_32_PTABLE_ACCESSED
46#define PTABLE_CACHE_DISABLED   X86_32_PTABLE_CACHE_DISABLED
47#define PTABLE_WRITE_THROUGH    X86_32_PTABLE_WRITE_THROUGH
48#define PTABLE_USER_SUPERVISOR  X86_32_PTABLE_USER_SUPERVISOR
49#define PTABLE_READ_WRITE       X86_32_PTABLE_READ_WRITE
50#define PTABLE_PRESENT          X86_32_PTABLE_PRESENT
51
52#define PTABLE_SIZE             X86_32_PTABLE_SIZE
53#define PTABLE_MASK             X86_32_PTABLE_MASK
54#define PTABLE_CLEAR            X86_32_PTABLE_CLEAR
55
56#define PTABLE_ACCESS_DEFAULT   X86_32_PTABLE_ACCESS_DEFAULT
57#define PTABLE_ACCESS_READONLY  X86_32_PTABLE_ACCESS_READONLY
58
59#define PTABLE_ENTRY_SIZE       X86_32_PTABLE_ENTRY_SIZE
60
61#endif // ARCH_X86_32_BARRELFISH_KPI_PAGING_H
62