File tree Expand file tree Collapse file tree 3 files changed +16
-28
lines changed Expand file tree Collapse file tree 3 files changed +16
-28
lines changed Original file line number Diff line number Diff line change 11@ SPDX - License - Identifier: MPL - 1 . 0
22@ Copyright (c) 2016 Tobias Schießl
3- . global ExceptionHandler
4- . global IRQHandler
5- . global SWIHandler
6-
73 .set MODE_USR , 0x10
84 .set MODE_FIQ , 0x11
95 .set MODE_IRQ , 0x12
1612 . equ I_F_BIT , 0xC0
1713 . equ MASK_SWI_NUM , 0xFF000000
1814
19- .text
15+ @ This will be placed at 0xffff0000 by the linker script
16+ . section .vector , "ax" , %progbits
2017
2118 .code 32
2219
23- @ Default entry for all vectors except Reset is "B ExceptionHandler" so each interrupt would cause a reset
24- @ Since I can only say th at the IRQ Handler works , we leave the remaining ones as they are
25- ExceptionHandler:
20+ ResetToEntry:
2621 B Entry
27- B ExceptionHandler
22+ B ResetToEntry
2823 B SWIHandler
29- B ExceptionHandler
30- B ExceptionHandler
31- B ExceptionHandler
24+ B ResetToEntry
25+ B ResetToEntry
26+ B ResetToEntry
3227 B IRQHandler
3328 NOP @ Fall to FIQHandler
34-
29+
3530FIQHandler:
3631 STMFD r13 ! , {r0 - r7 , lr}
3732 LDR r0 , = 0xFFFEF600
Original file line number Diff line number Diff line change @@ -393,19 +393,6 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
393393 },
394394};
395395
396- // See exceptionhandler.S
397- extern void ExceptionHandler (void );
398-
399- void copy_vector_table (void ) {
400- unsigned int * dest = (unsigned int * )0xFFFF0000 ;
401- unsigned int * addrExceptionHandler = (unsigned int * )ExceptionHandler ;
402- int i = 1 ;
403-
404- for (; i < 8 + 2048 ; ++ i ) {
405- dest [i ] = addrExceptionHandler [i ];
406- }
407- }
408-
409396unsigned int EDMAVersionGet (void ) {
410397 return 1 ;
411398}
@@ -558,8 +545,6 @@ void SystemInit(void) {
558545
559546 SysCfgRegistersUnlock ();
560547
561- copy_vector_table ();
562-
563548 // Initialize advanced interrupt controller (AINTC)
564549 IntAINTCInit ();
565550 IntMasterIRQEnable ();
Original file line number Diff line number Diff line change 88 SRAM (rwx) : ORIGIN = 0x80000000 , LENGTH = 128K
99 DDR_unused (rwx) : ORIGIN = 0xC0000000 , LENGTH = 0x8000
1010 DDR (rwx) : ORIGIN = 0xC0008000 , LENGTH = (64M - 0x8000 )
11+ ARM_LRAM (rwx) : ORIGIN = 0xFFFF0000 , LENGTH = 8K
1112}
1213
1314_minimal_stack_size = 4M;
@@ -53,6 +54,13 @@ SECTIONS
5354 *(.noinit )
5455 } > DDR
5556
57+ /* Exception vector table */
58+ .vector :
59+ {
60+ . = ALIGN (4 );
61+ KEEP (*(.vector ));
62+ } > ARM_LRAM
63+
5664 .stack :
5765 {
5866 . = ALIGN (4 );
You can’t perform that action at this time.
0 commit comments