diff options
Diffstat (limited to 'arch/arm/kernel/head.S')
-rw-r--r-- | arch/arm/kernel/head.S | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index bda0748ffb00..d994561816a1 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -22,30 +22,31 @@ | |||
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | 24 | ||
25 | #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) | 25 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) |
26 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | * swapper_pg_dir is the virtual address of the initial page table. | 29 | * swapper_pg_dir is the virtual address of the initial page table. |
29 | * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must | 30 | * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must |
30 | * make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect | 31 | * make sure that KERNEL_RAM_VADDR is correctly set. Currently, we expect |
31 | * the least significant 16 bits to be 0x8000, but we could probably | 32 | * the least significant 16 bits to be 0x8000, but we could probably |
32 | * relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000. | 33 | * relax this restriction to KERNEL_RAM_VADDR >= PAGE_OFFSET + 0x4000. |
33 | */ | 34 | */ |
34 | #if (KERNEL_RAM_ADDR & 0xffff) != 0x8000 | 35 | #if (KERNEL_RAM_VADDR & 0xffff) != 0x8000 |
35 | #error KERNEL_RAM_ADDR must start at 0xXXXX8000 | 36 | #error KERNEL_RAM_VADDR must start at 0xXXXX8000 |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | .globl swapper_pg_dir | 39 | .globl swapper_pg_dir |
39 | .equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x4000 | 40 | .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000 |
40 | 41 | ||
41 | .macro pgtbl, rd | 42 | .macro pgtbl, rd |
42 | ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000)) | 43 | ldr \rd, =(KERNEL_RAM_PADDR - 0x4000) |
43 | .endm | 44 | .endm |
44 | 45 | ||
45 | #ifdef CONFIG_XIP_KERNEL | 46 | #ifdef CONFIG_XIP_KERNEL |
46 | #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) | 47 | #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) |
47 | #else | 48 | #else |
48 | #define TEXTADDR KERNEL_RAM_ADDR | 49 | #define TEXTADDR KERNEL_RAM_VADDR |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | /* | 52 | /* |