[U-Boot] [PATCH 3/3] fdt: Fix fdtdec_get_pci_addr() for 64-bit

Simon Glass sjg at chromium.org
Tue Mar 24 00:20:55 CET 2015


On 20 March 2015 at 05:51, Thierry Reding <thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> The fdtdec_get_pci_addr() implementation uses fdt_addr_to_cpu() to read
> cells from an FDT blob. That is wrong because cells are always 32 bits
> wide, irrespective of the architecture's address bus width, which does
> not apply to fdt_addr_t.
>
> Besides reading the wrong results, this can also cause aborts on 64-bit
> architectures that don't allow unaligned accesses to memory. Fix this by
> using fdt32_to_cpu() to read the cells instead.
>
> Cc: Hanna Hawa <hannah at marvell.com>
> Cc: Simon Glass <sjg at chromium.org>
> Signed-off-by: Thierry Reding <treding at nvidia.com>

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list