Tutorials to .com

Tutorials to .com » Os » Mobile » WinCE OAL introduced in Startup.s

WinCE OAL introduced in Startup.s

Print View , by: iSee ,Total views: 19 ,Word Count: 655 ,Date: Mon, 15 Jun 2009 Time: 2:48 AM

OAL should be said that the most Startup.s is the beginning of the entrance, just like Startup.s the EBOOT, it is the best running WinCE kernel code. BSP in general, EBOOT and Startup.s the Startup.s the OAL function should be the same, but will still be some difference in many cases depend on the development of BSP, the two can be shared between many Startup.s code can also be part of shared or independent of each other.

OAL in the beginning of Startup is defined as follows:



Is to initialize the main CPU, the ARM, the general steps are as follows:

1. Set CPU mode to supervisor

2. Disable IRQ and FIQ interrupt

3. MMU and instructions to close Data Cache

4. Refresh Cache and TLB, empty the write buffer

5. To confirm the reasons to start may be from EBOOT Jump start, cold start, hot start, Watchdog reset

6. GPIO configuration to light LED

7. Memory controller configuration and timing

8. Interrupt controller configuration, clear all interrupt

9. Initialized RTC

10. Configuration CPU power management

11. Setting CPU clock and clock-related peripheral

12. OEMAddressTable the beginning of the address will be written into the register r0

13. Kernelstart in the Jump to

Jump to the procedure will eventually KernelStart, in the Private directory armstart.s, the compilation is still here, more or less, follow these steps:

1. OEMAddresstable initialization based on the introduction of a Page Table

2. MMU and Cache-enabled

3. For each model a stack ARM

4. ARMInit function call access to the entrance of kernel.dll, the function defined in arminit.c

5. Kernel.dll to return to the entrance of NKStartup, defined in mdarm.c, Jump to start kernel.dll entrance

6. NKStartup read ARMv6 determine ID of the CPU architecture, the kernel initializes the global variable

7. OEMInitDebugSerial call to initialize the serial debug

8. OEMInit call initialization-related peripheral interface

9. OEMCacheRangeFlush call Refresh Cache and TLB

10. KernelFindMemory to call into the target storage space and memory space

11. Kernelstart function call, it started with the most kernelstart different, it is defined in armtrap.s

This should be said that the CPU related to the basic completion of initialization, is to the beginning of the following WinCE kernel initialization, and in general, follow these steps:

1. Armstrap.s Jump to kernelstart continue to implement the

2. KernelInit call a function defined in nkinit.c, the main initialization complete API set, the kernel initialization Heap memory pool initialization, the initialization process and thread, and finally the mapping file initialization

3. KernelInit in the implementation of END after FirstSchedule Jump to the first system of scheduling, this kernel has been running up.

Here the whole of the initialization process described what, in fact, the most Startup.s start WinCE only the beginning of the CPU level to complete the initialization, this code is compiled, it is also simple debugging also difficult, because simple are the order of execution, only to initialize CPU, difficulties due to the lack of good debugging tools, the general point here is the adoption of LED the way to determine the location of the implementation process.

Mobile OS Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.