Skip to content

Commit 3a79444

Browse files
committed
Set chainloader relocation address to 32 MiB
Apparently, this is needed according to #53 for compatibility to Pi3 A+ devices. Fixes #53
1 parent 792b208 commit 3a79444

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

07_uart_chainloader/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ kernel.
5757

5858
The `Makefile` in this tutorial has an additional target, `qemuasm`, that lets
5959
you nicely observe the jump from the loaded address (`0x80_XXX`) to the
60-
relocated code at (`0x1000_0XXX`):
60+
relocated code at (`0x0200_0XXX`):
6161

6262
```console
6363
$ make qemuasm
@@ -71,12 +71,12 @@ IN:
7171

7272
----------------
7373
IN:
74-
0x10000b1c: b0000008 adrp x8, #0x10001000
75-
0x10000b20: b0000009 adrp x9, #0x10001000
76-
0x10000b24: f9475d08 ldr x8, [x8, #0xeb8]
77-
0x10000b28: f9476129 ldr x9, [x9, #0xec0]
78-
0x10000b2c: eb08013f cmp x9, x8
79-
0x10000b30: 540000c2 b.hs #0x10000b48
74+
0x02000b1c: b0000008 adrp x8, #0x2001000
75+
0x02000b20: b0000009 adrp x9, #0x2001000
76+
0x02000b24: f9475d08 ldr x8, [x8, #0xeb8]
77+
0x02000b28: f9476129 ldr x9, [x9, #0xec0]
78+
0x02000b2c: eb08013f cmp x9, x8
79+
0x02000b30: 540000c2 b.hs #0x2000b48
8080
[...]
8181
```
8282

@@ -253,8 +253,8 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld 07_uart_chainloader/s
253253
{
254254
- /* Set current address to the value from which the RPi starts execution */
255255
- . = 0x80000;
256-
+ /* Set the link address to 256 MiB */
257-
+ . = 0x10000000;
256+
+ /* Set the link address to 32 MiB */
257+
+ . = 0x2000000;
258258

259259
+ __binary_start = .;
260260
.text :

07_uart_chainloader/kernel

0 Bytes
Binary file not shown.

07_uart_chainloader/kernel8.img

0 Bytes
Binary file not shown.

07_uart_chainloader/src/bsp/raspberrypi/link.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
SECTIONS
77
{
8-
/* Set the link address to 256 MiB */
9-
. = 0x10000000;
8+
/* Set the link address to 32 MiB */
9+
. = 0x2000000;
1010

1111
__binary_start = .;
1212
.text :

08_timestamps/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ diff -uNr 07_uart_chainloader/src/bsp/raspberrypi/link.ld 08_timestamps/src/bsp/
272272

273273
SECTIONS
274274
{
275-
- /* Set the link address to 256 MiB */
276-
- . = 0x10000000;
275+
- /* Set the link address to 32 MiB */
276+
- . = 0x2000000;
277277
+ /* Set current address to the value from which the RPi starts execution */
278278
+ . = 0x80000;
279279

0 commit comments

Comments
 (0)