···72config ARCH_MTD_XIP73 bool7475+config VECTORS_BASE76+ hex77+ default 0xffff0000 if MMU78+ default DRAM_BASE if REMAP_VECTORS_TO_RAM79+ default 0x0000000080+ help81+ The base address of exception vectors.82+83source "init/Kconfig"8485menu "System Type"
+44
arch/arm/Kconfig-nommu
···00000000000000000000000000000000000000000000
···1+#2+# Kconfig for uClinux(non-paged MM) depend configurations3+# Hyok S. Choi <hyok.choi@samsung.com>4+# 5+6+config SET_MEM_PARAM7+ bool "Set flash/sdram size and base addr"8+ help9+ Say Y to manually set the base addresses and sizes.10+ otherwise, the default values are assigned.11+12+config DRAM_BASE13+ hex '(S)DRAM Base Address' if SET_MEM_PARAM14+ default 0x0080000015+16+config DRAM_SIZE17+ hex '(S)DRAM SIZE' if SET_MEM_PARAM18+ default 0x0080000019+20+config FLASH_MEM_BASE21+ hex 'FLASH Base Address' if SET_MEM_PARAM22+ default 0x0040000023+24+config FLASH_SIZE25+ hex 'FLASH Size' if SET_MEM_PARAM26+ default 0x0040000027+28+config REMAP_VECTORS_TO_RAM29+ bool 'Install vectors to the begining of RAM' if DRAM_BASE30+ depends on DRAM_BASE31+ help32+ The kernel needs to change the hardware exception vectors.33+ In nommu mode, the hardware exception vectors are normally34+ placed at address 0x00000000. However, this region may be35+ occupied by read-only memory depending on H/W design.36+37+ If the region contains read-write memory, say 'n' here.38+39+ If your CPU provides a remap facility which allows the exception40+ vectors to be mapped to writable memory, say 'n' here.41+42+ Otherwise, say 'y' here. In this case, the kernel will require43+ external support to redirect the hardware exception vectors to44+ the writable versions located at DRAM_BASE.
+7-2
arch/arm/Makefile
···20# Select a platform tht is kept up-to-date21KBUILD_DEFCONFIG := versatile_defconfig220000023ifeq ($(CONFIG_FRAME_POINTER),y)24CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog25endif···78CHECKFLAGS += -D__arm__7980#Default value81-head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o82textofs-y := 0x000080008384 machine-$(CONFIG_ARCH_RPC) := rpc···138MACHINE :=139endif140141-export TEXT_OFFSET GZFLAGS142143# Do we have FASTFPE?144FASTFPE :=arch/arm/fastfpe
···20# Select a platform tht is kept up-to-date21KBUILD_DEFCONFIG := versatile_defconfig2223+# defines filename extension depending memory manement type.24+ifeq ($(CONFIG_MMU),)25+MMUEXT := -nommu26+endif27+28ifeq ($(CONFIG_FRAME_POINTER),y)29CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog30endif···73CHECKFLAGS += -D__arm__7475#Default value76+head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o77textofs-y := 0x000080007879 machine-$(CONFIG_ARCH_RPC) := rpc···133MACHINE :=134endif135136+export TEXT_OFFSET GZFLAGS MMUEXT137138# Do we have FASTFPE?139FASTFPE :=arch/arm/fastfpe
+106
arch/arm/boot/compressed/head.S
···2 * linux/arch/arm/boot/compressed/head.S3 *4 * Copyright (C) 1996-2002 Russell King05 *6 * This program is free software; you can redistribute it and/or modify7 * it under the terms of the GNU General Public License version 2 as···321cache_on: mov r3, #8 @ cache_on function322 b call_cache_fn32300000000000000000000000000000000000000000000000000000000324__setup_mmu: sub r3, r4, #16384 @ Page directory size325 bic r3, r3, #0xff @ Align the pointer326 bic r3, r3, #0x3f00···553 b __armv4_mmu_cache_off554 mov pc, lr555000000000000556 .word 0x00007000 @ ARM7 IDs557 .word 0x0000f000558 mov pc, lr···631cache_off: mov r3, #12 @ cache_off function632 b call_cache_fn633000000000000000000634__armv4_mmu_cache_off:635 mrc p15, 0, r0, c1, c0636 bic r0, r0, #0x000d···688 mov r3, #16689 b call_cache_fn690000000000000000000691__armv6_mmu_cache_flush:692 mov r1, #0693 mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D···743 mov pc, lr744745__armv3_mmu_cache_flush:0746 mov r1, #0747 mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3748 mov pc, lr
···7 * it under the terms of the GNU General Public License version 2 as8 * published by the Free Software Foundation.9 */10-#define KERN_SIGRETURN_CODE 0xffff05001112extern const unsigned long sigreturn_codes[7];
···7 * it under the terms of the GNU General Public License version 2 as8 * published by the Free Software Foundation.9 */10+#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)1112extern const unsigned long sigreturn_codes[7];
+5-4
arch/arm/kernel/traps.c
···688689void __init trap_init(void)690{0691 extern char __stubs_start[], __stubs_end[];692 extern char __vectors_start[], __vectors_end[];693 extern char __kuser_helper_start[], __kuser_helper_end[];···699 * into the vector page, mapped at 0xffff0000, and ensure these700 * are visible to the instruction stream.701 */702- memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start);703- memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start);704- memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz);705706 /*707 * Copy signal return handlers into the vector page, and···710 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,711 sizeof(sigreturn_codes));712713- flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE);714 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);715}
···688689void __init trap_init(void)690{691+ unsigned long vectors = CONFIG_VECTORS_BASE;692 extern char __stubs_start[], __stubs_end[];693 extern char __vectors_start[], __vectors_end[];694 extern char __kuser_helper_start[], __kuser_helper_end[];···698 * into the vector page, mapped at 0xffff0000, and ensure these699 * are visible to the instruction stream.700 */701+ memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);702+ memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start);703+ memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);704705 /*706 * Copy signal return handlers into the vector page, and···709 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,710 sizeof(sigreturn_codes));711712+ flush_icache_range(vectors, vectors + PAGE_SIZE);713 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);714}