TwlIPL/build/systemMenu_RED/HWInfoWriter/ARM9/src/main.c
yosiokat 75a9423d25 ・生産工程でNANDに書き込んで、以降はReadOnlyとなるHW情報を追加。
・HW情報や本体設定データを共通のTSFフォーマットにするため、TSF
 フォーマットのコードを追加。(現状はHW情報のみ対応)
・HW情報用のRSA鍵ペアを追加。
・acsignライブラリにRSA暗号化関数を追加。
・acsignライブラリのRSAでコード関数の値チェックを修正。
・HW情報をライトするHWInfoWriterを追加。
・NANDフラッシュマップ&フォルダツリーのフォルダ構成における各ファイルに
 ついて、RSA署名の有無と使用する鍵による色分けを行う。
・TWL_SystemMenuメモリマップにNANDファーム用バッファを記載。
 (ランチャーとメモリが重ならないように)

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@312 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2007-12-05 12:19:30 +00:00

86 lines
2.6 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL
File: main.c
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "misc.h"
#include "HWInfoWriter.h"
// extern data-----------------------------------------------------------------
extern void SYSMi_SetLauncherMountInfo( void );
// define data-----------------------------------------------------------------
// function's prototype-------------------------------------------------------
static void INTR_VBlank( void );
// global variable-------------------------------------------------------------
// static variable-------------------------------------------------------------
// const data------------------------------------------------------------------
// ============================================================================
// function's description
// ============================================================================
void TwlMain(void)
{
SYSMi_SetLauncherMountInfo();
// 初期化----------------------------------
OS_Init();
OS_InitTick();
(void)OS_EnableIrq();
(void)OS_EnableInterrupts();
GX_Init();
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
// 割り込み許可----------------------------
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
(void)GX_VBlankIntr(TRUE);
// デバイス初期化-------------------------------
(void)RTC_Init();
// システムの初期化------------------
InitAllocator();
// メインループ----------------------------
HWInfoWriterInit();
while(1){
OS_WaitIrq(1, OS_IE_V_BLANK); // Vブランク割り込み待ち
ReadKeyPad(); // キー入力の取得
HWInfoWriterMain();
}
}
// ============================================================================
// 割り込み処理
// ============================================================================
// Vブランク割り込み
static void INTR_VBlank(void)
{
OS_SetIrqCheckFlag(OS_IE_V_BLANK); // Vブランク割込チェックのセット
}