ImportJumpの引数を拡張PSRAMからエミュレーションROM経由へ変更。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1299 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
nakasima 2008-05-09 06:13:11 +00:00
parent 30d29d379a
commit af54e8741d
2 changed files with 34 additions and 5 deletions

View File

@ -46,15 +46,14 @@ typedef struct _ImportJumpSetting
иђи`
*---------------------------------------------------------------------------*/
#define IMPORT_TAD_ROM_OFS 0x00800000
#define IMPORT_JUMP_SETTING_OFS (IMPORT_TAD_ROM_OFS - CARD_ROM_PAGE_SIZE)
/*---------------------------------------------------------------------------*
ЉЦђи`
*---------------------------------------------------------------------------*/
inline ImportJump* GetImportJumpSetting(void)
{
// リセット後は各PSRAMの先頭8MBしか保証されない
return (ImportJump *)HW_TWL_MAIN_MEM_EX;
}
ImportJump* GetImportJumpSetting( void );
/*===========================================================================*/

View File

@ -45,6 +45,7 @@
static void* spStack;
static u32 sCurrentProgress;
static vu8 sNowImport = FALSE;
static ImportJump sImportJumpSetting;
/*---------------------------------------------------------------------------*
ŕŠÖ<EFBFBD><EFBFBD>錾
@ -323,3 +324,32 @@ static void UpdateNandBoxCount( void )
}
}
/*---------------------------------------------------------------------------*
Name: GetImportJumpSetting
Description:
Arguments: None.
Returns: None.
*---------------------------------------------------------------------------*/
ImportJump* GetImportJumpSetting( void )
{
static BOOL inited = FALSE;
if ( ! inited )
{
// ŠJ”­—pCPUÅÌ݃Š<C692>[ƒh
if ( *(u8*)(OS_CHIPTYPE_DEBUGGER_ADDR) & OS_CHIPTYPE_DEBUGGER_MASK )
{
u16 id = (u16)OS_GetLockID();
CARD_LockRom( id );
CARD_ReadRom( MI_DMA_NOT_USE, (void*)IMPORT_JUMP_SETTING_OFS, &sImportJumpSetting, sizeof(ImportJump) );
CARD_UnlockRom( id );
}
inited = TRUE;
}
return &sImportJumpSetting;
}