OEMIsRom (Windows Embedded CE 6.0)

1/5/2010

This function determines if a given address range falls within a valid range of ROM addresses, and may be used to support ROM breakpoints.

Syntax

BOOL OEMIsROM(
  LPVOID pvAddr,
  DWORD cbSize
);

Parameters

  • pvAddr
    Starting address of ROM range.
  • cbSize
    Size of address range.

Return Value

This function returns TRUE if the given address falls within an accessible range of ROM addresses.

Remarks

The kernel pointer pfnOEMIsRom should be assigned to this function during OEMInit.

Your implementation of the OEMIsRom function must meet the following requirements:

  • Debug trace output is not allowed in this function.
  • If the input address range partially overlaps the ROM range, the function should return TRUE.

The following code example shows an implementation of OEMIsRom.

BOOL OEMIsRom( LPVOID pvAddr, DWORD cbSize )
{
    DWORD  CachedAddr;
    // Use cached addresses
    CachedAddr = (DWORD )pvAddr & ~CACHED_TO_UNCACHED_OFFSET;
    // Both addresses must fall within the flash range
         return( (CachedAddr < FLASH_END) && ((CachedAddr + cbSize) > FLASH_START) );
}

Requirements

Header Developer Implemented
Library Developer Implemented
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

Optional OAL Functions
pfnOEMIsRom
OEMInit

Other Resources

Adding Support for ROM Breakpoints