[Uboot-stm32] [PATCH v2 01/11] spl: Move SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig
Patrick DELAUNAY
patrick.delaunay at foss.st.com
Mon Oct 4 15:26:40 CEST 2021
Hi,
On 9/8/21 1:59 AM, Alexandru Gagniuc wrote:
> Although Falcon mode is very useful in improving boot speed, its
> implementation is quite antiquated. A question that Falcon mode asks
> is "Where do I look for the kernel". With MMC boot media, the correct
> answer is CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR.
>
> There are a few things to be said about the wisdom of using a raw
> sector as opposed to more elegant schemes. However, changing how
> falcon mode works is beyond the scope of this change.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> ---
> README | 4 ----
> common/spl/Kconfig | 11 +++++++++++
> configs/am335x_boneblack_vboot_defconfig | 1 +
> configs/am335x_evm_defconfig | 1 +
> configs/am335x_igep003x_defconfig | 1 +
> configs/am335x_shc_defconfig | 1 +
> configs/am335x_shc_ict_defconfig | 1 +
> configs/am335x_shc_netboot_defconfig | 1 +
> configs/am335x_shc_sdboot_defconfig | 1 +
> configs/am335x_sl50_defconfig | 1 +
> configs/am3517_evm_defconfig | 1 +
> configs/am43xx_evm_defconfig | 1 +
> configs/am43xx_evm_rtconly_defconfig | 1 +
> configs/am43xx_evm_usbhost_boot_defconfig | 1 +
> configs/am57xx_evm_defconfig | 1 +
> configs/devkit8000_defconfig | 1 +
> configs/display5_defconfig | 1 +
> configs/display5_factory_defconfig | 1 +
> configs/dra7xx_evm_defconfig | 1 +
> configs/gwventana_emmc_defconfig | 1 +
> configs/gwventana_gw5904_defconfig | 1 +
> configs/gwventana_nand_defconfig | 1 +
> configs/igep00x0_defconfig | 1 +
> configs/imx6dl_mamoj_defconfig | 1 +
> configs/imx6q_logic_defconfig | 1 +
> configs/imx6qdl_icore_mipi_defconfig | 1 +
> configs/imx6qdl_icore_mmc_defconfig | 1 +
> configs/imx6qdl_icore_rqs_defconfig | 1 +
> configs/mccmon6_nor_defconfig | 1 +
> configs/omap35_logic_defconfig | 1 +
> configs/omap35_logic_somlv_defconfig | 1 +
> configs/omap3_logic_defconfig | 1 +
> configs/omap3_logic_somlv_defconfig | 1 +
> configs/omap4_panda_defconfig | 1 +
> configs/omap5_uevm_defconfig | 1 +
> include/configs/brppt1.h | 1 -
> include/configs/devkit8000.h | 2 --
> include/configs/display5.h | 1 -
> include/configs/embestmx6boards.h | 1 -
> include/configs/gw_ventana.h | 1 -
> include/configs/imx6-engicam.h | 1 -
> include/configs/imx6_logic.h | 1 -
> include/configs/imx6dl-mamoj.h | 1 -
> include/configs/ls1043ardb.h | 1 -
> include/configs/mccmon6.h | 1 -
> include/configs/mx6sabreauto.h | 1 -
> include/configs/mx6sabresd.h | 1 -
> include/configs/pico-imx6.h | 1 -
> include/configs/pico-imx6ul.h | 1 -
> include/configs/pico-imx7d.h | 1 -
> include/configs/sama5d3_xplained.h | 1 -
> include/configs/tam3517-common.h | 1 -
> include/configs/ti_armv7_common.h | 1 -
> include/configs/vyasa-rk3288.h | 1 -
> include/configs/xea.h | 1 -
> include/configs/xilinx_zynqmp.h | 1 -
> include/configs/zynq-common.h | 1 -
> scripts/config_whitelist.txt | 1 -
> 58 files changed, 44 insertions(+), 28 deletions(-)
>
> diff --git a/README b/README
> index 1c1db98098..7df53a9861 100644
> --- a/README
> +++ b/README
> @@ -2182,10 +2182,6 @@ The following options need to be configured:
> Partition on the MMC to load U-Boot from when the MMC is being
> used in raw mode
> - CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
> - Sector to load kernel uImage from when MMC is being
> - used in raw mode (for Falcon mode)
> -
> CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
> CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
> Sector and number of sectors to load kernel argument
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index c155a3b5fc..1c6b57af49 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -990,6 +990,17 @@ config SYS_OS_BASE
> endif # SPL_OS_BOOT
> +config SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
> + hex "Falcon mode: Sector to load kernel uImage from MMC"
> + default 0x0
> + depends on SPL_OS_BOOT
> + help
> + When Falcon mode is used with an MMC or SD media, SPL needs to
> know
> + where to look for the kernel uImage. The image is expected to
> begin
> + at the raw MMC specified in this config.
> + Note that the Falcon mode image can also be a FIT, if FIT
> support is
> + enabled.
> +
The define will be activated for all the board ... with default value
0x0 !?
So the code in mmc_load_image_raw_os() will be activated (the SPL
behavior change):
#if defined(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR)
you need to add a boolean CONFIG_.* _USE_ .* to manage this case.
=> see SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR /
SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+ add depends on CONFIG_SPL_MMC as this define is only used in this
spl_mmc.c
proposal :
+config SYS_MMCSD_RAW_MODE_KERNEL_USE_SECTOR
+ bool "Falcon mode: use sector to load kernel uImage from MMC"
+ depends on SPL_OS_BOOT && SPL_MMC
+ help
+ Use sector number for specifying Kernel location on MMC/SD in
+ raw mode.
+
+config SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
+ hex "Falcon mode: MMC raw address to load kernel uImage"
+ default 0x0
+ depends on SYS_MMCSD_RAW_MODE_KERNEL_USE_SECTOR
+ help
+ When Falcon mode is used with an MMC or SD media, SPL needs to know
+ where to look for the kernel uImage. The image is expected to begin
+ at the raw MMC specified in this config.
+ Note that the Falcon mode image can also be a FIT, if FIT support is
+ enabled.
+ Units: MMC sectors (1 sector = 512 bytes).
NB: can you also migrate the remaining CONFIG_SYS_MMCSD_RAW configs ?
- CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR
- CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
Regards
Patrick
More information about the U-Boot
mailing list