Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:40

0001 
0002 #include <rtems/bfin/bfin.h>
0003 
0004 #include <bsp.h>
0005 #include <bspopts.h>
0006 
0007 #ifndef LO
0008 #define LO(con32) ((con32) & 0xFFFF)
0009 #endif
0010 #ifndef HI
0011 #define HI(con32) (((con32) >> 16) & 0xFFFF)
0012 #endif
0013 
0014 #if (BFIN_ON_SKYEYE)
0015     .section .init
0016 #else
0017     .section .l1code
0018 #endif
0019     .align  4
0020 
0021     .global __start
0022 __start:
0023 
0024     /* Start by setting up a stack */
0025     sp.h = __ISR_Stack_area_end;
0026     sp.l = __ISR_Stack_area_end;
0027 
0028     /* Maybe we should zero the memory in the .bss section.  */
0029 
0030     /* This changes to the supervisor mode */
0031     p0.l = START;
0032     p0.h = START;
0033     p1.l = LO(EVT15);
0034     p1.h = HI(EVT15);
0035 
0036     [P1] = P0;
0037 
0038     P0.h = HI(IMASK);
0039     P0.l = LO(IMASK);
0040     R0 = [P0];
0041     /* R1.l = EVT_IVG15 & 0xFFFF; */
0042     R1.l = 0x8000;
0043 
0044     R0 = R0 | R1;
0045 
0046     [P0] = R0;
0047 
0048     RAISE 15;
0049 
0050     P0.l = WAIT;
0051     P0.h = WAIT;
0052 
0053     RETI = P0;
0054     RTI;
0055 
0056     /* endless loop to wait */
0057     WAIT:
0058     jump WAIT;
0059 
0060     START:
0061     [--SP] = RETI;
0062 
0063     p0.h = _bss_start;
0064     p0.l = _bss_start;
0065     p1.h = _end;
0066     p1.l = _end;
0067     r0 = p0;
0068     r1 = p1;
0069     r1 = r1 - r0;
0070     p1 = r1;
0071     r0 = 0;
0072 
0073     /* Set _bss_start until _end to zero */
0074     lsetup(loop1,loop2) LC0 = p1;
0075     loop1:     b[p0] = r0;
0076     loop2:  p0 +=1;
0077 
0078     /* call boot_card( 0, 0 ) */
0079     r0 = 0;
0080     r1 = 0;
0081     p0.l = _boot_card;
0082     p0.h = _boot_card;
0083 
0084     call (p0);
0085 
0086     HLT
0087     p0.l = _exit;
0088     p0.h = _exit;
0089     P3 = P4;
0090     jump    (p0)        /* Should not return.  */
0091 
0092 .global _bfin_null_isr
0093 _bfin_null_isr:
0094     rti;
0095