Partager via


Adding Support for Memory Verification (Windows Embedded CE 6.0)

1/5/2010

Support for memory verification is optional and is handled through a function pointer.

If you want the BLCOMMON library to call a third-party routine to verify the RAM or flash memory to be used by the run-time image before the run-time image is downloaded completely, the function pointer should be changed to point to a third-party supplied verification routine. For more information, see OEMVerifyMemory.

The following code example shows how OEMVerifyMemory is implemented.

BOOL OEMVerifyMemory (DWORD dwStartAddr, DWORD dwLength)
{
    // 
    // Check specified start address and range here.
    // If the address does not correspond to RAM or flash memory
    // that is physically available on the system,
    // return FALSE. Otherwise, return TRUE.
    //
}

When using BLCOMMON during boot loader initialization, for example, OEMDebugInit, the verify memory function pointer should be assigned to the OEM's verification routine. For example, to have BLCOMMON call OEMVerifyMemory to validate the image signature, you should do the following in OEMDebugInit.

g_pOEMVerifyMemory = OEMVerifyMemory;

See Also

Tasks

How to Develop a Boot Loader