u-boot-2016/board
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
..
8dtech/eco5pk
abilis/tb100
advantech x86: baytrail: fsp: Move Azalia update codes to board 2017-10-19 11:37:51 +08:00
alphaproject/ap_sh4a_4a
altera MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
amarula/vyasa-rk3288 rk3288: vyasa: Add falcon mode support 2017-10-01 00:33:33 +02:00
amazon/kc1 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
amlogic ARM: arch-meson: build memory banks using reported memory from registers 2017-12-04 10:17:29 -05:00
AndesTech nds32: board: Support ftsdc010 DM. 2017-11-30 10:04:25 +08:00
Arcturus/ucp1020 env: Rename some other getenv()-related functions 2017-08-16 08:31:11 -04:00
aries env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
aristainetos imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
armadeus spl: add hierarchical defaults for SPL_LDSCRIPT 2017-08-13 17:12:37 +02:00
armltd mmc: arm_pl180_mmci: update arm_pl180_mmci_init() prototype 2017-11-17 07:44:13 -05:00
aspeed/evb_ast2500 MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
astro/mcf5373l
atmark-techno/armadillo-800eva
atmel board: atmel: add sama5d2_ptc_ek board 2017-11-29 22:30:50 -05:00
avionic-design
bachmann/ot1200 imx6: drop duplicated bss memset and board_init_r() call 2017-09-18 17:15:28 +02:00
barco imx: imx6: Move gpr_init() function to soc.c 2017-08-28 09:48:53 +02:00
Barix/ipam390 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
beckhoff/mx53cx9020 imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
birdland/bav335x env: Rename getenv_hex(), getenv_yesno(), getenv_ulong() 2017-08-16 08:30:32 -04:00
bluegiga/apx4devkit env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
bluewater env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
bosch/shc env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
boundary/nitrogen6x env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
broadcom env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
buffalo/lsxl env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
BuR env: Rename getenv_hex(), getenv_yesno(), getenv_ulong() 2017-08-16 08:30:32 -04:00
BuS/eb_cpu5282 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cadence/xtfpga env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
calao/usb_a9263 board: usb_a9263: Update to support DT and DM 2017-08-04 20:38:38 -04:00
CarMediaLab/flea3 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cavium/thunderx
ccv/xpress i.mx6ul: xpress: update UART init for current board revision 2017-10-12 17:58:42 +02:00
cei/cei-tk1-som dm: power: Convert as3722 to driver model 2017-07-28 12:02:47 -06:00
chipspark/popmetal_rk3288
cirrus/edb93xx
cloudengines/pogo_e02
cobra5272
compal/paz00
compulab usb: hub: identify the hub-device to usb_hub_reset_devices 2017-11-26 02:22:36 +01:00
comtrend
congatec imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
coreboot x86: kconfig: Let board select SPI flash 2017-08-01 20:17:02 +08:00
corscience/tricorder
creative/xfi3
cssi env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
CZ.NIC/turris_omnia arm: mvebu: correct comments around cas_wl/cas_l 2017-11-30 08:30:59 +01:00
d-link/dns325
davinci arm: da850-evm: Enable DM and device tree support for da850-evm 2017-09-29 10:52:21 -04:00
dbau1x00
dfi x86: dfi-bt700: Select SERIAL_RX_BUFFER via Kconfig 2017-08-24 11:00:47 +08:00
dhelectronics/dh_imx6 ARM: imx6: Adjust DDR DRAM settings on DHCOM i.MX6 PDK 2017-11-16 10:43:22 +01:00
ebv/socrates
efi x86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig 2017-08-01 20:17:02 +08:00
egnite/ethernut5 board: ethernut5: Update to support DT and DM 2017-08-04 20:38:37 -04:00
el/el6x imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
embest/mx6boards board: imx6: marsboard: Remove doubled #include <asm/arch/sys_proto.h> 2017-11-09 11:32:49 +01:00
emulation ARM: Add a new arch + board for QEMU's 'virt' machine 2017-10-06 11:28:16 -04:00
engicam engicam: imx6q: Return mmc dev 0 for icore 2017-11-27 10:36:40 +01:00
esd Drop CONFIG_HAS_DATAFLASH 2017-10-16 09:42:51 -04:00
espt
firefly/firefly-rk3288
freescale armv8: ls1088aqds: Add SD boot support for ls1088qds 2017-11-15 10:52:19 -08:00
gateworks/gw_ventana imx6: drop duplicated bss memset and board_init_r() call 2017-09-18 17:15:28 +02:00
gdsys arm: mvebu: correct comments around cas_wl/cas_l 2017-11-30 08:30:59 +01:00
ge mx53: Add Board support for GE PPD 2017-11-20 09:59:02 +01:00
geekbuying/geekbox rockchip: correct the bank0 ram size 2017-07-11 12:13:45 +02:00
google x86: kconfig: Let board select SPI flash 2017-08-01 20:17:02 +08:00
grinn env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
gumstix env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
h2200
highbank env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
hisilicon ARM: hisilicon: hikey: Fix eMMC with latest ATF & U-Boot 2017-08-20 09:54:31 -04:00
htkw/mcx env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
huawei/hg556a
ids/ids8313
imgtec boston: Add u-boot.mcs make target 2017-11-28 21:59:30 +01:00
imx31_phycore
intel x86: edison: Bring minimal ACPI support to the board 2017-10-07 15:07:59 +08:00
inversepath/usbarmory
iomega/iconnect
is1
isee MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
keymile env: Rename some other getenv()-related functions 2017-08-16 08:31:11 -04:00
kmc/kzm9g
kosagi/novena imx6: drop duplicated bss memset and board_init_r() call 2017-09-18 17:15:28 +02:00
l+g/vinco
LaCie env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
laird board: laird: add WB50N CPU module 2017-11-29 22:36:59 -05:00
lego/ev3
lg/sniper env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
liebherr imx:display5: Add support for LWN's DISPLAY5 board 2017-11-09 11:32:49 +01:00
logicpd omap3: omap3_logic: Move pinmuxing to header file 2017-11-17 07:44:13 -05:00
Marvell arm: mvebu: correct comments around cas_wl/cas_l 2017-11-30 08:30:59 +01:00
maxbcm
microchip/pic32mzda
micronas/vct env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
mini-box/picosam9g45 Drop CONFIG_HAS_DATAFLASH 2017-10-16 09:42:51 -04:00
mpc8308_p1m
mpr2
mqmaker/miqi_rk3288
ms7720se
ms7722se
ms7750se
netgear/cg3100d
nokia/rx51 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
nvidia MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
olimex/mx23_olinuxino
omicron/calimain
opalkelly/zynq arm: zynq: Convert all board to use arch ps7_init code 2017-11-29 08:02:39 +01:00
overo env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
pandora
pb1x00
phytec MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
ppcag/bg0900
qca
qemu-mips
qualcomm/dragonboard410c MAINTAINERS: board: qcom: db410c: Maintainer changed 2017-09-11 13:34:31 -04:00
quipos/cairo
radxa
raidsonic/ib62x0
raspberrypi/rpi add support for Raspberry Pi Zero W 2017-12-04 09:59:02 -05:00
renesas ARM: rmobile: Rework the ULCB CPLD driver 2017-11-30 08:54:18 +01:00
rockchip rockchip: board: evb-rk3128: add empty Makefile 2017-11-30 22:55:27 +01:00
ronetix Drop CONFIG_HAS_DATAFLASH 2017-10-16 09:42:51 -04:00
sagem/f@st1704
samsung MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
samtec env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
sandbox GPT: create block device for sandbox testing 2017-09-14 21:32:57 -04:00
sandisk/sansa_fuze_plus
sbc8349
sbc8548
sbc8641d
schulercontrol/sc_sps_1
Seagate
seco imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
sfr/nb4_ser
shmin
siemens Drop CONFIG_HAS_DATAFLASH 2017-10-16 09:42:51 -04:00
silica/pengwyn env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
socrates env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
solidrun arm: mvebu: correct comments around cas_wl/cas_l 2017-11-30 08:30:59 +01:00
spear board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ 2017-08-26 14:56:10 -04:00
sr1500
st mach-stm32: Factorize MPU's region config for STM32 SoCs 2017-11-29 22:30:50 -05:00
sunxi sunxi: SATA link timeout fix 2017-11-10 19:21:24 +05:30
Synology MAINTAINERS: Add missing boards and config entries 2017-11-06 09:58:51 -05:00
synopsys arc: Add support for HS Development Kit board 2017-06-29 19:34:10 +03:00
sysam m68k: add board stmark2, mcf5441x based 2017-08-18 01:26:52 +02:00
syteco/zmx25 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
tbs/tbs2910 imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
tcl/sl50 env: Rename getenv_hex(), getenv_yesno(), getenv_ulong() 2017-08-16 08:30:32 -04:00
technexion pico-imx7d: Add "how to boot with NXP 4.1 Kernel" 2017-09-18 17:15:28 +02:00
technologic imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
teejet/mt_ventoux env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
terasic
theadorable arm: mvebu: Remove theadorable_defconfig 2017-09-26 06:51:37 +02:00
theobroma-systems rockchip: rk3399-puma: add code to allow forcing a power-on reset 2017-11-30 22:59:54 +01:00
ti usb: hub: identify the hub-device to usb_hub_reset_devices 2017-11-26 02:22:36 +01:00
timll env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr() 2017-08-16 08:30:44 -04:00
topic/zynq arm: zynq: Move common ps7_init* initialization to arch code 2017-11-29 08:02:39 +01:00
toradex imx: Include <input.h> header file 2017-10-12 17:31:16 +02:00
tplink/wdr4300
tqc env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
udoo udoo: Remove cpu type check prior to setup_sata() 2017-10-31 11:13:56 +01:00
varisys env: Rename some other getenv()-related functions 2017-08-16 08:31:11 -04:00
ve8313
vscom/baltos env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
wandboard Revert "wandboard: Remove unnecessary delay" 2017-11-20 09:54:09 +01:00
warp imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
warp7 imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
woodburn
work-microwave/work_92105 env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
xes env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
xilinx arm: zynq: Add ps7_init for cc108 2017-11-29 08:02:40 +01:00
zipitz2
zyxel/nsa310s