Project restructuring
This commit is contained in:
18
c8_payloads/include/brfunc_aes.h
Normal file
18
c8_payloads/include/brfunc_aes.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef CHECKM8_TOOL_BRFUNC_AES_H
|
||||
#define CHECKM8_TOOL_BRFUNC_AES_H
|
||||
|
||||
#include "brfunc_common.h"
|
||||
|
||||
#define AES_HW_CRYPTO_CMD ((BOOTROM_FUNC) ADDR_AES_HW_CRYPTO_CMD)
|
||||
|
||||
#define CREATE_KEY_COMMAND ((BOOTROM_FUNC) ADDR_CREATE_KEY_COMMAND)
|
||||
#define PUSH_COMMAND_KEY ((BOOTROM_FUNC) ADDR_PUSH_COMMAND_KEY)
|
||||
#define PUSH_COMMAND_IV ((BOOTROM_FUNC) ADDR_PUSH_COMMAND_IV)
|
||||
#define PUSH_COMMAND_DATA ((BOOTROM_FUNC) ADDR_PUSH_COMMAND_DATA)
|
||||
#define PUSH_COMMAND_FLAG ((BOOTROM_FUNC) ADDR_PUSH_COMMAND_FLAG)
|
||||
#define WAIT_FOR_COMMAND_FLAG ((BOOTROM_FUNC) ADDR_WAIT_FOR_COMMAND)
|
||||
|
||||
#define rAES_INT_STATUS (long *) ADDR_AES_CONTROL
|
||||
#define rAES_CONTROL (long *) ADDR_AES_STATUS
|
||||
|
||||
#endif //CHECKM8_TOOL_BRFUNC_AES_H
|
||||
35
c8_payloads/include/brfunc_common.h
Normal file
35
c8_payloads/include/brfunc_common.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef CHECKM8_TOOL_BRFUNC_COMMON_H
|
||||
#define CHECKM8_TOOL_BRFUNC_COMMON_H
|
||||
|
||||
#include "checkm8_config.h"
|
||||
|
||||
typedef int (*BOOTROM_FUNC)();
|
||||
|
||||
#if CHECKM8_PLATFORM == 8010
|
||||
|
||||
/* AES */
|
||||
#define ADDR_AES_HW_CRYPTO_CMD 0x100000f0c
|
||||
#define ADDR_CREATE_KEY_COMMAND 0x100000e90
|
||||
#define ADDR_PUSH_COMMAND_KEY 0x100000c64
|
||||
#define ADDR_PUSH_COMMAND_IV 0x100000d18
|
||||
#define ADDR_PUSH_COMMAND_DATA 0x100000d98
|
||||
#define ADDR_PUSH_COMMAND_FLAG 0x100000e20
|
||||
#define ADDR_WAIT_FOR_COMMAND 0x100000ec4
|
||||
|
||||
#define ADDR_AES_CONTROL 0x20A108008
|
||||
#define ADDR_AES_STATUS 0x20A108018
|
||||
|
||||
/* SEP */
|
||||
#define ADDR_DPA_SEEDED 0x100001140
|
||||
#define ADDR_SEND_DPA_MESSAGE 0x100002338
|
||||
|
||||
/* Timing */
|
||||
#define ADDR_CLOCK_GATE 0x100009d4c
|
||||
#define ADDR_SYSTEM_TIME 0x10000B0E0
|
||||
#define ADDR_TIME_HAS_ELAPSED 0x10000B04F
|
||||
|
||||
#else
|
||||
#error "Unsupported checkm8 platform"
|
||||
#endif
|
||||
|
||||
#endif //CHECKM8_TOOL_BRFUNC_COMMON_H
|
||||
9
c8_payloads/include/brfunc_sep.h
Normal file
9
c8_payloads/include/brfunc_sep.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef CHECKM8_TOOL_BRFUNC_SEP_H
|
||||
#define CHECKM8_TOOL_BRFUNC_SEP_H
|
||||
|
||||
#include "brfunc_common.h"
|
||||
|
||||
#define DPA_SEEDED ((BOOTROM_FUNC) ADDR_DPA_SEEDED)
|
||||
#define SEP_CREATE_SEND_DPA_MESSAGE ((BOOTROM_FUNC) ADDR_SEND_DPA_MESSAGE)
|
||||
|
||||
#endif //CHECKM8_TOOL_BRFUNC_SEP_H
|
||||
10
c8_payloads/include/brfunc_timing.h
Normal file
10
c8_payloads/include/brfunc_timing.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef CHECKM8_TOOL_BRFUNC_TIMING_H
|
||||
#define CHECKM8_TOOL_BRFUNC_TIMING_H
|
||||
|
||||
#include "brfunc_common.h"
|
||||
|
||||
#define CLOCK_GATE ((BOOTROM_FUNC) ADDR_CLOCK_GATE)
|
||||
#define SYSTEM_TIME ((BOOTROM_FUNC) ADDR_SYSTEM_TIME)
|
||||
#define TIME_HAS_ELAPSED ((BOOTROM_FUNC) ADDR_TIME_HAS_ELAPSED)
|
||||
|
||||
#endif //CHECKM8_TOOL_BRFUNC_TIMING_H
|
||||
7
c8_payloads/include/util.h
Normal file
7
c8_payloads/include/util.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef CHECKM8_TOOL_UTIL_H
|
||||
#define CHECKM8_TOOL_UTIL_H
|
||||
|
||||
#define PAYLOAD_SECTION __attribute__ ((section (".payload_text")))
|
||||
#define TEXT_SECTION __attribute__((section (".text")))
|
||||
|
||||
#endif //CHECKM8_TOOL_UTIL_H
|
||||
Reference in New Issue
Block a user