| /****************************************************************************** |
| * |
| * (C)Copyright 2005 - 2008 Marvell. All Rights Reserved. |
| * |
| * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL. |
| * The copyright notice above does not evidence any actual or intended |
| * publication of such source code. |
| * This Module contains Proprietary Information of Marvell and should be |
| * treated as Confidential. |
| * The information in this file is provided for the exclusive use of the |
| * licensees of Marvell. |
| * Such users have the right to use, modify, and incorporate this code into |
| * products for purposes authorized by the license agreement provided they |
| * include this notice and the associated copyright notice with any such |
| * product. |
| * The information in this file is provided "AS IS" without warranty. |
| * |
| ******************************************************************************/ |
| /* |
| * Use this file for BootLoader definitions |
| */ |
| |
| #ifndef __bootloader_h |
| #define __bootloader_h |
| |
| ////////////////////////////////////////////////////////////////////// |
| // Include Boot and Download Mode libraries |
| ////////////////////////////////////////////////////////////////////// |
| #include "BootMode.h" |
| #include "DownloadMode.h" |
| #include "PlatformConfig.h" |
| #include "timer.h" |
| #include "loadoffsets.h" |
| #include "tim.h" |
| #include "Flash.h" |
| #include "DDR_Cfg.h" |
| #include "Typedef.h" |
| #include "PMUA.h" |
| #include "wdt.h" |
| #include "obm2osl.h" |
| |
| #if TRUSTED |
| #include "Security.h" |
| #endif |
| |
| ////////////////////////////////////////////////////////////////////// |
| // Constants |
| ////////////////////////////////////////////////////////////////////// |
| #define MY_CONSUMER_ID TBRIDENTIFIER // OBMIDENTIFIER |
| #define MAX_NUMBER_OF_DATA_PAIRS 0x100 // Max number of data pairs in the Transfer Struct |
| |
| #define KEYID_SOFTWARE_UPGRADE_REQUEST 0x08 // this is the top left key: Key_WiFi |
| |
| #define OBM_VERSION 0x34393139 // need update this info for new release |
| #ifdef CONFIG_ASR_SDTIM |
| #define SWD_VERSION 0x34393233 /* 4.9.2.3 */ |
| #else |
| #define SWD_VERSION 0x34393139 /* 4.9.1.9 */ |
| #endif |
| |
| #define OBM_COMPILE_INFO "-- " __DATE__ " - " __TIME__ " --\n\r" |
| |
| #define KEYID_UPGRADESW_REQUEST 0x01 // GPIO56 / key_TD |
| #define KEYID_PRODUCT_USB_MODE_REQUEST 0x02 // GPIO 55 / key_uAP |
| |
| ////////////////////////////////////////////////////////////////////// |
| // Function Prototypes |
| ////////////////////////////////////////////////////////////////////// |
| void SetupEnvironment(UINT_T *TIM_Address, P_TRANSFER_STRUCT pTS_h, UINT_T *startOfDayTimerVal, TIM *pTIM_h, pFUSE_SET pFuses); |
| void ParseTransferStruct(UINT_T *TIM_Address, P_TRANSFER_STRUCT pTS_h, pFUSE_SET pFuses, UINT_T *startOfDayTimerVal); |
| void FatalError(UINT_T ErrorCode, const CHAR* ErrStr, UINT_T SubErrCode); |
| void PerformTIMBasedSetup(pTIM pTIM_h, pFUSE_SET pFuses); |
| OPERATING_MODE_T DetermineOperatingMode(FUSE_SET *pFuses, pTIM pTIM_h); |
| void FinalizeSetup(pFUSE_SET pFuses, pTIM pTIM_h ); |
| |
| ////////////////////////////////////////////////////////////////////// |
| // Methods defined outside |
| ////////////////////////////////////////////////////////////////////// |
| extern void EnableIrqInterrupts(void); |
| extern void DisableIrqInterrupts(void); |
| extern void TransferControl(UINT_T, UINT_T, UINT_T, UINT_T); |
| extern void SaveProgramState(); |
| extern void TransferControl2TOS(UINT_T LoadAddr, UINT_T NsEntry, UINT_T pOBM2OSLO, UINT_T pAsrTeec); |
| |
| extern pTEEC_INFO pAsrTeec; |
| extern OBM2OSL *pOBM2OSL_h; |
| #endif |