u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
int rcode = 0;
struct image_header *header;
+ u32 ecrypt_bm_addr = 0;
if (argc < 2)
return CMD_RET_USAGE;
memcpy((void *)load_addr, (void *)(addr + sizeof(struct image_header)),
size);
- rcode = mon_install(load_addr, dpsc_base, freq);
+ if (argc >= 3)
+ ecrypt_bm_addr = simple_strtoul(argv[2], NULL, 16);
+
+ rcode = mon_install(load_addr, dpsc_base, freq, ecrypt_bm_addr);
printf("## installed monitor @ 0x%x, freq [%d], status %d\n",
load_addr, freq, rcode);
return 0;
}
-U_BOOT_CMD(mon_install, 2, 0, do_mon_install,
+U_BOOT_CMD(mon_install, 3, 0, do_mon_install,
"Install boot kernel at 'addr'",
""
);
#ifndef _MACH_MON_H_
#define _MACH_MON_H_
-int mon_install(u32 addr, u32 dpsc, u32 freq);
+int mon_install(u32 addr, u32 dpsc, u32 freq, u32 bm_addr);
int mon_power_on(int core_id, void *ep);
int mon_power_off(int core_id);
#include <spl.h>
asm(".arch_extension sec\n\t");
-int mon_install(u32 addr, u32 dpsc, u32 freq)
+int mon_install(u32 addr, u32 dpsc, u32 freq, u32 bm_addr)
{
int result;
"mov r0, %1\n"
"mov r1, %2\n"
"mov r2, %3\n"
+ "mov r3, %4\n"
"blx r0\n"
"ldmfd r13!, {lr}\n"
: "=&r" (result)
- : "r" (addr), "r" (dpsc), "r" (freq)
- : "cc", "r0", "r1", "r2", "memory");
+ : "r" (addr), "r" (dpsc), "r" (freq), "r" (bm_addr)
+ : "cc", "r0", "r1", "r2", "r3", "memory");
return result;
}