Skip to contentSkip to conversation

Fix the ARM bootloader so that r0 is always 0 before jumping to the kernel entry point

PATCH Applied Sylvain Garrigues 2 participants 2 messages Apr 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix the ARM bootloader so that r0 is always 0 before jumping to the kernel entry point

---
 hw/arm/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/boot.c +1 -1
index 5975fbf..5876945 100644
@@ -68,7 +68,7 @@ static const ARMInsnFixup bootloader_aarch64[] = {
  */
 
 static const ARMInsnFixup bootloader[] = {
-    { 0xe28fe008 }, /* add     lr, pc, #8 */
+    { 0xe28fe004 }, /* add     lr, pc, #4 */
     { 0xe51ff004 }, /* ldr     pc, [pc, #-4] */
     { 0, FIXUP_BOARD_SETUP },
 #define BOOTLOADER_NO_BOARD_SETUP_OFFSET 3
Signature · 1 line
2.8.1
#1 lore raw
Quoted 10 lines · Sylvain Garrigues
---
 hw/arm/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/boot.c +0 -0
index 5975fbf..5876945 100644

hw/arm/boot.c static const ARMInsnFixup bootloader_aarch64[] = { · line 74

Quoted 8 lines
hw/arm/boot.c +1 -1
@@ -68,7 +68,7 @@ static const ARMInsnFixup bootloader_aarch64[] = {
  */
 
 static const ARMInsnFixup bootloader[] = {
-    { 0xe28fe008 }, /* add     lr, pc, #8 */
+    { 0xe28fe004 }, /* add     lr, pc, #4 */
     { 0xe51ff004 }, /* ldr     pc, [pc, #-4] */
     { 0, FIXUP_BOARD_SETUP },
 #define BOOTLOADER_NO_BOARD_SETUP_OFFSET 3

Applied, to master, thanks. (I expanded the commit message a bit.)

-- PMM