Merge branch '2022-08-10-assorted-updates'
[platform/kernel/u-boot.git] / lib / Kconfig
index effe735..e888c29 100644 (file)
@@ -52,11 +52,6 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
 
 config CHARSET
        bool
-       default y if UT_UNICODE || EFI_LOADER || UFS || EFI_APP
-       help
-         Enables support for various conversions between different
-         character sets, such as between unicode representations and
-         different 'code pages'.
 
 config DYNAMIC_CRC_TABLE
        bool "Enable Dynamic tables for CRC"
@@ -90,6 +85,11 @@ config TPL_PRINTF
        select TPL_SPRINTF
        select TPL_STRTO if !TPL_USE_TINY_PRINTF
 
+config VPL_PRINTF
+       bool
+       select VPL_SPRINTF
+       select VPL_STRTO if !VPL_USE_TINY_PRINTF
+
 config SPRINTF
        bool
        default y
@@ -100,6 +100,9 @@ config SPL_SPRINTF
 config TPL_SPRINTF
        bool
 
+config VPL_SPRINTF
+       bool
+
 config SSCANF
        bool
 
@@ -113,6 +116,9 @@ config SPL_STRTO
 config TPL_STRTO
        bool
 
+config VPL_STRTO
+       bool
+
 config IMAGE_SPARSE
        bool
 
@@ -165,6 +171,17 @@ config TPL_USE_TINY_PRINTF
 
          The supported format specifiers are %c, %s, %u/%d and %x.
 
+config VPL_USE_TINY_PRINTF
+       bool "Enable tiny printf() version for VPL"
+       depends on VPL
+       help
+         This option enables a tiny, stripped down printf version.
+         This should only be used in space limited environments,
+         like SPL versions with hard memory limits. This version
+         reduces the code size by about 2.5KiB on armv7.
+
+         The supported format specifiers are %c, %s, %u/%d and %x.
+
 config PANIC_HANG
        bool "Do not reset the system on fatal error"
        help
@@ -222,6 +239,7 @@ config GENERATE_ACPI_TABLE
 
 config SPL_TINY_MEMSET
        bool "Use a very small memset() in SPL"
+       depends on SPL
        help
          The faster memset() is the arch-specific one (if available) enabled
          by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
@@ -231,6 +249,7 @@ config SPL_TINY_MEMSET
 
 config TPL_TINY_MEMSET
        bool "Use a very small memset() in TPL"
+       depends on TPL
        help
          The faster memset() is the arch-specific one (if available) enabled
          by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
@@ -341,6 +360,7 @@ source lib/crypt/Kconfig
 config TPM
        bool "Trusted Platform Module (TPM) Support"
        depends on DM
+       imply DM_RNG
        help
          This enables support for TPMs which can be used to provide security
          features for your board. The TPM can be connected via LPC or I2C
@@ -371,6 +391,17 @@ config TPL_TPM
          for the low-level TPM interface, but only one TPM is supported at
          a time by the TPM library.
 
+config VPL_TPM
+       bool "Trusted Platform Module (TPM) Support in VPL"
+       depends on VPL_DM
+       help
+         This enables support for TPMs which can be used to provide security
+         features for your board. The TPM can be connected via LPC or I2C
+         and a sandbox TPM is provided for testing purposes. Use the 'tpm'
+         command to interactive the TPM. Driver model support is provided
+         for the low-level TPM interface, but only one TPM is supported at
+         a time by the TPM library.
+
 endmenu
 
 menu "Android Verified Boot"
@@ -528,6 +559,7 @@ config MD5
 
 config SPL_MD5
        bool "Support MD5 algorithm in SPL"
+       depends on SPL
        help
          This option enables MD5 support in SPL. MD5 is an algorithm designed
          in 1991 that produces a 16-byte digest (or checksum) from its input
@@ -614,6 +646,7 @@ config ZSTD
 
 config SPL_LZ4
        bool "Enable LZ4 decompression support in SPL"
+       depends on SPL
        help
          This enables support for the LZ4 decompression algorithm in SPL. LZ4
          is a lossless data compression algorithm that is focused on
@@ -622,11 +655,19 @@ config SPL_LZ4
 
 config SPL_LZMA
        bool "Enable LZMA decompression support for SPL build"
+       depends on SPL
        help
          This enables support for LZMA compression algorithm for SPL boot.
 
+config VPL_LZMA
+       bool "Enable LZMA decompression support for VPL build"
+       default y if LZMA
+       help
+         This enables support for LZMA compression algorithm for VPL boot.
+
 config SPL_LZO
        bool "Enable LZO decompression support in SPL"
+       depends on SPL
        help
          This enables support for LZO compression algorithm in the SPL.
 
@@ -643,6 +684,7 @@ config SPL_ZLIB
 
 config SPL_ZSTD
        bool "Enable Zstandard decompression support in SPL"
+       depends on SPL
        select XXHASH
        help
          This enables Zstandard decompression library in the SPL.
@@ -704,6 +746,7 @@ config OF_LIBFDT_OVERLAY
 
 config SPL_OF_LIBFDT
        bool "Enable the FDT library for SPL"
+       depends on SPL_LIBGENERIC_SUPPORT
        default y if SPL_OF_CONTROL
        help
          This enables the FDT library (libfdt). It provides functions for
@@ -714,7 +757,7 @@ config SPL_OF_LIBFDT
 
 config SPL_OF_LIBFDT_ASSUME_MASK
        hex "Mask of conditions to assume for libfdt"
-       depends on SPL_OF_LIBFDT || FIT
+       depends on SPL_OF_LIBFDT || (FIT && SPL)
        default 0xff
        help
          Use this to change the assumptions made by libfdt in SPL about the
@@ -725,6 +768,7 @@ config SPL_OF_LIBFDT_ASSUME_MASK
 
 config TPL_OF_LIBFDT
        bool "Enable the FDT library for TPL"
+       depends on TPL_LIBGENERIC_SUPPORT
        default y if TPL_OF_CONTROL
        help
          This enables the FDT library (libfdt). It provides functions for
@@ -735,7 +779,7 @@ config TPL_OF_LIBFDT
 
 config TPL_OF_LIBFDT_ASSUME_MASK
        hex "Mask of conditions to assume for libfdt"
-       depends on TPL_OF_LIBFDT || FIT
+       depends on TPL_OF_LIBFDT || (FIT && TPL)
        default 0xff
        help
          Use this to change the assumptions made by libfdt in TPL about the
@@ -744,6 +788,28 @@ config TPL_OF_LIBFDT_ASSUME_MASK
          0xff means all assumptions are made and any invalid data may cause
          unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
 
+config VPL_OF_LIBFDT
+       bool "Enable the FDT library for VPL"
+       depends on VPL
+       default y if VPL_OF_CONTROL && !VPL_OF_PLATDATA
+       help
+         This enables the FDT library (libfdt). It provides functions for
+         accessing binary device tree images in memory, such as adding and
+         removing nodes and properties, scanning through the tree and finding
+         particular compatible nodes. The library operates on a flattened
+         version of the device tree.
+
+config VPL_OF_LIBFDT_ASSUME_MASK
+       hex "Mask of conditions to assume for libfdt"
+       depends on VPL_OF_LIBFDT || (FIT && VPL)
+       default 0xff
+       help
+         Use this to change the assumptions made by libfdt in SPL about the
+         device tree it is working with. A value of 0 means that no assumptions
+         are made, and libfdt is able to deal with malicious data. A value of
+         0xff means all assumptions are made and any invalid data may cause
+         unsafe execution. See FDT_ASSUME_PERFECT, etc. in libfdt_internal.h
+
 config FDT_FIXUP_PARTITIONS
        bool "overwrite MTD partitions in DTS through defined in 'mtdparts'"
        depends on OF_LIBFDT
@@ -861,7 +927,7 @@ config LIB_ELF
 
 config LMB
        bool "Enable the logical memory blocks library (lmb)"
-       default y if ARC || ARM || M68K || MICROBLAZE || MIPS || NDS32 || \
+       default y if ARC || ARM || M68K || MICROBLAZE || MIPS || \
                     NIOS2 || PPC || RISCV || SANDBOX || SH || X86 || XTENSA
        help
          Support the library logical memory blocks.
@@ -901,11 +967,4 @@ config LMB_RESERVED_REGIONS
          Define the number of supported reserved regions in the library logical
          memory blocks.
 
-config PHANDLE_CHECK_SEQ
-       bool "Enable phandle check while getting sequence number"
-       help
-         When there are multiple device tree nodes with same name,
-          enable this config option to distinguish them using
-         phandles in fdtdec_get_alias_seq() function.
-
 endmenu