···11#ifndef _ASM_X86_PGTABLE_32_H22#define _ASM_X86_PGTABLE_32_H3344+#include <asm/pgtable_32_types.h>4556/*67 * The Linux memory management assumes a three-level page table setup. On···34333534extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);36353737-/*3838- * The Linux x86 paging architecture is 'compile-time dual-mode', it3939- * implements both the traditional 2-level x86 page tables and the4040- * newer 3-level PAE-mode page tables.4141- */4242-#ifdef CONFIG_X86_PAE4343-# include <asm/pgtable-3level_types.h>4444-# define PMD_SIZE (1UL << PMD_SHIFT)4545-# define PMD_MASK (~(PMD_SIZE - 1))4646-#else4747-# include <asm/pgtable-2level_types.h>4848-#endif4949-5050-#define PGDIR_SIZE (1UL << PGDIR_SHIFT)5151-#define PGDIR_MASK (~(PGDIR_SIZE - 1))5252-5353-/* Just any arbitrary offset to the start of the vmalloc VM area: the5454- * current 8MB value just means that there will be a 8MB "hole" after the5555- * physical memory until the kernel virtual memory starts. That means that5656- * any out-of-bounds memory accesses will hopefully be caught.5757- * The vmalloc() routines leaves a hole of 4kB between each vmalloced5858- * area for the same reason. ;)5959- */6060-#define VMALLOC_OFFSET (8 * 1024 * 1024)6161-#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)6262-#ifdef CONFIG_X86_PAE6363-#define LAST_PKMAP 5126464-#else6565-#define LAST_PKMAP 10246666-#endif6767-6868-#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \6969- & PMD_MASK)7070-7171-#ifdef CONFIG_HIGHMEM7272-# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)7373-#else7474-# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)7575-#endif7676-7777-#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)78367937/*8038 * Define this if things work differently on an i386 and an i486:
+46
arch/x86/include/asm/pgtable_32_types.h
···11+#ifndef _ASM_X86_PGTABLE_32_DEFS_H22+#define _ASM_X86_PGTABLE_32_DEFS_H33+44+/*55+ * The Linux x86 paging architecture is 'compile-time dual-mode', it66+ * implements both the traditional 2-level x86 page tables and the77+ * newer 3-level PAE-mode page tables.88+ */99+#ifdef CONFIG_X86_PAE1010+# include <asm/pgtable-3level_types.h>1111+# define PMD_SIZE (1UL << PMD_SHIFT)1212+# define PMD_MASK (~(PMD_SIZE - 1))1313+#else1414+# include <asm/pgtable-2level_types.h>1515+#endif1616+1717+#define PGDIR_SIZE (1UL << PGDIR_SHIFT)1818+#define PGDIR_MASK (~(PGDIR_SIZE - 1))1919+2020+/* Just any arbitrary offset to the start of the vmalloc VM area: the2121+ * current 8MB value just means that there will be a 8MB "hole" after the2222+ * physical memory until the kernel virtual memory starts. That means that2323+ * any out-of-bounds memory accesses will hopefully be caught.2424+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced2525+ * area for the same reason. ;)2626+ */2727+#define VMALLOC_OFFSET (8 * 1024 * 1024)2828+#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)2929+#ifdef CONFIG_X86_PAE3030+#define LAST_PKMAP 5123131+#else3232+#define LAST_PKMAP 10243333+#endif3434+3535+#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \3636+ & PMD_MASK)3737+3838+#ifdef CONFIG_HIGHMEM3939+# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)4040+#else4141+# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)4242+#endif4343+4444+#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)4545+4646+#endif /* _ASM_X86_PGTABLE_32_DEFS_H */