예제 #1
0
파일: cinit.c 프로젝트: hsdhatt/SLOS
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;
}
예제 #2
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;
}