4NAA対応

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/branches/20080524_SDK500fc_plus4_branch@1576 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yoshida_teruhisa 2008-06-05 01:09:08 +00:00
parent fbc8a36e4d
commit d07a97ae0c
5 changed files with 36 additions and 6 deletions

View File

@ -104,7 +104,12 @@ void SYSMi_SetAESKeysForSignJPEG( ROM_Header *pROMH, BOOL *pIsClearSlotB, BOOL *
{ {
void *pAESKey; void *pAESKey;
if( ( pROMH->s.titleID_Hi & TITLE_ID_HI_SECURE_FLAG_MASK ) && if( ( pROMH->s.titleID_Hi & TITLE_ID_HI_SECURE_FLAG_MASK ) &&
( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "ANH", 3 ) ) ) { ( ( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( (const char *)&pROMH->s.titleID_Lo[ 1 ], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
) {
// for Launcher // for Launcher
pAESKey = ( SCFG_GetBondingOption() == SCFG_OP_PRODUCT ) ? pAESKey = ( SCFG_GetBondingOption() == SCFG_OP_PRODUCT ) ?
&( OSi_GetFromFirmAddr()->rsa_pubkey[ 3 ][ 0x30 ] ) : (void *)dev_jpegEncodeKeyForLauncher; &( OSi_GetFromFirmAddr()->rsa_pubkey[ 3 ][ 0x30 ] ) : (void *)dev_jpegEncodeKeyForLauncher;

View File

@ -513,6 +513,8 @@ static OSTitleId SYSMi_getTitleIdOfMachineSettings( void )
int getNum; int getNum;
int validNum = 0; int validNum = 0;
NAMTitleId *pTitleIDList = NULL; NAMTitleId *pTitleIDList = NULL;
char machine_setting_code[4];
ROM_Header_Short *header = ( ROM_Header_Short *)HW_TWL_ROM_HEADER_BUF;
// インストールされているタイトルの取得 // インストールされているタイトルの取得
getNum = NAM_GetNumTitles(); getNum = NAM_GetNumTitles();
@ -523,10 +525,13 @@ static OSTitleId SYSMi_getTitleIdOfMachineSettings( void )
} }
(void)NAM_GetTitleList( pTitleIDList, (u32)getNum ); (void)NAM_GetTitleList( pTitleIDList, (u32)getNum );
// 本体情報のTitleIDの4バイト目はランチャーのTitleIDの4バイト目と同じ
STD_TSNPrintf( machine_setting_code, 4, "BN%c", header->titleID_Lo[3]);
// 取得したタイトルに本体情報のIDがあるかチェック // 取得したタイトルに本体情報のIDがあるかチェック
for( l = 0; l < getNum; l++ ) { for( l = 0; l < getNum; l++ ) {
char *code = ((char *)&pTitleIDList[l]) + 1; char *code = ((char *)&pTitleIDList[l]) + 1;
if( 0 == STD_CompareNString( code, "BNH", 3 ) ) if( 0 == STD_CompareNString( code, machine_setting_code, 3 ) )
{ {
ret = (OSTitleId)pTitleIDList[l]; ret = (OSTitleId)pTitleIDList[l];
break; break;

View File

@ -920,7 +920,11 @@ static AuthResult SYSMi_AuthenticateHeaderWithSign( TitleProperty *pBootTitle, R
prev = OS_GetTick(); prev = OS_GetTick();
hi = head->s.titleID_Hi; hi = head->s.titleID_Hi;
// Launcherは専用の鍵を使う // Launcherは専用の鍵を使う
if( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) ) if( ( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( &gamecode[1], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
{ {
keynum = LAUNCHER_KEY_INDEX; keynum = LAUNCHER_KEY_INDEX;
}else }else
@ -1462,12 +1466,13 @@ static void SYSMi_AuthenticateTitleThreadFunc( TitleProperty *pBootTitle )
// ロード済みの指定タイトルを別スレッドで検証開始する // ロード済みの指定タイトルを別スレッドで検証開始する
#define AUTH_STACK_SIZE 0x1400
void SYSM_StartAuthenticateTitle( TitleProperty *pBootTitle ) void SYSM_StartAuthenticateTitle( TitleProperty *pBootTitle )
{ {
static u64 stack[ STACK_SIZE / sizeof(u64) ]; static u64 stack[ AUTH_STACK_SIZE / sizeof(u64) ];
s_authResult = AUTH_RESULT_PROCESSING; s_authResult = AUTH_RESULT_PROCESSING;
OS_InitThread(); OS_InitThread();
OS_CreateThread( &s_auth_thread, (void (*)(void *))SYSMi_AuthenticateTitleThreadFunc, (void*)pBootTitle, stack+STACK_SIZE/sizeof(u64), STACK_SIZE,THREAD_PRIO ); OS_CreateThread( &s_auth_thread, (void (*)(void *))SYSMi_AuthenticateTitleThreadFunc, (void*)pBootTitle, stack+AUTH_STACK_SIZE/sizeof(u64), AUTH_STACK_SIZE,THREAD_PRIO );
OS_WakeupThreadDirect( &s_auth_thread ); OS_WakeupThreadDirect( &s_auth_thread );
} }
@ -1616,7 +1621,11 @@ static void SYSMi_makeTitleIdList( void )
// ランチャーはリストに入れない // ランチャーはリストに入れない
gamecode = (char *)&(pe_hs->titleID); gamecode = (char *)&(pe_hs->titleID);
if( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) ) if( ( 0 == STD_CompareNString( &gamecode[1], "ANH", 3 ) )
#ifdef DEV_UIG_LAUNCHER
|| ( ( 0 == STD_CompareNString( &gamecode[1], "AN4", 3 ) ) && ( SCFG_GetBondingOption() != 0 ) )
#endif
)
{ {
continue; continue;
} }

View File

@ -52,6 +52,9 @@ void SYSMi_SetBootAppMountInfo( TitleProperty *pBootTitle );
#endif // SDK_ARM9 #endif // SDK_ARM9
// UIGランチャーの開発版4NA*を開発用CPUに乗ったREDランチャーから
// 起動するためのスイッチ
#define DEV_UIG_LAUNCHER
#ifdef SDK_ARM9 #ifdef SDK_ARM9
//------------------------------------------------------- //-------------------------------------------------------

View File

@ -360,6 +360,14 @@ BOOL InstallWlanFirmware( BOOL isHotStartWLFirm )
u8 *pSecBuf = NULL; u8 *pSecBuf = NULL;
u8 *pHdrBuf = NULL; u8 *pHdrBuf = NULL;
ROM_Header_Short *header = ( ROM_Header_Short *)HW_TWL_ROM_HEADER_BUF;
if( header->titleID_Lo[3] == '4' )
{
OS_TPrintf("[Wlan Firm] This is DEV_UIG_Launcher. Wireless firmware download skipped.\n");
return TRUE;
}
s_isFinished = FALSE; s_isFinished = FALSE;
pNwmBuf = NULL; pNwmBuf = NULL;
pFwBuffer = NULL; pFwBuffer = NULL;