| 1 | /*
|
| 2 | * arch/xtensa/boot/boot-elf/bootstrap.S
|
| 3 | *
|
| 4 | * Low-level exception handling
|
| 5 | *
|
| 6 | * This file is subject to the terms and conditions of the GNU General Public
|
| 7 | * License. See the file "COPYING" in the main directory of this archive
|
| 8 | * for more details.
|
| 9 | *
|
| 10 | * Copyright (C) 2004 - 2013 by Tensilica Inc.
|
| 11 | *
|
| 12 | * Chris Zankel <chris@zankel.net>
|
| 13 | * Marc Gauthier <marc@tensilica.com>
|
| 14 | * Piet Delaney <piet@tensilica.com>
|
| 15 | */
|
| 16 |
|
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | .section .ResetVector.text, "ax"
|
| 23 | .global _ResetVector
|
| 24 | .global reset
|
| 25 |
|
| 26 | _ResetVector:
|
| 27 | _j _SetupMMU
|
| 28 |
|
| 29 | .begin no-absolute-literals
|
| 30 | .literal_position
|
| 31 |
|
| 32 | |
| 33 | .align 4
|
| 34 | _bootparam:
|
| 35 | .short BP_TAG_FIRST
|
| 36 | .short 4
|
| 37 | .long BP_VERSION
|
| 38 | .short BP_TAG_LAST
|
| 39 | .short 0
|
| 40 | .long 0
|
| 41 | |
| 42 |
|
| 43 | .align 4
|
| 44 | _SetupMMU:
|
| 45 | |
| 46 | movi a0, 0
|
| 47 | wsr a0, windowbase
|
| 48 | rsync
|
| 49 | movi a0, 1
|
| 50 | wsr a0, windowstart
|
| 51 | rsync
|
| 52 | |
| 53 | movi a0, 0x1F
|
| 54 | wsr a0, ps
|
| 55 | rsync
|
| 56 |
|
| 57 | |
| 58 | initialize_mmu
|
| 59 | |
| 60 |
|
| 61 | rsil a0, XCHAL_DEBUGLEVEL-1
|
| 62 | rsync
|
| 63 | reset:
|
| 64 | |
| 65 | XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY
|
| 66 | movi a0, CONFIG_KERNEL_LOAD_ADDRESS
|
| 67 | |
| 68 | movi a0, KERNELOFFSET
|
| 69 | |
| 70 | |
| 71 | movi a2, _bootparam
|
| 72 | |
| 73 | movi a2, 0
|
| 74 | |
| 75 | movi a3, 0
|
| 76 | movi a4, 0
|
| 77 | jx a0
|
| 78 |
|
| 79 | .end no-absolute-literals
|