From 03a916acb8b5d3656bce055808fb3f0abc31d606 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 9 Mar 2020 13:03:49 +0900 Subject: [PATCH] Kconfig: Add kconfig options for module text allocator Enable it for ESP32. --- arch/Kconfig | 14 ++++++++++++++ arch/xtensa/Kconfig | 1 + 2 files changed, 15 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index aaf1c61637..15421c6949 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -213,6 +213,10 @@ config ARCH_NEED_ADDRENV_MAPPING bool default n +config ARCH_HAVE_MODULE_TEXT + bool "Special memory region for dynamic code loading" + default n + config ARCH_HAVE_MULTICPU bool default n @@ -321,6 +325,16 @@ config ARCH_USE_MPU is enabled by other, platform-specific logic. In those cases, this selection will always be forced. +config ARCH_USE_MODULE_TEXT + bool "Enable module text allocator" + default n + depends on ARCH_HAVE_MODULE_TEXT + ---help--- + This option enable architecture-sepecific memory allocator + for dynamic code loading. For example, ESP32 has a separate memory + regions for instruction and data and the memory region used for + usual malloc doesn't work for instruction. + menuconfig ARCH_ADDRENV bool "Address environments" default n diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 1bedd5348d..5569e1b250 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -14,6 +14,7 @@ config ARCH_CHIP_ESP32 select ARCH_FAMILY_LX6 select XTENSA_HAVE_INTERRUPTS select ARCH_HAVE_MULTICPU + select ARCH_HAVE_MODULE_TEXT select ARCH_TOOLCHAIN_GNU select ARCH_GLOBAL_IRQDISABLE ---help---