Share via


Adapt the OAL (Compact 7)

3/12/2014

To adapt the OAL, follow the steps below. For information on the functions, see OAL Code Overview.

To configure the OAL startup

  • To further initialize the hardware and call the kernel initialization function, you may need to modify:

    • OAL’s StartUp (note that the boot loader has a StartUp function also)
    • OEMInit

To define the memory layout for the run-time image

  • To configure the memory layout, you may need to modify:

    • The config.bib configuration file
  • To define the physical-to-virtual address mappings (for ARM and x86 only), you may need to modify:

    • OEMAddressTable
    • OEMDeviceTable (for ARM and x86 architectures using more than 512 MB of RAM)
    • OEMRAMTable (for ARM and x86 architectures using more than 512 MB of RAM)

To configure the real-time clock (RTC)

  • To set the time, you may need to modify:

    • OEMSetRealTime
    • OEMSetAlarmTime
  • To get the time, you may need to modify:

    • OEMGetRealTime

To handle the cache

  • To initialize the cache, you may need to modify:

    • OALCacheGlobalsInit
  • To get cache information, you may need to modify:

    • OALIoCtlHalGetCacheInfo
  • To clean the cache, you may need to modify:

    • OEMCacheRangeFlush
    • OALCleanDCache
    • OALCleanDCacheLines
  • To clear the translation look-aside buffers (TLBs), you may need to modify:

    • OALClearDTLB
    • OALClearITLB
  • To flush the cache, you may need to modify:

    • OALFlushDCache
    • OALFlushDCacheLines
    • OALFlushICache
    • OALFlushICacheLines

To configure the timer

  • To initialize the timer, you may need to modify:

    • OALTimerInit
    • OALTimerInitCount
  • To handle timer interrupts, you may need to modify:

    • OALTimerIntrHandler
  • To get and set the timer, you may need to modify:

    • OALTimerGetCount
    • OALTimerGetCompare
    • OALGetTickCount
    • OALTimerSetCompare
    • OALTimerUpdate
    • OALTimerRecharge

To configure power management

  • To place the CPU in an Idle state, you may need to modify:

    • OEMIdle, OEMIdleEx (preferred)
    • OALCPUIdle
  • To power down or place the CPU in a Suspend state, you may need to modify:

    • OEMPowerOff
  • To enable or disable an interrupt from waking the system, you may need to modify:

    • OALIoCtlHalEnableWake
    • OALIoCtlHalDisableWake

To set up serial debugging

  • To set up the serial debugger, you can often use the boot loader’s debug functions with minor modifications. For more information about these functions, see Adapt the Boot Loader.

To handle interrupts

  • To enable interrupts, you may need to modify:

    • OALIntrEnableIrqs
    • BSPIntrEnableIrq
  • To disable interrupts, you may need to modify:

    • OALIntrDisableIrqs
    • OALIntrDisableIrq
  • To initialize interrupts, you may need to modify:

    • OALIntrInit
    • BSPIntrInit
    • OALIntrMapInit
  • To handle interrupt requests, you may need to modify:

    • OALIntrRequestIrqs
    • BSPIntrRequestIrqs
  • To release interrupts, you may need to modify:

    • OALIntrReleaseSysIntr
  • To handle interrupt translation and mapping, you may need to modify:

    • OALIntrStaticTranslate
    • OALIntrTranslateIrq

To specify which hardware modules to include in the build

  • To specify the hardware-dependent modules and files (such as driver files) for the device, you may need to modify:

See Also

Concepts

Adapt a BSP