From 1abff55a199b733c1addb8792db33ad5054bcd21 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 22 Nov 2018 09:19:32 +0100 Subject: arm: baltos: move CONFIG_SYS_NAND_U_BOOT_OFFS to defconfig Also get rid of CONFIG_SYS_NAND_SPL_KERNEL_OFFS as SPL_OS_BOOT feature won't be used. Signed-off-by: Yegor Yefremov Reviewed-by: Simon Glass --- include/configs/baltos.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'include') diff --git a/include/configs/baltos.h b/include/configs/baltos.h index 006b049d09..7b5f652f7e 100644 --- a/include/configs/baltos.h +++ b/include/configs/baltos.h @@ -34,15 +34,8 @@ /* FIT support */ #define CONFIG_SYS_BOOTM_LEN SZ_64M -/* UBI Support */ - -/* I2C configuration */ - #ifdef CONFIG_NAND -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00080000 -#ifdef CONFIG_SPL_OS_BOOT -#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */ -#endif + #define NANDARGS \ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ -- cgit From 8ce7f2c11577a0353a1bc7ddeff3c751f66f3521 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 22 Nov 2018 09:19:33 +0100 Subject: arm: baltos: migrate Ethernet PHYs configuration to Kconfig Remove CONFIG_PHY_ATHEROS and CONFIG_PHY_SMSC from defconfig and select them in Kconfig. Signed-off-by: Yegor Yefremov Reviewed-by: Simon Glass --- include/configs/baltos.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/configs/baltos.h b/include/configs/baltos.h index 7b5f652f7e..ccbdc0a335 100644 --- a/include/configs/baltos.h +++ b/include/configs/baltos.h @@ -257,10 +257,6 @@ #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_OTG -/* Network. */ -#define CONFIG_PHY_SMSC -#define CONFIG_PHY_ATHEROS - /* NAND support */ #ifdef CONFIG_NAND #define GPMC_NAND_ECC_LP_x8_LAYOUT 1 -- cgit From d27db67e6b130972441ea27344d09395dee0ae42 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Thu, 22 Nov 2018 14:54:31 +0100 Subject: Kconfig: Migrate CONFIG_RTC_M41T62 define to Kconfig This patch moves the RTC M41T62 config define to Kconfig. Signed-off-by: Lukasz Majewski Reviewed-by: Stefan Roese Reviewed-by: Simon Glass --- include/configs/m53menlo.h | 1 - include/configs/pcm052.h | 1 - include/configs/x600.h | 1 - 3 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 94214b135d..3fca28da6b 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -110,7 +110,6 @@ * RTC */ #ifdef CONFIG_CMD_DATE -#define CONFIG_RTC_M41T62 #define CONFIG_SYS_I2C_RTC_ADDR 0x68 #define CONFIG_SYS_M41T11_BASE_YEAR 2000 #endif diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h index 9997795434..e125a38e7d 100644 --- a/include/configs/pcm052.h +++ b/include/configs/pcm052.h @@ -58,7 +58,6 @@ #define CONFIG_SYS_I2C_MXC /* RTC (actually an RV-4162 but M41T62-compatible) */ -#define CONFIG_RTC_M41T62 #define CONFIG_SYS_I2C_RTC_ADDR 0x68 #define CONFIG_SYS_RTC_BUS_NUM 2 diff --git a/include/configs/x600.h b/include/configs/x600.h index a6835ebbd5..639da8012c 100644 --- a/include/configs/x600.h +++ b/include/configs/x600.h @@ -75,7 +75,6 @@ #define CONFIG_SYS_I2C_SLAVE 0x02 #define CONFIG_I2C_CHIPADDRESS 0x50 -#define CONFIG_RTC_M41T62 1 #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* FPGA config options */ -- cgit From 20031567e12bb312bff95b70767f6275e20f0346 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Wed, 14 Nov 2018 13:51:00 +0100 Subject: rsa: add a structure for the padding The rsa signature use a padding algorithm. By default, we use the padding pkcs-1.5. In order to add some new padding algorithm, we add a padding framework to manage several padding algorithm. The choice of the padding is done in the file .its. Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- include/image.h | 16 ++++++++++++++++ include/u-boot/rsa.h | 13 +++++++++++++ 2 files changed, 29 insertions(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index f67502e333..e75d1763b5 100644 --- a/include/image.h +++ b/include/image.h @@ -1101,6 +1101,7 @@ struct image_sign_info { int node_offset; /* Offset of signature node */ const char *name; /* Algorithm name */ struct checksum_algo *checksum; /* Checksum algorithm information */ + struct padding_algo *padding; /* Padding algorithm information */ struct crypto_algo *crypto; /* Crypto algorithm information */ const void *fdt_blob; /* FDT containing public keys */ int required_keynode; /* Node offset of key to use: -1=any */ @@ -1186,6 +1187,13 @@ struct crypto_algo { uint8_t *sig, uint sig_len); }; +struct padding_algo { + const char *name; + int (*verify)(struct image_sign_info *info, + uint8_t *pad, int pad_len, + const uint8_t *hash, int hash_len); +}; + /** * image_get_checksum_algo() - Look up a checksum algorithm * @@ -1202,6 +1210,14 @@ struct checksum_algo *image_get_checksum_algo(const char *full_name); */ struct crypto_algo *image_get_crypto_algo(const char *full_name); +/** + * image_get_padding_algo() - Look up a padding algorithm + * + * @param name Name of padding algorithm + * @return pointer to algorithm information, or NULL if not found + */ +struct padding_algo *image_get_padding_algo(const char *name); + /** * fit_image_verify_required_sigs() - Verify signatures marked as 'required' * diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index 68bcb14c74..16b4c4caee 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -97,6 +97,10 @@ static inline int rsa_add_verify_data(struct image_sign_info *info, int rsa_verify(struct image_sign_info *info, const struct image_region region[], int region_count, uint8_t *sig, uint sig_len); + +int padding_pkcs_15_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len); #else static inline int rsa_verify(struct image_sign_info *info, const struct image_region region[], int region_count, @@ -104,8 +108,17 @@ static inline int rsa_verify(struct image_sign_info *info, { return -ENXIO; } + +static inline int padding_pkcs_15_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len) +{ + return -ENXIO; +} #endif +#define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" + #define RSA2048_BYTES (2048 / 8) #define RSA4096_BYTES (4096 / 8) -- cgit From 061daa0b61f0fbeb214c566f3adb23da05545320 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Wed, 14 Nov 2018 13:51:01 +0100 Subject: rsa: add support of padding pss We add the support of the padding pss for rsa signature. This new padding is often recommended instead of pkcs-1.5. Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- include/image.h | 1 + include/u-boot/rsa.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index e75d1763b5..83a2d412c9 100644 --- a/include/image.h +++ b/include/image.h @@ -30,6 +30,7 @@ struct fdt_region; #define IMAGE_ENABLE_FIT 1 #define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ +#define CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT 1 #define CONFIG_FIT_ENABLE_SHA256_SUPPORT #define CONFIG_SHA1 #define CONFIG_SHA256 diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index 16b4c4caee..2d3024d8b7 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -101,6 +101,12 @@ int rsa_verify(struct image_sign_info *info, int padding_pkcs_15_verify(struct image_sign_info *info, uint8_t *msg, int msg_len, const uint8_t *hash, int hash_len); + +#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT +int padding_pss_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len); +#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */ #else static inline int rsa_verify(struct image_sign_info *info, const struct image_region region[], int region_count, @@ -115,6 +121,15 @@ static inline int padding_pkcs_15_verify(struct image_sign_info *info, { return -ENXIO; } + +#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT +static inline int padding_pss_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len) +{ + return -ENXIO; +} +#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */ #endif #define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" -- cgit From 42b54013a08dbda78b466243f03ced249a7fbe84 Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Wed, 21 Nov 2018 08:51:53 +0000 Subject: drivers: serial: get rid of non DM mpc8xx driver Signed-off-by: Christophe Leroy --- include/serial.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/serial.h b/include/serial.h index ec25db6e60..9133d07fd5 100644 --- a/include/serial.h +++ b/include/serial.h @@ -224,7 +224,6 @@ struct serial_dev_priv { void atmel_serial_initialize(void); void mcf_serial_initialize(void); void mpc85xx_serial_initialize(void); -void mpc8xx_serial_initialize(void); void mxc_serial_initialize(void); void ns16550_serial_initialize(void); void pl01x_serial_initialize(void); -- cgit