boards which do not use the full malloc in SPL (which is
enabled with CONFIG_SYS_SPL_MALLOC).
-- CONFIG_SYS_NONCACHED_MEMORY:
- Size of non-cached memory area. This area of memory will be
- typically located right below the malloc() area and mapped
- uncached in the MMU. This is useful for drivers that would
- otherwise require a lot of explicit cache maintenance. For
- some drivers it's also impossible to properly maintain the
- cache. For example if the regions that need to be flushed
- are not a multiple of the cache-line size, *and* padding
- cannot be allocated between the regions to align them (i.e.
- if the HW requires a contiguous array of regions, and the
- size of each region is not cache-aligned), then a flush of
- one region may result in overwriting data that hardware has
- written to another region in the same cache-line. This can
- happen for example in network drivers where descriptors for
- buffers are typically smaller than the CPU cache-line (e.g.
- 16 bytes vs. 32 or 64 bytes).
-
- Non-cached memory is only supported on 32-bit ARM at present.
-
- CONFIG_SYS_BOOTMAPSZ:
Maximum size of memory mapped by the startup code of
the Linux kernel; all data that must be processed by
normal CP15 init (such as enabling the instruction cache) is still
performed.
+config SYS_HAS_NONCACHED_MEMORY
+ bool "Enable reserving a non-cached memory area for drivers"
+ depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
+ help
+ This is useful for drivers that would otherwise require a lot of
+ explicit cache maintenance. For some drivers it's also impossible to
+ properly maintain the cache. For example if the regions that need to
+ be flushed are not a multiple of the cache-line size, *and* padding
+ cannot be allocated between the regions to align them (i.e. if the
+ HW requires a contiguous array of regions, and the size of each
+ region is not cache-aligned), then a flush of one region may result
+ in overwriting data that hardware has written to another region in
+ the same cache-line. This can happen for example in network drivers
+ where descriptors for buffers are typically smaller than the CPU
+ cache-line (e.g. 16 bytes vs. 32 or 64 bytes).
+
+config SYS_NONCACHED_MEMORY
+ hex "Size in bytes of the non-cached memory area"
+ depends on SYS_HAS_NONCACHED_MEMORY
+ default 0x100000
+ help
+ Size of non-cached memory area. This area of memory will be typically
+ located right below the malloc() area and mapped uncached in the MMU.
+
source "arch/arc/Kconfig"
source "arch/arm/Kconfig"
source "arch/m68k/Kconfig"
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_ARCH_IMX8M=y
CONFIG_TEXT_BASE=0x40200000
CONFIG_SYS_MALLOC_LEN=0x2000000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_ARCH_IMX8M=y
CONFIG_TEXT_BASE=0x40200000
CONFIG_SYS_MALLOC_LEN=0x2000000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_MALLOC_LEN=0x100000
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_MALLOC_LEN=0x100000
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_THUMB_BUILD=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x81e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_THUMB_BUILD=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x81e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_ARCH_TIMER=y
CONFIG_SYS_THUMB_BUILD=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=13000000
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=13000000
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x81000100
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80080000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=19200000
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80080000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=19200000
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=19200000
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=19200000
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x80110000
CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_SYS_L2CACHE_OFF=y
CONFIG_ARCH_TEGRA=y
CONFIG_TEXT_BASE=0x00110000
#if defined(CONFIG_CMD_NET)
#define CONFIG_FEC_MXC_PHYADDR 4
-#ifdef CONFIG_DWC_ETH_QOS
-#define CONFIG_SYS_NONCACHED_MEMORY (1 * SZ_1M) /* 1M */
-#endif
-
#define PHY_ANEG_TIMEOUT 20000
#endif
#define CONFIG_SYS_INIT_SP_OFFSET 0x800000
-#define CONFIG_SYS_NONCACHED_MEMORY 0x100000
-
/* MMC */
#define MMC_SUPPORTS_TUNING
#ifndef __MT7622_H
#define __MT7622_H
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Uboot definition */
#define CONFIG_SYS_UBOOT_BASE CONFIG_TEXT_BASE
/* Miscellaneous configurable options */
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Environment */
/* Preloader -> Uboot */
/* Miscellaneous configurable options */
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Environment */
/* Defines for SPL */
#ifndef __MT7981_H
#define __MT7981_H
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Uboot definition */
#define CONFIG_SYS_UBOOT_BASE CONFIG_TEXT_BASE
#ifndef __MT7986_H
#define __MT7986_H
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Uboot definition */
#define CONFIG_SYS_UBOOT_BASE CONFIG_TEXT_BASE
#ifndef __MT8512_H
#define __MT8512_H
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
/* Uboot definition */
#define CONFIG_SYS_UBOOT_START CONFIG_TEXT_BASE
#ifndef __MT8518_H
#define __MT8518_H
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M
-
-
/* DRAM definition */
#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define CONFIG_SYS_SDRAM_SIZE 0x20000000
#ifndef __TEGRA_COMMON_POST_H
#define __TEGRA_COMMON_POST_H
-#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
-
#if CONFIG_IS_ENABLED(CMD_USB)
# define BOOT_TARGET_USB(func) func(USB, usb, 0)
#else