X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Fspl%2FKconfig;h=10d9cdd0c286d206d20d8887545d0d34f6a8fbe5;hb=10f6e4dc3a16c21f235416f975ecf2070ceb351f;hp=dc319adeacd9729ee57dde52c5fcb6002c0cf132;hpb=34d2b7f20369d62c0f091d6572a8c0ea4655cf14;p=platform%2Fkernel%2Fu-boot.git diff --git a/common/spl/Kconfig b/common/spl/Kconfig index dc319ad..10d9cdd 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1,4 +1,4 @@ -menu "SPL / TPL" +menu "SPL / TPL / VPL" config SUPPORT_SPL bool @@ -6,6 +6,9 @@ config SUPPORT_SPL config SUPPORT_TPL bool +config SUPPORT_VPL + bool + config SPL_DFU_NO_RESET bool @@ -72,6 +75,89 @@ config SPL_SIZE_LIMIT_PROVIDE_STACK of SRAM available for SPL when the stack required before reolcation uses this SRAM, too. +config SPL_MAX_SIZE + hex "Maximum size of the SPL image, excluding BSS" + default 0x30000 if ARCH_MX6 && MX6_OCRAM_256KB + default 0x1b000 if AM33XX && !TI_SECURE_DEVICE + default 0x10000 if ARCH_MX6 && !MX6_OCRAM_256KB + default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x10000 + default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x20000 && !MACH_SUN50I_H616 + default 0x7000 if RCAR_GEN3 + default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0 + default 0x0 + help + Maximum size of the SPL image (text, data, rodata, and linker lists + sections), BSS excluded. When defined, the linker checks that the + actual size does not exceed it. + +config SPL_PAD_TO + hex "Offset to which the SPL should be padded before appending the SPL payload" + default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB + default 0x11000 if ARCH_MX7 || (ARCH_MX6 && !MX6_OCRAM_256KB) + default 0x10000 if ARCH_KEYSTONE + default 0x8000 if ARCH_SUNXI && !MACH_SUN50I_H616 + default TPL_MAX_SIZE if TPL_MAX_SIZE > SPL_MAX_SIZE + default SPL_MAX_SIZE + help + Image offset to which the SPL should be padded before appending the + SPL payload. By default, this is defined as CONFIG_SPL_MAX_SIZE, or 0 if + CONFIG_SPL_MAX_SIZE is undefined. CONFIG_SPL_PAD_TO must be either + 0, meaning to append the SPL payload without any padding, or >= + CONFIG_SPL_MAX_SIZE. + +config SPL_HAS_BSS_LINKER_SECTION + depends on SPL_FRAMEWORK + bool "Use a specific address for the BSS via the linker script" + default y if ARCH_SUNXI || ARCH_MX6 || ARCH_OMAP2PLUS || MIPS || RISCV + +config SPL_BSS_START_ADDR + hex "Link address for the BSS within the SPL binary" + depends on SPL_HAS_BSS_LINKER_SECTION + default 0x88200000 if (ARCH_MX6 && (MX6SX || MX6SL || MX6UL || MX6ULL)) || ARCH_MX7 + default 0x18200000 if ARCH_MX6 && !(MX6SX || MX6SL || MX6UL || MX6ULL) + default 0x80a00000 if ARCH_OMAP2PLUS + default 0x81f80000 if ARCH_SUNXI && MACH_SUNIV + default 0x4ff80000 if ARCH_SUNXI && !(MACH_SUN9I || MACH_SUNIV) + default 0x2ff80000 if ARCH_SUNXI && MACH_SUN9I + +choice + prompt "Enforce SPL BSS limit" + depends on SPL && !PPC + default SPL_BSS_LIMIT + help + In some platforms we only want to enforce a limit on the size of the + BSS in memory. On other platforms we need to enforce a limit on the + whole of the memory allocation as we're strictly limited to a small + typically non-DRAM location. Finally, other platforms do not enforce + a memory limit within SPL. + +config SPL_NO_BSS_LIMIT + bool "Do not enforce a build time limit on the size of the BSS" + +config SPL_BSS_LIMIT + bool "Enforce a limit on the size of the BSS only" + +config SPL_FOOTPRINT_LIMIT + bool "Enforce a limit on the whole of memory allocated to SPL, BSS included" + +endchoice + +config SPL_BSS_MAX_SIZE + hex "Maximum size in memory allocated to the SPL BSS" + depends on SPL_BSS_LIMIT + default 0x100000 if ARCH_MX6 || RISCV + default 0x80000 if ARCH_OMAP2PLUS || ARCH_SUNXI + help + When non-zero, the linker checks that the actual memory used by SPL + from __bss_start to __bss_end does not exceed it. + +config SPL_MAX_FOOTPRINT + hex "Maximum size in memory allocated to the SPL, BSS included" + depends on SPL_FOOTPRINT_LIMIT + help + When non-zero, the linker checks that the actual memory used by SPL + from _start to __bss_end does not exceed it. + config SPL_SYS_STACK_F_CHECK_BYTE hex default 0xaa @@ -135,6 +221,86 @@ config SPL_FSL_PBL Create boot binary having SPL binary in PBI format concatenated with u-boot binary. +config SPL_SYS_CCSR_DO_NOT_RELOCATE + bool "Ensures that CCSR is not relocated" + depends on PPC + help + If this is defined, then CONFIG_SYS_CCSRBAR_PHYS will be forced to a + value that ensures that CCSR is not relocated. + +config TPL_SYS_CCSR_DO_NOT_RELOCATE + def_bool y + depends on SPL_SYS_CCSR_DO_NOT_RELOCATE + +endmenu + +menu "PowerPC SPL / TPL specific options" + depends on PPC && (SPL && !SPL_FRAMEWORK) + +config SPL_INIT_MINIMAL + bool "Arch init code will be built for a very small image" + +config SPL_FLUSH_IMAGE + bool "Clean dcache and invalidate icache after loading the image" + +config SPL_SKIP_RELOCATE + bool "Skip relocating SPL" + +config SPL_RELOC_TEXT_BASE + hex "Address to relocate SPL to" + default SPL_TEXT_BASE + help + If unspecified, this is equal to CONFIG_SPL_TEXT_BASE (i.e. no + relocation is done). + +config SPL_RELOC_STACK + hex "Address of the start of the stack SPL will use after relocation." + help + If unspecified, this is equal to CONFIG_SYS_SPL_MALLOC_START. Starting + address of the malloc pool used in SPL. When this option is set the full + malloc is used in SPL and it is set up by spl_init() and before that, the + simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined. + +config SPL_RELOC_MALLOC + bool "SPL has malloc pool after relocation" + +config SPL_RELOC_MALLOC_ADDR + hex "Address of malloc pool in SPL" + depends on SPL_RELOC_MALLOC + +config SPL_RELOC_MALLOC_SIZE + hex "Size of malloc pool in SPL" + depends on SPL_RELOC_MALLOC + +config TPL_RELOC_TEXT_BASE + hex "Address to relocate TPL to" + depends on TPL + default TPL_TEXT_BASE + help + If unspecified, this is equal to CONFIG_TPL_TEXT_BASE (i.e. no + relocation is done). + +config TPL_RELOC_STACK + hex "Address of the start of the stack TPL will use after relocation." + depends on TPL + help + If unspecified, this is equal to CONFIG_SYS_TPL_MALLOC_START. Starting + address of the malloc pool used in TPL. When this option is set the full + malloc is used in TPL and it is set up by spl_init() and before that, the + simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined. + +config TPL_RELOC_MALLOC + bool "TPL has malloc pool after relocation" + depends on TPL + +config TPL_RELOC_MALLOC_ADDR + hex "Address of malloc pool in TPL" + depends on TPL_RELOC_MALLOC + +config TPL_RELOC_MALLOC_SIZE + hex "Size of malloc pool in TPL" + depends on TPL_RELOC_MALLOC + endmenu config HANDOFF @@ -186,6 +352,13 @@ config SPL_BOARD_INIT spl_board_init() from board_init_r(). This function should be provided by the board. +config VPL_BOARD_INIT + bool "Call board-specific initialization in VPL" + help + If this option is enabled, U-Boot will call the function + spl_board_init() from board_init_r(). This function should be + provided by the board. + config SPL_BOOTROM_SUPPORT bool "Support returning to the BOOTROM" help @@ -209,15 +382,17 @@ config SPL_BOOTCOUNT_LIMIT config SPL_RAW_IMAGE_SUPPORT bool "Support SPL loading and booting of RAW images" default n if (ARCH_MX6 && (SPL_MMC || SPL_SATA)) - default y if !TI_SECURE_DEVICE + default y + depends on !TI_SECURE_DEVICE help SPL will support loading and booting a RAW image when this option is y. If this is not set, SPL will move on to other available boot media to find a suitable image. -config SPL_LEGACY_IMAGE_SUPPORT +config SPL_LEGACY_IMAGE_FORMAT bool "Support SPL loading and booting of Legacy images" - default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT + default y if !SPL_LOAD_FIT + depends on !TI_SECURE_DEVICE help SPL will support loading and booting Legacy images when this option is y. If this is not set, SPL will move on to other available @@ -225,7 +400,7 @@ config SPL_LEGACY_IMAGE_SUPPORT config SPL_LEGACY_IMAGE_CRC_CHECK bool "Check CRC of Legacy images" - depends on SPL_LEGACY_IMAGE_SUPPORT + depends on SPL_LEGACY_IMAGE_FORMAT select SPL_CRC32 help Enable this to check the CRC of Legacy images. While this increases @@ -252,6 +427,27 @@ config TPL_SYS_MALLOC_SIMPLE this will make the TPL binary smaller at the cost of more heap usage as the *_simple malloc functions do not re-use free-ed mem. +config SPL_SHARES_INIT_SP_ADDR + bool "SPL and U-Boot use the same initial stack pointer location" + depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && SPL_FRAMEWORK + default n if ARCH_SUNXI || ARCH_MX6 || ARCH_MX7 + default y + help + In many cases, we can use the same initial stack pointer address for + both SPL and U-Boot itself. If you need to specify a different address + however, say N here and then set a different value in CONFIG_SPL_STACK. + +config SPL_STACK + hex "Initial stack pointer location" + depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && SPL_FRAMEWORK + depends on !SPL_SHARES_INIT_SP_ADDR + default 0x946bb8 if ARCH_MX7 + default 0x93ffb8 if ARCH_MX6 && MX6_OCRAM_256KB + default 0x91ffb8 if ARCH_MX6 && !MX6_OCRAM_256KB + help + Address of the start of the stack SPL will use before SDRAM is + initialized. + config SPL_STACK_R bool "Enable SDRAM location for SPL stack" help @@ -289,6 +485,23 @@ config SPL_SEPARATE_BSS location is used. Normally we put the device tree at the end of BSS but with this option enabled, it goes at _image_binary_end. +config SYS_SPL_MALLOC + bool "Enable malloc pool in SPL" + depends on SPL_FRAMEWORK + +config HAS_CUSTOM_SPL_MALLOC_START + bool "For the SPL malloc pool, define a custom starting address" + depends on SYS_SPL_MALLOC + +config CUSTOM_SYS_SPL_MALLOC_ADDR + hex "SPL malloc addr" + depends on HAS_CUSTOM_SPL_MALLOC_START + +config SYS_SPL_MALLOC_SIZE + hex "Size of the SPL malloc pool" + depends on SYS_SPL_MALLOC + default 0x100000 + config SPL_READ_ONLY bool depends on SPL_OF_PLATDATA @@ -302,6 +515,16 @@ config SPL_READ_ONLY writeable memory) of anything it wants to modify, such as device-private data. +config TPL_SEPARATE_BSS + bool "BSS section is in a different memory region from text" + default y if SPL_SEPARATE_BSS + help + Some platforms need a large BSS region in TPL and can provide this + because RAM is already set up. In this case BSS can be moved to RAM. + This option should then be enabled so that the correct device tree + location is used. Normally we put the device tree at the end of BSS + but with this option enabled, it goes at _image_binary_end. + config SPL_BANNER_PRINT bool "Enable output of the SPL banner 'U-Boot SPL ...'" default y @@ -431,7 +654,7 @@ config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION config SPL_CRC32 bool "Support CRC32" - default y if SPL_LEGACY_IMAGE_SUPPORT || SPL_EFI_PARTITION + default y if SPL_LEGACY_IMAGE_FORMAT || SPL_EFI_PARTITION default y if SPL_ENV_SUPPORT || TPL_BLOBLIST help Enable this to support CRC32 in uImages or FIT images within SPL. @@ -569,6 +792,31 @@ config SPL_FS_FAT filesystem from within SPL. Support for the underlying block device (e.g. MMC or USB) must be enabled separately. +config SPL_FS_LOAD_PAYLOAD_NAME + string "File to load for U-Boot from the filesystem" + depends on SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS + default "tispl.bin" if SYS_K3_SPL_ATF + default "u-boot.itb" if SPL_LOAD_FIT + default "u-boot.img" + help + Filename to read to load U-Boot when reading from filesystem. + +config SPL_FS_LOAD_KERNEL_NAME + string "File to load for the OS kernel from the filesystem" + depends on (SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS) && SPL_OS_BOOT + default "uImage" + help + Filename to read to load for the OS kernel when reading from the + filesystem. + +config SPL_FS_LOAD_ARGS_NAME + string "File to load for the OS kernel argument parameters from the filesystem" + depends on (SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS) && SPL_OS_BOOT + default "args" + help + Filename to read to load for the OS kernel argument parameters from + the filesystem. + config SPL_FAT_WRITE bool "Support write for FAT filesystems" help @@ -668,7 +916,8 @@ config SYS_MMCSD_FS_BOOT_PARTITION default 1 help Partition on the MMC to load U-Boot from when the MMC is being - used in fs mode + used in fs mode. + Use -1 as a special value to use the first bootable partition. config SPL_MMC_TINY bool "Tiny MMC framework in SPL" @@ -726,13 +975,23 @@ config SPL_NAND_SUPPORT This enables the drivers in drivers/mtd/nand/raw as part of an SPL build. +config SPL_NAND_RAW_ONLY + bool "Support to boot only raw u-boot.bin images" + depends on SPL_NAND_SUPPORT + help + Use this only if you need to save space. + config SPL_NAND_DRIVERS bool "Use standard NAND driver" help SPL uses normal NAND drivers, not minimal drivers. config SPL_NAND_ECC - bool "Include standard software ECC in the SPL" + bool "Include standard ECC in SPL" + +config SPL_NAND_SOFTECC + bool "Use software ECC in SPL" + depends on SPL_NAND_ECC config SPL_NAND_SIMPLE bool "Support simple NAND drivers in SPL" @@ -1412,16 +1671,31 @@ config TPL_POWER config TPL_TEXT_BASE hex "Base address for the .text section of the TPL stage" + default 0 help The base address for the .text section of the TPL stage. config TPL_MAX_SIZE - int "Maximum size (in bytes) for the TPL stage" - default 0 - depends on TPL + hex "Maximum size (in bytes) for the TPL stage" + default 0x2e000 if ROCKCHIP_RK3399 + default 0x8000 if ROCKCHIP_RK3288 + default 0x7000 if ROCKCHIP_RK322X || ROCKCHIP_RK3328 || ROCKCHIP_RK3368 + default 0x2800 if ROCKCHIP_PX30 + default 0x0 help The maximum size (in bytes) of the TPL stage. +config TPL_PAD_TO + hex "Offset to which the TPL should be padded before appending the TPL payload" + depends on !TPL_FRAMEWORK && PPC + default TPL_MAX_SIZE + help + Image offset to which the TPL should be padded before appending the + TPL payload. By default, this is defined as CONFIG_TPL_MAX_SIZE, or 0 if + CONFIG_TPL_MAX_SIZE is undefined. CONFIG_TPL_PAD_TO must be either + 0, meaning to append the TPL payload without any padding, or >= + CONFIG_TPL_MAX_SIZE. + config TPL_STACK hex "Address of the initial stack-pointer for the TPL stage" depends on TPL_NEEDS_SEPARATE_STACK @@ -1617,6 +1891,218 @@ config TPL_YMODEM_SUPPORT endif # TPL +config VPL + bool + depends on SUPPORT_SPL + prompt "Enable VPL" + help + If you want to build VPL as well as the normal image, TPL and SPL, + say Y. + +if VPL + +config VPL_BANNER_PRINT + bool "Enable output of the VPL banner 'U-Boot VPL ...'" + depends on VPL + default y + help + If this option is enabled, VPL will print the banner with version + info. Disabling this option could be useful to reduce VPL boot time + (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud). + +config VPL_BOARD_INIT + bool "Call board-specific initialization in VPL" + help + If this option is enabled, U-Boot will call the function + spl_board_init() from board_init_r(). This function should be + provided by the board. + +config VPL_CACHE + depends on CACHE + bool "Support cache drivers in VPL" + help + Enable support for cache drivers in VPL. + +config VPL_CRC32 + bool "Support CRC32 in VPL" + default y if VPL_ENV_SUPPORT || VPL_BLOBLIST + help + Enable this to support CRC32 in uImages or FIT images within VPL. + This is a 32-bit checksum value that can be used to verify images. + For FIT images, this is the least secure type of checksum, suitable + for detected accidental image corruption. For secure applications you + should consider SHA1 or SHA256. + +config VPL_DM_SPI + bool "Support SPI DM drivers in VPL" + help + Enable support for SPI DM drivers in VPL. + +config VPL_DM_SPI_FLASH + bool "Support SPI DM FLASH drivers in VPL" + help + Enable support for SPI DM flash drivers in VPL. + +config VPL_FRAMEWORK + bool "Support VPL based upon the common SPL framework" + default y + help + Enable the SPL framework under common/spl/ for VPL builds. + This framework supports MMC, NAND and YMODEM and other methods + loading of U-Boot's next stage. If unsure, say Y. + +config VPL_HANDOFF + bool "Pass hand-off information from VPL to SPL" + depends on HANDOFF && VPL_BLOBLIST + default y + help + This option enables VPL to write handoff information. This can be + used to pass information like the size of SDRAM from VPL to SPL. Also + VPL can receive information from TPL in the same place if that is + enabled. + +config VPL_LIBCOMMON_SUPPORT + bool "Support common libraries" + default y if SPL_LIBCOMMON_SUPPORT + help + Enable support for common U-Boot libraries within VPL. See + SPL_LIBCOMMON_SUPPORT for details. + +config VPL_LIBGENERIC_SUPPORT + bool "Support generic libraries" + default y if SPL_LIBGENERIC_SUPPORT + help + Enable support for generic U-Boot libraries within VPL. These + libraries include generic code to deal with device tree, hashing, + printf(), compression and the like. This option is enabled on many + boards. Enable this option to build the code in lib/ as part of a + VPL build. + +config VPL_DRIVERS_MISC + bool "Support misc drivers" + default y if TPL_DRIVERS_MISC + help + Enable miscellaneous drivers in VPL. These drivers perform various + tasks that don't fall nicely into other categories, Enable this + option to build the drivers in drivers/misc as part of a VPL + build, for those that support building in VPL (not all drivers do). + +config VPL_ENV_SUPPORT + bool "Support an environment" + help + Enable environment support in VPL. The U-Boot environment provides + a number of settings (essentially name/value pairs) which can + control many aspects of U-Boot's operation. Enabling this option will + make env_get() and env_set() available in VSPL. + +config VPL_GPIO + bool "Support GPIO in VPL" + default y if SPL_GPIO + help + Enable support for GPIOs (General-purpose Input/Output) in VPL. + GPIOs allow U-Boot to read the state of an input line (high or + low) and set the state of an output line. This can be used to + drive LEDs, control power to various system parts and read user + input. GPIOs can be useful in VPL to enable a 'sign-of-life' LED, + for example. Enable this option to build the drivers in + drivers/gpio as part of a VPL build. + +config VPL_HANDOFF + bool "Pass hand-off information from VPL to SPL and U-Boot proper" + depends on HANDOFF && VPL_BLOBLIST + default y + help + This option enables VPL to write handoff information. This can be + used to pass information like the size of SDRAM from VPL to U-Boot + proper. The information is also available to VPL if it is useful + there. + +config VPL_HASH + bool "Support hashing drivers in VPL" + depends on VPL + select SHA1 + select SHA256 + help + Enable hashing drivers in VPL. These drivers can be used to + accelerate secure boot processing in secure applications. Enable + this option to build system-specific drivers for hash acceleration + as part of a VPL build. + +config VPL_I2C_SUPPORT + bool "Support I2C in VPL" + default y if SPL_I2C_SUPPORT + help + Enable support for the I2C bus in VPL. Vee SPL_I2C_SUPPORT for + details. + +config VPL_PCH_SUPPORT + bool "Support PCH drivers" + default y if TPL_PCH_SUPPORT + help + Enable support for PCH (Platform Controller Hub) devices in VPL. + These are used to set up GPIOs and the SPI peripheral early in + boot. This enables the drivers in drivers/pch as part of a VPL + build. + +config VPL_PCI + bool "Support PCI drivers" + default y if SPL_PCI + help + Enable support for PCI in VPL. For platforms that need PCI to boot, + or must perform some init using PCI in VPL, this provides the + necessary driver support. This enables the drivers in drivers/pci + as part of a VPL build. + +config VPL_RTC + bool "Support RTC drivers" + help + Enable RTC (Real-time Clock) support in VPL. This includes support + for reading and setting the time. Some RTC devices also have some + non-volatile (battery-backed) memory which is accessible if + needed. This enables the drivers in drivers/rtc as part of a VPL + build. + +config VPL_SERIAL + bool "Support serial" + default y if TPL_SERIAL + select VPL_PRINTF + select VPL_STRTO + help + Enable support for serial in VPL. See SPL_SERIAL_SUPPORT for + details. + +config VPL_SIZE_LIMIT + hex "Maximum size of VPL image" + depends on VPL + default 0x0 + help + Specifies the maximum length of the U-Boot VPL image. + If this value is zero, it is ignored. + +config VPL_SPI + bool "Support SPI drivers" + help + Enable support for using SPI in VPL. See SPL_SPI_SUPPORT for + details. + +config VPL_SPI_FLASH_SUPPORT + bool "Support SPI flash drivers" + help + Enable support for using SPI flash in VPL, and loading U-Boot from + SPI flash. SPI flash (Serial Peripheral Bus flash) is named after + the SPI bus that is used to connect it to a system. It is a simple + but fast bidirectional 4-wire bus (clock, chip select and two data + lines). This enables the drivers in drivers/mtd/spi as part of a + VPL build. This normally requires VPL_SPI_SUPPORT. + +config VPL_TEXT_BASE + hex "VPL Text Base" + default 0x0 + help + The address in memory that VPL will be running from. + +endif # VPL + config SPL_AT91_MCK_BYPASS bool "Use external clock signal as a source of main clock for AT91 platforms" depends on ARCH_AT91