sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: #define FILE_ID 0x594D777D sl@0: #include "bootldr.h" sl@0: sl@0: GLDEF_D TInt LoadDrive; sl@0: GLDEF_D TInt LoadFile; sl@0: GLDEF_D TInt LoadSize; sl@0: GLDEF_D TInt ImageSize; sl@0: GLDEF_D TInt ImageReadProgress; sl@0: GLDEF_D TBool ImageHeaderPresent=EFalse; sl@0: GLDEF_D TBool ImageZip=EFalse; sl@0: GLDEF_D TBool LoadToFlash=EFalse; sl@0: GLDEF_D TBool FlashBootLoader=EFalse; sl@0: GLDEF_D TInt FileSize; sl@0: GLDEF_D TLoadDevice LoadDevice; sl@0: GLDEF_D TInputFunc InputFunction; sl@0: GLDEF_D TCloseInputFunc CloseInputFunction; sl@0: GLDEF_D TBuf<256> FileName; sl@0: GLDEF_D TUint32 RamBootPhys; sl@0: GLDEF_D TUint32 * ActualDestinationAddress; sl@0: GLDEF_D TInt SerialDownloadPort; sl@0: GLDEF_D TBps SerialBaud; sl@0: GLDEF_D RFile bootFile; sl@0: GLDEF_D TBool ImageDeflated=EFalse; sl@0: GLDEF_D TBool RomLoaderHeaderExists=ETrue; sl@0: GLDEF_D TBusLocalDrive LocDrv; sl@0: GLDEF_D TBool LocDrvChg; sl@0: GLDEF_D TInt64 LocDrvPos; sl@0: sl@0: GLDEF_C void BootFault(TUint aId, TInt aLine, char aFileName[]) sl@0: { sl@0: PrintToScreen(_L("BOOTFAULT: 0x%X in file %s @ line %d"), aId, aFileName, aLine); sl@0: User::After(1000); // delay to let the LCD draw the message sl@0: RDebug::Print(_L("BOOTFAULT: 0x%X in file %s @ line %d"), aId, aFileName, aLine); sl@0: User::LeaveIfError(KErrUnknown); sl@0: // Kern::Fault((const char*)buf.Ptr(),aLine); sl@0: } sl@0: