SDK rev.6745に対応。AES_InitとSEA_Initの引数にスレッドPriorityを追加。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1685 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yosiokat 2008-06-25 01:14:03 +00:00
parent cae2469015
commit 9357d24c28
7 changed files with 20 additions and 17 deletions

View File

@ -65,6 +65,8 @@
#define THREAD_PRIO_SND 6 #define THREAD_PRIO_SND 6
#define THREAD_PRIO_FATFS 8 #define THREAD_PRIO_FATFS 8
#define THREAD_PRIO_HOTSW 11 #define THREAD_PRIO_HOTSW 11
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_SEA 12
#define THREAD_PRIO_RTC 12 #define THREAD_PRIO_RTC 12
#define THREAD_PRIO_SNDEX 14 #define THREAD_PRIO_SNDEX 14
#define THREAD_PRIO_FS 15 #define THREAD_PRIO_FS 15
@ -117,13 +119,6 @@ extern BOOL sdmcGetNandLogFatal( void );
Arguments: None. Arguments: None.
Returns: None. Returns: None.
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#define COMPONENT_WRAM_A_OFS (HW_WRAM_A_LTD - HW_WRAM_BASE)
#define COMPONENT_WRAM_A_OFS_END (COMPONENT_WRAM_A_OFS + HW_WRAM_A_SIZE)
#define COMPONENT_WRAM_B_OFS (COMPONENT_WRAM_A_OFS - HW_WRAM_B_SIZE)
#define COMPONENT_WRAM_B_OFS_END (COMPONENT_WRAM_A_OFS)
#define COMPONENT_WRAM_C_OFS (COMPONENT_WRAM_B_OFS - HW_WRAM_C_SIZE)
#define COMPONENT_WRAM_C_OFS_END (COMPONENT_WRAM_B_OFS)
void void
TwlSpMain(void) TwlSpMain(void)
{ {
@ -198,7 +193,7 @@ TwlSpMain(void)
InitializeFatfs(); // FATFS 初期化 InitializeFatfs(); // FATFS 初期化
InitializeNwm(mainHeapHandle, mainHeapHandle); // NWM 初期化 InitializeNwm(mainHeapHandle, mainHeapHandle); // NWM 初期化
#ifndef SDK_NOCRYPTO #ifndef SDK_NOCRYPTO
AES_Init(); // AES <20>‰Šú‰» AES_Init(THREAD_PRIO_AES); // AES <20>‰Šú‰»
{ {
// JPEGエンコード用の鍵セット // JPEGエンコード用の鍵セット
@ -208,7 +203,7 @@ TwlSpMain(void)
} }
#ifdef SDK_SEA #ifdef SDK_SEA
SEA_Init(); SEA_Init(THREAD_PRIO_SEA);
#endif // ifdef SDK_SEA #endif // ifdef SDK_SEA
#endif #endif
MCU_InitIrq(THREAD_PRIO_MCU); // MCU 初期化 MCU_InitIrq(THREAD_PRIO_MCU); // MCU 初期化

View File

@ -61,6 +61,7 @@ static char* debugPtr = (char*)PRINT_MEMORY_ADDR;
#define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__)) #define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__))
#endif #endif
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_FATFS 8 #define THREAD_PRIO_FATFS 8
#define DMA_FATFS_1 0 #define DMA_FATFS_1 0
#define DMA_FATFS_2 1 #define DMA_FATFS_2 1
@ -148,7 +149,7 @@ static void PostInit(void)
PM_InitFIRM(); PM_InitFIRM();
#endif #endif
// AESの初期化 // AESの初期化
AES_Init(); // for encrypted NAND AES_Init(THREAD_PRIO_AES); // for encrypted NAND
// マウント情報の初期化 // マウント情報の初期化
FS_InitMountInfo(FALSE, TRUE); FS_InitMountInfo(FALSE, TRUE);
// アイドルスレッドの作成 // アイドルスレッドの作成

View File

@ -66,6 +66,7 @@ static char* debugPtr = (char*)PRINT_MEMORY_ADDR;
#define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__)) #define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__))
#endif #endif
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_FATFS 8 #define THREAD_PRIO_FATFS 8
#define DMA_FATFS_1 0 #define DMA_FATFS_1 0
#define DMA_FATFS_2 1 #define DMA_FATFS_2 1
@ -126,7 +127,7 @@ static void PostInit(void)
AESi_PreInitKeys(); AESi_PreInitKeys();
} }
// AESの初期化 // AESの初期化
AES_Init(); // for encrypted NAND AES_Init(THREAD_PRIO_AES); // for encrypted NAND
// 4: after AES_Init // 4: after AES_Init
PUSH_PROFILE(); PUSH_PROFILE();
SetDebugLED(++step); // 0x85 SetDebugLED(++step); // 0x85

View File

@ -66,6 +66,7 @@ static char* debugPtr = (char*)PRINT_MEMORY_ADDR;
#define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__)) #define OS_TPrintf(...) (debugPtr += STD_TSPrintf(debugPtr, __VA_ARGS__))
#endif #endif
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_FATFS 8 #define THREAD_PRIO_FATFS 8
#define DMA_FATFS_1 0 #define DMA_FATFS_1 0
#define DMA_FATFS_2 1 #define DMA_FATFS_2 1
@ -126,7 +127,7 @@ static void PostInit(void)
AESi_PreInitKeys(); AESi_PreInitKeys();
} }
// AESの初期化 // AESの初期化
AES_Init(); // for encrypted NAND AES_Init(THREAD_PRIO_AES); // for encrypted NAND
// マウント情報の初期化 // マウント情報の初期化
FS_InitMountInfo(FALSE, TRUE); FS_InitMountInfo(FALSE, TRUE);
// アイドルスレッドの作成 // アイドルスレッドの作成

View File

@ -51,6 +51,8 @@
#define THREAD_PRIO_NWM_COMMAND 9 #define THREAD_PRIO_NWM_COMMAND 9
#define THREAD_PRIO_NWM_WPA 10 #define THREAD_PRIO_NWM_WPA 10
#define THREAD_PRIO_HOTSW 11 #define THREAD_PRIO_HOTSW 11
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_SEA 12
#define THREAD_PRIO_RTC 12 #define THREAD_PRIO_RTC 12
#define THREAD_PRIO_SNDEX 14 #define THREAD_PRIO_SNDEX 14
#define THREAD_PRIO_FS 15 #define THREAD_PRIO_FS 15
@ -124,8 +126,8 @@ TwlSpMain(void)
#endif #endif
/* 各ライブラリ初期化 */ /* 各ライブラリ初期化 */
AES_Init(); // AES AES_Init(THREAD_PRIO_AES); // AES
SEA_Init(); // SEA SEA_Init(THREAD_PRIO_SEA); // SEA
FS_Init(FS_DMA_NOT_USE); // FS for CARD FS_Init(FS_DMA_NOT_USE); // FS for CARD
FS_CreateReadServerThread(THREAD_PRIO_FS); // FS for CARD FS_CreateReadServerThread(THREAD_PRIO_FS); // FS for CARD
InitializeFatfs(); // FAT-FS InitializeFatfs(); // FAT-FS

View File

@ -49,6 +49,8 @@
#define THREAD_PRIO_NWM_COMMAND 9 #define THREAD_PRIO_NWM_COMMAND 9
#define THREAD_PRIO_NWM_WPA 10 #define THREAD_PRIO_NWM_WPA 10
#define THREAD_PRIO_HOTSW 11 #define THREAD_PRIO_HOTSW 11
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_SEA 12
#define THREAD_PRIO_RTC 12 #define THREAD_PRIO_RTC 12
#define THREAD_PRIO_SNDEX 14 #define THREAD_PRIO_SNDEX 14
#define THREAD_PRIO_FS 15 #define THREAD_PRIO_FS 15
@ -117,8 +119,8 @@ TwlSpMain(void)
(void)OS_EnableInterrupts(); (void)OS_EnableInterrupts();
/* 各ライブラリ初期化 */ /* 各ライブラリ初期化 */
AES_Init(); // AES AES_Init(THREAD_PRIO_AES); // AES
SEA_Init(); // SEA SEA_Init(THREAD_PRIO_SEA); // SEA
FS_Init(FS_DMA_NOT_USE); // FS for CARD FS_Init(FS_DMA_NOT_USE); // FS for CARD
FS_CreateReadServerThread(THREAD_PRIO_FS); // FS for CARD FS_CreateReadServerThread(THREAD_PRIO_FS); // FS for CARD
InitializeFatfs(); // FAT-FS InitializeFatfs(); // FAT-FS

View File

@ -46,6 +46,7 @@
#define THREAD_PRIO_SPI 2 #define THREAD_PRIO_SPI 2
#define THREAD_PRIO_SND 6 #define THREAD_PRIO_SND 6
#define THREAD_PRIO_FATFS 8 #define THREAD_PRIO_FATFS 8
#define THREAD_PRIO_AES 12
#define THREAD_PRIO_RTC 12 #define THREAD_PRIO_RTC 12
#define THREAD_PRIO_FS 15 #define THREAD_PRIO_FS 15
/* OS_THREAD_LAUNCHER_PRIORITY 16 */ /* OS_THREAD_LAUNCHER_PRIORITY 16 */
@ -151,7 +152,7 @@ TwlSpMain(void)
if (OS_IsRunOnTwl() == TRUE) if (OS_IsRunOnTwl() == TRUE)
{ {
#ifndef SDK_NOCRYPTO #ifndef SDK_NOCRYPTO
AES_Init(); // AES <20>‰Šú‰» AES_Init(THREAD_PRIO_AES); // AES
#endif #endif
} }