11 #include <linux/module.h>
12 #include <linux/signal.h>
13 #include <linux/sched.h>
16 #include <linux/kernel.h>
17 #include <linux/string.h>
18 #include <linux/types.h>
23 #include <asm/setup.h>
24 #include <asm/uaccess.h>
26 #include <asm/pgalloc.h>
27 #include <asm/machdep.h>
33 #include <asm/sections.h>
48 #define INIT_MAPPED_SIZE (4UL<<20)
61 nocache_page(ptablep);
79 last = (
unsigned long)kernel_pg_dir;
88 last_pgtable = (
pmd_t *)last;
90 printk(
"kernel_ptr_init: %p\n", last_pgtable);
95 if (((
unsigned long)last_pgtable & ~
PAGE_MASK) == 0) {
101 nocache_page(last_pgtable);
109 #define PTRTREESIZE (256*1024)
110 #define ROOTTREESIZE (32*1024*1024)
111 unsigned long physaddr, virtaddr,
size;
126 if (!(virtaddr & (PTRTREESIZE-1)))
132 if (!(virtaddr & (ROOTTREESIZE-1)) &&
133 size >= ROOTTREESIZE) {
135 printk (
"[very early term]");
145 pmd_dir = kernel_ptr_table();
147 printk (
"[new pointer %p]", pmd_dir);
166 pte_dir = (
pte_t *)zero_pgtable;
171 for (i = 1; i < 64; physaddr +=
PAGE_SIZE, i++)
172 pte_val(*pte_dir++) = physaddr;
181 pte_dir = kernel_page_table();
208 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
209 unsigned long min_addr, max_addr;
223 for (i = 0; i < 16; i++)
231 printk(
"Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
233 printk(
"Fix your bootloader or use a memfile to make use of this area!\n");
236 (m68k_num_memory - i) *
sizeof(
struct mem_info));
296 printk (
"before free_area_init\n");