Files
Jibo-Platform-Tools-OLD/depricated payloads/source/jibo_leakerv5SIG.c

25 lines
596 B
C
Raw Normal View History

#define PMC_BASE 0x7000e400
#define PMC_SCRATCH0 (PMC_BASE + 0x50)
#define PMC_SCRATCH1 (PMC_BASE + 0x54)
#define PMC_CNTRL (PMC_BASE + 0x0)
void _start() {
unsigned int *target =
(unsigned int *)(*(volatile unsigned int *)PMC_SCRATCH1);
if ((unsigned int)target < 0x40000000 || (unsigned int)target > 0x40010000) {
target = (unsigned int *)0x40000000;
}
unsigned int val = *target;
*(volatile unsigned int *)PMC_SCRATCH0 = val;
*(volatile unsigned int *)PMC_SCRATCH1 = (unsigned int)target + 4;
*(volatile unsigned int *)PMC_CNTRL |= (1 << 4);
while (1)
;
}