.. | .. |
---|
37 | 37 | #include <asm/bootparam.h> |
---|
38 | 38 | #include <asm/kasan.h> |
---|
39 | 39 | #include <asm/mmu_context.h> |
---|
40 | | -#include <asm/pgtable.h> |
---|
41 | 40 | #include <asm/processor.h> |
---|
42 | 41 | #include <asm/timex.h> |
---|
43 | 42 | #include <asm/platform.h> |
---|
.. | .. |
---|
61 | 60 | #ifdef CONFIG_BLK_DEV_INITRD |
---|
62 | 61 | extern unsigned long initrd_start; |
---|
63 | 62 | extern unsigned long initrd_end; |
---|
64 | | -int initrd_is_mapped = 0; |
---|
65 | 63 | extern int initrd_below_start_ok; |
---|
66 | 64 | #endif |
---|
67 | 65 | |
---|
.. | .. |
---|
95 | 93 | } tagtable_t; |
---|
96 | 94 | |
---|
97 | 95 | #define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ |
---|
98 | | - __attribute__((used, section(".taglist"))) = { tag, fn } |
---|
| 96 | + __section(".taglist") __attribute__((used)) = { tag, fn } |
---|
99 | 97 | |
---|
100 | 98 | /* parse current tag */ |
---|
101 | 99 | |
---|
.. | .. |
---|
285 | 283 | extern char _UserExceptionVector_text_end; |
---|
286 | 284 | extern char _DoubleExceptionVector_text_start; |
---|
287 | 285 | extern char _DoubleExceptionVector_text_end; |
---|
| 286 | +extern char _exception_text_start; |
---|
| 287 | +extern char _exception_text_end; |
---|
288 | 288 | #if XCHAL_EXCM_LEVEL >= 2 |
---|
289 | 289 | extern char _Level2InterruptVector_text_start; |
---|
290 | 290 | extern char _Level2InterruptVector_text_end; |
---|
.. | .. |
---|
309 | 309 | extern char _SecondaryResetVector_text_start; |
---|
310 | 310 | extern char _SecondaryResetVector_text_end; |
---|
311 | 311 | #endif |
---|
| 312 | +#ifdef CONFIG_XIP_KERNEL |
---|
| 313 | +extern char _xip_start[]; |
---|
| 314 | +extern char _xip_end[]; |
---|
| 315 | +#endif |
---|
312 | 316 | |
---|
313 | 317 | static inline int __init_memblock mem_reserve(unsigned long start, |
---|
314 | 318 | unsigned long end) |
---|
.. | .. |
---|
319 | 323 | void __init setup_arch(char **cmdline_p) |
---|
320 | 324 | { |
---|
321 | 325 | pr_info("config ID: %08x:%08x\n", |
---|
322 | | - get_sr(SREG_EPC), get_sr(SREG_EXCSAVE)); |
---|
323 | | - if (get_sr(SREG_EPC) != XCHAL_HW_CONFIGID0 || |
---|
324 | | - get_sr(SREG_EXCSAVE) != XCHAL_HW_CONFIGID1) |
---|
| 326 | + xtensa_get_sr(SREG_EPC), xtensa_get_sr(SREG_EXCSAVE)); |
---|
| 327 | + if (xtensa_get_sr(SREG_EPC) != XCHAL_HW_CONFIGID0 || |
---|
| 328 | + xtensa_get_sr(SREG_EXCSAVE) != XCHAL_HW_CONFIGID1) |
---|
325 | 329 | pr_info("built for config ID: %08x:%08x\n", |
---|
326 | 330 | XCHAL_HW_CONFIGID0, XCHAL_HW_CONFIGID1); |
---|
327 | 331 | |
---|
.. | .. |
---|
332 | 336 | /* Reserve some memory regions */ |
---|
333 | 337 | |
---|
334 | 338 | #ifdef CONFIG_BLK_DEV_INITRD |
---|
335 | | - if (initrd_start < initrd_end) { |
---|
336 | | - initrd_is_mapped = mem_reserve(__pa(initrd_start), |
---|
337 | | - __pa(initrd_end)) == 0; |
---|
| 339 | + if (initrd_start < initrd_end && |
---|
| 340 | + !mem_reserve(__pa(initrd_start), __pa(initrd_end))) |
---|
338 | 341 | initrd_below_start_ok = 1; |
---|
339 | | - } else { |
---|
| 342 | + else |
---|
340 | 343 | initrd_start = 0; |
---|
341 | | - } |
---|
342 | 344 | #endif |
---|
343 | 345 | |
---|
344 | 346 | mem_reserve(__pa(_stext), __pa(_end)); |
---|
| 347 | +#ifdef CONFIG_XIP_KERNEL |
---|
| 348 | + mem_reserve(__pa(_xip_start), __pa(_xip_end)); |
---|
| 349 | +#endif |
---|
345 | 350 | |
---|
346 | | -#ifdef CONFIG_VECTORS_OFFSET |
---|
| 351 | +#ifdef CONFIG_VECTORS_ADDR |
---|
347 | 352 | mem_reserve(__pa(&_WindowVectors_text_start), |
---|
348 | 353 | __pa(&_WindowVectors_text_end)); |
---|
349 | 354 | |
---|
.. | .. |
---|
359 | 364 | mem_reserve(__pa(&_DoubleExceptionVector_text_start), |
---|
360 | 365 | __pa(&_DoubleExceptionVector_text_end)); |
---|
361 | 366 | |
---|
| 367 | + mem_reserve(__pa(&_exception_text_start), |
---|
| 368 | + __pa(&_exception_text_end)); |
---|
362 | 369 | #if XCHAL_EXCM_LEVEL >= 2 |
---|
363 | 370 | mem_reserve(__pa(&_Level2InterruptVector_text_start), |
---|
364 | 371 | __pa(&_Level2InterruptVector_text_end)); |
---|
.. | .. |
---|
380 | 387 | __pa(&_Level6InterruptVector_text_end)); |
---|
381 | 388 | #endif |
---|
382 | 389 | |
---|
383 | | -#endif /* CONFIG_VECTORS_OFFSET */ |
---|
| 390 | +#endif /* CONFIG_VECTORS_ADDR */ |
---|
384 | 391 | |
---|
385 | 392 | #ifdef CONFIG_SMP |
---|
386 | 393 | mem_reserve(__pa(&_SecondaryResetVector_text_start), |
---|
.. | .. |
---|
401 | 408 | #ifdef CONFIG_VT |
---|
402 | 409 | # if defined(CONFIG_VGA_CONSOLE) |
---|
403 | 410 | conswitchp = &vga_con; |
---|
404 | | -# elif defined(CONFIG_DUMMY_CONSOLE) |
---|
405 | | - conswitchp = &dummy_con; |
---|
406 | 411 | # endif |
---|
407 | | -#endif |
---|
408 | | - |
---|
409 | | -#ifdef CONFIG_PCI |
---|
410 | | - platform_pcibios_init(); |
---|
411 | 412 | #endif |
---|
412 | 413 | } |
---|
413 | 414 | |
---|
.. | .. |
---|
598 | 599 | num_online_cpus(), |
---|
599 | 600 | cpumask_pr_args(cpu_online_mask), |
---|
600 | 601 | XCHAL_BUILD_UNIQUE_ID, |
---|
601 | | - get_sr(SREG_EPC), get_sr(SREG_EXCSAVE), |
---|
| 602 | + xtensa_get_sr(SREG_EPC), xtensa_get_sr(SREG_EXCSAVE), |
---|
602 | 603 | XCHAL_HAVE_BE ? "big" : "little", |
---|
603 | 604 | ccount_freq/1000000, |
---|
604 | 605 | (ccount_freq/10000) % 100, |
---|
.. | .. |
---|
653 | 654 | #if XCHAL_HAVE_S32C1I |
---|
654 | 655 | "s32c1i " |
---|
655 | 656 | #endif |
---|
| 657 | +#if XCHAL_HAVE_EXCLUSIVE |
---|
| 658 | + "exclusive " |
---|
| 659 | +#endif |
---|
656 | 660 | "\n"); |
---|
657 | 661 | |
---|
658 | 662 | /* Registers. */ |
---|