Convert CONFIG_SYS_FSL_SEC_MON et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_FSL_SEC_MON
   CONFIG_SYS_FSL_SEC_MON_BE
   CONFIG_SYS_FSL_SEC_MON_LE

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2022-06-16 14:04:39 -04:00
parent 7e7d04aecb
commit c9f85187e2
24 changed files with 31 additions and 23 deletions

View File

@ -4,6 +4,7 @@ config CHAIN_OF_TRUST
imply CMD_HASH if ARM imply CMD_HASH if ARM
select FSL_CAAM select FSL_CAAM
select ARCH_MISC_INIT select ARCH_MISC_INIT
select FSL_SEC_MON
select SPL_BOARD_INIT if (ARM && SPL) select SPL_BOARD_INIT if (ARM && SPL)
select SPL_HASH if (ARM && SPL) select SPL_HASH if (ARM && SPL)
select SHA_HW_ACCEL select SHA_HW_ACCEL

View File

@ -60,9 +60,6 @@
#define CONFIG_SYS_FSL_SFP_LE #define CONFIG_SYS_FSL_SFP_LE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
/* Security Monitor */
#define CONFIG_SYS_FSL_SEC_MON_LE
/* DCFG - GUR */ /* DCFG - GUR */
#define CONFIG_SYS_FSL_CCSR_GUR_LE #define CONFIG_SYS_FSL_CCSR_GUR_LE
@ -162,9 +159,6 @@
#define CONFIG_SYS_FSL_SFP_LE #define CONFIG_SYS_FSL_SFP_LE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
/* Security Monitor */
#define CONFIG_SYS_FSL_SEC_MON_LE
/* DCFG - GUR */ /* DCFG - GUR */
#define CONFIG_SYS_FSL_CCSR_GUR_LE #define CONFIG_SYS_FSL_CCSR_GUR_LE
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
@ -214,9 +208,6 @@
#define CONFIG_SYS_FSL_SFP_LE #define CONFIG_SYS_FSL_SFP_LE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
/* Security Monitor */
#define CONFIG_SYS_FSL_SEC_MON_LE
/* DCFG - GUR */ /* DCFG - GUR */
#define CONFIG_SYS_FSL_CCSR_GUR_LE #define CONFIG_SYS_FSL_CCSR_GUR_LE
@ -273,9 +264,6 @@
/* SEC */ /* SEC */
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
/* Security Monitor */
#define CONFIG_SYS_FSL_SEC_MON_LE
/* DCFG - GUR */ /* DCFG - GUR */
#define CONFIG_SYS_FSL_CCSR_GUR_LE #define CONFIG_SYS_FSL_CCSR_GUR_LE
@ -310,7 +298,6 @@
#define CONFIG_SYS_FSL_IFC_BE #define CONFIG_SYS_FSL_IFC_BE
#define CONFIG_SYS_FSL_SFP_VER_3_2 #define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SEC_MON_BE
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
#define CONFIG_KEY_REVOCATION #define CONFIG_KEY_REVOCATION
@ -350,7 +337,6 @@
#define GICD_BASE 0x01401000 #define GICD_BASE 0x01401000
#define GICC_BASE 0x01402000 #define GICC_BASE 0x01402000
#define CONFIG_SYS_FSL_SFP_VER_3_2 #define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SEC_MON_BE
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
#define CONFIG_KEY_REVOCATION #define CONFIG_KEY_REVOCATION
@ -369,7 +355,6 @@
#define CONFIG_SYS_FSL_IFC_BE #define CONFIG_SYS_FSL_IFC_BE
#define CONFIG_SYS_FSL_SFP_VER_3_2 #define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SEC_MON_BE
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
#define CONFIG_KEY_REVOCATION #define CONFIG_KEY_REVOCATION

View File

@ -87,7 +87,6 @@
#define CONFIG_SYS_FSL_ESDHC_BE #define CONFIG_SYS_FSL_ESDHC_BE
#define CONFIG_SYS_FSL_WDOG_BE #define CONFIG_SYS_FSL_WDOG_BE
#define CONFIG_SYS_FSL_DSPI_BE #define CONFIG_SYS_FSL_DSPI_BE
#define CONFIG_SYS_FSL_SEC_MON_LE
#define CONFIG_SYS_FSL_SFP_VER_3_2 #define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE

View File

@ -8,8 +8,6 @@
#define __FSL_SECURE_BOOT_H #define __FSL_SECURE_BOOT_H
#ifdef CONFIG_CHAIN_OF_TRUST #ifdef CONFIG_CHAIN_OF_TRUST
#define CONFIG_FSL_SEC_MON
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_SPL_BUILD
/* /*
* Define the key hash for U-Boot here if public/private key pair used to * Define the key hash for U-Boot here if public/private key pair used to

View File

@ -19,7 +19,6 @@
/* IP endianness */ /* IP endianness */
#define CONFIG_SYS_FSL_IFC_BE #define CONFIG_SYS_FSL_IFC_BE
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SEC_MON_BE
#if defined(CONFIG_ARCH_MPC8548) #if defined(CONFIG_ARCH_MPC8548)
#define CONFIG_SYS_FSL_SRIO_MAX_PORTS 1 #define CONFIG_SYS_FSL_SRIO_MAX_PORTS 1

View File

@ -92,8 +92,6 @@
#define CONFIG_SPL_UBOOT_KEY_HASH NULL #define CONFIG_SPL_UBOOT_KEY_HASH NULL
#endif /* ifdef CONFIG_SPL_BUILD */ #endif /* ifdef CONFIG_SPL_BUILD */
#define CONFIG_FSL_SEC_MON
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_SPL_BUILD
/* /*
* fsl_setenv_chain_of_trust() must be called from * fsl_setenv_chain_of_trust() must be called from

View File

@ -47,6 +47,7 @@ CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y CONFIG_DM_SPI_FLASH=y

View File

@ -45,6 +45,7 @@ CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y CONFIG_DM_SPI_FLASH=y

View File

@ -52,6 +52,7 @@ CONFIG_DM=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x57 CONFIG_SYS_I2C_EEPROM_ADDR=0x57
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -50,6 +50,7 @@ CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y CONFIG_DM_SPI_FLASH=y

View File

@ -48,6 +48,7 @@ CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y CONFIG_DM_SPI_FLASH=y

View File

@ -64,6 +64,7 @@ CONFIG_DM_I2C=y
CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_EARLY_INIT=y CONFIG_SYS_I2C_EARLY_INIT=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x57 CONFIG_SYS_I2C_EEPROM_ADDR=0x57
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -50,6 +50,7 @@ CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -73,6 +73,7 @@ CONFIG_SPL_DM=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -73,6 +73,7 @@ CONFIG_SPL_DM=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
# CONFIG_SPL_DM_MMC is not set # CONFIG_SPL_DM_MMC is not set
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y

View File

@ -49,6 +49,7 @@ CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -45,6 +45,7 @@ CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x52 CONFIG_SYS_I2C_EEPROM_ADDR=0x52
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -64,6 +64,7 @@ CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x57 CONFIG_SYS_I2C_EEPROM_ADDR=0x57
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -64,6 +64,7 @@ CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_SYS_I2C_EARLY_INIT=y CONFIG_SYS_I2C_EARLY_INIT=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x57 CONFIG_SYS_I2C_EEPROM_ADDR=0x57
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -57,6 +57,7 @@ CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -80,6 +80,7 @@ CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
# CONFIG_SPL_DM_I2C is not set # CONFIG_SPL_DM_I2C is not set
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
# CONFIG_SPL_DM_MMC is not set # CONFIG_SPL_DM_MMC is not set
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y

View File

@ -51,6 +51,7 @@ CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
CONFIG_MPC8XXX_GPIO=y CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_SYS_FSL_SEC_MON_BE=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x53 CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC=y
CONFIG_MTD=y CONFIG_MTD=y

View File

@ -275,6 +275,20 @@ config FSL_SEC_MON
Security Monitor can be transitioned on any security failures, Security Monitor can be transitioned on any security failures,
like software violations or hardware security violations. like software violations or hardware security violations.
choice
prompt "Security monitor interaction endianess"
depends on FSL_SEC_MON
default SYS_FSL_SEC_MON_BE if PPC
default SYS_FSL_SEC_MON_LE
config SYS_FSL_SEC_MON_LE
bool "Security monitor interactions are little endian"
config SYS_FSL_SEC_MON_BE
bool "Security monitor interactions are big endian"
endchoice
config IRQ config IRQ
bool "Interrupt controller" bool "Interrupt controller"
help help

View File

@ -23,8 +23,6 @@
#define sec_mon_in16(a) in_be16(a) #define sec_mon_in16(a) in_be16(a)
#define sec_mon_clrbits32 clrbits_be32 #define sec_mon_clrbits32 clrbits_be32
#define sec_mon_setbits32 setbits_be32 #define sec_mon_setbits32 setbits_be32
#else
#error Neither CONFIG_SYS_FSL_SEC_MON_LE nor CONFIG_SYS_FSL_SEC_MON_BE defined
#endif #endif
struct ccsr_sec_mon_regs { struct ccsr_sec_mon_regs {