[processor-sdk/pdk.git] / packages / ti / boot / sbl / example / k3MulticoreApp / sbl_multicore_r5_xip.asm
1 ;******************************************************************************
2 ;* *
3 ;* Copyright (c) 2018-2019 Texas Instruments Incorporated *
4 ;* http://www.ti.com/ *
5 ;* *
6 ;* Redistribution and use in source and binary forms, with or without *
7 ;* modification, are permitted provided that the following conditions *
8 ;* are met: *
9 ;* *
10 ;* Redistributions of source code must retain the above copyright *
11 ;* notice, this list of conditions and the following disclaimer. *
12 ;* *
13 ;* Redistributions in binary form must reproduce the above copyright *
14 ;* notice, this list of conditions and the following disclaimer in *
15 ;* the documentation and/or other materials provided with the *
16 ;* distribution. *
17 ;* *
18 ;* Neither the name of Texas Instruments Incorporated nor the names *
19 ;* of its contributors may be used to endorse or promote products *
20 ;* derived from this software without specific prior written *
21 ;* permission. *
22 ;* *
23 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
24 ;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
25 ;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR *
26 ;* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT *
27 ;* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
28 ;* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
29 ;* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
30 ;* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
31 ;* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
32 ;* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
33 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
34 ;* *
35 ;******************************************************************************
37 .arm
39 .sect ".rstvectors"
41 .global _c_int00
42 .global _sblTestResetVectors
43 .asmfunc
45 _c_int00:
46 _sblTestResetVectors: LDR pc, sblTestEntry ; Entry
47 _sblUndefVectors: LDR pc, sblUndefLoop
48 _sblSvcVectors: LDR pc, sblSvcLoop
49 _sblPabortVectors: LDR pc, sblPabortLoop
50 _sblDabortVectors: LDR pc, sblDabortLoop
51 _sblHyVectors: LDR pc, sblHypLoop
52 _sblIrqVectors: LDR pc, sblIrqLoop
53 _sblFiqVectors: LDR pc, sblFiqLoop
55 sblTestEntry .long _sblTestEntry
56 sblUndefLoop .long _sblUndefLoop
57 sblSvcLoop .long _sblSvcLoop
58 sblPabortLoop .long _sblPabortLoop
59 sblDabortLoop .long _sblDabortLoop
60 sblHypLoop .long _sblHypLoop
61 sblIrqLoop .long _sblIrqLoop
62 sblFiqLoop .long _sblFiqLoop
63 .endasmfunc
65 .sect ".sbl_mcu_1_0_resetvector"
67 .global sblTestmain
68 .global _sblTestEntry
69 .asmfunc
70 _sblTestEntry:
71 ; Setup stack
72 LDR r1, _sblTestStackBaseAddr
73 MOV sp, r1
75 LDR r1, sblTestmainAddr
76 BLX r1
78 ; Test complete.
79 WFI
80 ADD r0, r0, #0x1
81 _sbTestDone: B _sbTestDone
83 sblTestmainAddr .long sblTestmain
84 _sblTestStackBaseAddr .long _sblTestStackBase
86 _sblUndefLoop: B _sblUndefLoop
87 _sblSvcLoop: B _sblSvcLoop
88 _sblPabortLoop: B _sblPabortLoop
89 _sblDabortLoop: B _sblDabortLoop
90 _sblHypLoop: B _sblHypLoop
91 _sblIrqLoop: B _sblIrqLoop
92 _sblFiqLoop: B _sblFiqLoop
94 .endasmfunc
96 .sect ".stack"
97 _sblTestStackTop:
98 .space 1024
99 _sblTestStackBase: