these payloads may not work , i have no clue honestly i attached them , also there are 2 helper py scripts that might work with some of these payloads
31 lines
805 B
C
31 lines
805 B
C
#define PMC_BASE 0x7000e400
|
|
#define PMC_SCRATCH0 (PMC_BASE + 0x50)
|
|
#define PMC_SCRATCH1 (PMC_BASE + 0x54)
|
|
#define PMC_CNTRL (PMC_BASE + 0x0)
|
|
|
|
void _start() {
|
|
__asm__ volatile("mrs r0, cpsr\n"
|
|
"bic r0, r0, #0x1f\n"
|
|
"orr r0, r0, #0x13\n"
|
|
"msr cpsr, r0\n");
|
|
|
|
unsigned int *target =
|
|
(unsigned int *)(*(volatile unsigned int *)PMC_SCRATCH1);
|
|
|
|
if ((unsigned int)target < 0x40000000 || (unsigned int)target > 0xFFF10000) {
|
|
target = (unsigned int *)0x40000000;
|
|
}
|
|
|
|
unsigned int val = *target;
|
|
|
|
*(volatile unsigned int *)PMC_SCRATCH0 = val;
|
|
*(volatile unsigned int *)PMC_SCRATCH1 = (unsigned int)target + 4;
|
|
|
|
__asm__ volatile("mcr p15, 0, r0, c7, c10, 4\n");
|
|
|
|
*(volatile unsigned int *)PMC_CNTRL |= (1 << 4);
|
|
|
|
while (1)
|
|
;
|
|
}
|