u-boot-brain/arch/arm
Neil Armstrong c7be3e5a79 ARM: arch-meson: build memory banks using reported memory from registers
As discussed at [1], the Amlogic Meson GX SoCs can embed a BL31 firmware
and a secondary BL32 firmware.
Since mid-2017, the reserved memory address of the BL31 firmware was moved
and grown for security reasons.

But mainline U-Boot and Linux has the old address and size fixed.

These SoCs have a register interface to get the two firmware reserved
memory start and sizes.

This patch adds a dynamic reservation of the memory zones in the device tree bootmem
reserved memory zone used by the kernel in early boot.
To be complete, the memory zones are also added to the EFI reserved zones.

Depends on patchset "Add support for Amlogic GXL Based SBCs" at [2].

[1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html
[2] http://lists.infradead.org/pipermail/linux-amlogic/2017-November/005410.html

Changes since v1:
- switched the #if to if(IS_ENABLED()) to compile all code paths
- renamed function to meson_board_add_reserved_memory()
- added a mem.h header with comment
- updated all boards ft_board_setup()

Changes since RFC v2:
- reduced preprocessor load
- kept Odroid-C2 static memory mapping as exception

Changes since RFC v1:
- switch to fdt rsv mem table and efi reserve memory
- replaced in_le32 by readl()

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[trini: Fix warning on khadas-vim over missing <asm/arch/mem.h>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-12-04 10:17:29 -05:00
..
cpu armv8: shrink exception table code 2017-12-04 09:59:02 -05:00
dts arm: Add Khadas VIM support based on Meson GXL family 2017-12-04 09:59:03 -05:00
include ARM: arch-meson: build memory banks using reported memory from registers 2017-12-04 10:17:29 -05:00
lib arm: provide a PCS-compliant setjmp implementation 2017-11-21 23:57:22 +01:00
mach-aspeed aspeed: Refactor SCU to use consistent mask & shift 2017-05-08 11:57:35 -04:00
mach-at91 board: laird: add WB50N CPU module 2017-11-29 22:36:59 -05:00
mach-bcm283x add support for Raspberry Pi Zero W 2017-12-04 09:59:02 -05:00
mach-davinci ARM: davinci: Remove CONFIG_SOC_DA830 2017-09-15 12:35:48 -04:00
mach-exynos usb: net: migrate USB Ethernet adapters to Kconfig 2017-09-08 10:23:00 -04:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-imx i.MX6: engicam: Add imx6q/imx6ul boards for existing boards 2017-11-27 10:36:40 +01:00
mach-integrator env: Convert CONFIG_ENV_IS_IN... to a choice 2017-08-15 20:50:01 -04:00
mach-keystone env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
mach-kirkwood bitops: collect BIT macros to include/linux/bitops.h 2017-11-29 00:28:57 +09:00
mach-meson ARM: arch-meson: build memory banks using reported memory from registers 2017-12-04 10:17:29 -05:00
mach-mvebu arm: mvebu: enable boot from NAND 2017-11-30 08:30:27 +01:00
mach-omap2 omap2: set the ethaddr as well as the usbethaddr env var to ensure static MAC 2017-12-02 18:32:58 -05:00
mach-orion5x spl: add hierarchical defaults for SPL_LDSCRIPT 2017-08-13 17:12:37 +02:00
mach-qemu ARM: Add a new arch + board for QEMU's 'virt' machine 2017-10-06 11:28:16 -04:00
mach-rmobile ARM: rmobile: Convert PRR to DM and OF control 2017-11-30 02:34:21 +01:00
mach-rockchip rockchip: rk3036: sdram: correct setting for pll integer mode 2017-11-30 22:55:27 +01:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-snapdragon dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
mach-socfpga socfpga: boot0 hook: adjust to unified boot0 semantics 2017-11-21 23:57:21 +01:00
mach-sti board: Add STMicroelectronics STiH410-B2260 support 2017-03-14 20:40:21 -04:00
mach-stm32 mach-stm32: Factorize MPU's region config for STM32 SoCs 2017-11-29 22:30:50 -05:00
mach-sunxi sunxi: video: add LCD support to DE2 driver 2017-10-27 09:44:48 +02:00
mach-tegra treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
mach-uniphier ARM: dts: uniphier: Sync with Linux 4.15-rc1 2017-11-29 00:29:00 +09:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq mtd: zynq: nand: Move board_nand_init() function to board.c 2017-11-29 08:02:40 +01:00
thumb1/include/asm/proc-armv arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
config.mk arm: Always keep the dtb section on objcopy 2017-06-05 14:13:11 -04:00
Kconfig arm: zynq: Change Zynq/ZynqMP Kconfig description 2017-11-29 08:02:40 +01:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00