hack offset into boot address as well
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 11 Apr 2022 22:18:35 +0000 (23:18 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 11 Apr 2022 22:18:35 +0000 (23:18 +0100)
coldboot/coldboot.c

index d5f8c4973e97271ecdc5342d2c554856e2c9fabe..c240c3fefefd325a072ddfa73a6a8091e677632b 100644 (file)
@@ -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++) {