From 21ab2e48975ac33067ce44c5fe3daaa6638a8904 Mon Sep 17 00:00:00 2001 From: yutaka Date: Tue, 5 Feb 2008 01:54:51 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E9=96=A2=E6=95=B0?= =?UTF-8?q?=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@576 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/libraries/fs/ARM9/src/fs_loader2.c | 52 ------------------------ include/firm/fs/ARM9/fs_loader2.h | 14 ------- 2 files changed, 66 deletions(-) diff --git a/build/libraries/fs/ARM9/src/fs_loader2.c b/build/libraries/fs/ARM9/src/fs_loader2.c index 79601beb..43efe415 100644 --- a/build/libraries/fs/ARM9/src/fs_loader2.c +++ b/build/libraries/fs/ARM9/src/fs_loader2.c @@ -166,58 +166,6 @@ static BOOL CheckRomCertificate( SVCSignHeapContext* pool, const RomCertificate return CheckDigest(md, digest, TRUE, TRUE); } -/*---------------------------------------------------------------------------* - Name: FS2_LoadBuffer - - Description: receive data from ARM7 via WRAM-B and store in destination address, - calculate SHA1 in parallel if ctx is specified - - Arguments: dest destination address to read - size total length to read in bytes - ctx pointer to SHA1 context or NULL - - Returns: TRUE if success - *---------------------------------------------------------------------------*/ -BOOL FS2_LoadBuffer( u8* dest, u32 size, SVCSHA1Context *ctx ) -{ - static int count = 0; - - while ( size > 0 ) - { - u8* src = (u8*)HW_FIRM_LOAD_BUFFER_BASE + count * HW_FIRM_LOAD_BUFFER_UNIT_SIZE; - u32 unit = size < HW_FIRM_LOAD_BUFFER_UNIT_SIZE ? size : HW_FIRM_LOAD_BUFFER_UNIT_SIZE; - if ( PXI_RecvID() != FIRM_PXI_ID_LOAD_PIRIOD ) - { - return FALSE; - } - MIi_SetWramBankMaster_B( count, MI_WRAM_ARM9 ); - if (ctx) - { - int done; - for ( done = 0; done < unit; done += HASH_UNIT ) - { - u8* s = src + done; - u8* d = dest + done; - u32 u = unit - done < HASH_UNIT ? unit - done : HASH_UNIT; - SVC_SHA1Update( ctx, s, u ); - MI_CpuCopyFast( s, d, u ); - MI_CpuClearFast( s, u ); // OS_Bootでのクリアと比較する - } - } - else - { - MI_CpuCopyFast( src, dest, unit ); - MI_CpuClearFast( src, unit ); // OS_Bootでのクリアと比較する - } - DC_FlushRange( src, unit ); - size -= unit; - dest += unit; - MIi_SetWramBankMaster_B( count, MI_WRAM_ARM7 ); - count = ( count + 1 ) % HW_FIRM_LOAD_BUFFER_UNIT_NUMS; - } - return TRUE; -} - static void AesCallback(AESResult result, void* arg) { volatile BOOL *pBusy = (BOOL*)arg; diff --git a/include/firm/fs/ARM9/fs_loader2.h b/include/firm/fs/ARM9/fs_loader2.h index a5228728..edb22fb0 100644 --- a/include/firm/fs/ARM9/fs_loader2.h +++ b/include/firm/fs/ARM9/fs_loader2.h @@ -60,20 +60,6 @@ void FS2_DeleteAesKeySeed( void ); *---------------------------------------------------------------------------*/ void FS2_SetDigestKey( const u8* digestKey ); -/*---------------------------------------------------------------------------* - Name: FS2_LoadBuffer - - Description: receive data from ARM7 via WRAM-B and store in destination address, - calculate SHA1 in parallel if ctx is specified - - Arguments: dest destination address to read - size total length to read in bytes - ctx pointer to SHA1 context or NULL - - Returns: TRUE if success - *---------------------------------------------------------------------------*/ -BOOL FS2_LoadBuffer( u8* dest, u32 size, SVCSHA1Context *ctx ); - /*---------------------------------------------------------------------------* Name: FS2_LoadModule