Skip to contentSkip to conversation

EFI Capsule "dfu_alt_info" fixes for TI Boards

PATCH Superseded Siddharth Vadapalli 1 participant 7 messages Nov 24, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover EFI Capsule "dfu_alt_info" fixes for TI Boards

Hello,

This series fixes the commits which introduced EFI Capsule support. The blamed commits unconditionally updated "dfu_alt_info" with the "dfu_string" corresponding to SPI Flash and therefore its associated partitions. While this addresses use-cases where the interface is indeed SPI Flash ("sf"), it breaks use-cases such as USB DFU Boot where the interface is RAM ("ram").

As of commit
52c0e5f8a3 Merge branch '2024-11-22-assorted-fixes' of the master branch of U-Boot, USB DFU Boot on AM625-SK is non-functional. Logs:
https://gist.github.com/Siddharth-Vadapalli-at-TI/726854b49eb199f4acf79028212fabdc

In order to fix this, update "dfu_alt_info" only if the interface is "sf".

The patch for AM62x in this series has been tested and it fixes USB DFU Boot on AM625-SK. Logs:
https://gist.github.com/Siddharth-Vadapalli-at-TI/feaed5b0a30aff752306d370531a4e10

Series is based on commit
52c0e5f8a3 Merge branch '2024-11-22-assorted-fixes' of the master branch of U-Boot.

Regards,
Siddharth.

Siddharth Vadapalli (5):
board: ti: am64x: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: j721e: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: am62x: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: am62px: evm: Set "dfu_alt_info" only if interface is SPI
Flash
board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is SPI
Flash

 board/ti/am62px/evm.c | 8 +++++++-
 board/ti/am62x/evm.c  | 8 +++++++-
 board/ti/am64x/evm.c  | 8 +++++++-
 board/ti/j721e/evm.c  | 8 +++++++-
 board/ti/j784s4/evm.c | 8 +++++++-
 5 files changed, 35 insertions(+), 5 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/5 board: ti: am64x: evm: Set "dfu_alt_info" only if interface is SPI Flash

Commit 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes 5b84d2de5e6c ("board: am64x: Define capsule update firmware info")
---
 board/ti/am64x/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am64x/evm.c +7 -1
index 00b8317d6b..e8132b8aa9 100644
@@ -56,7 +56,13 @@ struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for SPI Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (SPI Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/5 board: ti: j721e: evm: Set "dfu_alt_info" only if interface is SPI Flash

In reply to Siddharth Vadapalli

Commit 9bd6cc292fa8 ("board: j721e: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes 9bd6cc292fa8 ("board: j721e: Define capsule update firmware info")
---
 board/ti/j721e/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/j721e/evm.c +7 -1
index 6221be9dcf..f7e181548c 100644
@@ -67,7 +67,13 @@ struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for SPI Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (SPI Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/5 board: ti: am62x: evm: Set "dfu_alt_info" only if interface is SPI Flash

In reply to Siddharth Vadapalli

Commit 2af879df86f8 ("board: am62x: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes 2af879df86f8 ("board: am62x: Define capsule update firmware info")
---
 board/ti/am62x/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am62x/evm.c +7 -1
index 9075df01ca..3e5d6406ae 100644
@@ -76,7 +76,13 @@ struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for SPI Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (SPI Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/5 board: ti: am62px: evm: Set "dfu_alt_info" only if interface is SPI Flash

In reply to Siddharth Vadapalli

Commit 0af78a1a729d ("board: am62px: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes 0af78a1a729d ("board: am62px: Define capsule update firmware info")
---
 board/ti/am62px/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/am62px/evm.c +7 -1
index 7362fa4520..1bfbc7ed4d 100644
@@ -43,7 +43,13 @@ struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for SPI Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (SPI Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/5 board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is SPI Flash

In reply to Siddharth Vadapalli

Commit a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info") updated the "dfu_alt_info" variable to support use-cases with SPI Flash. However, this breaks use-cases where the interface is not SPI Flash ("sf"). Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
---
 board/ti/j784s4/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
board/ti/j784s4/evm.c +7 -1
index 548dbd5925..3699076a93 100644
@@ -42,7 +42,13 @@ struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for SPI Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (SPI Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif
Signature · 1 line
2.43.0