Share via


Adding Support for Memory Verification

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 image before the 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

How to Develop a Boot Loader

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.