if (!FlashRead(EBOOT_FLASH_CFG_START, (PUCHAR)EBootCFG, sizeof(EBOOT_CFG)))
{
EdbgOutputDebugString("ERROR: LoadEBootCFG: failed to load configuration.\r\n");
return(FALSE);
}
// Is the CFG data valid? Check for the magic number that was written the last time
// the CFG block was updated. If Eboot has never been run, there will be no configuration
// information, so the magic number will likely not be found. In this case, setup the
// factory defaults and store them into Flash.
//
if (EBootCFG->ConfigMagicNumber != EBOOT_CFG_MAGIC_NUMBER)
{
ResetDefaultEBootCFG(EBootCFG);
}
// Make sure a valid debug serial port address (physical) was found.
//
if (g_EbootCFG.dwDbgSerPhysAddr == 0)
{
g_EbootCFG.dwDbgSerPhysAddr = BULVERDE_BASE_REG_PA_FFUART;
}