mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@399 b08762b0-b915-fc4b-9d8c-17b2551a87ff
98 lines
3.2 KiB
C
98 lines
3.2 KiB
C
/*---------------------------------------------------------------------------*
|
||
Project: TwlIPL - AES - include
|
||
File: aes_init.h
|
||
|
||
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:: 2007-09-06$
|
||
$Rev$
|
||
$Author$
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
#ifndef TWL_AES_AES_INIT_H_
|
||
#define TWL_AES_AES_INIT_H_
|
||
|
||
#include <twl/os/common/format_rom.h>
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
ŠÖ<C5A0>”’è‹`
|
||
*---------------------------------------------------------------------------*/
|
||
/*---------------------------------------------------------------------------*
|
||
Name: AESi_InitKeysForApp
|
||
|
||
Description: set IDs depending on the application.
|
||
you SHOULD NOT touch any ID registers after this call.
|
||
|
||
Arguments: game_code game code
|
||
|
||
Returns: None
|
||
*---------------------------------------------------------------------------*/
|
||
void AESi_InitKeysForApp( u8 game_code[4] );
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: AESi_InitKeysForHard
|
||
|
||
Description: set IDs depending on the system hardware.
|
||
you SHOULD NOT use this for standard applications.
|
||
|
||
Arguments: fuse camouflaged fuse id
|
||
|
||
Returns: None
|
||
*---------------------------------------------------------------------------*/
|
||
void AESi_InitKeysForHard( u8 fuse[8] );
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: AESi_ResetAesKey
|
||
|
||
Description: set SEED/KEYs by dummy data without seed[3]
|
||
|
||
Arguments: None
|
||
|
||
Returns: None
|
||
*---------------------------------------------------------------------------*/
|
||
void AESi_ResetAesKey( void );
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: AESi_InitKeysFIRM
|
||
|
||
Description: set IDs depending on the application.
|
||
you SHOULD NOT touch any ID registers after this call.
|
||
|
||
Arguments: game_code game code
|
||
|
||
Returns: None
|
||
*---------------------------------------------------------------------------*/
|
||
static inline void AESi_InitKeysFIRM( void )
|
||
{
|
||
AESi_InitKeysForApp( (u8*)((ROM_Header_Short*)HW_TWL_ROM_HEADER_BUF)->game_code );
|
||
AESi_ResetAesKey();
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: AESi_RecvSeed
|
||
|
||
Description: set SEED/KEY from ARM9 via PXI.
|
||
|
||
Arguments: developer_encrypt set TRUE if received key is using as direct key
|
||
|
||
Returns: None
|
||
*---------------------------------------------------------------------------*/
|
||
void AESi_RecvSeed( BOOL developer_encrypt );
|
||
|
||
#ifdef __cplusplus
|
||
} /* extern "C" */
|
||
#endif
|
||
|
||
/* TWL_AES_AES_INIT_H_ */
|
||
#endif
|