From: Luke Kenneth Casson Leighton Date: Mon, 11 Apr 2022 22:18:35 +0000 (+0100) Subject: hack offset into boot address as well X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2dd9e4ac27af101747014820aeb278751b94461;p=ls2.git hack offset into boot address as well --- diff --git a/coldboot/coldboot.c b/coldboot/coldboot.c index d5f8c49..c240c3f 100644 --- a/coldboot/coldboot.c +++ b/coldboot/coldboot.c @@ -160,19 +160,19 @@ static unsigned long copy_flash(unsigned int offset, unsigned int dst_offs) } puts("Booting from DRAM at"); - uart_writeuint32((unsigned int)ehdr.e_entry); + uart_writeuint32((unsigned int)(dst_offs+ehdr.e_entry)); puts("\r\n"); puts("Dump DRAM\r\n"); for (i = 0; i < 64; i++) { - uart_writeuint32(readl(ehdr.e_entry+(i*4))); + uart_writeuint32(readl(dst_offs+ehdr.e_entry+(i*4))); puts(" "); if ((i & 7) == 7) puts("\r\n"); } puts("\r\n"); //flush_cpu_icache(); - return ehdr.e_entry; + return dst_offs+ehdr.e_entry; dump: puts("HDR: \r\n"); for (i = 0; i < 8; i++) {