mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
セキュアコマンドレイテンシをROMヘッダから取得するように変更。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@822 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
a7f1f274a2
commit
85b6d1fb48
@ -4,6 +4,7 @@
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <twl.h>
|
#include <twl.h>
|
||||||
|
#include <firm/os/common/system.h>
|
||||||
#include <blowfish.h>
|
#include <blowfish.h>
|
||||||
#include <dsCardCommon.h>
|
#include <dsCardCommon.h>
|
||||||
#include <customNDma.h>
|
#include <customNDma.h>
|
||||||
@ -11,7 +12,6 @@
|
|||||||
// define -------------------------------------------------------------------
|
// define -------------------------------------------------------------------
|
||||||
#define SECURE_SEGMENT_NUM 4
|
#define SECURE_SEGMENT_NUM 4
|
||||||
#define ONE_SEGMENT_PAGE_NUM 8
|
#define ONE_SEGMENT_PAGE_NUM 8
|
||||||
#define COMMAND_DECRYPTION_WAIT 25 // 25ms
|
|
||||||
|
|
||||||
#define ROM_EMULATION_START_OFS 0x160
|
#define ROM_EMULATION_START_OFS 0x160
|
||||||
#define ROM_EMULATION_END_OFS 0x180
|
#define ROM_EMULATION_END_OFS 0x180
|
||||||
@ -310,8 +310,8 @@ static void SetSecureCommand(SecureCommandType type, CardBootData *cbd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// コマンド作成
|
||||||
data = (type == S_PNG_ON) ? (u64)cbd->vd : (u64)cbd->vae;
|
data = (type == S_PNG_ON) ? (u64)cbd->vd : (u64)cbd->vae;
|
||||||
|
|
||||||
cndLE.dw |= cbd->vbi;
|
cndLE.dw |= cbd->vbi;
|
||||||
cndLE.dw |= data << HSWOP_S_VA_SHIFT;
|
cndLE.dw |= data << HSWOP_S_VA_SHIFT;
|
||||||
|
|
||||||
@ -337,8 +337,8 @@ static void PreSendSecureCommand(CardBootData *cbd, u32 *scrambleMask)
|
|||||||
// MCCNT1 ƒŒƒWƒXƒ^<5E>Ý’è
|
// MCCNT1 ƒŒƒWƒXƒ^<5E>Ý’è
|
||||||
reg_HOTSW_MCCNT1 = START_MASK | *scrambleMask | cbd->pBootSegBuf->rh.s.secure_cmd_param;
|
reg_HOTSW_MCCNT1 = START_MASK | *scrambleMask | cbd->pBootSegBuf->rh.s.secure_cmd_param;
|
||||||
|
|
||||||
// 25ms‘Ò‚¿
|
// セキュアコマンド間レイテンシ待ち
|
||||||
OS_Sleep(COMMAND_DECRYPTION_WAIT);
|
OS_Sleep( OS_CPUCYC_TO_MSEC(cbd->pBootSegBuf->rh.s.secure_cmd_latency * 0x100) );
|
||||||
}
|
}
|
||||||
// <20>š NTR-MROM‘Ήž
|
// <20>š NTR-MROM‘Ήž
|
||||||
else{
|
else{
|
||||||
|
|||||||
@ -511,7 +511,7 @@ static HotSwState LoadBannerData(void)
|
|||||||
|
|
||||||
if ( SYSMi_GetWork()->flags.hotsw.isExistCard )
|
if ( SYSMi_GetWork()->flags.hotsw.isExistCard )
|
||||||
{
|
{
|
||||||
SYSMi_GetWork()->flags.hotsw.isInspectCard = ((ROM_Header_Short *)SYSM_CARD_ROM_HEADER_BAK)->inspect_card;
|
SYSMi_GetWork()->flags.hotsw.isInspectCard = s_cbData.pBootSegBuf->rh.s.inspect_card;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user