From 771d7cd8c5f78df9b52225d6f18b4d07e2e9e483 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 20 Jul 2023 18:27:30 +0200 Subject: [PATCH 01/27] doc: update doc/sphinx/requirements.txt Update the following requirements to their latest version: * Pygments - syntax highlighting * pytz - world timezone definitions * certifi - Mozilla's CA bundle Signed-off-by: Heinrich Schuchardt --- doc/sphinx/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt index aed44921171..b74661ad3f1 100644 --- a/doc/sphinx/requirements.txt +++ b/doc/sphinx/requirements.txt @@ -1,6 +1,6 @@ alabaster==0.7.12 Babel==2.9.1 -certifi==2022.12.7 +certifi==2023.5.7 charset-normalizer==2.0.12 docutils==0.16 idna==3.3 @@ -8,9 +8,9 @@ imagesize==1.3.0 Jinja2==3.0.3 MarkupSafe==2.1.1 packaging==21.3 -Pygments==2.11.2 +Pygments==2.15.1 pyparsing==3.0.7 -pytz==2022.1 +pytz==2023.3 requests==2.31.0 six==1.16.0 snowballstemmer==2.2.0 From c227ef7c4aca1a26e59640a46950b20bdc80f1b8 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 21 Jul 2023 00:03:46 +0200 Subject: [PATCH 02/27] efi_loader: device paths for special block devices The UEFI specification does not provide node types matching UCLASS_BLKMAP, UCLASS_HOST, UCLASS_VIRTIO block devices. The current implementation uses VenHw() nodes with uclass specific GUIDs and a single byte for the device number appended. This leads to unaligned integers in succeeding device path nodes. The current implementation fails to create unique device paths for block devices based on other uclasses like UCLASS_PVBLOCK. Let's use a VenHw() node with the U-Boot GUID with a length dividable by four and encoding blkdesc->uclass_id as well as blkdesc->devnum. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- lib/efi_loader/efi_device_path.c | 114 ++++++------------------------- 1 file changed, 21 insertions(+), 93 deletions(-) diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 19e8861ef49..5b050fa17c5 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -22,16 +22,6 @@ #include #include /* U16_MAX */ -#ifdef CONFIG_BLKMAP -const efi_guid_t efi_guid_blkmap_dev = U_BOOT_BLKMAP_DEV_GUID; -#endif -#ifdef CONFIG_SANDBOX -const efi_guid_t efi_guid_host_dev = U_BOOT_HOST_DEV_GUID; -#endif -#ifdef CONFIG_VIRTIO_BLK -const efi_guid_t efi_guid_virtio_dev = U_BOOT_VIRTIO_DEV_GUID; -#endif - /* template END node: */ const struct efi_device_path END = { .type = DEVICE_PATH_TYPE_END, @@ -524,43 +514,15 @@ __maybe_unused static unsigned int dp_size(struct udevice *dev) return dp_size(dev->parent) + sizeof(struct efi_device_path_nvme); #endif -#ifdef CONFIG_SANDBOX - case UCLASS_HOST: - /* - * Sandbox's host device will be represented - * as vendor device with extra one byte for - * device number - */ - return dp_size(dev->parent) - + sizeof(struct efi_device_path_vendor) + 1; -#endif #ifdef CONFIG_USB case UCLASS_MASS_STORAGE: return dp_size(dev->parent) + sizeof(struct efi_device_path_controller); -#endif -#ifdef CONFIG_VIRTIO_BLK - case UCLASS_VIRTIO: - /* - * Virtio devices will be represented as a vendor - * device node with an extra byte for the device - * number. - */ - return dp_size(dev->parent) - + sizeof(struct efi_device_path_vendor) + 1; -#endif -#ifdef CONFIG_BLKMAP - case UCLASS_BLKMAP: - /* - * blkmap devices will be represented as a vendor - * device node with an extra byte for the device - * number. - */ - return dp_size(dev->parent) - + sizeof(struct efi_device_path_vendor) + 1; #endif default: - return dp_size(dev->parent); + /* UCLASS_BLKMAP, UCLASS_HOST, UCLASS_VIRTIO */ + return dp_size(dev->parent) + + sizeof(struct efi_device_path_udevice); } #if defined(CONFIG_MMC) case UCLASS_MMC: @@ -608,53 +570,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) } #endif case UCLASS_BLK: - switch (dev->parent->uclass->uc_drv->id) { -#ifdef CONFIG_BLKMAP - case UCLASS_BLKMAP: { - struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_plat(dev); - - dp = dp_fill(buf, dev->parent); - dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; - dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; - dp->dp.length = sizeof(*dp) + 1; - memcpy(&dp->guid, &efi_guid_blkmap_dev, - sizeof(efi_guid_t)); - dp->vendor_data[0] = desc->devnum; - return &dp->vendor_data[1]; - } -#endif -#ifdef CONFIG_SANDBOX - case UCLASS_HOST: { - /* stop traversing parents at this point: */ - struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_plat(dev); - - dp = dp_fill(buf, dev->parent); - dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; - dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; - dp->dp.length = sizeof(*dp) + 1; - memcpy(&dp->guid, &efi_guid_host_dev, - sizeof(efi_guid_t)); - dp->vendor_data[0] = desc->devnum; - return &dp->vendor_data[1]; - } -#endif -#ifdef CONFIG_VIRTIO_BLK - case UCLASS_VIRTIO: { - struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_plat(dev); - - dp = dp_fill(buf, dev->parent); - dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; - dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; - dp->dp.length = sizeof(*dp) + 1; - memcpy(&dp->guid, &efi_guid_virtio_dev, - sizeof(efi_guid_t)); - dp->vendor_data[0] = desc->devnum; - return &dp->vendor_data[1]; - } -#endif + switch (device_get_uclass_id(dev->parent)) { #ifdef CONFIG_IDE case UCLASS_IDE: { struct efi_device_path_atapi *dp = @@ -744,12 +660,24 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) return &dp[1]; } #endif - default: - debug("%s(%u) %s: unhandled parent class: %s (%u)\n", - __FILE__, __LINE__, __func__, - dev->name, dev->parent->uclass->uc_drv->id); - return dp_fill(buf, dev->parent); + default: { + /* UCLASS_BLKMAP, UCLASS_HOST, UCLASS_VIRTIO */ + struct efi_device_path_udevice *dp; + struct blk_desc *desc = dev_get_uclass_plat(dev); + + dp = dp_fill(buf, dev->parent); + dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; + dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; + dp->dp.length = sizeof(*dp); + memcpy(&dp->guid, &efi_u_boot_guid, + sizeof(efi_guid_t)); + dp->uclass_id = (UCLASS_BLK & 0xffff) | + (desc->uclass_id << 16); + dp->dev_number = desc->devnum; + + return &dp[1]; } + } #if defined(CONFIG_MMC) case UCLASS_MMC: { struct efi_device_path_sd_mmc_path *sddp = From d0544244b1c1dc371d0ba18307ce66be51ac1c67 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 21 Jul 2023 08:34:18 +0200 Subject: [PATCH 03/27] efi_loader: simplify dp_fill() Move the recursive dp_fill(dev->parent) call to a single location. Determine uclass_id only once. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- lib/efi_loader/efi_device_path.c | 45 +++++++++++++------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 5b050fa17c5..ed7214f3a34 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -548,14 +548,19 @@ __maybe_unused static unsigned int dp_size(struct udevice *dev) */ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) { + enum uclass_id uclass_id; + if (!dev || !dev->driver) return buf; - switch (device_get_uclass_id(dev)) { + uclass_id = device_get_uclass_id(dev); + if (uclass_id != UCLASS_ROOT) + buf = dp_fill(buf, dev->parent); + + switch (uclass_id) { #ifdef CONFIG_NETDEVICES case UCLASS_ETH: { - struct efi_device_path_mac_addr *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_mac_addr *dp = buf; struct eth_pdata *pdata = dev_get_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -573,8 +578,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) switch (device_get_uclass_id(dev->parent)) { #ifdef CONFIG_IDE case UCLASS_IDE: { - struct efi_device_path_atapi *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_atapi *dp = buf; struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -590,8 +594,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif #if defined(CONFIG_SCSI) case UCLASS_SCSI: { - struct efi_device_path_scsi *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_scsi *dp = buf; struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -604,8 +607,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif #if defined(CONFIG_MMC) case UCLASS_MMC: { - struct efi_device_path_sd_mmc_path *sddp = - dp_fill(buf, dev->parent); + struct efi_device_path_sd_mmc_path *sddp = buf; struct blk_desc *desc = dev_get_uclass_plat(dev); sddp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -619,8 +621,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif #if defined(CONFIG_AHCI) || defined(CONFIG_SATA) case UCLASS_AHCI: { - struct efi_device_path_sata *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_sata *dp = buf; struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -635,8 +636,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif #if defined(CONFIG_NVME) case UCLASS_NVME: { - struct efi_device_path_nvme *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_nvme *dp = buf; u32 ns_id; dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; @@ -650,8 +650,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #if defined(CONFIG_USB) case UCLASS_MASS_STORAGE: { struct blk_desc *desc = dev_get_uclass_plat(dev); - struct efi_device_path_controller *dp = - dp_fill(buf, dev->parent); + struct efi_device_path_controller *dp = buf; dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_CONTROLLER; @@ -662,10 +661,9 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif default: { /* UCLASS_BLKMAP, UCLASS_HOST, UCLASS_VIRTIO */ - struct efi_device_path_udevice *dp; + struct efi_device_path_udevice *dp = buf; struct blk_desc *desc = dev_get_uclass_plat(dev); - dp = dp_fill(buf, dev->parent); dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; dp->dp.length = sizeof(*dp); @@ -680,8 +678,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) } #if defined(CONFIG_MMC) case UCLASS_MMC: { - struct efi_device_path_sd_mmc_path *sddp = - dp_fill(buf, dev->parent); + struct efi_device_path_sd_mmc_path *sddp = buf; struct mmc *mmc = mmc_get_mmc_dev(dev); struct blk_desc *desc = mmc_get_blk_desc(mmc); @@ -697,7 +694,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif case UCLASS_MASS_STORAGE: case UCLASS_USB_HUB: { - struct efi_device_path_usb *udp = dp_fill(buf, dev->parent); + struct efi_device_path_usb *udp = buf; switch (device_get_uclass_id(dev->parent)) { case UCLASS_USB_HUB: { @@ -717,13 +714,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) return &udp[1]; } default: { - struct efi_device_path_udevice *vdp; - enum uclass_id uclass_id = device_get_uclass_id(dev); - - if (uclass_id == UCLASS_ROOT) - vdp = buf; - else - vdp = dp_fill(buf, dev->parent); + struct efi_device_path_udevice *vdp = buf; vdp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; vdp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; From 95537bd31cd86af21245b98b84fc657e07782f04 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 24 Jul 2023 10:53:59 +0200 Subject: [PATCH 04/27] doc: fix typo device_compat/.h %s/device_compat\/.h/device_compat.h/ Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- doc/develop/codingstyle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst index 3d05a6b9887..b25bfbd271f 100644 --- a/doc/develop/codingstyle.rst +++ b/doc/develop/codingstyle.rst @@ -120,7 +120,7 @@ then headers with directories, then local files: #include #include #include - #include + #include #include #include "local.h" From 8505c0bb5c075a5d9f5849ec9e79617aa07555b2 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 24 Jul 2023 12:04:18 +0200 Subject: [PATCH 05/27] doc: describe QEMU emulation of block devices * Add a new page about the emulation of block devices * Add semihosting to the emulation index page * Set toc maxdepth to 1 to improve readability Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- doc/board/emulation/blkdev.rst | 38 ++++++++++++++++++++++++++++++++++ doc/board/emulation/index.rst | 4 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 doc/board/emulation/blkdev.rst diff --git a/doc/board/emulation/blkdev.rst b/doc/board/emulation/blkdev.rst new file mode 100644 index 00000000000..dc83a005268 --- /dev/null +++ b/doc/board/emulation/blkdev.rst @@ -0,0 +1,38 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Emulation of block devices +-------------------------- + +QEMU can emulate common block devices by adding the following parameters to +the qemu-system- command line: + +* MMC + + .. code-block:: bash + + -device sdhci-pci,sd-spec-version=3 \ + -device sd-card,drive=MMC1 \ + -drive if=none,file=disk.img,format=raw,id=MMC1 + +* NVMe + + .. code-block:: bash + + -drive if=none,file=disk.img,format=raw,id=NVME1 \ + -device nvme,drive=NVME1,serial=nvme-1 + +* SATA + + .. code-block:: bash + + -device ahci,id=ahci0 \ + -drive if=none,file=disk.img,format=raw,id=SATA1 \ + -device ide-hd,bus=ahci0.0,drive=SATA1 + +* USB + + .. code-block:: bash + + -device qemu-xhci \ + -drive if=none,file=disk.img,format=raw,id=USB1 \ + -device usb-storage,drive=USB1 diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst index b5b6c3fa0de..932c65adebb 100644 --- a/doc/board/emulation/index.rst +++ b/doc/board/emulation/index.rst @@ -4,8 +4,10 @@ Emulation ========= .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + blkdev + ../../usage/semihosting qemu-arm qemu-mips qemu-ppce500 From 54edc37a22ecd7d640e449f098575ef2ff22f315 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Mon, 24 Jul 2023 13:17:36 +0300 Subject: [PATCH 06/27] efi_loader: make efi_delete_handle() follow the EFI spec The EFI doesn't allow removal of handles, unless all hosted protocols are cleanly removed. Our efi_delete_handle() is a bit intrusive. Although it does try to delete protocols before removing a handle, it doesn't care if that fails. Instead it only returns an error if the handle is invalid. On top of that none of the callers of that function check the return code. So let's rewrite this in a way that fits the EFI spec better. Instead of forcing the handle removal, gracefully uninstall all the handle protocols. According to the EFI spec when the last protocol is removed the handle will be deleted. Also switch all the callers and check the return code. Some callers can't do anything useful apart from reporting an error. The disk related functions on the other hand, can prevent a medium that is being used by EFI from removal. The only function that doesn't check the result is efi_delete_image(). But that function needs a bigger rework anyway, so we can clean it up in the future Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- cmd/bootefi.c | 21 ++++++--------------- include/efi_loader.h | 2 +- lib/efi_driver/efi_uclass.c | 12 +++++------- lib/efi_loader/efi_boottime.c | 20 ++++++++++++++------ lib/efi_loader/efi_disk.c | 7 ++++++- 5 files changed, 32 insertions(+), 30 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 5c0afec1544..f73d6eb0e2d 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -606,20 +606,6 @@ failure: return ret; } -/** - * bootefi_run_finish() - finish up after running an EFI test - * - * @loaded_image_info: Pointer to a struct which holds the loaded image info - * @image_obj: Pointer to a struct which holds the loaded image object - */ -static void bootefi_run_finish(struct efi_loaded_image_obj *image_obj, - struct efi_loaded_image *loaded_image_info) -{ - efi_restore_gd(); - free(loaded_image_info->load_options); - efi_delete_handle(&image_obj->header); -} - /** * do_efi_selftest() - execute EFI selftest * @@ -638,7 +624,12 @@ static int do_efi_selftest(void) /* Execute the test */ ret = EFI_CALL(efi_selftest(&image_obj->header, &systab)); - bootefi_run_finish(image_obj, loaded_image_info); + efi_restore_gd(); + free(loaded_image_info->load_options); + if (ret != EFI_SUCCESS) + efi_delete_handle(&image_obj->header); + else + ret = efi_delete_handle(&image_obj->header); return ret != EFI_SUCCESS; } diff --git a/include/efi_loader.h b/include/efi_loader.h index b5fa0fe01de..3a64eb9c667 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -629,7 +629,7 @@ void efi_add_handle(efi_handle_t obj); /* Create handle */ efi_status_t efi_create_handle(efi_handle_t *handle); /* Delete handle */ -void efi_delete_handle(efi_handle_t obj); +efi_status_t efi_delete_handle(efi_handle_t obj); /* Call this to validate a handle and find the EFI object for it */ struct efi_object *efi_search_obj(const efi_handle_t handle); /* Locate device_path handle */ diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 45f93519887..66a45e156d6 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -285,10 +285,8 @@ static efi_status_t efi_add_driver(struct driver *drv) bp->ops = ops; ret = efi_create_handle(&bp->bp.driver_binding_handle); - if (ret != EFI_SUCCESS) { - free(bp); - goto out; - } + if (ret != EFI_SUCCESS) + goto err; bp->bp.image_handle = bp->bp.driver_binding_handle; ret = efi_add_protocol(bp->bp.driver_binding_handle, &efi_guid_driver_binding_protocol, bp); @@ -299,11 +297,11 @@ static efi_status_t efi_add_driver(struct driver *drv) if (ret != EFI_SUCCESS) goto err; } -out: - return ret; + return ret; err: - efi_delete_handle(bp->bp.driver_binding_handle); + if (bp->bp.driver_binding_handle) + efi_delete_handle(bp->bp.driver_binding_handle); free(bp); return ret; } diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 052fe481e47..0e89c8505b1 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -59,6 +59,10 @@ static efi_handle_t current_image; static volatile gd_t *efi_gd, *app_gd; #endif +static efi_status_t efi_uninstall_protocol + (efi_handle_t handle, const efi_guid_t *protocol, + void *protocol_interface); + /* 1 if inside U-Boot code, 0 if inside EFI payload code */ static int entry_count = 1; static int nesting_level; @@ -610,8 +614,8 @@ static efi_status_t efi_remove_all_protocols(const efi_handle_t handle) list_for_each_entry_safe(protocol, pos, &efiobj->protocols, link) { efi_status_t ret; - ret = efi_remove_protocol(handle, &protocol->guid, - protocol->protocol_interface); + ret = efi_uninstall_protocol(handle, &protocol->guid, + protocol->protocol_interface); if (ret != EFI_SUCCESS) return ret; } @@ -622,19 +626,23 @@ static efi_status_t efi_remove_all_protocols(const efi_handle_t handle) * efi_delete_handle() - delete handle * * @handle: handle to delete + * + * Return: status code */ -void efi_delete_handle(efi_handle_t handle) +efi_status_t efi_delete_handle(efi_handle_t handle) { efi_status_t ret; ret = efi_remove_all_protocols(handle); - if (ret == EFI_INVALID_PARAMETER) { - log_err("Can't remove invalid handle %p\n", handle); - return; + if (ret != EFI_SUCCESS) { + log_err("Handle %p has protocols installed. Unable to delete\n", handle); + return ret; } list_del(&handle->link); free(handle); + + return ret; } /** diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 28c8cdf7100..46cb5704a72 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -708,6 +708,7 @@ int efi_disk_remove(void *ctx, struct event *event) efi_handle_t handle; struct blk_desc *desc; struct efi_disk_obj *diskobj = NULL; + efi_status_t ret; if (dev_tag_get_ptr(dev, DM_TAG_EFI, (void **)&handle)) return 0; @@ -727,10 +728,14 @@ int efi_disk_remove(void *ctx, struct event *event) return 0; } + ret = efi_delete_handle(handle); + /* Do not delete DM device if there are still EFI drivers attached. */ + if (ret != EFI_SUCCESS) + return -1; + if (diskobj) efi_free_pool(diskobj->dp); - efi_delete_handle(handle); dev_tag_del(dev, DM_TAG_EFI); return 0; From f687c8f7b44624a058b1a3979acea7f37f301c74 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 25 Jul 2023 12:44:16 -0400 Subject: [PATCH 07/27] doc: ti: Clarify required file names for K3 platforms Now that we are using binman in all cases on these platforms, reword things to be clearer that for filesystem booting we need to use a specific name for each component. Signed-off-by: Tom Rini Reviewed-by: Neha Malcom Francis --- doc/board/ti/am62x_sk.rst | 3 ++- doc/board/ti/am65x_evm.rst | 3 ++- doc/board/ti/j7200_evm.rst | 3 ++- doc/board/ti/j721e_evm.rst | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 3a122b07564..0721ee30749 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -169,7 +169,8 @@ Build procedure: Target Images -------------- -Copy the below images to an SD card and boot: +In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC +variant (GP, HS-FS, HS-SE) requires a different source for these files. - GP diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 300cd3e9b96..82bae7c633a 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -170,7 +170,8 @@ Build procedure: Target Images -------------- -Copy the below images to an SD card and boot: +In order to boot we need tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img. +Each SoC variant (GP and HS) requires a different source for these files. - GP diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 5e3d75059ca..909eb509638 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -172,7 +172,8 @@ Build procedure: Target Images -------------- -Copy the below images to an SD card and boot: +In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC +variant (GP, HS-FS, HS-SE) requires a different source for these files. - GP diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 46244197f34..a93160b7748 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -183,7 +183,9 @@ Build procedure: Target Images -------------- -Copy the below images to an SD card and boot: +In order to boot we need tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img. +Each SoC variant (GP, HS-FS and HS-SE) requires a different source for these +files. - GP From a7eb8aeccb8a6a574c8c8bac22c8e61ec425fea1 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 27 Jul 2023 10:15:01 +0300 Subject: [PATCH 08/27] efi_loader: fix uninitialized variable bug in efi_set_load_options() Check for efi_search_protocol() failure before dereferencing "handler" to avoid a crash. Signed-off-by: Dan Carpenter --- lib/efi_loader/efi_load_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_load_options.c b/lib/efi_loader/efi_load_options.c index 3cfddee014e..5f62184da1c 100644 --- a/lib/efi_loader/efi_load_options.c +++ b/lib/efi_loader/efi_load_options.c @@ -31,10 +31,10 @@ efi_status_t efi_set_load_options(efi_handle_t handle, efi_status_t ret; ret = efi_search_protocol(handle, &efi_guid_loaded_image, &handler); - loaded_image_info = handler->protocol_interface; if (ret != EFI_SUCCESS) return EFI_INVALID_PARAMETER; + loaded_image_info = handler->protocol_interface; loaded_image_info->load_options = load_options; loaded_image_info->load_options_size = load_options_size; From cce3e7a23db49b29fe64572323a335329406ea67 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:44 -0500 Subject: [PATCH 09/27] doc: board: ti: Optimize sources references We have duplication of sources which makes it hard to sustain across the board, but at the same time, we'd like to ensure readers get specific information without having to cross refer to different documentation to get piecemeal information that they need to put together. Reviewed-by: Neha Malcom Francis Reviewed-by: Tom Rini Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 17 +++-------------- doc/board/ti/am65x_evm.rst | 17 +++-------------- doc/board/ti/j7200_evm.rst | 17 +++-------------- doc/board/ti/j721e_evm.rst | 17 +++-------------- doc/board/ti/k3.rst | 4 ++++ 5 files changed, 16 insertions(+), 56 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 0721ee30749..0a3bbdfaf02 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -115,21 +115,10 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. Trusted Firmware-A: - Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ - Branch: master -2. OP-TEE: - Tree: https://github.com/OP-TEE/optee_os.git - Branch: master - -3. U-Boot: - Tree: https://source.denx.de/u-boot/u-boot - Branch: master - -4. TI Linux Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources Build procedure: ---------------- diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 82bae7c633a..93b983fda63 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -117,21 +117,10 @@ instead use Falcon boot flow to reduce boot time. Sources: -------- -1. Trusted Firmware-A: - Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ - Branch: master -2. OP-TEE: - Tree: https://github.com/OP-TEE/optee_os.git - Branch: master - -3. U-Boot: - Tree: https://source.denx.de/u-boot/u-boot - Branch: master - -4. TI Linux Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources Build procedure: ---------------- diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 909eb509638..24d309a9ff1 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -120,21 +120,10 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. Trusted Firmware-A: - Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ - Branch: master -2. OP-TEE: - Tree: https://github.com/OP-TEE/optee_os.git - Branch: master - -3. U-Boot: - Tree: https://source.denx.de/u-boot/u-boot - Branch: master - -4. TI Linux Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources Build procedure: ---------------- diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index a93160b7748..637b42d7c6d 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -130,21 +130,10 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. Trusted Firmware-A: - Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ - Branch: master -2. OP-TEE: - Tree: https://github.com/OP-TEE/optee_os.git - Branch: master - -3. U-Boot: - Tree: https://source.denx.de/u-boot/u-boot - Branch: master - -4. TI Linux Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources Build procedure: ---------------- diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 2db7bbdb42e..2df57c9850a 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -111,6 +111,8 @@ All scripts and code needed to build the `tiboot3.bin`, `tispl.bin` and `u-boot.img` for all K3 SoCs can be located at the following places online +.. k3_rst_include_start_boot_sources + * **Das U-Boot** | **source:** https://source.denx.de/u-boot/u-boot.git @@ -131,6 +133,8 @@ online | **source:** https://git.ti.com/git/processor-firmware/ti-linux-firmware.git | **branch:** ti-linux-firmware +.. k3_rst_include_end_boot_sources + Build Procedure --------------- From 68b3baaf3b3eb943cbb8363a064669527df3c79e Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:45 -0500 Subject: [PATCH 10/27] doc: board: ti: am62x/j7200: Update with common boot flow diagram Update the bootflow svg diagram and reuse across the platforms as they are common. Reviewed-by: Neha Malcom Francis Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 68 +- doc/board/ti/img/boot_diagram_k3_current.svg | 1925 ++++++++++++++++++ doc/board/ti/j7200_evm.rst | 85 +- 3 files changed, 1927 insertions(+), 151 deletions(-) create mode 100644 doc/board/ti/img/boot_diagram_k3_current.svg diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 0a3bbdfaf02..dd697e70915 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -42,73 +42,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. code-block:: text - - +------------------------------------------------------------------------+ - | TIFS | Main R5 | A53 | - +------------------------------------------------------------------------+ - | +--------+ | | | - | | Reset | | | | - | +--------+ | | | - | : | | | - | +--------+ | +-----------+ | | - | | *ROM* |----------|-->| Reset rls | | | - | +--------+ | +-----------+ | | - | | | | : | | - | | ROM | | : | | - | |services| | : | | - | | | | +-------------+ | | - | | | | | *R5 ROM* | | | - | | | | +-------------+ | | - | | |<---------|---|Load and auth| | | - | | | | | tiboot3.bin | | | - | +--------+ | +-------------+ | | - | | |<---------|---| Load sysfw | | | - | | | | | part to TIFS| | | - | | | | | core | | | - | | | | +-------------+ | | - | | | | : | | - | | | | : | | - | | | | : | | - | | | | +-------------+ | | - | | | | | *R5 SPL* | | | - | | | | +-------------+ | | - | | | | | DDR | | | - | | | | | config | | | - | | | | +-------------+ | | - | | | | | Load | | | - | | | | | tispl.bin | | | - | | | | +-------------+ | | - | | | | | Load R5 | | | - | | | | | firmware | | | - | | | | +-------------+ | | - | | |<---------|---| Start A53 | | | - | | | | | and jump to | | | - | | | | | DM fw image | | | - | | | | +-------------+ | | - | | | | | +-----------+ | - | | |----------|-----------------------|---->| Reset rls | | - | | | | | +-----------+ | - | | TIFS | | | : | - | |Services| | | +-------------+ | - | | |<---------|-----------------------|---->|*TF-A/OP-TEE*| | - | | | | | +-------------+ | - | | | | | : | - | | | | | +-----------+ | - | | |<---------|-----------------------|---->| *A53 SPL* | | - | | | | | +-----------+ | - | | | | | | Load | | - | | | | | | u-boot.img| | - | | | | | +-----------+ | - | | | | | : | - | | | | | +-----------+ | - | | |<---------|-----------------------|---->| *U-Boot* | | - | | | | | +-----------+ | - | | | | | | prompt | | - | | |----------|-----------------------|-----+-----------+-----| - | +--------+ | | | - | | | | - +------------------------------------------------------------------------+ +.. image:: img/boot_diagram_k3_current.svg - Here TIFS acts as master and provides all the critical services. R5/A53 requests TIFS to get these services done as shown in the above diagram. diff --git a/doc/board/ti/img/boot_diagram_k3_current.svg b/doc/board/ti/img/boot_diagram_k3_current.svg new file mode 100644 index 00000000000..995afd890e1 --- /dev/null +++ b/doc/board/ti/img/boot_diagram_k3_current.svg @@ -0,0 +1,1925 @@ + + + + + + + + + + + + + Cortex-R + + + + Cortex-R + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + Cortex-R SPL + + + + Cortex-R SPL + + + + + + + + + Load and auth tiboot3.bin + + + + Load and auth t... + + + + + + + + + Load system +config data + + + + Load system... + + + + + + + + + DDR Config + + + + DDR Config + + + + + + + + + Load tispl.bin + + + + Load tispl.bin + + + + + + + + + Start Cortex-A + + + + Start Cortex-A + + + + + + + + + Start DM + + + + Start DM + + + + + + + + + + Device Mgr + + + + Device Mgr + + + + + + + + + + Start Cortex-A + + + + Start Cort... + + + + + + + + + + + + + + + + + + + + + + + + Cortex-A + + + + Cortex-A + + + + + + + + + + + + + Cortex-R/M +C6x/C7x + + + + Cortex-R/M... + + + + + + + + + + Aux f/w + + + + Aux f/w + + + + + + + + + + TIFS/DMSC + + + + TIFS/DMSC + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + + Start TIFS + + + + Start TIFS + + + + + + + + + TIFS + + + + TIFS + + + + + + + + + + Security Enclave Boot Processor + + + + Security Enclave Boot... + + + + + + + + + + Boot Loader +Processor + + + + Boot Loader... + + + + + + + + + + Main CPU + + + + Main CPU + + + + + + + + + + Auxiliary +Processor + + + + Auxiliary... + + + + + + + + + + H/w Seq: Reset rls + + + + H/w Seq: Reset rls + + + + + + + + + + Auth tiboot3.bin + + + + Auth tiboo... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + + Load system config data + + + + Load syste... + + + + + + + + + Start TIFS + + + + Start TIFS + + + + + + + + + Load DM f/w + + + + Load DM f/w + + + + + + + + + + branch + + + + branch + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + + Cortex-A SPL + + + + Cortex-A SPL + + + + + + + + + + U-Boot + + + + U-Boot + + + + + + + + + Load u-boot.img + + + + Load u-boot.img + + + + + + + + + Load Aux core f/w +(optional) + + + + Load Aux core f/w... + + + + + + + + + Start Aux core +(optional) + + + + Start Aux core... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 24d309a9ff1..5c980bcace9 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -30,90 +30,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. code-block:: text - - +------------------------------------------------------------------------+-----------------------+ - | DMSC | MCU R5 | A72 | MAIN R5/C7x | - +------------------------------------------------------------------------+-----------------------+ - | +--------+ | | | | - | | Reset | | | | | - | +--------+ | | | | - | : | | | | - | +--------+ | +-----------+ | | | - | | *ROM* |----------|-->| Reset rls | | | | - | +--------+ | +-----------+ | | | - | | | | : | | | - | | ROM | | : | | | - | |services| | : | | | - | | | | +-------------+ | | | - | | | | | *R5 ROM* | | | | - | | | | +-------------+ | | | - | | |<---------|---|Load and auth| | | | - | | | | | tiboot3.bin | | | | - | | Start | | +-------------+ | | | - | | TIFS |<---------|---| Start | | | | - | | | | | TIFS | | | | - | +--------+ | +-------------+ | | | - | : | | | | | | - | +---------+ | | Load | | | | - | | *TIFS* | | | system | | | | - | +---------+ | | Config data | | | | - | | |<--------|---| | | | | - | | | | +-------------+ | | | - | | | | : | | | - | | | | : | | | - | | | | : | | | - | | | | +-------------+ | | | - | | | | | *R5 SPL* | | | | - | | | | +-------------+ | | | - | | | | | DDR | | | | - | | | | | config | | | | - | | | | +-------------+ | | | - | | | | | Load | | | | - | | | | | tispl.bin | | | | - | | | | +-------------+ | | | - | | | | | Load R5 | | | | - | | | | | firmware | | | | - | | | | +-------------+ | | | - | | |<--------|---| Start A72 | | | | - | | | | | and jump to | | | | - | | | | | DM fw image | | | | - | | | | +-------------+ | | | - | | | | | +-----------+ | | - | | |---------|-----------------------|---->| Reset rls | | | - | | | | | +-----------+ | | - | | TIFS | | | : | | - | |Services | | | +-------------+ | | - | | |<--------|-----------------------|---->|*TF-A/OP-TEE*| | | - | | | | | +-------------+ | | - | | | | | : | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|---->| *A72 SPL* | | | - | | | | | +-----------+ | | - | | | | | | Load | | | - | | | | | | u-boot.img| | | - | | | | | +-----------+ | | - | | | | | : | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|---->| *U-Boot* | | | - | | | | | +-----------+ | | - | | | | | | prompt | | | - | | | | | +-----------+ | | - | | | | | | Load R5 | | | - | | | | | | Firmware | | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|-----| Start R5 | | +-----------+ | - | | |---------|-----------------------|-----+-----------+-----|----->| R5 starts | | - | | | | | | Load C7 | | +-----------+ | - | | | | | | Firmware | | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|-----| Start C7 | | +-----------+ | - | | |---------|-----------------------|-----+-----------+-----|----->| C7 starts | | - | | | | | | +-----------+ | - | | | | | | | - | +---------+ | | | | - | | | | | - +------------------------------------------------------------------------+-----------------------+ +.. image:: img/boot_diagram_k3_current.svg - Here DMSC acts as master and provides all the critical services. R5/A72 requests DMSC to get these services done as shown in the above diagram. From fd358121bdb809d3896f55853567769c14a80e96 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:46 -0500 Subject: [PATCH 11/27] doc: board: ti: am65x: Update with boot flow diagram Update the bootflow svg diagram instead of the ascii version Reviewed-by: Neha Malcom Francis Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 71 +- doc/board/ti/img/boot_diagram_am65.svg | 1779 ++++++++++++++++++++++++ 2 files changed, 1780 insertions(+), 70 deletions(-) create mode 100644 doc/board/ti/img/boot_diagram_am65.svg diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 93b983fda63..e1f1b3c7c17 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -41,76 +41,7 @@ applications. This should happen before running Linux. 3. In production boot flow, we might not like to use full U-Boot, instead use Falcon boot flow to reduce boot time. -.. code-block:: text - - +------------------------------------------------------------------------+ - | DMSC | R5 | A53 | - +------------------------------------------------------------------------+ - | +--------+ | | | - | | Reset | | | | - | +--------+ | | | - | : | | | - | +--------+ | +-----------+ | | - | | *ROM* |----------|-->| Reset rls | | | - | +--------+ | +-----------+ | | - | | | | : | | - | | ROM | | : | | - | |services| | : | | - | | | | +-------------+ | | - | | | | | *R5 ROM* | | | - | | | | +-------------+ | | - | | |<---------|---|Load and auth| | | - | | | | | tiboot3.bin | | | - | | | | +-------------+ | | - | | | | : | | - | | | | : | | - | | | | : | | - | | | | +-------------+ | | - | | | | | *R5 SPL* | | | - | | | | +-------------+ | | - | | | | | Load | | | - | | | | | sysfw.itb | | | - | | Start | | +-------------+ | | - | | System |<---------|---| Start | | | - | |Firmware| | | SYSFW | | | - | +--------+ | +-------------+ | | - | : | | | | | - | +---------+ | | Load | | | - | | *SYSFW* | | | system | | | - | +---------+ | | Config data | | | - | | |<--------|---| | | | - | | | | +-------------+ | | - | | | | | | | | - | | | | | DDR | | | - | | | | | config | | | - | | | | +-------------+ | | - | | | | | | | | - | | |<--------|---| Start A53 | | | - | | | | | and Reset | | | - | | | | +-------------+ | | - | | | | | +-----------+ | - | | |---------|-----------------------|---->| Reset rls | | - | | | | | +-----------+ | - | | DMSC | | | : | - | |Services | | | +------------+ | - | | |<--------|-----------------------|---->|*ATF/OP-TEE*| | - | | | | | +------------+ | - | | | | | : | - | | | | | +-----------+ | - | | |<--------|-----------------------|---->| *A53 SPL* | | - | | | | | +-----------+ | - | | | | | | Load | | - | | | | | | u-boot.img| | - | | | | | +-----------+ | - | | | | | : | - | | | | | +-----------+ | - | | |<--------|-----------------------|---->| *U-Boot* | | - | | | | | +-----------+ | - | | | | | | prompt | | - | | | | | +-----------+ | - | +---------+ | | | - | | | | - +------------------------------------------------------------------------+ +.. image:: img/boot_diagram_am65.svg - Here DMSC acts as master and provides all the critical services. R5/A53 requests DMSC to get these services done as shown in the above diagram. diff --git a/doc/board/ti/img/boot_diagram_am65.svg b/doc/board/ti/img/boot_diagram_am65.svg new file mode 100644 index 00000000000..fe5533a5197 --- /dev/null +++ b/doc/board/ti/img/boot_diagram_am65.svg @@ -0,0 +1,1779 @@ + + + + + + + + + + + + + Cortex-R + + + + Cortex-R + + + + + + + + + + ROM + + + + ROM + + + + + + + + + Load and auth tiboot3.bin + + + + Load and auth t... + + + + + + + + + + Cortex-A + + + + Cortex-A + + + + + + + + + + Load system +config data + + + + Load system... + + + + + + + + + DDR Config + + + + DDR Config + + + + + + + + + Load tispl.bin + + + + Load tispl.bin + + + + + + + + + Start Cortex-A + + + + Start Cortex-A + + + + + + + + + + Start Cortex-A + + + + Start Cort... + + + + + + + + + + + + + + + + + + + + + Aux f/w + + + + Aux f/w + + + + + + + + + + + Start SYSFW + + + + Start SYSFW + + + + + + + + + SYSFW + + + + SYSFW + + + + + + + + + + Load system config data + + + + Load syste... + + + + + + + + + Start SYSFW + + + + Start SYSFW + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + + Cortex-A SPL + + + + Cortex-A SPL + + + + + + + + + + U-Boot + + + + U-Boot + + + + + + + + + Load u-boot.img + + + + Load u-boot.img + + + + + + + + + Load Aux core f/w +(optional) + + + + Load Aux core f/w... + + + + + + + + + Start Aux core +(optional) + + + + Start Aux core... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + + Cortex-R/M +C6x/C7x + + + + Cortex-R/M... + + + + + + + + + + TIFS/DMSC + + + + TIFS/DMSC + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + Security Enclave Boot Processor + + + + Security Enclave Boot... + + + + + + + + + + Boot Loader +Processor + + + + Boot Loader... + + + + + + + + + + Main CPU + + + + Main CPU + + + + + + + + + + Auxiliary +Processor + + + + Auxiliary... + + + + + + + + + + H/w Seq: Reset rls + + + + H/w Seq: Reset rls + + + + + + + + + + Auth tiboot3.bin + + + + Auth tiboo... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + Cortex-R SPL + + + + Cortex-R SPL + + + + + + + + + Load sysfw.itb + + + + Load sysfw.itb + + + + + + + + + + Auth SYSFW + + + + Auth SYSFW + + + + + + + Text is not SVG - cannot display + + + From 9e30ebc983df4ad789847a857a395a7ce898ff4e Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:47 -0500 Subject: [PATCH 12/27] doc: board: ti: j721e: Update with boot flow diagram Update the bootflow svg diagram instead of the ascii version Reviewed-by: Neha Malcom Francis Signed-off-by: Nishanth Menon --- doc/board/ti/img/boot_diagram_j721e.svg | 2012 +++++++++++++++++++++++ doc/board/ti/j721e_evm.rst | 91 +- 2 files changed, 2013 insertions(+), 90 deletions(-) create mode 100644 doc/board/ti/img/boot_diagram_j721e.svg diff --git a/doc/board/ti/img/boot_diagram_j721e.svg b/doc/board/ti/img/boot_diagram_j721e.svg new file mode 100644 index 00000000000..e61af5b7670 --- /dev/null +++ b/doc/board/ti/img/boot_diagram_j721e.svg @@ -0,0 +1,2012 @@ + + + + + + + + + + + + + Cortex-R + + + + Cortex-R + + + + + + + + + + ROM + + + + ROM + + + + + + + + + Load and auth tiboot3.bin + + + + Load and auth t... + + + + + + + + + + Cortex-A + + + + Cortex-A + + + + + + + + + + Load system +config data + + + + Load system... + + + + + + + + + DDR Config + + + + DDR Config + + + + + + + + + Load tispl.bin + + + + Load tispl.bin + + + + + + + + + Start Cortex-A + + + + Start Cortex-A + + + + + + + + + Start DM + + + + Start DM + + + + + + + + + + Device Mgr + + + + Device Mgr + + + + + + + + + + Start Cortex-A + + + + Start Cort... + + + + + + + + + + + + + + + + + + + + + + + + + + + Aux f/w + + + + Aux f/w + + + + + + + + + + + Start TIFS + + + + Start TIFS + + + + + + + + + TIFS + + + + TIFS + + + + + + + + + + Load system config data + + + + Load syste... + + + + + + + + + Start TIFS + + + + Start TIFS + + + + + + + + + Load DM f/w + + + + Load DM f/w + + + + + + + + + + branch + + + + branch + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + + Cortex A SPL + + + + Cortex A SPL + + + + + + + + + + U-Boot + + + + U-Boot + + + + + + + + + Load u-boot.img + + + + Load u-boot.img + + + + + + + + + Load Aux core f/w +(optional) + + + + Load Aux core f/w... + + + + + + + + + Start Aux core +(optional) + + + + Start Aux core... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + + + + Cortex-R/M +C6x/C7x + + + + Cortex-R/M... + + + + + + + + + + TIFS/DMSC + + + + TIFS/DMSC + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + Security Enclave Boot Processor + + + + Security Enclave Boot... + + + + + + + + + + Boot Loader +Processor + + + + Boot Loader... + + + + + + + + + + Main CPU + + + + Main CPU + + + + + + + + + + Auxiliary +Processor + + + + Auxiliary... + + + + + + + + + + H/w Seq: Reset rls + + + + H/w Seq: Reset rls + + + + + + + + + + Auth tiboot3.bin + + + + Auth tiboo... + + + + + + + + + + Release Reset + + + + Release Re... + + + + + + + + + Cortex-R SPL + + + + Cortex-R SPL + + + + + + + + + Load sysfw.itb + + + + Load sysfw.itb + + + + + + + + + + Auth TIFS + + + + Auth TIFS + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 637b42d7c6d..16091ac4458 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -34,96 +34,7 @@ Boot Flow: Boot flow is similar to that of AM65x SoC and extending it with remoteproc support. Below is the pictorial representation of boot flow: -.. code-block:: text - - +------------------------------------------------------------------------+-----------------------+ - | DMSC | MCU R5 | A72 | MAIN R5/C66x/C7x | - +------------------------------------------------------------------------+-----------------------+ - | +--------+ | | | | - | | Reset | | | | | - | +--------+ | | | | - | : | | | | - | +--------+ | +-----------+ | | | - | | *ROM* |----------|-->| Reset rls | | | | - | +--------+ | +-----------+ | | | - | | | | : | | | - | | ROM | | : | | | - | |services| | : | | | - | | | | +-------------+ | | | - | | | | | *R5 ROM* | | | | - | | | | +-------------+ | | | - | | |<---------|---|Load and auth| | | | - | | | | | tiboot3.bin | | | | - | | | | +-------------+ | | | - | | | | : | | | - | | | | : | | | - | | | | : | | | - | | | | +-------------+ | | | - | | | | | *R5 SPL* | | | | - | | | | +-------------+ | | | - | | | | | Load | | | | - | | | | | sysfw.itb | | | | - | | Start | | +-------------+ | | | - | | System |<---------|---| Start | | | | - | |Firmware| | | SYSFW | | | | - | +--------+ | +-------------+ | | | - | : | | | | | | - | +---------+ | | Load | | | | - | | *SYSFW* | | | system | | | | - | +---------+ | | Config data | | | | - | | |<--------|---| | | | | - | | | | +-------------+ | | | - | | | | | DDR | | | | - | | | | | config | | | | - | | | | +-------------+ | | | - | | | | | Load | | | | - | | | | | tispl.bin | | | | - | | | | +-------------+ | | | - | | | | | Load R5 | | | | - | | | | | firmware | | | | - | | | | +-------------+ | | | - | | |<--------|---| Start A72 | | | | - | | | | | and jump to | | | | - | | | | | DM fw image | | | | - | | | | +-------------+ | | | - | | | | | +-----------+ | | - | | |---------|-----------------------|---->| Reset rls | | | - | | | | | +-----------+ | | - | | TIFS | | | : | | - | |Services | | | +-------------+ | | - | | |<--------|-----------------------|---->|*TF-A/OP-TEE*| | | - | | | | | +-------------+ | | - | | | | | : | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|---->| *A72 SPL* | | | - | | | | | +-----------+ | | - | | | | | | Load | | | - | | | | | | u-boot.img| | | - | | | | | +-----------+ | | - | | | | | : | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|---->| *U-Boot* | | | - | | | | | +-----------+ | | - | | | | | | prompt | | | - | | | | | +-----------+ | | - | | | | | | Load R5 | | | - | | | | | | Firmware | | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|-----| Start R5 | | +-----------+ | - | | |---------|-----------------------|-----+-----------+-----|----->| R5 starts | | - | | | | | | Load C6 | | +-----------+ | - | | | | | | Firmware | | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|-----| Start C6 | | +-----------+ | - | | |---------|-----------------------|-----+-----------+-----|----->| C6 starts | | - | | | | | | Load C7 | | +-----------+ | - | | | | | | Firmware | | | - | | | | | +-----------+ | | - | | |<--------|-----------------------|-----| Start C7 | | +-----------+ | - | | |---------|-----------------------|-----+-----------+-----|----->| C7 starts | | - | +---------+ | | | +-----------+ | - | | | | | - +------------------------------------------------------------------------+-----------------------+ +.. image:: img/boot_diagram_j721e.svg - Here DMSC acts as master and provides all the critical services. R5/A72 requests DMSC to get these services done as shown in the above diagram. From c727b81d6530f7715849cc5712e1811c94a2033a Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:48 -0500 Subject: [PATCH 13/27] doc: board: ti: k3: Reuse build instructions Introduce common variables to define a generic build instruction that is then used in specific board specific description. Labels are introduced in the evm.rst files to be then reused in variant board documentation as well. While at this, drop using ARCH=arm when building u-boot sources. This practice has been discouraged for some time and can potentially create problems with Kconfig rules related to aarch64. It's best to avoid this approach. Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 63 ++++++++++++++------- doc/board/ti/am65x_evm.rst | 59 +++++++++++++------ doc/board/ti/j7200_evm.rst | 58 +++++++++++++------ doc/board/ti/j721e_evm.rst | 59 +++++++++++++------ doc/board/ti/k3.rst | 113 ++++++++++++++++++++++++++++--------- 5 files changed, 252 insertions(+), 100 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index dd697e70915..b10a74b6c75 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -56,39 +56,60 @@ Sources: Build procedure: ---------------- -1. Trusted Firmware-A: +0. Setup the environment variables: +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_board_env_vars_desc + :end-before: .. k3_rst_include_end_board_env_vars_desc + +Set the variables corresponding to this platform: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn .. code-block:: bash - $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ - TARGET_BOARD=lite SPD=opteed + $ export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig + $ export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig + $ export TFA_BOARD=lite + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am62x + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" + +.. am62x_evm_rst_include_start_build_steps + +1. Trusted Firmware-A: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_tfa + :end-before: .. k3_rst_include_end_build_steps_tfa + 2. OP-TEE: -.. code-block:: bash - - $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \ - CROSS_COMPILE64=aarch64-none-linux-gnu- +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_optee + :end-before: .. k3_rst_include_end_build_steps_optee 3. U-Boot: -* 3.1 R5: +* 4.1 R5: -.. code-block:: bash +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 - $ make ARCH=arm am62x_evm_r5_defconfig - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- \ - BINMAN_INDIRS= +* 4.2 A53: -* 3.2 A53: - -.. code-block:: bash - - $ make ARCH=arm am62x_evm_a53_defconfig - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- \ - BL31=/build/k3/lite/release/bl31.bin \ - TEE=/out/arm-plat-k3/core/tee-raw.bin \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot +.. am62x_evm_rst_include_end_build_steps Target Images -------------- diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index e1f1b3c7c17..ec29505c180 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -55,38 +55,61 @@ Sources: Build procedure: ---------------- -1. Trusted Firmware-A: +0. Setup the environment variables: +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_board_env_vars_desc + :end-before: .. k3_rst_include_end_board_env_vars_desc + +Set the variables corresponding to this platform: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn .. code-block:: bash - $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 \ - TARGET_BOARD=generic SPD=opteed + $ export UBOOT_CFG_CORTEXR=am65x_evm_r5_defconfig + $ export UBOOT_CFG_CORTEXA=am65x_evm_a53_defconfig + $ export TFA_BOARD=generic + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am65x + $ # we dont use any extra OP-TEE parameters + $ unset OPTEE_EXTRA_ARGS + +.. am65x_evm_rst_include_start_build_steps + +1. Trusted Firmware-A: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_tfa + :end-before: .. k3_rst_include_end_build_steps_tfa + 2. OP-TEE: -.. code-block:: bash - - $ make PLATFORM=k3-am65x CFG_ARM64_core=y +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_optee + :end-before: .. k3_rst_include_end_build_steps_optee 3. U-Boot: * 4.1 R5: -.. code-block:: bash - - $ make am65x_evm_r5_defconfig - $ make CROSS_COMPILE=arm-linux-gnueabihf- \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 * 4.2 A53: -.. code-block:: bash - - $ make am65x_evm_a53_defconfig - $ make CROSS_COMPILE=aarch64-linux-gnu- \ - BL31=/build/k3/generic/release/bl31.bin \ - TEE=/out/arm-plat-k3/core/tee-raw.bin \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot +.. am65x_evm_rst_include_end_build_steps Target Images -------------- diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 5c980bcace9..ce88893e341 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -44,37 +44,61 @@ Sources: Build procedure: ---------------- -1. Trusted Firmware-A: +0. Setup the environment variables: +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_board_env_vars_desc + :end-before: .. k3_rst_include_end_board_env_vars_desc + +Set the variables corresponding to this platform: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn .. code-block:: bash - $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed + $ export UBOOT_CFG_CORTEXR=j7200_evm_r5_defconfig + $ export UBOOT_CFG_CORTEXA=j7200_evm_a72_defconfig + $ export TFA_BOARD=generic + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-j7200 + $ # we dont use any extra OP-TEE parameters + $ unset OPTEE_EXTRA_ARGS + +.. j7200_evm_rst_include_start_build_steps + +1. Trusted Firmware-A: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_tfa + :end-before: .. k3_rst_include_end_build_steps_tfa + 2. OP-TEE: -.. code-block:: bash - - $ make PLATFORM=k3-j7200 CFG_ARM64_core=y +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_optee + :end-before: .. k3_rst_include_end_build_steps_optee 3. U-Boot: * 4.1 R5: -.. code-block:: bash - - $ make CROSS_COMPILE=arm-linux-gnueabihf- j7200_evm_r5_defconfig O=build/r5 - $ make CROSS_COMPILE=arm-linux-gnueabihf- \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 * 4.2 A72: -.. code-block:: bash - - $ make CROSS_COMPILE=aarch64-linux-gnu- j7200_evm_a72_defconfig O=build/a72 - $ make CROSS_COMPILE=aarch64-linux-gnu- \ - BL31=/build/k3/generic/release/bl31.bin \ - TEE=/out/arm-plat-k3/core/tee-raw.bin \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot +.. j7200_evm_rst_include_end_build_steps Target Images -------------- diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 16091ac4458..5acf7302c00 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -48,38 +48,61 @@ Sources: Build procedure: ---------------- -1. Trusted Firmware-A: +0. Setup the environment variables: +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_board_env_vars_desc + :end-before: .. k3_rst_include_end_board_env_vars_desc + +Set the variables corresponding to this platform: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn .. code-block:: bash - $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 \ - TARGET_BOARD=generic SPD=opteed + $ export UBOOT_CFG_CORTEXR=j721e_evm_r5_defconfig + $ export UBOOT_CFG_CORTEXA=j721e_evm_a72_defconfig + $ export TFA_BOARD=generic + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-j721e + $ # we dont use any extra OP-TEE parameters + $ unset OPTEE_EXTRA_ARGS + +.. j721e_evm_rst_include_start_build_steps + +1. Trusted Firmware-A: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_tfa + :end-before: .. k3_rst_include_end_build_steps_tfa + 2. OP-TEE: -.. code-block:: bash - - $ make PLATFORM=k3-j721e CFG_ARM64_core=y +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_optee + :end-before: .. k3_rst_include_end_build_steps_optee 3. U-Boot: * 4.1 R5: -.. code-block:: bash - - $ make j721e_evm_r5_defconfig - $ make CROSS_COMPILE=arm-linux-gnueabihf- \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 * 4.2 A72: -.. code-block:: bash - - $ make j721e_evm_a72_defconfig - $ make CROSS_COMPILE=aarch64-linux-gnu- \ - BL31=/build/k3/generic/release/bl31.bin \ - TEE=/out/arm-plat-k3/core/tee-raw.bin \ - BINMAN_INDIRS= +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot +.. j721e_evm_rst_include_end_build_steps Target Images -------------- diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 2df57c9850a..7933c955e07 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -154,10 +154,71 @@ compiled for 64bit main domain CPU cores. All of that to say you will need both a 32bit and 64bit cross compiler (assuming you're using an x86 desktop) +.. k3_rst_include_start_common_env_vars_desc +.. list-table:: Generic environment variables + :widths: 25 25 50 + :header-rows: 1 + + * - S/w Component + - Env Variable + - Description + * - All Software + - CC32 + - Cross compiler for ARMv7 (ARM 32bit), typically arm-linux-gnueabihf- + * - All Software + - CC64 + - Cross compiler for ARMv8 (ARM 64bit), typically aarch64-linux-gnu- + * - All Software + - LNX_FW_PATH + - Path to TI Linux firmware repository + * - All Software + - TFA_PATH + - Path to source of Trusted Firmware-A + * - All Software + - OPTEE_PATH + - Path to source of OP-TEE +.. k3_rst_include_end_common_env_vars_desc + +.. k3_rst_include_start_common_env_vars_defn .. code-block:: bash $ export CC32=arm-linux-gnueabihf- $ export CC64=aarch64-linux-gnu- + $ export LNX_FW_PATH=path/to/ti-linux-firmware + $ export TFA_PATH=path/to/trusted-firmware-a + $ export OPTEE_PATH=path/to/optee_os +.. k3_rst_include_end_common_env_vars_defn + +We will also need some common environment variables set up for the various +other build sources. we shall use the following, in the build descriptions below: + +.. k3_rst_include_start_board_env_vars_desc +.. list-table:: Board specific environment variables + :widths: 25 25 50 + :header-rows: 1 + + * - S/w Component + - Env Variable + - Description + * - U-Boot + - UBOOT_CFG_CORTEXR + - Defconfig for Cortex-R (Boot processor). + * - U-Boot + - UBOOT_CFG_CORTEXA + - Defconfig for Cortex-A (MPU processor). + * - Trusted Firmware-A + - TFA_BOARD + - Platform name used for building TF-A for Cortex-A Processor. + * - Trusted Firmware-A + - TFA_EXTRA_ARGS + - Any extra arguments used for building TF-A. + * - OP-TEE + - OPTEE_PLATFORM + - Platform name used for building OP-TEE for Cortex-A Processor. + * - OP-TEE + - OPTEE_EXTRA_ARGS + - Any extra arguments used for building OP-TEE. +.. k3_rst_include_end_board_env_vars_desc Building tiboot3.bin ^^^^^^^^^^^^^^^^^^^^^ @@ -168,13 +229,13 @@ Building tiboot3.bin the final `tiboot3.bin` binary. (or the `sysfw.itb` if your device uses the split binary flow) - +.. k3_rst_include_start_build_steps_spl_r5 .. code-block:: bash $ # inside u-boot source - $ make ARCH=arm {SOC}_evm_r5_defconfig - $ make ARCH=arm CROSS_COMPILE=$CC32 \ - BINMAN_INDIRS= + $ make $UBOOT_CFG_CORTEXR + $ make CROSS_COMPILE=$CC32 BINMAN_INDIRS=$LNX_FW_PATH +.. k3_rst_include_end_build_steps_spl_r5 At this point you should have all the needed binaries to boot the wakeup domain of your K3 SoC. @@ -204,39 +265,43 @@ firmware if your device using a split firmware. 2. We will first need TF-A, as it's the first thing to run on the 'big' application cores on the main domain. +.. k3_rst_include_start_build_steps_tfa .. code-block:: bash $ # inside trusted-firmware-a source - $ make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \ - TARGET_BOARD={lite|generic|j784s4} \ - SPD=opteed + $ make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 SPD=opteed $TFA_EXTRA_ARGS \ + TARGET_BOARD=$TFA_BOARD +.. k3_rst_include_end_build_steps_tfa Typically all `j7*` devices will use `TARGET_BOARD=generic` or `TARGET_BOARD -=j784s4` (if it is a J784S4 device), while all Sitara (`am6*`) devices +=j784s4` (if it is a J784S4 device), while typical Sitara (`am6*`) devices use the `lite` option. 3. The Open Portable Trusted Execution Environment (OP-TEE) is designed to run as a companion to a non-secure Linux kernel for Cortex-A cores using the TrustZone technology built into the core. +.. k3_rst_include_start_build_steps_optee .. code-block:: bash $ # inside optee_os source - $ make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \ - PLATFORM=k3 CFG_ARM64_core=y + $ make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 CFG_ARM64_core=y $OPTEE_EXTRA_ARGS \ + PLATFORM=$OPTEE_PLATFORM +.. k3_rst_include_end_build_steps_optee 4. Finally, after TF-A has initialized the main domain and OP-TEE has finished, we can jump back into U-Boot again, this time running on a 64bit core in the main domain. +.. k3_rst_include_start_build_steps_uboot .. code-block:: bash $ # inside u-boot source - $ make ARCH=arm {SOC}_evm_a{53,72}_defconfig - $ make ARCH=arm CROSS_COMPILE=$CC64 \ - BINMAN_INDIRS= \ - BL31=/build/k3/generic/release/bl31.bin \ - TEE=/out/arm-plat-k3/core/tee-raw.bin + $ make $UBOOT_CFG_CORTEXA + $ make CROSS_COMPILE=$CC64 BINMAN_INDIRS=$LNX_FW_PATH \ + BL31=$TFA_PATH/build/k3/$TFA_BOARD/release/bl31.bin \ + TEE=$OPTEE_PATH/out/arm-plat-k3/core/tee-raw.bin +.. k3_rst_include_end_build_steps_uboot At this point you should have every binary needed initialize both the wakeup and main domain and to boot to the U-Boot prompt @@ -314,13 +379,11 @@ and the same can be extended to other platforms 2. Compile U-boot for the respective board - .. code-block:: bash +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot - make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm - BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin - BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15 - - .. note:: +.. note:: The changes only affect a72 binaries so the example just builds that @@ -366,11 +429,9 @@ and the same can be extended to other platforms This is required so that the modified dtb gets updated in u-boot.img - .. code-block:: bash - - make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm - BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin - BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15 +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot 6. (Optional) Enabled FIT_SIGNATURE_ENFORCED From f4ade09a1e7615b800d6c360b9c79d0f2e59d0e9 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:49 -0500 Subject: [PATCH 14/27] doc: board: ti: j7200: Convert the image format to svg Convert the image format into svg that can be reused across platforms as needed. Signed-off-by: Nishanth Menon --- doc/board/ti/img/dm_tispl.bin.svg | 317 ++++++++++++++++++ doc/board/ti/img/j7200_tiboot3.bin.svg | 447 +++++++++++++++++++++++++ doc/board/ti/j7200_evm.rst | 63 +--- 3 files changed, 767 insertions(+), 60 deletions(-) create mode 100644 doc/board/ti/img/dm_tispl.bin.svg create mode 100644 doc/board/ti/img/j7200_tiboot3.bin.svg diff --git a/doc/board/ti/img/dm_tispl.bin.svg b/doc/board/ti/img/dm_tispl.bin.svg new file mode 100644 index 00000000000..ffca67d0269 --- /dev/null +++ b/doc/board/ti/img/dm_tispl.bin.svg @@ -0,0 +1,317 @@ + + + + + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + R5 DM FW + + + + R5 DM FW + + + + + + + + + Cortex-A SPL + + + + Cortex-A SPL + + + + + + + + + SPL DTB 1..N + + + + SPL DTB 1..N + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/img/j7200_tiboot3.bin.svg b/doc/board/ti/img/j7200_tiboot3.bin.svg new file mode 100644 index 00000000000..f535310f76d --- /dev/null +++ b/doc/board/ti/img/j7200_tiboot3.bin.svg @@ -0,0 +1,447 @@ + + + + + + + + + + + + + X.509 Certificate + + + + X.509 Cert... + + + + + + + + + R5 +u-boot-spl.bin + + + + R5... + + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + + + DTB 1..N + + + + DTB 1..N + + + + + + + + + + sysfw.bin + + + + sysfw.bin + + + + + + + + + board config + + + + board config + + + + + + + + + PM config + + + + PM config + + + + + + + + + RM config + + + + RM config + + + + + + + + + Secure config + + + + Secure config + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index ce88893e341..aa942ea6499 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -123,71 +123,14 @@ variant (GP, HS-FS, HS-SE) requires a different source for these files. Image formats: -------------- -- tiboot3.bin: +- tiboot3.bin -.. code-block:: console - - +-----------------------+ - | X.509 | - | Certificate | - | +-------------------+ | - | | | | - | | R5 | | - | | u-boot-spl.bin | | - | | | | - | +-------------------+ | - | | | | - | | FIT header | | - | | +---------------+ | | - | | | | | | - | | | DTB 1...N | | | - | | +---------------+ | | - | +-------------------+ | - | | | | - | | FIT HEADER | | - | | +---------------+ | | - | | | | | | - | | | sysfw.bin | | | - | | +---------------+ | | - | | | | | | - | | | board config | | | - | | +---------------+ | | - | | | | | | - | | | PM config | | | - | | +---------------+ | | - | | | | | | - | | | RM config | | | - | | +---------------+ | | - | | | | | | - | | | Secure config | | | - | | +---------------+ | | - | +-------------------+ | - +-----------------------+ +.. image:: img/j7200_tiboot3.bin.svg - tispl.bin -.. code-block:: console +.. image:: img/dm_tispl.bin.svg - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | A72 TF-A | | - | +-------------------+ | - | | | | - | | A72 OP-TEE | | - | +-------------------+ | - | | | | - | | R5 DM FW | | - | +-------------------+ | - | | | | - | | A72 SPL | | - | +-------------------+ | - | | | | - | | SPL DTB 1...N | | - | +-------------------+ | - +-----------------------+ Switch Setting for Boot Mode From 3b83dff183b5042a3a06f99114c645a54413a3cb Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:50 -0500 Subject: [PATCH 15/27] doc: board: ti: j721e: Convert the image format to svg Convert the image format into svg that can be reused across platforms as needed. Signed-off-by: Nishanth Menon --- .../ti/img/no_multi_cert_tiboot3.bin.svg | 238 +++++++++++++ doc/board/ti/img/sysfw.itb.svg | 317 ++++++++++++++++++ doc/board/ti/j721e_evm.rst | 68 +--- 3 files changed, 559 insertions(+), 64 deletions(-) create mode 100644 doc/board/ti/img/no_multi_cert_tiboot3.bin.svg create mode 100644 doc/board/ti/img/sysfw.itb.svg diff --git a/doc/board/ti/img/no_multi_cert_tiboot3.bin.svg b/doc/board/ti/img/no_multi_cert_tiboot3.bin.svg new file mode 100644 index 00000000000..557dbf0c040 --- /dev/null +++ b/doc/board/ti/img/no_multi_cert_tiboot3.bin.svg @@ -0,0 +1,238 @@ + + + + + + + + + + + + + X.509 Certificate + + + + X.509 Cert... + + + + + + + + + R5 +u-boot-spl.bin + + + + R5... + + + + + + + + + + DTB 1..N + + + + DTB 1..N + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/img/sysfw.itb.svg b/doc/board/ti/img/sysfw.itb.svg new file mode 100644 index 00000000000..2d6640a6e2d --- /dev/null +++ b/doc/board/ti/img/sysfw.itb.svg @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + + + sysfw.bin + + + + sysfw.bin + + + + + + + + + board config + + + + board config + + + + + + + + + PM config + + + + PM config + + + + + + + + + RM config + + + + RM config + + + + + + + + + Secure config + + + + Secure config + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 5acf7302c00..2d5f6497007 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -128,77 +128,17 @@ files. Image formats: -------------- -- tiboot3.bin: +- tiboot3.bin -.. code-block:: text - - +-----------------------+ - | X.509 | - | Certificate | - | +-------------------+ | - | | | | - | | R5 | | - | | u-boot-spl.bin | | - | | | | - | +-------------------+ | - | | | | - | | FIT header | | - | | +---------------+ | | - | | | | | | - | | | DTB 1...N | | | - | | +---------------+ | | - | +-------------------+ | - +-----------------------+ +.. image:: img/no_multi_cert_tiboot3.bin.svg - tispl.bin -.. code-block:: text - - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | A72 TF-A | | - | +-------------------+ | - | | | | - | | A72 OP-TEE | | - | +-------------------+ | - | | | | - | | R5 DM FW | | - | +-------------------+ | - | | | | - | | A72 SPL | | - | +-------------------+ | - | | | | - | | SPL DTB 1...N | | - | +-------------------+ | - +-----------------------+ +.. image:: img/dm_tispl.bin.svg - sysfw.itb -.. code-block:: text - - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | sysfw.bin | | - | +-------------------+ | - | | | | - | | board config | | - | +-------------------+ | - | | | | - | | PM config | | - | +-------------------+ | - | | | | - | | RM config | | - | +-------------------+ | - | | | | - | | Secure config | | - | +-------------------+ | - +-----------------------+ +.. image:: img/sysfw.itb.svg R5 Memory Map: -------------- From 654dceddcff487caf263709a3c75685355755e3c Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:51 -0500 Subject: [PATCH 16/27] doc: board: ti: am65x: Convert the image format to svg Convert the image format into svg that can be reused across platforms as needed. Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 65 +------ doc/board/ti/img/nodm_tispl.bin.svg | 277 ++++++++++++++++++++++++++++ 2 files changed, 281 insertions(+), 61 deletions(-) create mode 100644 doc/board/ti/img/nodm_tispl.bin.svg diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index ec29505c180..edd5f7d3c54 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -129,74 +129,17 @@ Each SoC variant (GP and HS) requires a different source for these files. Image formats: -------------- -- tiboot3.bin: +- tiboot3.bin -.. code-block:: text - - +-----------------------+ - | X.509 | - | Certificate | - | +-------------------+ | - | | | | - | | R5 | | - | | u-boot-spl.bin | | - | | | | - | +-------------------+ | - | | | | - | | FIT header | | - | | +---------------+ | | - | | | | | | - | | | DTB 1...N | | | - | | +---------------+ | | - | +-------------------+ | - +-----------------------+ +.. image:: img/no_multi_cert_tiboot3.bin.svg - tispl.bin -.. code-block:: text - - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | A53 ATF | | - | +-------------------+ | - | | | | - | | A53 OP-TEE | | - | +-------------------+ | - | | | | - | | A53 SPL | | - | +-------------------+ | - | | | | - | | SPL DTB 1...N | | - | +-------------------+ | - +-----------------------+ +.. image:: img/nodm_tispl.bin.svg - sysfw.itb -.. code-block:: text - - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | sysfw.bin | | - | +-------------------+ | - | | | | - | | board config | | - | +-------------------+ | - | | | | - | | PM config | | - | +-------------------+ | - | | | | - | | RM config | | - | +-------------------+ | - | | | | - | | Secure config | | - | +-------------------+ | - +-----------------------+ +.. image:: img/sysfw.itb.svg eMMC: ----- diff --git a/doc/board/ti/img/nodm_tispl.bin.svg b/doc/board/ti/img/nodm_tispl.bin.svg new file mode 100644 index 00000000000..040676400aa --- /dev/null +++ b/doc/board/ti/img/nodm_tispl.bin.svg @@ -0,0 +1,277 @@ + + + + + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + Cortex-A SPL + + + + Cortex-A SPL + + + + + + + + + SPL DTB 1..N + + + + SPL DTB 1..N + + + + + + + Text is not SVG - cannot display + + + From 34f76921d8012a272a59819e53b3b791455c5a26 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:52 -0500 Subject: [PATCH 17/27] doc: board: ti: am62x: Convert the image format to svg Convert the image format into svg that can be reused across platforms as needed. Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 50 +--- doc/board/ti/img/multi_cert_tiboot3.bin.svg | 287 ++++++++++++++++++++ 2 files changed, 290 insertions(+), 47 deletions(-) create mode 100644 doc/board/ti/img/multi_cert_tiboot3.bin.svg diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index b10a74b6c75..a482f52ce86 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -134,57 +134,13 @@ variant (GP, HS-FS, HS-SE) requires a different source for these files. Image formats: -------------- -- tiboot3.bin: +- tiboot3.bin -.. code-block:: text - - +-----------------------+ - | X.509 | - | Certificate | - | +-------------------+ | - | | | | - | | R5 | | - | | u-boot-spl.bin | | - | | | | - | +-------------------+ | - | | | | - | |TIFS with board cfg| | - | | | | - | +-------------------+ | - | | | | - | | | | - | | FIT header | | - | | +---------------+ | | - | | | | | | - | | | DTB 1...N | | | - | | +---------------+ | | - | +-------------------+ | - +-----------------------+ +.. image:: img/multi_cert_tiboot3.bin.svg - tispl.bin -.. code-block:: text - - +-----------------------+ - | | - | FIT HEADER | - | +-------------------+ | - | | | | - | | A53 TF-A | | - | +-------------------+ | - | | | | - | | A53 OP-TEE | | - | +-------------------+ | - | | | | - | | R5 DM FW | | - | +-------------------+ | - | | | | - | | A53 SPL | | - | +-------------------+ | - | | | | - | | SPL DTB 1...N | | - | +-------------------+ | - +-----------------------+ +.. image:: img/dm_tispl.bin.svg A53 SPL DDR Memory Layout ------------------------- diff --git a/doc/board/ti/img/multi_cert_tiboot3.bin.svg b/doc/board/ti/img/multi_cert_tiboot3.bin.svg new file mode 100644 index 00000000000..a210d66ca6d --- /dev/null +++ b/doc/board/ti/img/multi_cert_tiboot3.bin.svg @@ -0,0 +1,287 @@ + + + + + + + + + + + + + X.509 Certificate + + + + X.509 Cert... + + + + + + + + + R5 +u-boot-spl.bin + + + + R5... + + + + + + + + + + DTB 1..N + + + + DTB 1..N + + + + + + + + + + FIT Header + + + + FIT Header + + + + + + + + + TIFS with board cfg + + + + TIFS with board cfg + + + + + + + Text is not SVG - cannot display + + + From d7c3ca985c53eb8926861da1bbdbd660830d939a Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:53 -0500 Subject: [PATCH 18/27] doc: board: ti: am62x_sk: Add labels to reuse memory map Add labels around the A53 SPL DDR memory layout to be able to reuse the memory map. Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index a482f52ce86..16a4ab4dcfb 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -145,6 +145,8 @@ Image formats: A53 SPL DDR Memory Layout ------------------------- +.. am62x_evm_rst_include_start_ddr_mem_layout + This provides an overview memory usage in A53 SPL stage. .. list-table:: @@ -198,6 +200,7 @@ This provides an overview memory usage in A53 SPL stage. * - EMPTY - 0x80d00400 - 0x81000000 +.. am62x_evm_rst_include_end_ddr_mem_layout Switch Setting for Boot Mode ---------------------------- From 36ed8fbf4089e4dd8c24d002171aec88792922b4 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:54 -0500 Subject: [PATCH 19/27] doc: board: ti: am62x_sk: Convert switch settings to list tables Use list tables to map up the dip switch settings Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 16a4ab4dcfb..906d7ceb31a 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -213,16 +213,32 @@ The following table shows some common boot modes used on AM62 platform. More details can be found in the Technical Reference Manual: https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section. -*Boot Modes* +.. list-table:: Boot Modes + :widths: 16 16 16 + :header-rows: 1 -============ ============= ============= -Switch Label SW2: 12345678 SW3: 12345678 -============ ============= ============= -SD 01000000 11000010 -OSPI 00000000 11001110 -EMMC 00000000 11010010 -UART 00000000 11011100 -USB DFU 00000000 11001010 -============ ============= ============= + * - Switch Label + - SW2: 12345678 + - SW3: 12345678 + + * - SD + - 01000000 + - 11000010 + + * - OSPI + - 00000000 + - 11001110 + + * - EMMC + - 00000000 + - 11010010 + + * - UART + - 00000000 + - 11011100 + + * - USB DFU + - 00000000 + - 11001010 For SW2 and SW1, the switch state in the "ON" position = 1. From f940ec2f5ee2fe750ed665edd2bd4e3a4e30b73b Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:55 -0500 Subject: [PATCH 20/27] doc: board: ti: j7200_evm: Convert switch settings to list tables Use list tables to map up the dip switch settings Signed-off-by: Nishanth Menon --- doc/board/ti/j7200_evm.rst | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index aa942ea6499..a69935b1fa7 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -144,18 +144,33 @@ The following table shows some common boot modes used on J7200 platform. More details can be found in the Technical Reference Manual: https://www.ti.com/lit/pdf/spruiu1 under the `Boot Mode Pins` section. +.. list-table:: Boot Modes + :widths: 16 16 16 + :header-rows: 1 -*Boot Modes* + * - Switch Label + - SW9: 12345678 + - SW8: 12345678 -============ ============= ============= -Switch Label SW9: 12345678 SW8: 12345678 -============ ============= ============= -SD 00000000 10000010 -EMMC 01000000 10000000 -OSPI 01000000 00000110 -UART 01110000 00000000 -USB DFU 00100000 10000000 -============ ============= ============= + * - SD + - 00000000 + - 10000010 + + * - EMMC + - 01000000 + - 10000000 + + * - OSPI + - 01000000 + - 00000110 + + * - UART + - 01110000 + - 00000000 + + * - USB DFU + - 00100000 + - 10000000 For SW8 and SW9, the switch state in the "ON" position = 1. From fc5b2b8ee5c9b7f682818462cdc9c65907bf42ad Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:56 -0500 Subject: [PATCH 21/27] doc: board: ti: am65x_evm: Convert the UART boot responsibility to list table Use list tables to map up the UART Boot responsibility table. Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index edd5f7d3c54..3cb50270e44 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -274,16 +274,34 @@ ROM supports booting from MCU_UART0 via X-Modem protocol. The entire UART-based boot process up to U-Boot (proper) prompt goes through different stages and uses different UART peripherals as follows: -.. code-block:: text +.. list-table:: ROM UART Boot Responsibilities + :widths: 16 16 16 16 + :header-rows: 1 - +---------+---------------+-------------+------------+ - | WHO | Loading WHAT | HW Module | Protocol | - +---------+---------------+-------------+------------+ - |Boot ROM | tiboot3.bin | MCU_UART0 | X-Modem(*)| - |R5 SPL | sysfw.itb | MCU_UART0 | Y-Modem(*)| - |R5 SPL | tispl.bin | MAIN_UART0 | Y-Modem | - |A53 SPL | u-boot.img | MAIN_UART0 | Y-Modem | - +---------+---------------+-------------+------------+ + * - Who + - Loading What + - Hardware Module + - Protocol + + * - Boot ROM + - tiboot3.bin + - MCU_UART0 + - X-Modem(*) + + * - R5 SPL + - sysfw.itb + - MCU_UART0 + - Y-Modem(*) + + * - R5 SPL + - tispl.bin + - MAIN_UART0 + - Y-Modem + + * - A53 SPL + - u-boot.img + - MAIN_UART0 + - Y-Modem Note that in addition to X/Y-Modem related protocol timeouts the DMSC watchdog timeout of 3min (typ.) needs to be observed until System Firmware From 757836d95abbe8ed7afea2def89424ad2678c9bf Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:57 -0500 Subject: [PATCH 22/27] doc: board: ti: am65/j721e: Convert OSPI memory map to svg Convert the memory map for OSPI as a common memory map Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 27 +- doc/board/ti/img/ospi_sysfw.svg | 721 ++++++++++++++++++++++++++++++++ doc/board/ti/j721e_evm.rst | 27 +- 3 files changed, 723 insertions(+), 52 deletions(-) create mode 100644 doc/board/ti/img/ospi_sysfw.svg diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 3cb50270e44..e68b855d963 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -230,32 +230,7 @@ addresses. Flash layout for OSPI: -.. code-block:: text - - 0x0 +----------------------------+ - | ospi.tiboot3(512K) | - | | - 0x80000 +----------------------------+ - | ospi.tispl(2M) | - | | - 0x280000 +----------------------------+ - | ospi.u-boot(4M) | - | | - 0x680000 +----------------------------+ - | ospi.env(128K) | - | | - 0x6A0000 +----------------------------+ - | ospi.env.backup (128K) | - | | - 0x6C0000 +----------------------------+ - | ospi.sysfw(1M) | - | | - 0x7C0000 +----------------------------+ - | padding (256k) | - 0x800000 +----------------------------+ - | ospi.rootfs(UBIFS) | - | | - +----------------------------+ +.. image:: img/ospi_sysfw.svg Kernel Image and DT are expected to be present in the /boot folder of UBIFS ospi.rootfs just like in SD card case. U-Boot looks for UBI volume named diff --git a/doc/board/ti/img/ospi_sysfw.svg b/doc/board/ti/img/ospi_sysfw.svg new file mode 100644 index 00000000000..e7a0fd24824 --- /dev/null +++ b/doc/board/ti/img/ospi_sysfw.svg @@ -0,0 +1,721 @@ + + + + + + + + + + + + ospi.tiboot3(512k) + + + + ospi.tiboot3(512k) + + + + + + + + + + 0x0 + + + + + 0x0 + + + + + + + + + ospi.tispl(2M) + + + + ospi.tispl(2M) + + + + + + + + + + 0x80000 + + + + + 0x80000 + + + + + + + + + ospi.u-boot(4M) + + + + ospi.u-boot(4M) + + + + + + + + + + 0x280000 + + + + + 0x280000 + + + + + + + + + ospi.env(128K) + + + + ospi.env(128K) + + + + + + + + + + 0x680000 + + + + + 0x680000 + + + + + + + + + ospi.env.backup(128K) + + + + ospi.env.backup(128K) + + + + + + + + + + 0x6A0000 + + + + + 0x6A0000 + + + + + + + + + ospi.sysfw(1M) + + + + ospi.sysfw(1M) + + + + + + + + + + 0x6C0000 + + + + + 0x6C0000 + + + + + + + + + padding(256K) + + + + padding(256K) + + + + + + + + + + 0x7C0000 + + + + + 0x7C0000 + + + + + + + + + ospi.rootfs(UBIFS) + + + + ospi.rootfs(UBIFS) + + + + + + + + + + 0x800000 + + + + + 0x800000 + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 2d5f6497007..77eb2dbb047 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -207,32 +207,7 @@ addresses. Flash layout for OSPI: -.. code-block:: text - - 0x0 +----------------------------+ - | ospi.tiboot3(512K) | - | | - 0x80000 +----------------------------+ - | ospi.tispl(2M) | - | | - 0x280000 +----------------------------+ - | ospi.u-boot(4M) | - | | - 0x680000 +----------------------------+ - | ospi.env(128K) | - | | - 0x6A0000 +----------------------------+ - | ospi.env.backup (128K) | - | | - 0x6C0000 +----------------------------+ - | ospi.sysfw(1M) | - | | - 0x7C0000 +----------------------------+ - | padding (256k) | - 0x800000 +----------------------------+ - | ospi.rootfs(UBIFS) | - | | - +----------------------------+ +.. image:: img/ospi_sysfw.svg Firmwares: ---------- From e19efb13c95eeaa45b6a1191c3c87b88025023af Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:58 -0500 Subject: [PATCH 23/27] doc: board: ti: am65x_evm: Convert the emmc layout to svg Convert the emmc memory layout to svg Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 17 +- doc/board/ti/img/emmc_am65x_evm_boot0.svg | 748 ++++++++++++++++++++++ 2 files changed, 749 insertions(+), 16 deletions(-) create mode 100644 doc/board/ti/img/emmc_am65x_evm_boot0.svg diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index e68b855d963..fcb5f1c685a 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -180,22 +180,7 @@ used: eMMC layout: -.. code-block:: text - - boot0 partition (8 MB) user partition - 0x0+----------------------------------+ 0x0+-------------------------+ - | tiboot3.bin (512 KB) | | | - 0x400+----------------------------------+ | | - | tispl.bin (2 MB) | | | - 0x1400+----------------------------------+ | rootfs | - | u-boot.img (4 MB) | | | - 0x3400+----------------------------------+ | | - | environment (128 KB) | | | - 0x3500+----------------------------------+ | | - | backup environment (128 KB) | | | - 0x3600+----------------------------------+ | | - | sysfw (1 MB) | | | - 0x3E00+----------------------------------+ +-------------------------+ +.. image:: img/emmc_am65x_evm_boot0.svg Kernel image and DT are expected to be present in the /boot folder of rootfs. To boot kernel from eMMC, use the following commands: diff --git a/doc/board/ti/img/emmc_am65x_evm_boot0.svg b/doc/board/ti/img/emmc_am65x_evm_boot0.svg new file mode 100644 index 00000000000..ff5c7bf74b2 --- /dev/null +++ b/doc/board/ti/img/emmc_am65x_evm_boot0.svg @@ -0,0 +1,748 @@ + + + + + + + + + + + + tiboot3.bin (512KB) + + + + tiboot3.bin (512KB) + + + + + + + + + + + 0x0 + + + + + + 0x0 + + + + + + + + + tispl.bin (2MB) + + + + tispl.bin (2MB) + + + + + + + + + + + 0x400 + + + + + + 0x400 + + + + + + + + + U-boot.img (4MB) + + + + U-boot.img (4MB) + + + + + + + + + + + 0x1400 + + + + + + 0x1400 + + + + + + + + + environment (128KB) + + + + environment (128KB) + + + + + + + + + + + 0x3400 + + + + + + 0x3400 + + + + + + + + + backup environment (128KB) + + + + backup environment (128KB) + + + + + + + + + + + 0x3500 + + + + + + 0x3500 + + + + + + + + + Sysfw (1MB) + + + + Sysfw (1MB) + + + + + + + + + + + 0x3600 + + + + + + 0x3600 + + + + + + + + + + + 0x3E00 + + + + + + 0x3E00 + + + + + + + + + + UDA Partition + + + + UDA Partition + + + + + + + + + Boot0 partition (8MB) + + + + Boot0 partition (8MB) + + + + + + + + + rootfs + + + + rootfs + + + + + + + Text is not SVG - cannot display + + + From 93d90bf33e70a4b67af9e1cabb04341c560021b2 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:58:59 -0500 Subject: [PATCH 24/27] doc: board: ti: j7200_evm: Convert the emmc layout to svg Convert the emmc memory layout to svg Signed-off-by: Nishanth Menon --- doc/board/ti/img/emmc_j7200_evm_boot01.svg | 662 +++++++++++++++++++++ doc/board/ti/img/emmc_j7200_evm_udafs.svg | 505 ++++++++++++++++ doc/board/ti/j7200_evm.rst | 32 +- 3 files changed, 1169 insertions(+), 30 deletions(-) create mode 100644 doc/board/ti/img/emmc_j7200_evm_boot01.svg create mode 100644 doc/board/ti/img/emmc_j7200_evm_udafs.svg diff --git a/doc/board/ti/img/emmc_j7200_evm_boot01.svg b/doc/board/ti/img/emmc_j7200_evm_boot01.svg new file mode 100644 index 00000000000..43e8b254a82 --- /dev/null +++ b/doc/board/ti/img/emmc_j7200_evm_boot01.svg @@ -0,0 +1,662 @@ + + + + + + + + + + + + tiboot3.bin (1MB) + + + + tiboot3.bin (1MB) + + + + + + + + + + + 0x0 + + + + + + 0x0 + + + + + + + + + tispl.bin (2MB) + + + + tispl.bin (2MB) + + + + + + + + + + + 0x800 + + + + + + 0x800 + + + + + + + + + U-boot.img (4MB) + + + + U-boot.img (4MB) + + + + + + + + + + + 0x1800 + + + + + + 0x1800 + + + + + + + + + environment (128KB) + + + + environment (128KB) + + + + + + + + + + + 0x3800 + + + + + + 0x3800 + + + + + + + + + backup environment (128KB) + + + + backup environment (128KB) + + + + + + + + + + + 0x3900 + + + + + + 0x3900 + + + + + + + + + + + 0x3A00 + + + + + + 0x3A00 + + + + + + + + + + UDA Partition + + + + UDA Partition + + + + + + + + + Boot0/1 partition (8MB) + + + + Boot0/1 partition (8MB) + + + + + + + + + rootfs + + + + rootfs + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/img/emmc_j7200_evm_udafs.svg b/doc/board/ti/img/emmc_j7200_evm_udafs.svg new file mode 100644 index 00000000000..4287bb65b54 --- /dev/null +++ b/doc/board/ti/img/emmc_j7200_evm_udafs.svg @@ -0,0 +1,505 @@ + + + + + + + + + + + + + + 0x0 + + + + + + 0x0 + + + + + + + + + + + 0x3A00 + + + + + + 0x3A00 + + + + + + + + + + UDA Partition + + + + UDA Partition + + + + + + + + + Boot0/1 partition (8MB) + + + + Boot0/1 partition (8MB) + + + + + + + + + + + rootfs + + + + rootfs + + + + + + + + + boot + + + + boot + + + + + + + + + + tiboot3.bin* + + + + tiboot3.bi... + + + + + + + + + tispl.bin + + + + tispl.bin + + + + + + + + + u-boot.img + + + + u-boot.img + + + + + + + + + environment + + + + environment + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index a69935b1fa7..33d849198c3 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -186,42 +186,14 @@ Current allocated size for tiboot3 size is 1MB, tispl is 2MB. Size of u-boot.img is taken 4MB for refernece, But this is subject to change depending upon atf, optee size -.. code-block:: console - - boot0/1 partition (8 MB) user partition - 0x0+----------------------------------+ 0x0+------------------------+ - | tiboot3.bin (1 MB) | | | - 0x800+----------------------------------+ | | - | tispl.bin (2 MB) | | | - 0x1800+----------------------------------+ | | - | u-boot.img (4MB) | | | - 0x3800+----------------------------------+ | | - | | | | - 0x3900+ environment | | | - | | | | - 0x3A00+----------------------------------+ +-------------------------+ +.. image:: img/emmc_j7200_evm_boot01.svg In case of UDA FS mode booting, following is layout. All boot images tiboot3.bin, tispl and u-boot should be written to fat formatted UDA FS as file. -.. code-block:: console - - boot0/1 partition (8 MB) user partition - 0x0+---------------------------------+ 0x0+-------------------------+ - | | | tiboot3.bin* | - 0x800+----------------------------------+ | | - | | | tispl.bin | - 0x1800+----------------------------------+ | | - | | | u-boot.img | - 0x3800+----------------------------------+ | | - | | | | - 0x3900+ | | environment | - | | | | - 0x3A00+----------------------------------+ +-------------------------+ - - +.. image:: img/emmc_j7200_evm_udafs.svg In case of booting from eMMC, write above images into raw or UDA FS. and set mmc partconf accordingly. From 08df746dd146c7d106110718d42ec34b21763403 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:59:00 -0500 Subject: [PATCH 25/27] doc: board: ti: *: Add platform information Add link to the actual platform for folks to find details about the board in addition to the SoC's TRM. Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 4 ++++ doc/board/ti/am65x_evm.rst | 4 ++++ doc/board/ti/j7200_evm.rst | 4 ++++ doc/board/ti/j721e_evm.rst | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 906d7ceb31a..637985cb096 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -38,6 +38,10 @@ Some highlights of this SoC are: More details can be found in the Technical Reference Manual: https://www.ti.com/lit/pdf/spruiv7 +Platform information: + +* https://www.ti.com/tool/SK-AM62B + Boot Flow: ---------- Below is the pictorial representation of boot flow: diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index fcb5f1c685a..0129235c2b2 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -24,6 +24,10 @@ cores, voltage domains and peripherals: More info can be found in TRM: http://www.ti.com/lit/pdf/spruid7 +Platform information: + +* https://www.ti.com/tool/TMDX654GPEVM + Boot Flow: ---------- On AM65x family devices, ROM supports boot only via MCU(R5). This means that diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 33d849198c3..69abc55a93c 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -26,6 +26,10 @@ specific processing cores and peripherals: More info can be found in TRM: https://www.ti.com/lit/pdf/spruiu1 +Platform information: + +* https://www.ti.com/tool/J7200XSOMXEVM + Boot Flow: ---------- Below is the pictorial representation of boot flow: diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index 77eb2dbb047..f4b4c192d9d 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -29,6 +29,11 @@ specific processing cores and peripherals: More info can be found in TRM: http://www.ti.com/lit/pdf/spruil1 +Platform information: + +* https://www.ti.com/tool/J721EXSOMXEVM +* https://www.ti.com/tool/SK-TDA4VM + Boot Flow: ---------- Boot flow is similar to that of AM65x SoC and extending it with remoteproc From 5c86c57f9d857740acb85f9ab16cb16748d890cc Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:59:01 -0500 Subject: [PATCH 26/27] doc: board: ti: k3: Sort the boards in alphabetical order Keep the boards sorted in alphabetical order. Signed-off-by: Nishanth Menon --- doc/board/ti/k3.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 7933c955e07..eb1896b06cd 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -30,10 +30,10 @@ K3 Based SoCs .. toctree:: :maxdepth: 1 - j721e_evm - j7200_evm am62x_sk am65x_evm + j7200_evm + j721e_evm Boot Flow Overview ------------------ From 6e8fa0611f19824e200fe4725f18bce7e2000071 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 27 Jul 2023 13:59:02 -0500 Subject: [PATCH 27/27] board: ti: k3: Convert boot flow ascii flow to svg Replace the ascii flow diagram with svg. Signed-off-by: Nishanth Menon --- doc/board/ti/img/boot_flow_01.svg | 220 +++++++++++ doc/board/ti/img/boot_flow_02.svg | 459 +++++++++++++++++++++++ doc/board/ti/img/boot_flow_03.svg | 583 ++++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 15 +- 4 files changed, 1265 insertions(+), 12 deletions(-) create mode 100644 doc/board/ti/img/boot_flow_01.svg create mode 100644 doc/board/ti/img/boot_flow_02.svg create mode 100644 doc/board/ti/img/boot_flow_03.svg diff --git a/doc/board/ti/img/boot_flow_01.svg b/doc/board/ti/img/boot_flow_01.svg new file mode 100644 index 00000000000..b5bd0ac2774 --- /dev/null +++ b/doc/board/ti/img/boot_flow_01.svg @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + WKUP Domain + + + + WKUP Domain + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + WKUP SPL + + + + WKUP SPL + + + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/img/boot_flow_02.svg b/doc/board/ti/img/boot_flow_02.svg new file mode 100644 index 00000000000..4e282d8baf0 --- /dev/null +++ b/doc/board/ti/img/boot_flow_02.svg @@ -0,0 +1,459 @@ + + + + + + + + + + + + + + WKUP Domain + + + + WKUP Domain + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + WKUP SPL + + + + WKUP SPL + + + + + + + + + + + + + Main Domain + + + + Main Domain + + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + + + + Main SPL + + + + Main SPL + + + + + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/img/boot_flow_03.svg b/doc/board/ti/img/boot_flow_03.svg new file mode 100644 index 00000000000..b77d679926d --- /dev/null +++ b/doc/board/ti/img/boot_flow_03.svg @@ -0,0 +1,583 @@ + + + + + + + + + + + + + + WKUP Domain + + + + WKUP Domain + + + + + + + + + + ROM + + + + ROM + + + + + + + + + + WKUP SPL + + + + WKUP SPL + + + + + + + + + + + + + Main Domain + + + + Main Domain + + + + + + + + + + TF-A + + + + TF-A + + + + + + + + + + OP-TEE + + + + OP-TEE + + + + + + + + + + + + Main SPL + + + + Main SPL + + + + + + + + + + + + U-Boot + + + + U-Boot + + + + + + + + + + Linux + + + + Linux + + + + + + + + + + + + + Text is not SVG - cannot display + + + diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index eb1896b06cd..9d40675b600 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -45,10 +45,7 @@ boot media needed to load the binaries packaged inside `tiboot3.bin`, including a 32bit U-Boot SPL, (called the wakup SPL) that ROM will jump to after it has finished loading everything into internal SRAM. -.. code-block:: text - - | WKUP Domain - ROM -> WKUP SPL -> +.. image:: img/boot_flow_01.svg The wakeup SPL, running on a wakeup domain core, will initialize DDR and any peripherals needed load the larger binaries inside the `tispl.bin` @@ -57,10 +54,7 @@ application cores inside the main domain to initialize the main domain, starting with Trusted Firmware-A (TF-A), before moving on to start OP-TEE and the main domain's U-Boot SPL. -.. code-block:: text - - | WKUP Domain | Main Domain -> - ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL +.. image:: img/boot_flow_02.svg The main domain's SPL, running on a 64bit application core, has virtually unlimited space (billions of bytes now that DDR is working) to @@ -68,10 +62,7 @@ initialize even more peripherals needed to load in the `u-boot.img` which loads more firmware into the micro-controller & wakeup domains and finally prepare the main domain to run Linux. -.. code-block:: text - - | WKUP Domain | Main Domain -> - ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL -> UBoot -> Linux +.. image:: img/boot_flow_03.svg This is the typical boot flow for all K3 based SoCs, however this flow offers quite a lot in the terms of flexibility, especially on High