Modified payload_aes_busy to include some sleep statements
This commit is contained in:
@@ -27,6 +27,7 @@ typedef int (*BOOTROM_FUNC)();
|
|||||||
#define ADDR_CLOCK_GATE 0x100009d4c
|
#define ADDR_CLOCK_GATE 0x100009d4c
|
||||||
#define ADDR_SYSTEM_TIME 0x10000B0E0
|
#define ADDR_SYSTEM_TIME 0x10000B0E0
|
||||||
#define ADDR_TIME_HAS_ELAPSED 0x10000B04F
|
#define ADDR_TIME_HAS_ELAPSED 0x10000B04F
|
||||||
|
#define ADDR_TASK_SLEEP 0x10000ADF0
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Unsupported checkm8 platform"
|
#error "Unsupported checkm8 platform"
|
||||||
|
|||||||
@@ -7,4 +7,10 @@
|
|||||||
#define SYSTEM_TIME ((BOOTROM_FUNC) ADDR_SYSTEM_TIME)
|
#define SYSTEM_TIME ((BOOTROM_FUNC) ADDR_SYSTEM_TIME)
|
||||||
#define TIME_HAS_ELAPSED ((BOOTROM_FUNC) ADDR_TIME_HAS_ELAPSED)
|
#define TIME_HAS_ELAPSED ((BOOTROM_FUNC) ADDR_TIME_HAS_ELAPSED)
|
||||||
|
|
||||||
|
PAYLOAD_SECTION
|
||||||
|
void task_sleep(unsigned int usec)
|
||||||
|
{
|
||||||
|
((BOOTROM_FUNC) ADDR_TASK_SLEEP)(usec);
|
||||||
|
}
|
||||||
|
|
||||||
#endif //CHECKM8_TOOL_BRFUNC_TIMING_H
|
#endif //CHECKM8_TOOL_BRFUNC_TIMING_H
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "brfunc_aes.h"
|
#include "brfunc_aes.h"
|
||||||
|
#include "brfunc_timing.h"
|
||||||
|
|
||||||
|
|
||||||
TEXT_SECTION
|
TEXT_SECTION
|
||||||
@@ -12,10 +13,12 @@ int _start(void *src, void *dst, void *key, int rep)
|
|||||||
src_data[j] = ((unsigned char *) src)[j];
|
src_data[j] = ((unsigned char *) src)[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task_sleep(100);
|
||||||
for(i = 0; i < rep; i++)
|
for(i = 0; i < rep; i++)
|
||||||
{
|
{
|
||||||
if(i % 2 == 0) aes_hw_crypto_cmd(16, src_data, dst, 16, 0, key, 0);
|
if(i % 2 == 0) aes_hw_crypto_cmd(16, src_data, dst, 16, 0, key, 0);
|
||||||
else aes_hw_crypto_cmd(16, dst, src_data, 16, 0, key, 0);
|
else aes_hw_crypto_cmd(16, dst, src_data, 16, 0, key, 0);
|
||||||
|
task_sleep(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user