From c59fe1d776ccf21c3ad9936378b750b4959bbb73 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 16 May 2013 16:30:41 +0200 Subject: [PATCH] Leif's BSS fix --- grub-core/kern/arm/uboot/startup.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/arm/uboot/startup.S b/grub-core/kern/arm/uboot/startup.S index 3e3869867..256613674 100644 --- a/grub-core/kern/arm/uboot/startup.S +++ b/grub-core/kern/arm/uboot/startup.S @@ -99,8 +99,13 @@ FUNCTION(codestart) @ Since we _are_ the C run-time, we need to manually zero the BSS @ region before continuing ldr r0, =EXT_C(__bss_start) @ zero from here - ldr r1, =EXT_C(_end) @ to here + @ If unaligned, bytewise zero until base address aligned. mov r2, #0 +1: tst r0, #3 + beq 2f + strb r2, [r0], #1 + b 1b +2: ldr r1, =EXT_C(_end) @ to here 1: str r2, [r0], #4 cmp r0, r1 bne 1b