Skip to content

Commit

Permalink
stubs: Zero kernel and dtb address in stubs
Browse files Browse the repository at this point in the history
Allow the firmware to choose sensible kernel and DTB addresses for 32-
and 64-bit system by zeroing the values in the stubs. These will be
overwritten by the real address, or zero if the relevant item is not
loaded.

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell committed Apr 18, 2016
1 parent 723dd8c commit 2b2d204
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions armstubs/armstub.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ machid: .word 3138
.org 0xf0
.word 0x5afe570b @ magic value to indicate firmware should overwrite atags and kernel
.word 0 @ version
atags: .word 0x100 @ device tree address
kernel: .word 0x8000 @ kernel start address
atags: .word 0x0 @ device tree address
kernel: .word 0x0 @ kernel start address
4 changes: 2 additions & 2 deletions armstubs/armstub7.S
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ jmp_loader:
.org 0xf0
.word 0x5afe570b @ magic value to indicate firmware should overwrite atags and kernel
.word 0 @ version
atags: .word 0x100 @ device tree address
kernel: .word 0x8000 @ kernel start address
atags: .word 0x0 @ device tree address
kernel: .word 0x0 @ kernel start address
4 changes: 2 additions & 2 deletions armstubs/armstub8.S
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ stub_version:
.org 0xf8
.globl dtb_ptr32
dtb_ptr32:
.word 0x100
.word 0x0
.org 0xfc
.globl kernel_entry32
kernel_entry32:
.word 0x8000
.word 0x0

.org 0x100
.globl dtb_space
Expand Down

0 comments on commit 2b2d204

Please sign in to comment.