[PATCH 4/4] board: vexpress64: enable bloblist for SPL handoff

Enable bloblist on vexpress64 platforms to facilitate information passing from TF-A using the firmware handoff framework.
Signed-off-by: Harrison Mutai harrison.mutai@arm.com --- board/armltd/vexpress64/Makefile | 3 ++- board/armltd/vexpress64/vexpress64.c | 4 ++++ configs/vexpress_fvp_bloblist_defconfig | 5 +++++ doc/board/armltd/vexpress64.rst | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 configs/vexpress_fvp_bloblist_defconfig
diff --git a/board/armltd/vexpress64/Makefile b/board/armltd/vexpress64/Makefile index 1878fbed4e..4729787c5e 100644 --- a/board/armltd/vexpress64/Makefile +++ b/board/armltd/vexpress64/Makefile @@ -3,5 +3,6 @@ # (C) Copyright 2000-2004 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-obj-y := vexpress64.o lowlevel_init.o +obj-y := vexpress64.o +obj-$(CONFIG_OF_HAS_PRIOR_STAGE) := lowlevel_init.o obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.o diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index 0119f54f0d..f8bd5fbcf8 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -100,7 +100,9 @@ int dram_init_banksize(void) * Push the variable into the .data section so that it * does not get cleared later. */ +#ifdef CONFIG_OF_HAS_PRIOR_STAGE unsigned long __section(".data") prior_stage_fdt_address[2]; +#endif
#ifdef CONFIG_OF_BOARD
@@ -151,6 +153,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) } #endif
+#ifdef CONFIG_OF_HAS_PRIOR_STAGE /* * Filter for a valid DTB, as TF-A happens to provide a pointer to some * data structure using the DTB format, which we cannot use. @@ -206,6 +209,7 @@ void *board_fdt_blob_setup(int *err) return NULL; } #endif +#endif
/* Actual reset is done via PSCI. */ void reset_cpu(void) diff --git a/configs/vexpress_fvp_bloblist_defconfig b/configs/vexpress_fvp_bloblist_defconfig new file mode 100644 index 0000000000..dcc87db872 --- /dev/null +++ b/configs/vexpress_fvp_bloblist_defconfig @@ -0,0 +1,5 @@ +#include <configs/vexpress_fvp_defconfig> + +CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_PASSAGE=y +CONFIG_BLOBLIST_SIZE_RELOC=0x10000 diff --git a/doc/board/armltd/vexpress64.rst b/doc/board/armltd/vexpress64.rst index a7f771d266..4dadadb53d 100644 --- a/doc/board/armltd/vexpress64.rst +++ b/doc/board/armltd/vexpress64.rst @@ -43,6 +43,22 @@ Juno is an Arm development board with the following features:
More details can be found in the board documentation [3]_.
+Bloblist Support +---------------- + +The ``vexpress_fvp_bloblist_defconfig`` configures U-Boot to be compiled for +Vexpress64 with Bloblist as the primary method for information handoff between +boot stages. U-Boot offers three methods to set up a bloblist: using a +predefined bloblist at a specified address, dynamically allocating memory for a +bloblist, or utilizing a standard passage-provided bloblist with automatic size +detection. + +By default, ``vexpress_fvp_bloblist_defconfig`` uses the standard passage method +(CONFIG_BLOBLIST_PASSAGE) because TF-A provides a Transfer List in non-secure +memory that U-Boot can utilise. This Bloblist, which is referred to as a Transfer List in +TF-A, contains all necessary data for the handoff process, including DT and ACPI +tables. + References ----------
-- 2.46.2

On Wed, Dec 18, 2024 at 03:39:31PM +0000, Harrison Mutai wrote:
Enable bloblist on vexpress64 platforms to facilitate information passing from TF-A using the firmware handoff framework.
Signed-off-by: Harrison Mutai harrison.mutai@arm.com
[snip]
diff --git a/configs/vexpress_fvp_bloblist_defconfig b/configs/vexpress_fvp_bloblist_defconfig new file mode 100644 index 0000000000..dcc87db872 --- /dev/null +++ b/configs/vexpress_fvp_bloblist_defconfig @@ -0,0 +1,5 @@ +#include <configs/vexpress_fvp_defconfig>
+CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_PASSAGE=y +CONFIG_BLOBLIST_SIZE_RELOC=0x10000
I wonder if this means we should also do:
diff --git a/common/Kconfig b/common/Kconfig index 11066ec64315..cca33ed28f32 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1087,7 +1087,6 @@ config BLOBLIST_SIZE config BLOBLIST_SIZE_RELOC hex "Size of bloblist after relocation" default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC - default 0x0 if BLOBLIST_PASSAGE default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) help Sets the size of the bloblist in bytes after relocation. Since U-Boot
Because in this case we do need to set the size of the bloblist we use internally to non-zero?

On 18/12/2024 16:31, Tom Rini wrote:
On Wed, Dec 18, 2024 at 03:39:31PM +0000, Harrison Mutai wrote:
Enable bloblist on vexpress64 platforms to facilitate information passing from TF-A using the firmware handoff framework.
Signed-off-by: Harrison Mutai harrison.mutai@arm.com
[snip]
diff --git a/configs/vexpress_fvp_bloblist_defconfig b/configs/vexpress_fvp_bloblist_defconfig new file mode 100644 index 0000000000..dcc87db872 --- /dev/null +++ b/configs/vexpress_fvp_bloblist_defconfig @@ -0,0 +1,5 @@ +#include <configs/vexpress_fvp_defconfig>
+CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_PASSAGE=y +CONFIG_BLOBLIST_SIZE_RELOC=0x10000
I wonder if this means we should also do:
diff --git a/common/Kconfig b/common/Kconfig index 11066ec64315..cca33ed28f32 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1087,7 +1087,6 @@ config BLOBLIST_SIZE config BLOBLIST_SIZE_RELOC hex "Size of bloblist after relocation" default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
- default 0x0 if BLOBLIST_PASSAGE default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) help Sets the size of the bloblist in bytes after relocation. Since U-Boot
Because in this case we do need to set the size of the bloblist we use internally to non-zero?
That makes sense. The relocation in board_f will fail, as reserve_bloblist relies on this value being non-zero. However, if CONFIG_BLOBLIST_PASSAGE implies GD_FLG_SKIP_RELOC, then the relocation may not be necessary?

On Thu, Dec 19, 2024 at 04:04:04PM +0000, Harrison Mutai wrote:
On 18/12/2024 16:31, Tom Rini wrote:
On Wed, Dec 18, 2024 at 03:39:31PM +0000, Harrison Mutai wrote:
Enable bloblist on vexpress64 platforms to facilitate information passing from TF-A using the firmware handoff framework.
Signed-off-by: Harrison Mutai harrison.mutai@arm.com
[snip]
diff --git a/configs/vexpress_fvp_bloblist_defconfig b/configs/vexpress_fvp_bloblist_defconfig new file mode 100644 index 0000000000..dcc87db872 --- /dev/null +++ b/configs/vexpress_fvp_bloblist_defconfig @@ -0,0 +1,5 @@ +#include <configs/vexpress_fvp_defconfig>
+CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_PASSAGE=y +CONFIG_BLOBLIST_SIZE_RELOC=0x10000
I wonder if this means we should also do:
diff --git a/common/Kconfig b/common/Kconfig index 11066ec64315..cca33ed28f32 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1087,7 +1087,6 @@ config BLOBLIST_SIZE config BLOBLIST_SIZE_RELOC hex "Size of bloblist after relocation" default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
- default 0x0 if BLOBLIST_PASSAGE default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) help Sets the size of the bloblist in bytes after relocation. Since U-Boot
Because in this case we do need to set the size of the bloblist we use internally to non-zero?
That makes sense. The relocation in board_f will fail, as reserve_bloblist relies on this value being non-zero. However, if CONFIG_BLOBLIST_PASSAGE implies GD_FLG_SKIP_RELOC, then the relocation may not be necessary?
We don't need to worry about the GD_FLG_SKIP_RELOC case really, it's a corner case of the ARC architecture and nothing else. We do want to however copy the bloblist from where it was passed to us (possibly in the middle of memory for example) and move it to an area we can reserve.
participants (2)
-
Harrison Mutai
-
Tom Rini