<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/board/raspberrypi, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>rpi: Fix DRAM size reporting to show total RAM</title>
<updated>2025-11-28T13:50:51+00:00</updated>
<author>
<name>Anders Roxell</name>
<email>anders.roxell@linaro.org</email>
</author>
<published>2025-11-25T10:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5b702cf4d09f84f6cfe2989038b67feafe9945ed'/>
<id>5b702cf4d09f84f6cfe2989038b67feafe9945ed</id>
<content type='text'>
The VideoCore mailbox GET_ARM_MEMORY only reports the size of the
first accessible memory region (~947 MiB on RPi4 with 8GB), not the
total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)"
instead of "DRAM: 7.9 GiB".

On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple
non-contiguous banks. The dram_init() function only sets gd-&gt;ram_size
to the first bank size reported by the VideoCore firmware, while
fdtdec_setup_memory_banksize() correctly populates all memory banks
from the device tree.

Fix this by updating gd-&gt;ram_size after dram_init_banksize() has
populated all memory banks, so it reflects the actual total RAM
across all banks.

Signed-off-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The VideoCore mailbox GET_ARM_MEMORY only reports the size of the
first accessible memory region (~947 MiB on RPi4 with 8GB), not the
total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)"
instead of "DRAM: 7.9 GiB".

On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple
non-contiguous banks. The dram_init() function only sets gd-&gt;ram_size
to the first bank size reported by the VideoCore firmware, while
fdtdec_setup_memory_banksize() correctly populates all memory banks
from the device tree.

Fix this by updating gd-&gt;ram_size after dram_init_banksize() has
populated all memory banks, so it reflects the actual total RAM
across all banks.

Signed-off-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: Use the U-Boot control FDT for fdt_addr</title>
<updated>2025-11-25T09:22:12+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-09-27T11:30:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=15c719174cf30c4ef1c5a3638156db8c318fbd18'/>
<id>15c719174cf30c4ef1c5a3638156db8c318fbd18</id>
<content type='text'>
The fdt_addr variable is used in extlinux as a fallback devicetree if
none is provided by the boot command. Otherwise the only use in U-Boot
seems to me efi_install_fdt() when the internal FDT is required.

The existing mechanism uses the devicetree provided to U-Boot, but in
its original, unrelocated position. In my testing on an rpi_4, this ends
up at 2b35ef00 which is not a convenient place in memory, if the ramdisk
is large.

U-Boot already deals with this sort of problem by relocating the FDT
to a safe address.

So use the control-FDT address instead.

Remove the existing comment, which is confusing, since the FDT is not
actually passed unmodified to the kernel: U-Boot adds various things
using its FDT-fixup mechanism.

Note that board_get_usable_ram_top() reduces the RAM top for boards with
less RAM. This behaviour is left unchanged as there is no other
mechanism for U-Boot to handle this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fdt_addr variable is used in extlinux as a fallback devicetree if
none is provided by the boot command. Otherwise the only use in U-Boot
seems to me efi_install_fdt() when the internal FDT is required.

The existing mechanism uses the devicetree provided to U-Boot, but in
its original, unrelocated position. In my testing on an rpi_4, this ends
up at 2b35ef00 which is not a convenient place in memory, if the ramdisk
is large.

U-Boot already deals with this sort of problem by relocating the FDT
to a safe address.

So use the control-FDT address instead.

Remove the existing comment, which is confusing, since the FDT is not
actually passed unmodified to the kernel: U-Boot adds various things
using its FDT-fixup mechanism.

Note that board_get_usable_ram_top() reduces the RAM top for boards with
less RAM. This behaviour is left unchanged as there is no other
mechanism for U-Boot to handle this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: Fix compilation with larger configs</title>
<updated>2025-11-25T09:22:12+00:00</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2025-11-15T07:33:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46e0ac55e56638d2543fc5a4c1ed28470095233e'/>
<id>46e0ac55e56638d2543fc5a4c1ed28470095233e</id>
<content type='text'>
Tom reports that adding more Kconfig options fails with
board/raspberrypi/rpi/lowlevel_init.o: in function `save_boot_params':
board/raspberrypi/rpi/lowlevel_init.S:20:(.text+0x0):
relocation truncated to fit: R_AARCH64_ADR_PREL_LO21
against symbol `fw_dtb_pointer' defined in .data section
in board/raspberrypi/rpi/rpi.o
make: *** [Makefile:2029: u-boot] Error 1

Since fw_dtb_pointer lives in .data it might end up above the
+-1MB that adr can reach.
So switch over to adrp+add which has a +-4gb reach.

Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Closes: https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tom reports that adding more Kconfig options fails with
board/raspberrypi/rpi/lowlevel_init.o: in function `save_boot_params':
board/raspberrypi/rpi/lowlevel_init.S:20:(.text+0x0):
relocation truncated to fit: R_AARCH64_ADR_PREL_LO21
against symbol `fw_dtb_pointer' defined in .data section
in board/raspberrypi/rpi/rpi.o
make: *** [Makefile:2029: u-boot] Error 1

Since fw_dtb_pointer lives in .data it might end up above the
+-1MB that adr can reach.
So switch over to adrp+add which has a +-4gb reach.

Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Closes: https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: Update environment to support booti and large initrd</title>
<updated>2025-04-16T10:00:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-20T00:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5f9cff14beb7b16ba799c8f43a7cca11c821929a'/>
<id>5f9cff14beb7b16ba799c8f43a7cca11c821929a</id>
<content type='text'>
The existing values don't provide for decompressing an arm64 boot-image.
Add those values and move things apart a bit so that a 50MB kernel can be
accommodated.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing values don't provide for decompressing an arm64 boot-image.
Add those values and move things apart a bit so that a 50MB kernel can be
accommodated.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: Drop fdt_high and initrd_high</title>
<updated>2025-04-16T10:00:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-20T00:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=23bb009351190e7bf9969ea007f500ae92f7bf45'/>
<id>23bb009351190e7bf9969ea007f500ae92f7bf45</id>
<content type='text'>
These are not needed now since there is a bootm_size setting to keep
things within the lower part of memory.

Drop them.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are not needed now since there is a bootm_size setting to keep
things within the lower part of memory.

Drop them.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: Set bootm_size to 512MB</title>
<updated>2025-04-16T10:00:49+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-20T00:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e072ebec0556dcbf63f8dc8a3aad739929ef93dd'/>
<id>e072ebec0556dcbf63f8dc8a3aad739929ef93dd</id>
<content type='text'>
Set this option so that all boot images stay within the bottom 512MB of
memory. This should allow us to drop the fdt_high and initrd_high
options.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set this option so that all boot images stay within the bottom 512MB of
memory. This should allow us to drop the fdt_high and initrd_high
options.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt;
Tested-by: Christopher Obbard &lt;christopher.obbard@linaro.org&gt; # CM4 1G
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: always set fdt_addr with firmware-provided FDT address</title>
<updated>2025-04-16T10:00:49+00:00</updated>
<author>
<name>Mauro Salvini</name>
<email>m.salvini@koansoftware.com</email>
</author>
<published>2021-05-12T12:39:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=564d99d0723e338792df6897dc7407df2cf6196d'/>
<id>564d99d0723e338792df6897dc7407df2cf6196d</id>
<content type='text'>
Raspberry firmware prepares the FDT blob in memory at an address
that depends on both the memory size and the blob size [1].
After commit ade243a211d6 ("rpi: passthrough of the firmware provided FDT
blob") this FDT is passed to kernel through fdt_addr environment variable,
handled in set_fdt_addr() function in board file.

When u-boot environment is persistently saved, if a change happens
in loaded FDT (e.g. for a new overlay applied), firmware produces a FDT
address different from the saved one, but u-boot still use the saved
one because set_fdt_addr() function does not overwrite the fdt_addr
variable. So, for example, if there is a script that uses fdt commands for
e.g. manipulate the bootargs, boot hangs with error

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

Removing the fdt_addr variable in saved environment allows to boot.

With this patch set_fdt_addr() function always overwrite fdt_addr value.

[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&amp;t=134018

Signed-off-by: Mauro Salvini &lt;m.salvini@koansoftware.com&gt;
Cc: Cédric Schieli &lt;cschieli@gmail.com&gt;
Cc: Matthias Brugger &lt;mbrugger@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Raspberry firmware prepares the FDT blob in memory at an address
that depends on both the memory size and the blob size [1].
After commit ade243a211d6 ("rpi: passthrough of the firmware provided FDT
blob") this FDT is passed to kernel through fdt_addr environment variable,
handled in set_fdt_addr() function in board file.

When u-boot environment is persistently saved, if a change happens
in loaded FDT (e.g. for a new overlay applied), firmware produces a FDT
address different from the saved one, but u-boot still use the saved
one because set_fdt_addr() function does not overwrite the fdt_addr
variable. So, for example, if there is a script that uses fdt commands for
e.g. manipulate the bootargs, boot hangs with error

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

Removing the fdt_addr variable in saved environment allows to boot.

With this patch set_fdt_addr() function always overwrite fdt_addr value.

[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&amp;t=134018

Signed-off-by: Mauro Salvini &lt;m.salvini@koansoftware.com&gt;
Cc: Cédric Schieli &lt;cschieli@gmail.com&gt;
Cc: Matthias Brugger &lt;mbrugger@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpi: copy over uart clock-frequency in DT</title>
<updated>2025-04-16T10:00:49+00:00</updated>
<author>
<name>Bruno Leite</name>
<email>brule@prevas.dk</email>
</author>
<published>2025-04-15T08:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0270806ffea732bd0835c14892740a9b82703788'/>
<id>0270806ffea732bd0835c14892740a9b82703788</id>
<content type='text'>
rpi5 firmware sets uart_clk clock-frequency in
the firmware and patches it to the DT, copy it
over when loading a new DT.

Signed-off-by: Bruno Leite &lt;brule@prevas.dk&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rpi5 firmware sets uart_clk clock-frequency in
the firmware and patches it to the DT, copy it
over when loading a new DT.

Signed-off-by: Bruno Leite &lt;brule@prevas.dk&gt;
Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arm: simplify updating ACPI table header checksum</title>
<updated>2025-04-08T21:22:56+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-03-21T23:21:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fecc50b0517d362b4db173b08a769f7b975d8255'/>
<id>fecc50b0517d362b4db173b08a769f7b975d8255</id>
<content type='text'>
Use acpi_update_checksum() to update table header.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use acpi_update_checksum() to update table header.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Raspberry Pi: Copy Bluetooth device address in DT</title>
<updated>2025-03-13T11:06:16+00:00</updated>
<author>
<name>Fiona Klute</name>
<email>fiona.klute@gmx.de</email>
</author>
<published>2025-02-12T11:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e042d7593a0b7544259fd2d22240e78d18912746'/>
<id>e042d7593a0b7544259fd2d22240e78d18912746</id>
<content type='text'>
The firmware sets local-bd-address, copy it when loading a new DT.

Signed-off-by: Fiona Klute &lt;fiona.klute@gmx.de&gt;
Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The firmware sets local-bd-address, copy it when loading a new DT.

Signed-off-by: Fiona Klute &lt;fiona.klute@gmx.de&gt;
Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
