void cinit_init(void) { STATE = LOW_LEVEL_INITIALIZATION; /* ------------------------------------------------------------------- * Initialize all the device drivers * * This routine has to be called before any of the device driver can * be used. It complies with version 0.01 of the Wright Device Driver * Framework (v0.01). * * ------------------------------------------------------------------- */ lltrace(eventIODeviceInit(),DEVICESINIT); /* ------------------------------------------------------------------- * * Initialize all the unique services /pod/events/e7t/init.h * In SLOS Services are devices that cause interrupts. * * ------------------------------------------------------------------- */ lltrace(eventServicesInit(),SERVICESINIT); /* ------------------------------------------------------------------- * * Initialize the timer to interrupt every 2 milliseconds * * ------------------------------------------------------------------- */ lltrace(eventTickInit(2),TICKINIT); }
int C_Entry(void) { /* -------------------------------------------------------------------- * * Initalize all the internal data structures for device drivers and * services. * * Terminology: * * - services are called by interrupt... * - device drivers are called by applications * * ------------------------------------------------------------------- */ lltrace(cinit_init(),CINITINIT); /* ------------------------------------------------------------------- * * Start the periodic timer. This will not effect the system until * IRQ or FIQ interrupts are enabled. * * ------------------------------------------------------------------- */ lltrace(eventTickStart(),TICKSTART); /* ------------------------------------------------------------------- * * Turn On interrupts (I_bit=0) and change mode to User Mode. * * ------------------------------------------------------------------- */ STATE=BOOT_SLOS; __asm { MSR CPSR_c,#0x50 } /* ------------------------------------------------------------------- * * Enter into Application/Task1 * * ------------------------------------------------------------------- */ lltrace(C_EntryTask1(),ENTERTASK); /* ------------------------------------------------------------------- * * THIS CODE SHOULD NEVER BE REACHED * * ------------------------------------------------------------------- */ return 0; }
int C_Entry(void) { /* -------------------------------------------------------------------- * * Initalize all the internal data structures for device drivers and * services. * * Terminology: * * - services are called by interrupt... * - device drivers are called by applications * * ------------------------------------------------------------------- */ __REG((unsigned int) BOOT_SWI) = 0xe51ff004; // ldr pc, [pc, #-4] __REG((unsigned int)(BOOT_SWI+1))= (unsigned int)0xa0000008; __REG((unsigned int) BOOT_IRQ) = 0xe51ff004; // ldr pc, [pc, #-4] __REG((unsigned int)(BOOT_IRQ+1))= (unsigned int)0xa0000018; lltrace(cinit_init(),CINITINIT); /* ------------------------------------------------------------------- * * Start the periodic timer. This will not effect the system until * IRQ or FIQ interrupts are enabled. * * ------------------------------------------------------------------- */ lltrace(eventTickStart(),TICKSTART); /* ------------------------------------------------------------------- * * Turn On interrupts (I_bit=0) and change mode to User Mode. * * ------------------------------------------------------------------- */ STATE=BOOT_SLOS; asm volatile ("MSR CPSR_c,#0x52"); /* ------------------------------------------------------------------- * * Enter into Application/Task1 * * ------------------------------------------------------------------- */ lltrace(C_EntryTask1(),ENTERTASK); /* ------------------------------------------------------------------- * * THIS CODE SHOULD NEVER BE REACHED * * ------------------------------------------------------------------- */ return 0; }