From ab87f7d487cb848acd567d7f1f816382f46b33b9 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Wed, 7 Jun 2017 17:13:05 -0700 Subject: [PATCH] make sure first-stage bootloader loads a0 and a1 as expected by pk --- bootrom/bootrom.S | 4 ++++ bootrom/bootrom.img | Bin 96 -> 96 bytes 2 files changed, 4 insertions(+) diff --git a/bootrom/bootrom.S b/bootrom/bootrom.S index 76f2f1f4..6b2e973a 100644 --- a/bootrom/bootrom.S +++ b/bootrom/bootrom.S @@ -10,6 +10,8 @@ _start: sw zero, 0(a0) // clear the interrupt li a0, DRAM_BASE // program reset vector csrw mepc, a0 // return from interrupt to start of user program + csrr a0, mhartid // hartid for next level bootloader + la a1, _dtb // dtb address for next level bootloader mret .section .text.hang, "ax", @progbits @@ -26,3 +28,5 @@ _hang: wfi_loop: wfi j wfi_loop + +_dtb: diff --git a/bootrom/bootrom.img b/bootrom/bootrom.img index 33cb9452c485b99d58501878e8ff6ab9ee14cf04..040dc666e7b2323b84f57eb18dc12e0a4aa57049 100755 GIT binary patch delta 26 hcmYdDm>|oq>hN(oD+9yiR#ui`1_gtOiXsyo6aZ!|2MPcH delta 23 VcmYdDm>|o~pkTm&1Saa3001Y40=@tM