mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
(更新:Akabane Jumpei)
・カードの読み込みをしたら、どんな場合でもフラグ処理をするように修正 ・カードが抜けた時、Secure2バッファをクリアするように修正 ・状態回復スレッドのスリープ条件を変更 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2013 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
e32ffdaba9
commit
160586b6f5
@ -153,7 +153,6 @@ static SYSMRomEmuInfo s_romEmuInfo;
|
|||||||
static BOOL s_debuggerFlg;
|
static BOOL s_debuggerFlg;
|
||||||
|
|
||||||
static BOOL s_isPulledOut = TRUE;
|
static BOOL s_isPulledOut = TRUE;
|
||||||
static BOOL s_isHotSwBusy = FALSE;
|
|
||||||
static BOOL s_pollingThreadSleepFlg = FALSE;
|
static BOOL s_pollingThreadSleepFlg = FALSE;
|
||||||
|
|
||||||
// HMACSHA1の鍵
|
// HMACSHA1の鍵
|
||||||
@ -344,8 +343,6 @@ static HotSwState LoadCardData(void)
|
|||||||
HotSwState state = HOTSW_SUCCESS;
|
HotSwState state = HOTSW_SUCCESS;
|
||||||
u32 romMode = HOTSW_ROM_MODE_NULL;
|
u32 romMode = HOTSW_ROM_MODE_NULL;
|
||||||
|
|
||||||
s_isHotSwBusy = TRUE;
|
|
||||||
|
|
||||||
// カードのロック
|
// カードのロック
|
||||||
CARD_LockRom(s_CardLockID);
|
CARD_LockRom(s_CardLockID);
|
||||||
|
|
||||||
@ -582,8 +579,6 @@ end:
|
|||||||
// カードのロック開放(※ロックIDは開放せずに持ち続ける)
|
// カードのロック開放(※ロックIDは開放せずに持ち続ける)
|
||||||
CARD_UnlockRom(s_CardLockID);
|
CARD_UnlockRom(s_CardLockID);
|
||||||
|
|
||||||
s_isHotSwBusy = FALSE;
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1556,8 +1551,6 @@ static void HotSwThread(void *arg)
|
|||||||
|
|
||||||
HotSwState retval;
|
HotSwState retval;
|
||||||
HotSwMessageForArm7 *msg;
|
HotSwMessageForArm7 *msg;
|
||||||
|
|
||||||
static BOOL card_exist = FALSE;
|
|
||||||
|
|
||||||
while(1){
|
while(1){
|
||||||
OS_ReceiveMessage(&HotSwThreadData.hotswQueue, (OSMessage *)&msg, OS_MESSAGE_BLOCK);
|
OS_ReceiveMessage(&HotSwThreadData.hotswQueue, (OSMessage *)&msg, OS_MESSAGE_BLOCK);
|
||||||
@ -1613,23 +1606,20 @@ static void HotSwThread(void *arg)
|
|||||||
if(HOTSW_IsCardExist()){
|
if(HOTSW_IsCardExist()){
|
||||||
if(!s_isPulledOut){
|
if(!s_isPulledOut){
|
||||||
if(GetMcSlotMode() == SLOT_STATUS_MODE_10){
|
if(GetMcSlotMode() == SLOT_STATUS_MODE_10){
|
||||||
if(!card_exist){
|
LockHotSwRsc(&SYSMi_GetWork()->lockCardRsc);
|
||||||
card_exist = TRUE;
|
|
||||||
|
|
||||||
LockHotSwRsc(&SYSMi_GetWork()->lockCardRsc);
|
|
||||||
|
|
||||||
SYSMi_GetWork()->flags.hotsw.isExistCard = TRUE;
|
SYSMi_GetWork()->flags.hotsw.isExistCard = TRUE;
|
||||||
SYSMi_GetWork()->flags.hotsw.isCardStateChanged = TRUE;
|
SYSMi_GetWork()->flags.hotsw.isCardStateChanged = TRUE;
|
||||||
SYSMi_GetWork()->flags.hotsw.isCardLoadCompleted = TRUE;
|
SYSMi_GetWork()->flags.hotsw.isCardLoadCompleted = TRUE;
|
||||||
#ifdef USE_WRAM_LOAD
|
#ifdef USE_WRAM_LOAD
|
||||||
SYSMi_GetWork()->flags.hotsw.isCardGameMode = TRUE;
|
SYSMi_GetWork()->flags.hotsw.isCardGameMode = TRUE;
|
||||||
#endif
|
#endif
|
||||||
UnlockHotSwRsc(&SYSMi_GetWork()->lockCardRsc);
|
UnlockHotSwRsc(&SYSMi_GetWork()->lockCardRsc);
|
||||||
#ifdef USE_WRAM_LOAD
|
#ifdef USE_WRAM_LOAD
|
||||||
SendPxiMessage(HOTSW_CHANGE_GAMEMODE);
|
SendPxiMessage(HOTSW_CHANGE_GAMEMODE);
|
||||||
#endif
|
#endif
|
||||||
HOTSW_PutString("ok!\n");
|
HOTSW_PutString("ok!\n");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1653,8 +1643,6 @@ static void HotSwThread(void *arg)
|
|||||||
|
|
||||||
// カードが抜けてたら
|
// カードが抜けてたら
|
||||||
else{
|
else{
|
||||||
card_exist = FALSE;
|
|
||||||
|
|
||||||
#ifdef USE_WRAM_LOAD
|
#ifdef USE_WRAM_LOAD
|
||||||
SendPxiMessage(HOTSW_CARD_PULLOUT);
|
SendPxiMessage(HOTSW_CARD_PULLOUT);
|
||||||
#endif
|
#endif
|
||||||
@ -1665,6 +1653,7 @@ static void HotSwThread(void *arg)
|
|||||||
|
|
||||||
MI_CpuClearFast(s_pBootSegBuffer, s_BootSegBufSize);
|
MI_CpuClearFast(s_pBootSegBuffer, s_BootSegBufSize);
|
||||||
MI_CpuClearFast(s_pSecureSegBuffer, s_SecureSegBufSize);
|
MI_CpuClearFast(s_pSecureSegBuffer, s_SecureSegBufSize);
|
||||||
|
MI_CpuClearFast(s_pSecure2SegBuffer, s_Secure2SegBufSize);
|
||||||
MI_CpuClearFast((u32 *)SYSM_CARD_BANNER_BUF, sizeof(TWLBannerFile));
|
MI_CpuClearFast((u32 *)SYSM_CARD_BANNER_BUF, sizeof(TWLBannerFile));
|
||||||
|
|
||||||
s_isPulledOut = TRUE;
|
s_isPulledOut = TRUE;
|
||||||
@ -2006,7 +1995,7 @@ static void MonitorThread(void *arg)
|
|||||||
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
while(s_isHotSwBusy);
|
while( SYSMi_GetWork()->flags.hotsw.isBusyHotSW );
|
||||||
|
|
||||||
// ポーリングスレッド抑制フラグが上がってたら、スリープ。抑制フラグが下りたら起床。
|
// ポーリングスレッド抑制フラグが上がってたら、スリープ。抑制フラグが下りたら起床。
|
||||||
if(s_pollingThreadSleepFlg){
|
if(s_pollingThreadSleepFlg){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user