
15 May
2014
15 May
'14
12:41 a.m.
Hello Darwin,
On wo, 2014-05-14 at 15:05 -0700, Darwin Rambo wrote:
+#ifdef CONFIG_ARM64
- /*
* Fix relocation if u-boot is not on an aligned address.
*/
- {
int offset = CONFIG_SYS_TEXT_BASE % 4096;
if (offset) {
addr += offset;
debug("Relocation Addr bumped to 0x%08lx\n", addr);
}
- }
+#endif
Do you really want to check a define at runtime? Placement is typically at the end of RAM and allocation goes down, not up as in this patch. Aren't you overlapping memory here?
static int setup_reloc(void) { +#ifdef CONFIG_ARM64
- /*
* Fix relocation if u-boot is not on an aligned address.
*/
- int offset = CONFIG_SYS_TEXT_BASE % 4096;
- if (offset) {
gd->relocaddr += offset;
debug("Relocation Addr bumped to 0x%08lx\n", gd->relocaddr);
- }
+#endif gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
This is a generic file, hell breaks loose if you start using arch / board / pre bootloader specific workarounds here afaiac.
lucky for you, I am not a u-boot maintainer, but this looks at least a bit weird, glancing at it.
Regards, Jeroen