bootAPIでセキュアシステム以外はファーム(元はブートROM)からもらった鍵領域を消しておく(SDコンテキストは残す)。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@864 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
nakasima 2008-03-12 04:37:12 +00:00
parent 187834627f
commit 6bf4d3207c
2 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,8 @@
#include <twl/aes/ARM7/lo.h>
#include <sysmenu.h>
#include <sysmenu/ds.h>
#include <firm/hw/ARM7/mmap_firm.h>
#include <firm/format/from_brom.h>
#include <firm/aes/ARM7/aes_init.h>
#include "reboot.h"
@ -233,6 +235,13 @@ BOOL BOOT_WaitStart( void )
}
#endif // FIRM_USE_SDK_KEYS || SYSMENU_DISABLE_RETAIL_BOOT
// セキュアシステム以外は鍵を消しておく
if ( target != REBOOT_TARGET_TWL_SECURE_SYSTEM )
{
OSFromBrom7Buf* fromBrom = (void*)HW_FIRM_FROM_BROM_BUF;
MI_CpuClearFast(fromBrom, sizeof(OSFromBrom7Buf) - sizeof(fromBrom->SDNandContext));
}
// リブート
OS_Boot( dh->s.sub_entry_address, mem_list, target );
}

View File

@ -21,6 +21,8 @@
#include <sysmenu.h>
#include <sysmenu/ds.h>
#include <firm/format/wram_regs.h>
#include <firm/hw/ARM9/mmap_firm.h>
#include <firm/format/from_brom.h>
#include "reboot.h"
@ -176,6 +178,12 @@ void BOOT_Ready( void )
// ゲームコマンドパラメータをスクランブルOFF設定に書き換える
dh->s.game_cmd_param = SYSMi_GetWork()->gameCommondParam;
// セキュアシステム以外は鍵を消しておく
if ( target != REBOOT_TARGET_TWL_SECURE_SYSTEM )
{
MI_CpuClearFast((void*)HW_FIRM_FROM_BROM_BUF, HW_FIRM_FROM_BROM_BUF_SIZE);
}
// 起動するターゲットの種類を指定する必要あり
OS_Boot( dh->s.main_entry_address, mem_list, target );
}