Share via


Flow in CE Boot (Compact 2013)

3/26/2014

The following core functions control the execution of the boot loader from the time the device powers up to the time control jumps to the entry point of the OS:

  • BootStart
  • BootMain
  • OEMBootInit
  • OEMBootLoad
  • OEMBootRun
  • OEMBootPowerOff
  • BootJumpTo

The illustration below shows a simplified version of the order in which the core flow functions are called. (See the text below the illustration for information about which function actually calls each subsequent function.) The code that drives the state machine is shaded blue. OEMBootLoad is called repeatedly until a boot scenario function returns BOOT_STATE_RUN or BOOT_STATE_FAILURE.

The figure shows only the main function calls; see the source code for all function calls. In the illustration, the core function call sequence starts when the device powers up, and ends when the boot loader passes control to the OS.

Flow of the Boot Process

CE Boot Flow

The flow of the boot process as shown in the illustration is as follows:

  1. The entry point of CE Boot is the assembly code BootStart function (the name might vary depending on the platform), which initializes a minimum of hardware.
  2. BootStart calls the BootMain function, which calls the rest of the core functions, as described below. BootMain does not return because upon successful boot-up, the OS is started, and on unsuccessful boot-up, the device is powered off or reset.
  3. BootMain initializes the heap by calling the BootHeapInit function (not shown), and then it calls the OEMBootInit function. OEMBootInit finishes initializing the hardware that the boot loader uses and the global variables that store the parameters for this instance of the boot loader.
  4. BootMain calls the OEMBootLoad function, passing in a pointer to the context of the boot loader and the state of the device. OEMBootLoad calls the boot scenario functions, which move the boot loader through a series of states. (See Boot Scenario Code for the boot scenario functions, and Boot Sequence States for a discussion of the states.) BootMain calls OEMBootLoad repeatedly until a boot scenario function returns BOOT_STATE_RUN or BOOT_STATE_FAILURE.
  5. If a boot scenario function returns BOOT_STATE_FAILURE, the device powers off. If a boot scenario function returns BOOT_STATE_RUN, BootMain calls the OEMBootRun function. OEMBootRun prepares the device information to be passed to the OEM adaptation layer (OAL), and returns the physical starting address of the entry point of the image.
  6. Finally, BootMain calls the BootJumpTo function, which jumps to the physical address of the entry point to the OS.

In This Section

See Also

Concepts

Core Code