mini_ipc.h File Reference

Go to the source code of this file.

Data Structures

struct  sig_rsa2048_t
struct  tmd_content_t
struct  tmd_t
struct  otp_t
struct  eep_ctr_t
struct  seeprom_t

Defines

#define SDHC_ENOCARD   -0x1001
#define SDHC_ESTRANGE   -0x1002
#define SDHC_EOVERFLOW   -0x1003
#define SDHC_ETIMEDOUT   -0x1004
#define SDHC_EINVAL   -0x1005
#define SDHC_EIO   -0x1006
#define SDMMC_NO_CARD   1
#define SDMMC_NEW_CARD   2
#define SDMMC_INSERTED   3
#define NAND_ECC_OK   0
#define NAND_ECC_CORRECTED   1
#define NAND_ECC_UNCORRECTABLE   -1
#define TMD_BM_MARK(x)   ((u16*)&(x->reserved[4]))
#define TMD_BM_MAGIC   0x424d

Functions

int sd_get_state (void)
int sd_protected (void)
int sd_mount (void)
int sd_select (void)
int sd_read (u32 start_block, u32 blk_cnt, void *buffer)
int sd_write (u32 start_block, u32 blk_cnt, const void *buffer)
u32 sd_getsize (void)
int ipc_powerpc_boot (const void *addr, u32 len)
 Reboot the PowerPC to a specific vector.
int ipc_powerpc_boot_file (const char *file)
 Reboot the PowerPC to a file.
u32 boot2_run (u32 hi, u32 lo)
 Return to boot2 with modified launch title.
tmd_tboot2_tmd (void)
 Get boot2's TMD.
void getotp (otp_t *otp)
 Get OTP data.
void getseeprom (seeprom_t *seeprom)
 Get SEEPROM data.
void getMiniGitVer (char *buf, u16 len)
 Get the Git version of MINI.
void aes_reset (void)
 Reset the AES engine.
void aes_set_key (u8 *key)
 Set the key for the AES engine.
void aes_set_iv (u8 *iv)
 Set the IV for the AES engine.
void aes_decrypt (u8 *src, u8 *dst, u32 blocks, u8 keep_iv)
 Decrypt data using the AES engine.
void nand_reset (void)
u32 nand_getid (void)
u8 nand_status (void)
int nand_read (u32 pageno, void *data, void *ecc)
void nand_write (u32 pageno, void *data, void *ecc)
void nand_erase (u32 pageno)
int slave_load (void *code, u32 size)
 Load code into the ARM.
void slave_execute (void)
 Schedule execution of code.
void slave_params (void *data, u32 size)
 Load parameter data into the ARM.
void * slave_results (void)
 Retrieve results of executed code.
int slave_executing (void)
 Checks if the slave is done executing.

Variables

struct sig_rsa2048_t packed

Detailed Description

An abstraction of several MINI calls.


Define Documentation

#define NAND_ECC_CORRECTED   1

ECC was corrected

#define NAND_ECC_OK   0

ECC is proper

#define NAND_ECC_UNCORRECTABLE   -1

ECC was uncorrectable

#define SDHC_EINVAL   -0x1005

Invalid

#define SDHC_EIO   -0x1006

I/O error

#define SDHC_ENOCARD   -0x1001

No card inserted

#define SDHC_EOVERFLOW   -0x1003

Overflow

#define SDHC_ESTRANGE   -0x1002

???

#define SDHC_ETIMEDOUT   -0x1004

Request timed out

#define SDMMC_INSERTED   3

Card inserted

#define SDMMC_NEW_CARD   2

New card

#define SDMMC_NO_CARD   1

No card inserted


Function Documentation

void aes_decrypt ( u8 *  src,
u8 *  dst,
u32  blocks,
u8  keep_iv 
)

Decrypt data using the AES engine.

Parameters:
src the data to decrypt. (16 byte aligned)
dst the destination for the decrypted data. (16 byte aligned)
blocks how many blocks to decrypt. (blocks are 16 bytes)
keep_iv if 1, chain from last command. Otherwise use the set IV.
void aes_set_iv ( u8 *  iv  ) 

Set the IV for the AES engine.

Parameters:
iv the IV to be used.
void aes_set_key ( u8 *  key  ) 

Set the key for the AES engine.

Parameters:
key the key to be used.
u32 boot2_run ( u32  hi,
u32  lo 
)

Return to boot2 with modified launch title.

Parameters:
hi the high 32bits of the launch title
lo the low 32bits of the launch title
Returns:
Anything must be an error code
tmd_t* boot2_tmd ( void   ) 

Get boot2's TMD.

Returns:
boot2's TMD, or (tmd_t*)-1.
void getMiniGitVer ( char *  buf,
u16  len 
)

Get the Git version of MINI.

Parameters:
buf buffer to be filled.
len length of the buffer to be filled.
void getotp ( otp_t otp  ) 

Get OTP data.

Parameters:
otp a pointer to an otp_t to be filled.
void getseeprom ( seeprom_t seeprom  ) 

Get SEEPROM data.

Parameters:
seeprom a pointer to an seeprom_t to be filled.
int ipc_powerpc_boot ( const void *  addr,
u32  len 
)

Reboot the PowerPC to a specific vector.

Parameters:
addr the address the PowerPC will boot at.
len how long the code at addr is
Returns:
Anything must be an error code
int ipc_powerpc_boot_file ( const char *  file  ) 

Reboot the PowerPC to a file.

Parameters:
file the path to the file that will be launched.
Returns:
Anything must be an error code
int slave_executing ( void   ) 

Checks if the slave is done executing.

Returns:
1 if the slave is still executing, 0 if the slave is done.
int slave_load ( void *  code,
u32  size 
)

Load code into the ARM.

Parameters:
code the code to be sent.
size the length of the code to be sent.
Returns:
0 on success, error code otherwise
void slave_params ( void *  data,
u32  size 
)

Load parameter data into the ARM.

Parameters:
data the data to be sent.
size the length of the data to be sent.
void* slave_results ( void   ) 

Retrieve results of executed code.

Returns:
Memory pointing to the results of the executed code.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3