aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-09 17:38:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-09 17:38:16 -0400
commitc61c48dfe00907007df3b87e4ed271a5c143bdda (patch)
tree6d26bd3a8b4aa3cf35cad35fa27d1e0afe715db3
parente30f4192456971623b40c97a027346b69457ef69 (diff)
parentb341d84c8ac5ecbf7aa0b3ccd0745d87e881953c (diff)
Merge tag 'xtensa-next-20130508' of git://github.com/czankel/xtensa-linux
Pull xtensa updates from Chris Zankel: "Support for the latest MMU architecture that allows for a larger accessible memory region, and various bug-fixes" * tag 'xtensa-next-20130508' of git://github.com/czankel/xtensa-linux: xtensa: Switch to asm-generic/linkage.h xtensa: fix redboot load address xtensa: ISS: fix timer_lock usage in rs_open xtensa: disable IRQs while IRQ handler is running xtensa: enable lockdep support xtensa: fix arch_irqs_disabled_flags implementation xtensa: add irq flags trace support xtensa: provide custom CALLER_ADDR* implementations xtensa: add stacktrace support xtensa: clean up stpill_registers xtensa: don't use a7 in simcalls xtensa: don't attempt to use unconfigured timers xtensa: provide default platform_pcibios_init implementation xtensa: remove KCORE_ELF again xtensa: document MMUv3 setup sequence xtensa: add MMU v3 support xtensa: fix ibreakenable register update xtensa: fix oprofile building as module
-rw-r--r--Documentation/xtensa/mmu.txt46
-rw-r--r--arch/xtensa/Kconfig57
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile1
-rw-r--r--arch/xtensa/boot/boot-elf/boot.lds.S64
-rw-r--r--arch/xtensa/boot/boot-elf/bootstrap.S101
-rw-r--r--arch/xtensa/boot/boot-redboot/boot.ld2
-rw-r--r--arch/xtensa/boot/boot-uboot/Makefile6
-rw-r--r--arch/xtensa/include/asm/Kbuild1
-rw-r--r--arch/xtensa/include/asm/ftrace.h34
-rw-r--r--arch/xtensa/include/asm/initialize_mmu.h107
-rw-r--r--arch/xtensa/include/asm/irqflags.h5
-rw-r--r--arch/xtensa/include/asm/linkage.h16
-rw-r--r--arch/xtensa/include/asm/stacktrace.h36
-rw-r--r--arch/xtensa/include/asm/timex.h9
-rw-r--r--arch/xtensa/include/asm/traps.h5
-rw-r--r--arch/xtensa/include/asm/vectors.h125
-rw-r--r--arch/xtensa/kernel/Makefile8
-rw-r--r--arch/xtensa/kernel/entry.S84
-rw-r--r--arch/xtensa/kernel/head.S39
-rw-r--r--arch/xtensa/kernel/platform.c1
-rw-r--r--arch/xtensa/kernel/stacktrace.c120
-rw-r--r--arch/xtensa/kernel/traps.c67
-rw-r--r--arch/xtensa/kernel/vectors.S16
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S48
-rw-r--r--arch/xtensa/kernel/xtensa_ksyms.c5
-rw-r--r--arch/xtensa/mm/mmu.c14
-rw-r--r--arch/xtensa/oprofile/backtrace.c4
-rw-r--r--arch/xtensa/platforms/iss/console.c12
-rw-r--r--arch/xtensa/platforms/iss/include/platform/simcall.h24
-rw-r--r--arch/xtensa/platforms/iss/setup.c8
-rw-r--r--arch/xtensa/platforms/iss/simdisk.c4
-rw-r--r--arch/xtensa/platforms/xt2000/setup.c2
-rw-r--r--arch/xtensa/platforms/xtfpga/setup.c2
33 files changed, 819 insertions, 254 deletions
diff --git a/Documentation/xtensa/mmu.txt b/Documentation/xtensa/mmu.txt
new file mode 100644
index 000000000000..2b1af7606d57
--- /dev/null
+++ b/Documentation/xtensa/mmu.txt
@@ -0,0 +1,46 @@
1MMUv3 initialization sequence.
2
3The code in the initialize_mmu macro sets up MMUv3 memory mapping
4identically to MMUv2 fixed memory mapping. Depending on
5CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX symbol this code is
6located in one of the following address ranges:
7
8 0xF0000000..0xFFFFFFFF (will keep same address in MMU v2 layout;
9 typically ROM)
10 0x00000000..0x07FFFFFF (system RAM; this code is actually linked
11 at 0xD0000000..0xD7FFFFFF [cached]
12 or 0xD8000000..0xDFFFFFFF [uncached];
13 in any case, initially runs elsewhere
14 than linked, so have to be careful)
15
16The code has the following assumptions:
17 This code fragment is run only on an MMU v3.
18 TLBs are in their reset state.
19 ITLBCFG and DTLBCFG are zero (reset state).
20 RASID is 0x04030201 (reset state).
21 PS.RING is zero (reset state).
22 LITBASE is zero (reset state, PC-relative literals); required to be PIC.
23
24TLB setup proceeds along the following steps.
25
26 Legend:
27 VA = virtual address (two upper nibbles of it);
28 PA = physical address (two upper nibbles of it);
29 pc = physical range that contains this code;
30
31After step 2, we jump to virtual address in 0x40000000..0x5fffffff
32that corresponds to next instruction to execute in this code.
33After step 4, we jump to intended (linked) address of this code.
34
35 Step 0 Step1 Step 2 Step3 Step 4 Step5
36 ============ ===== ============ ===== ============ =====
37 VA PA PA VA PA PA VA PA PA
38 ------ -- -- ------ -- -- ------ -- --
39 E0..FF -> E0 -> E0 E0..FF -> E0 F0..FF -> F0 -> F0
40 C0..DF -> C0 -> C0 C0..DF -> C0 E0..EF -> F0 -> F0
41 A0..BF -> A0 -> A0 A0..BF -> A0 D8..DF -> 00 -> 00
42 80..9F -> 80 -> 80 80..9F -> 80 D0..D7 -> 00 -> 00
43 60..7F -> 60 -> 60 60..7F -> 60
44 40..5F -> 40 40..5F -> pc -> pc 40..5F -> pc
45 20..3F -> 20 -> 20 20..3F -> 20
46 00..1F -> 00 -> 00 00..1F -> 00
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index acdfc615cca2..0a1b95f81a32 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -1,11 +1,9 @@
1config FRAME_POINTER
2 def_bool n
3
4config ZONE_DMA 1config ZONE_DMA
5 def_bool y 2 def_bool y
6 3
7config XTENSA 4config XTENSA
8 def_bool y 5 def_bool y
6 select ARCH_WANT_FRAME_POINTERS
9 select HAVE_IDE 7 select HAVE_IDE
10 select GENERIC_ATOMIC64 8 select GENERIC_ATOMIC64
11 select HAVE_GENERIC_HARDIRQS 9 select HAVE_GENERIC_HARDIRQS
@@ -49,6 +47,15 @@ config HZ
49source "init/Kconfig" 47source "init/Kconfig"
50source "kernel/Kconfig.freezer" 48source "kernel/Kconfig.freezer"
51 49
50config LOCKDEP_SUPPORT
51 def_bool y
52
53config STACKTRACE_SUPPORT
54 def_bool y
55
56config TRACE_IRQFLAGS_SUPPORT
57 def_bool y
58
52config MMU 59config MMU
53 def_bool n 60 def_bool n
54 61
@@ -100,6 +107,35 @@ config MATH_EMULATION
100 help 107 help
101 Can we use information of configuration file? 108 Can we use information of configuration file?
102 109
110config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
111 bool "Initialize Xtensa MMU inside the Linux kernel code"
112 default y
113 help
114 Earlier version initialized the MMU in the exception vector
115 before jumping to _startup in head.S and had an advantage that
116 it was possible to place a software breakpoint at 'reset' and
117 then enter your normal kernel breakpoints once the MMU was mapped
118 to the kernel mappings (0XC0000000).
119
120 This unfortunately doesn't work for U-Boot and likley also wont
121 work for using KEXEC to have a hot kernel ready for doing a
122 KDUMP.
123
124 So now the MMU is initialized in head.S but it's necessary to
125 use hardware breakpoints (gdb 'hbreak' cmd) to break at _startup.
126 xt-gdb can't place a Software Breakpoint in the 0XD region prior
127 to mapping the MMU and after mapping even if the area of low memory
128 was mapped gdb wouldn't remove the breakpoint on hitting it as the
129 PC wouldn't match. Since Hardware Breakpoints are recommended for
130 Linux configurations it seems reasonable to just assume they exist
131 and leave this older mechanism for unfortunate souls that choose
132 not to follow Tensilica's recommendation.
133
134 Selecting this will cause U-Boot to set the KERNEL Load and Entry
135 address at 0x00003000 instead of the mapped std of 0xD0003000.
136
137 If in doubt, say Y.
138
103endmenu 139endmenu
104 140
105config XTENSA_CALIBRATE_CCOUNT 141config XTENSA_CALIBRATE_CCOUNT
@@ -249,21 +285,6 @@ endmenu
249 285
250menu "Executable file formats" 286menu "Executable file formats"
251 287
252# only elf supported
253config KCORE_ELF
254 def_bool y
255 depends on PROC_FS
256 help
257 If you enabled support for /proc file system then the file
258 /proc/kcore will contain the kernel core image in ELF format. This
259 can be used in gdb:
260
261 $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
262
263 This is especially useful if you have compiled the kernel with the
264 "-g" option to preserve debugging information. It is mainly used
265 for examining kernel data structures on the live kernel.
266