Skip to content

Support for 4 GB DDR modules for 32-bit U-Boot builds

Pali Rohár u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9common/memsize.c: Fix get_effective_memsize() to always check for CONFIG_MAX_MEM_MAPPEDcommon/memsize.c+1 -11 reply
2/9common/memsize.c: Fix get_effective_memsize() to check for overflowcommon/memsize.c+15 -30 replies
3/9board_f: Fix types for board_get_usable_ram_top()arch/arm/mach-imx/imx8m/soc.c arch/arm/mach-mvebu/arm64-common.c arch/arm/mach-rockchip/sdram.c +33 more+37 -371 reply
4/9board_f: Fix printing gd->ram_size and gd->ram_topcommon/board_f.c+2 -23 replies
5/9ddr: fsl: Fix checking for maximal mappable memorydrivers/ddr/fsl/main.c+14 -50 replies
6/9ddr: fsl: Fix fsl_ddr_sdram_size() for 4GB modules with 32-bit phys_size_tdrivers/ddr/fsl/main.c+4 -00 replies
7/9ddr: fsl: Allow to detect 4 GB DDR modules in 32-bit modedrivers/ddr/fsl/main.c+10 -40 replies
8/9ddr: fsl: Fix re-align of verbose DRAM information for non-SPL buildsdrivers/ddr/fsl/lc_common_dimm_params.c+3 -04 replies
9/9powerpc/mpc85xx: Explain TLB unmapped memory messagearch/powerpc/cpu/mpc85xx/tlb.c+1 -10 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/9
2/9
3/9R-b
4/9R-b
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] Support for 4 GB DDR modules for 32-bit U-Boot builds

This patch series fixes U-Boot code to correctly handle RAM size larger than 2 GB and then fixes fsl ddr driver to do not crash U-Boot when 4 GB DDR module is detected when U-Boot operates in 32-bit mode (as opposite of the 36-bit mode).

With this patch series it is possible to boot 32-bit U-Boot with 4 GB SODIMM DDR3 module without crashes. U-Boot will still use just CONFIG_MAX_MEM_MAPPED amount of RAM, but it is better than crashing due to the truncating of 4GB value to 32-bit number (which is zero).

I tested this patch series on powerpc P2020 based board but only with U-Boot v2022.04 because U-Boot master branch is still broken on P2020.

Pali Rohár (9):
common/memsize.c: Fix get_effective_memsize() to always check for
CONFIG_MAX_MEM_MAPPED
common/memsize.c: Fix get_effective_memsize() to check for overflow
board_f: Fix types for board_get_usable_ram_top()
board_f: Fix printing gd->ram_size and gd->ram_top
ddr: fsl: Fix checking for maximal mappable memory
ddr: fsl: Fix fsl_ddr_sdram_size() for 4GB modules with 32-bit
phys_size_t
ddr: fsl: Allow to detect 4 GB DDR modules in 32-bit mode
ddr: fsl: Fix re-align of verbose DRAM information for non-SPL builds powerpc/mpc85xx: Explain TLB unmapped memory message

 arch/arm/mach-imx/imx8m/soc.c           |  2 +-
 arch/arm/mach-mvebu/arm64-common.c      |  2 +-
 arch/arm/mach-rockchip/sdram.c          |  2 +-
 arch/arm/mach-stm32mp/dram_init.c       |  2 +-
 arch/arm/mach-sunxi/board.c             |  2 +-
 arch/arm/mach-tegra/board2.c            |  2 +-
 arch/mips/mach-jz47xx/jz4780/jz4780.c   |  2 +-
 arch/mips/mach-octeon/dram.c            |  2 +-
 arch/powerpc/cpu/mpc85xx/tlb.c          |  2 +-
 arch/riscv/cpu/fu540/dram.c             |  2 +-
 arch/riscv/cpu/fu740/dram.c             |  2 +-
 arch/riscv/cpu/generic/dram.c           |  2 +-
 arch/x86/cpu/broadwell/sdram.c          |  2 +-
 arch/x86/cpu/coreboot/sdram.c           |  2 +-
 arch/x86/cpu/efi/payload.c              |  2 +-
 arch/x86/cpu/efi/sdram.c                |  2 +-
 arch/x86/cpu/intel_common/mrc.c         |  4 ++--
 arch/x86/cpu/ivybridge/sdram.c          |  2 +-
 arch/x86/cpu/qemu/dram.c                |  2 +-
 arch/x86/cpu/quark/dram.c               |  2 +-
 arch/x86/cpu/slimbootloader/sdram.c     |  2 +-
 arch/x86/cpu/tangier/sdram.c            |  2 +-
 arch/x86/include/asm/mrc_common.h       |  2 +-
 arch/x86/include/asm/u-boot-x86.h       |  2 +-
 arch/x86/lib/fsp1/fsp_dram.c            |  2 +-
 arch/x86/lib/fsp2/fsp_dram.c            |  2 +-
 board/broadcom/bcmns3/ns3.c             |  2 +-
 board/imgtec/boston/ddr.c               |  2 +-
 board/menlo/m53menlo/m53menlo.c         |  2 +-
 board/raspberrypi/rpi/rpi.c             |  2 +-
 board/ti/am65x/evm.c                    |  2 +-
 board/ti/j721e/evm.c                    |  2 +-
 board/ti/j721s2/evm.c                   |  2 +-
 board/xilinx/zynqmp/zynqmp.c            |  2 +-
 common/board_f.c                        |  6 ++---
 common/memsize.c                        | 20 ++++++++++++----
 drivers/ddr/fsl/lc_common_dimm_params.c |  3 +++
 drivers/ddr/fsl/main.c                  | 31 ++++++++++++++++++++-----
 drivers/video/fsl_dcu_fb.c              |  2 +-
 include/init.h                          |  2 +-
 40 files changed, 84 insertions(+), 50 deletions(-)
Signature · 1 line
2.20.1