blob: bf575a9610a289424a380b4e5333adedd31e0cca [file] [log] [blame]
#define APB_TIMER_REG_LDC (0xf7e82c00) //; apb_timer Load Counter Register
#define APB_TIMER_REG_VALUE (0xf7e82c04) //; apb_timer Value Register
#define APB_TIMER_REG_CTL (0xf7e82c08) //; apb_timer Controll Register
#define APB_TIMER_REG_RANGE (0x14) //; apb_timer Register Range for each timer
#define IMAGE2_TIMER (2) //; use timer 2 to caculate the whole time for Image-2
#define BOOT_FLOW_TIMER (6) //; use timer 6 to caculate the whole time for Image-2 and Image-3
#define TIMER_INIT_COUNT (0xffffffff)
// r0: destination address
// void Jump(void *dest, unsigned long param[8])
.global Jump
Jump:
#if 0
mov r8, r0
mov ip, r1
cmp ip, #0
ldmne ip!, {r0-r7}
dsb
isb
MOV pc, r8
#else
mov x19, x0
mov x20, x1
//; According to ARMv8 calling convention, callee should garantee x19 and x20 intact.
bl disable_mmu
cmp x20, #0
b.eq noparam
ldp x6, x7, [x20, #0x30]
ldp x4, x5, [x20, #0x20]
ldp x2, x3, [x20, #0x10]
ldp x0, x1, [x20, #0]
noparam:
//;dsb
isb
br x19
panic:
b panic
#endif