mmu.c (ff69a4c855066592f9e293cff8f54813614dd544) mmu.c (19accfd373847ac3d10623c5d20f948846299741)
1/*
2 * linux/arch/arm/mm/mmu.c
3 *
4 * Copyright (C) 1995-2005 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 1137 unchanged lines hidden (view full) ---

1146
1147/*
1148 * Set up the device mappings. Since we clear out the page tables for all
1149 * mappings above VMALLOC_START, we will remove any debug device mappings.
1150 * This means you have to be careful how you debug this function, or any
1151 * called function. This means you can't use any function or debugging
1152 * method which may touch any device, otherwise the kernel _will_ crash.
1153 */
1/*
2 * linux/arch/arm/mm/mmu.c
3 *
4 * Copyright (C) 1995-2005 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 1137 unchanged lines hidden (view full) ---

1146
1147/*
1148 * Set up the device mappings. Since we clear out the page tables for all
1149 * mappings above VMALLOC_START, we will remove any debug device mappings.
1150 * This means you have to be careful how you debug this function, or any
1151 * called function. This means you can't use any function or debugging
1152 * method which may touch any device, otherwise the kernel _will_ crash.
1153 */
1154static void __init devicemaps_init(const struct machine_desc *mdesc)
1154static void __init devicemaps_init(struct machine_desc *mdesc)
1155{
1156 struct map_desc map;
1157 unsigned long addr;
1158 void *vectors;
1159
1160 /*
1161 * Allocate the vector page early.
1162 */
1155{
1156 struct map_desc map;
1157 unsigned long addr;
1158 void *vectors;
1159
1160 /*
1161 * Allocate the vector page early.
1162 */
1163 vectors = early_alloc(PAGE_SIZE);
1163 vectors = early_alloc(PAGE_SIZE * 2);
1164
1165 early_trap_init(vectors);
1166
1167 for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
1168 pmd_clear(pmd_off_k(addr));
1169
1170 /*
1171 * Map the kernel if it is XIP.

--- 33 unchanged lines hidden (view full) ---

1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1206 map.virtual = 0xffff0000;
1207 map.length = PAGE_SIZE;
1208 map.type = MT_HIGH_VECTORS;
1209 create_mapping(&map);
1210
1211 if (!vectors_high()) {
1212 map.virtual = 0;
1164
1165 early_trap_init(vectors);
1166
1167 for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
1168 pmd_clear(pmd_off_k(addr));
1169
1170 /*
1171 * Map the kernel if it is XIP.

--- 33 unchanged lines hidden (view full) ---

1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1206 map.virtual = 0xffff0000;
1207 map.length = PAGE_SIZE;
1208 map.type = MT_HIGH_VECTORS;
1209 create_mapping(&map);
1210
1211 if (!vectors_high()) {
1212 map.virtual = 0;
1213 map.length = PAGE_SIZE * 2;
1213 map.type = MT_LOW_VECTORS;
1214 create_mapping(&map);
1215 }
1216
1214 map.type = MT_LOW_VECTORS;
1215 create_mapping(&map);
1216 }
1217
1218 /* Now create a kernel read-only mapping */
1219 map.pfn += 1;
1220 map.virtual = 0xffff0000 + PAGE_SIZE;
1221 map.length = PAGE_SIZE;
1222 map.type = MT_LOW_VECTORS;
1223 create_mapping(&map);
1224
1217 /*
1218 * Ask the machine support to map in the statically mapped devices.
1219 */
1220 if (mdesc->map_io)
1221 mdesc->map_io();
1222 else
1223 debug_ll_io_init();
1224 fill_pmd_gaps();

--- 42 unchanged lines hidden (view full) ---

1267 create_mapping(&map);
1268 }
1269}
1270
1271/*
1272 * paging_init() sets up the page tables, initialises the zone memory
1273 * maps, and sets up the zero page, bad page and bad page tables.
1274 */
1225 /*
1226 * Ask the machine support to map in the statically mapped devices.
1227 */
1228 if (mdesc->map_io)
1229 mdesc->map_io();
1230 else
1231 debug_ll_io_init();
1232 fill_pmd_gaps();

--- 42 unchanged lines hidden (view full) ---

1275 create_mapping(&map);
1276 }
1277}
1278
1279/*
1280 * paging_init() sets up the page tables, initialises the zone memory
1281 * maps, and sets up the zero page, bad page and bad page tables.
1282 */
1275void __init paging_init(const struct machine_desc *mdesc)
1283void __init paging_init(struct machine_desc *mdesc)
1276{
1277 void *zero_page;
1278
1279 memblock_set_current_limit(arm_lowmem_limit);
1280
1281 build_mem_type_table();
1282 prepare_page_table();
1283 map_lowmem();

--- 15 unchanged lines hidden ---
1284{
1285 void *zero_page;
1286
1287 memblock_set_current_limit(arm_lowmem_limit);
1288
1289 build_mem_type_table();
1290 prepare_page_table();
1291 map_lowmem();

--- 15 unchanged lines hidden ---