次の方法で共有


OEMGLOBAL (Windows Embedded CE 6.0)

1/5/2010

This structure defines all the functions that the OAL must implement for BSP migration, and all the variables that it needs to define.

Syntax

typedef struct _OEMGLOBAL {
        DWORD dwVersion;
        PFN_InitDebugSerial pfnInitDebugSerial;
        PFN_InitPlatform pfnInitPlatform;
        PFN_WriteDebugByte pfnWriteDebugByte;
        PFN_WriteDebugString pfnWriteDebugString;
        PFN_ReadDebugByte pfnReadDebugByte;
        PFN_WriteDebugLED pfnWriteDebugLED;
        PFN_CacheRangeFlush pfnCacheRangeFlush;
        PFN_InitClock pfnInitClock;
        PFN_GetRealTime pfnGetRealTime;
        PFN_SetRealTime pfnSetRealTime;
        FPN_SetAlarmTime pfnSetAlarmTime;
        PFN_QueryPerfCounter pfnQueryPerfCounter;
        PFN_QueryPerfFreq pfnQueryPerfFreq;
        PFN_GetTickCount pfnGetTickCount;
        PFN_Idle pfnIdle;
        PFN_NotifyThreadExit pfnNotifyThreadExit;
        PFN_NotifyReschedule pfnNotifyReschedule;
        PFN_NotifyIntrOccurs pfnNotifyIntrOccurs;
        PFN_UpdateReschedTime pfnUpdateReschedTime;
        DWORD dwDefaultThreadQuantum;
        PFN_PowerOff pfnPowerOff;
        PFN_GetExtensionDRAM pfnGetExtensionDRAM;
        PFN_EnumExtensionDRAM pfnEnumExtensionDRAM;
        PFN_CalcFSPages pfnCalcFSPages;
        DWORD dwMainMemoryEndAddress;
        PFN_InterruptEnable pfnInterruptEnable;
        PFN_InterruptDisable pfnInterruptDisable;
        PFN_InterruptDone pfnInterruptDone;
        PFN_InterruptMask pfnInterruptMask;
        PFN_InitCoProcRegs pfnInitCoProcRegs;
        PFN_SaveCoProcRegs pfnSaveCoProcRegs;
        PFN_RestoreCoProcRegs pfnRestoreCoProcRegs;
        DWORD cbCoProcRegSize;
        DWORD fSaveCoProcReg;
        PFN_ReadRegistry pfnReadRegistry;
        PFN_WriteRegistry pfnWriteRegistry;
        PFN_RefreshWatchDog pfnRefreshWatchDog;
        DWORD dwWatchDogPeriod;
        DWORD dwWatchDogThreadPriority;
        PFN_ProfileTimerEnable pfnProfileTimerEnable;
        PFN_ProfileTimerDisable pfnProfileTimerDisable;
        DWORD cbErrReportSize;
        PFN_Ioctl pfnOEMIoctl;
        PFN_KDIoctl pfnKDIoctl;
        PFN_IsRom pfnIsRom;
        PFN_MapW32Priority pfnMapW32Priority;
        PFN_SetMemoryAttributes pfnSetMemoryAttributes;
        PFN_IsProcessorFeaturePresent pfnIsProcessorFeaturePresent;
        PFN_HaltSystem pfnHaltSystem;
    PFN_NotifyForceCleanBoot pfnNotifyForceCleanBoot;
        PROMChain_t pROMChain;
        LPVOID pKitlInfo;
        PFNVOID pfnKITLGlobalInit;
        DBGPARAM *pdpCurSettings;
    DWORD_PTR *p__security_cookie;
    DWORD_PTR *p__security_cookie_complement;
    DWORD dwAlarmResolution;
    DWORD dwYearsRTCRollover;
    DWORD _rsvd_[8];
#if defined (x86)
        PFN_NMIHandler pfnNMIHandler;
#elif defined (ARM)
        PFN_InterruptHandler pfnInterruptHandler;
        PFNVOID pfnFIQHandler;
        DWORD dwARM1stLvlBits;
        DWORD dwARMCacheMode;
    DWORD f_V6_VIVT_ICache;
        PFN_SaveRestoreVFPCtrlRegs pfnSaveVFPCtrlRegs;
        FN_SaveRestoreVFPCtrlRegs pfnRestoreVFPCtrlRegs;
        FN_HandleVFPException pfnHandleVFPExcp;
#elif defined (MIPS)
        DWORD dwCoProcBits;
        DWORD dwOEMTLBLastIdx;
        DWORD dwArchFlagOverride;
        const BYTE *pIntrPrio;
        const BYTE *pIntrMask;
#elif defined (SHx)
        PFN_NMIHandler pfnNMIHandler;
        DWORD dwSHxIntEventCodeLength
#else
#pragma error("No CPU Defined")
#endif
} OEMGLOBAL, *POEMGLOBAL;

Members

  • dwVersion
    Windows Embedded CE version.
  • pfnInitPlatform
    Pointer to the function OEMInit.
  • pfnWriteDebugLED
    Pointer to an optional function, OEMWriteDebugLED, that outputs a byte to the target device's specified LED port. If this function is implemented, it must be initialized.
  • pfnInitClock
    Pointer to an optional function that initializes the clock. If this function is implemented, it must be initialized.
  • pfnQueryPerfCounter
    Pointer to an optional function, pQueryPerformanceCounter, that retrieves the current value of the high-resolution performance counter. If this function is implemented, it must be initialized.
  • pfnQueryPerfFreq
    Pointer to an optional function, pQueryPerformanceFrequency, that retrieves the frequency of the high-resolution performance counter. If this function is implemented, it must be initialized.
  • pfnIdle
    Pointer to the function OEMIdle.
  • pfnNotifyThreadExit
    Pointer to an optional function that is called when a thread exits. If this function is implemented, it must be initialized.
  • pfnNotifyReschedule
    Pointer to an optional function that is called when a new thread is ready to run. If this function is implemented, it must be initialized.
  • pfnNotifyIntrOccurs
    Pointer to an optional function that is called when an interrupt occurs. If this function is implemented, it must be initialized.
  • pfnUpdateReschedTime
    Pointer to an optional function. If this function is implemented, it must be initialized.
  • dwDefaultThreadQuantum
    By default, this member is set to DEFAULT_THREAD_QUANTUM.
  • pfnEnumExtensionDRAM
    Pointer to an optional function that returns information about extension DRAM on the device. If this function is implemented, it must be initialized.
  • pfnCalcFSPages
    Pointer to a function that returns the amount of pages the kernel should use for the object store in a RAM-based file system. By default, it points to the function FakeCalcPage, which returns the default number of pages.
  • dwMainMemoryEndAddress
    Specifies the next available address following the first available contiguous block of memory. This is an optional variable that is set to 0 by default.
  • pfnInterruptMask
    Pointer to the function OEMInterruptMask.
  • pfnInitCoProcRegs
    Pointer to an optional function that is called by the kernel when a thread is created to initialize the debug registers. If this function is implemented, it must be initialized.
  • pfnSaveCoProcRegs
    Pointer to an optional function that is called by the kernel to save the platform-specific debug registers when a thread switch occurs. If this function is implemented, it must be initialized.
  • pfnRestoreCoProcRegs
    Pointer to an optional function that is called by the kernel to restore the platform-specific debug registers when a thread switch occurs. If this function is implemented, it must be initialized.
  • cbCoProcRegSize
    Specifies the size of the memory allocation, in bytes, needed for the OEM to save or restore coprocessor registers. This variable is only used if the particular platform or CPU has coprocessor registers that must be saved or restored during context switches.
  • fSaveCoProcReg
    Specifies the flag to tell the kernel when the save/restore of coprocessor registers is performed. This variable is set to False by default.
  • pfnReadRegistry
    Pointer to an optional function that reads a registry file into RAM from persistent storage. If this function is implemented, it must be initialized.
  • pfnWriteRegistry
    Pointer to an optional function that is called by the operating system to transfer registry data to persistent storage. If this function is implemented, it must be initialized.
  • pfnRefreshWatchDog
    Pointer to an optional function that is called by the kernel to refresh the hardware watchdog. If this function is implemented, it must be initialized.
  • dwWatchDogPeriod
    Specifies the watchdog period, in milliseconds, where the hardware watchdog must be refreshed before system reset. The default value, 0, indicates that the watchdog timer does not exist.
  • dwWatchDogThreadPriority
    Specifies the kernel watchdog thread. By default, this member is set to DEFAULT_WATCHDOG_PRIORITY.
  • pfnProfileTimerEnable
    Pointer to an optional function that enables a profiler timer. If this function is implemented, it must be initialized.
  • pfnProfileTimerDisable
    Pointer to an optional function that clears and disables a profiler timer. If this function is implemented, it must be initialized.
  • cbErrReportSize
    Specifies the amount of memory for the Windows Embedded CE Error Reporting dump area. By default, this member is set to 0. cbErrReportSize was previously named cbNKDrWatsonSize.
  • pfnKDIoctl
    Pointer to an optional function that supports requests from the kernel debugger. If this function is implemented, it must be initialized.
  • pfnIsRom
    Pointer to an optional function that determines whether a given address range falls within a valid range of ROM addresses. If this function is implemented, it must be initialized.
  • pfnMapW32Priority
    Pointer to an optional function that is not implemented. If this function is implemented, it must be initialized.
  • pfnSetMemoryAttributes
    Pointer to an optional function that supports changes to memory attributes. If this function is implemented, it must be initialized.
  • pfnIsProcessorFeaturePresent
    Pointer to an optional function that retrieves information about the supported features in your system. If this function is implemented, it must be initialized.
  • pfnHaltSystem
    Pointer to an optional function that is called when the kernel is about to halt the system. If this function is implemented, it must be initialized.
  • pfnNotifyForceCleanBoot
    Pointer to an optional function that the kernel calls when the file system is identified as corrupted. It is called before the kernel forces a clean system boot.
  • pROMChain
    Pointer to an optional structure that defines an XIP region. If this structure is implemented, it must be initialized.
  • pKitlInfo
    Pointer to an optional structure that is used to pass platform-specific information from the OAL to the KITL. If this structure is implemented, it must be initialized.
  • pfnKITLGlobalInit
    Specifies the KITL entry point. By default, this is set to KitlDllMain.
  • pdpCurSettings
    Contains a reference to dpCurSettings, which stores a DBGPARAM structure.
  • p__security_cookie
    Pointer to the security cookie for the compiler's /GS build flag.
  • p__security_cookie_complement
    Pointer to the security cookie complement for the compiler's /GS build flag.
  • dwAlarmResolution
    Specifies the alarm resolution in milliseconds.
  • dwYearsRTCRollover
    Specifies the number of years for RTC rollover.
  • _rsvd_[8]
    Reserved for future use.
  • pfnNMIHandler
    Pointer to the function OEMNMIHandler. This function is used on x86 processors.
  • pfnInterruptHandler
    Pointer to the function OEMInterruptHandler. This function is used on ARM processors.
  • dwARM1stLvlBits
    Specifies the extra bits to be set in the 1st level page table. This variable is applies only to ARM processors.
  • dwARMCacheMode
    Specifies C and B bits. dwARMCacheMode is set to 0 by default. This variable applies only to ARM processors.
  • f_V6_VIVT_ICache
    Indicates that the instruction cache is virtually indexed and virtually tagged, using address space identifiers (ASIDs). This variable applies only to ARMv6 processors.
  • pfnSaveVFPCtrlRegs
    Pointer to an optional function that is called when the kernel needs to save the state of the extra FPU registers for the current thread. If this function is implemented, it must be initialized. This function is used on ARM processors if the CPU supports Vector Floating Point (VFP).
  • pfnRestoreVFPCtrlRegs
    Pointer to an optional function that is called to restore the state of the extra implementation-defined VFP registers for the current thread. If this function is implemented, it must be initialized. This function is used on ARM processors if the CPU supports VFP.
  • pfnHandleVFPExcp
    Pointer to an optional function that is called to handle a floating point exception reported by VFP hardware. If this function is implemented, it must be initialized. This function is used on ARM processors if the CPU supports VFP.
  • dwCoProcBits
    Specifies the bits to enable the platform-specific coprocessor. By default, this is set to DEFAULT_FPU_ENABLE. This variable is used on MIPS processors.
  • dwOEMTLBLastIdx
    Specifies the last index for the TLB, which corresponds to the size of the TLB minus 1. By default, this is set to 0. This variable is used on MIPS processors.
  • dwArchFlagOverride
    Architecture flag override value. For MIPS, the kernel attempts to auto-detect all architecture flags if you set this value to MIPS_FLAG_NO_OVERRIDE, which is the default value.
  • pIntrPrio
    Pointer to an optional array that provides the MIPS and SHx kernel with information about which nested interrupts are masked while the current interrupt is being handled. If pIntrPrio is implemented, it must be initialized.
  • pIntrMask
    Pointer to an optional array that provides the MIPS and SHx kernel with information about which nested interrupts are masked while the current interrupt is being handled. If pIntrMask is implemented, it must be initialized.
  • pfnNMIHandler
    Pointer to the function OEMNMIHandler. This function is used on SHx processors.
  • dwSHxIntEventCodeLength
    Specifies interrupt event code length for SHx processors. By default, this is set to SH4_INTEVT_LENGTH.

Remarks

The OEMGLOBAL structure is defined in Public\Common\Oak\Inc\Oemglobal.h.

The initial values for the structure are defined in Private\Winceos\Coreos\Nk\Oemmain\OEMglobal.c, which is built into OEMMain.lib and OEMMain_StaticKITL.lib. The OAL should link to OEMMain.lib when the KITL is built as a DLL, or to OEMMain_StaticKITL.lib if the KITL is linked into Oalkitl.exe. The two libraries are identical except for differences in the initialization of pfnKITLGlobalInit.

The mandatory functions in OEMGLOBAL are initialized. As a result, when the OAL links with OEMMain.lib or OEMMain_StaticKITL.lib, the OAL must provide the implementation.

To set the paging pool size, implement the IOCTL_HAL_GET_POOL_PARAMETERS I/O control code, which the kernel calls during boot to query the paging pool's size. Or, you can use the FIXUPVAR values. For more information about the paging pool, see Paging Pool.

Requirements

Header oemglobal.h
Library OEMMain.lib or OEMMain_StaticKITL.lib
Windows Embedded CE Windows Embedded CE 6.0

See Also

Reference

BSP Data Structures
IOCTL_HAL_GET_POOL_PARAMETERS

Other Resources

Paging Pool
BSP Migration Reference