u-boot/arch/arm/include/asm
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
..
arch-am33xx Add UART base addresses for additional UARTs 2017-11-17 10:53:45 -05:00
arch-armada8k arm64: mvebu: Add L3 cache flush functionality to A8K family 2016-12-12 09:05:28 +01:00
arch-armada100 i2c: Drop use of CONFIG_I2C_HARD 2017-05-15 06:17:09 +02:00
arch-armv7 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S 2015-07-20 11:44:38 -07:00
arch-aspeed aspeed: Refactor SCU to use consistent mask & shift 2017-05-08 11:57:35 -04:00
arch-bcm235xx bcm235xx: boot0 hook: adjust to unified boot0 semantics 2017-11-21 23:57:21 +01:00
arch-bcm281xx bcm281xx: boot0 hook: adjust to unified boot0 semantics 2017-11-21 23:57:22 +01:00
arch-bcmcygnus net: move Broadcom SF2 driver to Kconfig 2017-08-07 15:18:30 -05:00
arch-bcmnsp arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-ep93xx arm: ep9315: Return back Cirrus Logic EDB9315A board support 2014-07-04 23:45:48 +02:00
arch-fsl-layerscape armv8: layerscape: Allocate 66 MB DDR for secure memory 2017-10-27 08:47:14 -07:00
arch-hi3798cv200 ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards 2017-07-10 14:26:03 -04:00
arch-hi6220 driver: gpio: hikey: Fix pointer conversion warnings for hikey 2015-11-12 15:58:59 -05:00
arch-imx common: freescale: Move arch-specific imx code to arch-imx 2017-06-05 12:31:22 -04:00
arch-lpc32xx i2c: lpc32xx: Move definitions to header file 2017-03-28 06:27:14 +02:00
arch-ls102xa armv7: Add workaround for USB erratum A-009007 2017-09-11 08:01:07 -07:00
arch-meson ARM: arch-meson: build memory banks using reported memory from registers 2017-12-04 10:17:29 -05:00
arch-mvebu spi: kirkwood_spi: implement mvebu_spi_set_mode() 2016-11-18 13:04:52 +05:30
arch-mx5 arm: mx5: Add more register definitions 2017-11-20 09:58:31 +01:00
arch-mx6 mx6ull: Fix WDOG3 base address 2017-11-27 10:34:31 +01:00
arch-mx7 imx7: Add include guards for include/asm/arch-mx7/sys_proto.h file 2017-11-09 11:32:49 +01:00
arch-mx7ulp imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
arch-mx25 imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
arch-mx27 mmc: move more driver config options to Kconfig 2017-01-11 19:40:15 +09:00
arch-mx31 imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
arch-mx35 imx: fix licensing in i.MX files 2017-08-23 10:45:45 +02:00
arch-mxs imx: fix licensing in i.MX files 2017-08-23 10:45:45 +02:00
arch-omap3 Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig 2017-09-01 20:44:30 -04:00
arch-omap4 Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig 2017-09-01 20:44:30 -04:00
arch-omap5 ARM: DRA7: Cleanup old pinctrl macros 2017-09-14 21:32:56 -04:00
arch-orion5x edminiv2: switch to SPL 2015-02-25 07:59:50 +01:00
arch-pxa arm: pxa: use common timer functions 2015-08-24 20:30:37 +02:00
arch-rockchip rockchip: clk: rk3128: fix DCLK_VOP_DIV_CON_MASK 2017-12-02 00:27:42 +01:00
arch-s32v234 armv8: s32v234: Introduce basic support for s32v234evb 2016-06-13 08:56:35 -04:00
arch-sa1100
arch-spear spear: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
arch-stih410 sti: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
arch-stm32f4 stm32: migrate clock structs in include/stm32_rcc.h 2017-11-29 22:30:50 -05:00
arch-stm32f7 stm32: migrate clock structs in include/stm32_rcc.h 2017-11-29 22:30:50 -05:00
arch-stm32h7 stm32: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
arch-stv0991 stv0991: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
arch-sunxi bitops: collect BIT macros to include/linux/bitops.h 2017-11-29 00:28:57 +09:00
arch-tegra dm: tegra: Convert clock_decode_periph_id() to support livetree 2017-07-28 12:02:47 -06:00
arch-tegra20 ARM: tegra: use DT bindings for GPIO naming 2016-05-31 09:53:56 -07:00
arch-tegra30 ARM: tegra: use DT bindings for GPIO naming 2016-05-31 09:53:56 -07:00
arch-tegra114 Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
arch-tegra124 Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
arch-tegra186 ARM: tegra: add core Tegra186 support 2016-05-31 11:22:59 -07:00
arch-tegra210 ARM: tegra: use DT bindings for GPIO naming 2016-05-31 09:53:56 -07:00
arch-vf610 imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00
arch-zynqmp arm64: zynqmp: Add support for CG/EG/EV device detection 2017-11-28 16:09:01 +01:00
armv8 armv8: sec_firmware: Add support for loadables in FIT 2017-10-27 08:47:14 -07:00
iproc-common arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
kona-common bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
mach-imx imx: Remove boolean parameter from wdog powerdown function 2017-11-27 10:34:49 +01:00
proc-armv ARM: add missing HYP mode constant 2014-07-28 17:06:35 +02:00
ti-common ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig 2017-04-27 16:49:08 -04:00
armv7.h armv7: Move L2CTLR read/write to common 2017-10-01 00:33:33 +02:00
armv7m.h armv7m: add MPU configuration support 2017-05-12 08:37:06 -04:00
armv7m_mpu.h stm32: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
assembler.h arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD 2017-03-18 20:28:01 -04:00
atomic.h ARM64: Add support for some of atomic64 operations 2016-10-06 20:57:42 -04:00
barriers.h ARM: Rework and correct barrier definitions 2016-08-05 07:23:57 -04:00
bitops.h arm, ubifs: fix gcc5.x compiler warning 2016-01-20 10:03:58 -05:00
bootm.h arm: Add declarations to avoid needing to include headers 2017-06-05 11:02:37 -04:00
byteorder.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
cache.h arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD 2017-03-18 20:28:01 -04:00
config.h arm64: support running at addr other than linked to 2017-11-17 07:44:13 -05:00
davinci_rtc.h
dma-mapping.h dma: import linux/dma-direction.h to consolidate enum dma_data_direction 2017-09-12 18:02:23 -04:00
ehci-omap.h configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boards 2017-07-28 23:34:24 +02:00
emif.h arm: am33xx: Initialize EMIF REG_PR_OLD_COUNT for BBB and am335x-evm 2016-12-09 15:00:03 -05:00
fsl_secure_boot.h LS2080ARDB: QSPI boot: Secure Boot image validation 2017-09-11 07:55:36 -07:00
gic.h arm64 patch: gicv3 support 2014-04-08 00:15:12 +02:00
global_data.h arm: change tbu/l type to unsigned int 2017-05-12 08:37:34 -04:00
gpio.h gpio: do not include <asm/arch/gpio.h> for ARCH_STI 2017-03-14 20:40:19 -04:00
hardware.h
io.h arm: Use asm-generic/io.h 2017-10-02 21:52:20 -04:00
linkage.h
mach-types.h arm: Re-sync with full list of MACH_TYPE_xxx values 2017-01-28 14:04:20 -05:00
macro.h ARMv8: make master CPU checking logic more clear 2017-10-08 16:19:56 -04:00
memory.h Various, accumulated typos collected from around the tree. 2016-10-06 20:57:40 -04:00
omap_common.h ARM: DRA72x: Add support for detection of DRA71x SR 2.1 2017-09-12 18:02:29 -04:00
omap_gpio.h gpio: omap: Drop 'method' parameter 2015-08-12 20:48:06 -04:00
omap_mmc.h arm: omap5+: Add board specific ldo powering 2017-09-11 16:19:35 -04:00
omap_musb.h drivers: usb: musb: adopt musb backend driver to driver model 2016-12-02 21:04:48 -07:00
omap_sec_common.h arm: mach-omap2: Factor out common FDT fixup suport 2017-07-22 22:22:43 -04:00
opcodes-sec.h ARM: adjust arm-smccc code for use in U-Boot 2017-04-18 10:29:17 -04:00
opcodes-virt.h ARM: adjust arm-smccc code for use in U-Boot 2017-04-18 10:29:17 -04:00
opcodes.h ARM: adjust arm-smccc code for use in U-Boot 2017-04-18 10:29:17 -04:00
pl310.h arm: socfpga: enable data/inst prefetch and shared override in the L2 2015-10-17 01:47:31 +02:00
posix_types.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
processor.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
psci.h ARMv8: Add basic PSCI framework 2016-12-15 11:57:44 -08:00
ptrace.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
sections.h
secure.h ARMv8: Setup PSCI memory and device tree 2016-12-15 11:57:51 -08:00
setjmp.h arm: provide a PCS-compliant setjmp implementation 2017-11-21 23:57:22 +01:00
setup.h Various, accumulated typos collected from around the tree. 2016-10-06 20:57:40 -04:00
spin_table.h arm64: add better and more generic spin-table support 2016-07-14 18:22:16 -04:00
spl.h spl: add a 'return to bootrom' boot method 2017-08-13 17:12:19 +02:00
string.h ARM: revive CONFIG_USE_ARCH_MEMCPY/MEMSET for UniPhier and Tegra 2016-12-27 11:24:15 -05:00
system.h arm: make save_boot_params_ret prototype visible for AArch64 2017-11-21 23:57:22 +01:00
types.h types.h: move and redefine resource_size_t 2016-07-14 18:22:24 -04:00
u-boot-arm.h arm: Add declarations to avoid needing to include headers 2017-06-05 11:02:37 -04:00
u-boot.h arm: Make u-boot-arm.h a private header 2017-06-05 11:02:33 -04:00
unaligned.h arm64: core support 2014-01-09 16:08:44 +01:00
unified.h arm: include: Import unified.h from Linux kernel 2016-06-02 21:21:43 -04:00
utils.h