diff options
-rw-r--r-- | boot/Kconfig | 2 | ||||
-rw-r--r-- | boot/bootm_os.c | 4 | ||||
-rw-r--r-- | doc/board/ti/am62ax_sk.rst | 20 | ||||
-rw-r--r-- | doc/board/ti/am62px_sk.rst | 18 | ||||
-rw-r--r-- | doc/board/ti/j722s_evm.rst | 12 | ||||
-rw-r--r-- | doc/board/ti/j784s4_evm.rst | 16 | ||||
-rw-r--r-- | doc/board/ti/k3.rst | 10 | ||||
-rw-r--r-- | include/efi_loader.h | 2 | ||||
-rw-r--r-- | include/uthread.h | 9 | ||||
-rw-r--r-- | lib/efi_loader/efi_bootbin.c | 9 | ||||
-rw-r--r-- | lib/efi_loader/efi_helper.c | 29 |
11 files changed, 81 insertions, 50 deletions
diff --git a/boot/Kconfig b/boot/Kconfig index fb37d912bc9..2456856a572 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1170,7 +1170,7 @@ config BOOTSTAGE_REPORT config BOOTSTAGE_RECORD_COUNT int "Number of boot stage records to store" depends on BOOTSTAGE - default 30 + default 50 help This is the size of the bootstage record list and is the maximum number of bootstage records that can be recorded. diff --git a/boot/bootm_os.c b/boot/bootm_os.c index dc9d3e61fca..a3c7cb5332e 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -498,11 +498,11 @@ static int do_bootm_efi(int flag, struct bootm_info *bmi) /* We expect to return */ images->os.type = IH_TYPE_STANDALONE; - image_buf = map_sysmem(images->ep, images->os.image_len); + image_buf = map_sysmem(images->os.image_start, images->os.image_len); /* Run EFI image */ printf("## Transferring control to EFI (at address %08lx) ...\n", - images->ep); + images->os.image_start); bootstage_mark(BOOTSTAGE_ID_RUN_OS); ret = efi_binary_run(image_buf, images->os.image_len, diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst index 262340ef59a..43a1db68873 100644 --- a/doc/board/ti/am62ax_sk.rst +++ b/doc/board/ti/am62ax_sk.rst @@ -81,16 +81,16 @@ Set the variables corresponding to this platform: .. include:: ../ti/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 +.. prompt:: bash - $ export UBOOT_CFG_CORTEXR=am62ax_evm_r5_defconfig - $ export UBOOT_CFG_CORTEXA=am62ax_evm_a53_defconfig - $ export TFA_BOARD=lite - $ # we dont use any extra TFA parameters - $ unset TFA_EXTRA_ARGS - $ export OPTEE_PLATFORM=k3-am62ax - $ # we dont use any extra OPTEE parameters - $ unset OPTEE_EXTRA_ARGS + export UBOOT_CFG_CORTEXR=am62ax_evm_r5_defconfig + export UBOOT_CFG_CORTEXA=am62ax_evm_a53_defconfig + export TFA_BOARD=lite + # we dont use any extra TFA parameters + unset TFA_EXTRA_ARGS + export OPTEE_PLATFORM=k3-am62ax + # we dont use any extra OPTEE parameters + unset OPTEE_EXTRA_ARGS 1. Trusted Firmware-A: @@ -212,6 +212,6 @@ detailed setup information. To start OpenOCD and connect to the board -.. code-block:: bash +.. prompt:: bash openocd -f board/ti_am62a7evm.cfg diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst index 99bdc034869..a07d6a4da45 100644 --- a/doc/board/ti/am62px_sk.rst +++ b/doc/board/ti/am62px_sk.rst @@ -91,15 +91,15 @@ Set the variables corresponding to this platform: :start-after: .. k3_rst_include_start_common_env_vars_defn :end-before: .. k3_rst_include_end_common_env_vars_defn -.. code-block:: bash +.. prompt:: bash - $ export UBOOT_CFG_CORTEXR=am62px_evm_r5_defconfig - $ export UBOOT_CFG_CORTEXA=am62px_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" + export UBOOT_CFG_CORTEXR=am62px_evm_r5_defconfig + export UBOOT_CFG_CORTEXA=am62px_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" .. am62px_evm_rst_include_start_build_steps @@ -312,6 +312,6 @@ detailed setup information. To start OpenOCD and connect to the board -.. code-block:: bash +.. prompt:: bash openocd -f board/ti_am62pevm.cfg diff --git a/doc/board/ti/j722s_evm.rst b/doc/board/ti/j722s_evm.rst index edc29a4f9e4..9c53fa50858 100644 --- a/doc/board/ti/j722s_evm.rst +++ b/doc/board/ti/j722s_evm.rst @@ -68,12 +68,12 @@ Set the variables corresponding to this platform: :start-after: .. k3_rst_include_start_common_env_vars_defn :end-before: .. k3_rst_include_end_common_env_vars_defn -.. code-block:: bash +.. prompt:: bash - $ export UBOOT_CFG_CORTEXR=j722s_evm_r5_defconfig - $ export UBOOT_CFG_CORTEXA=j722s_evm_a53_defconfig - $ export TFA_BOARD=lite - $ export OPTEE_PLATFORM=k3-am62x + export UBOOT_CFG_CORTEXR=j722s_evm_r5_defconfig + export UBOOT_CFG_CORTEXA=j722s_evm_a53_defconfig + export TFA_BOARD=lite + export OPTEE_PLATFORM=k3-am62x .. j722s_evm_rst_include_start_build_steps @@ -258,6 +258,6 @@ detailed setup information. To start OpenOCD and connect to the board -.. code-block:: bash +.. prompt:: bash openocd -f board/ti_j722sevm.cfg diff --git a/doc/board/ti/j784s4_evm.rst b/doc/board/ti/j784s4_evm.rst index a1e927cb743..349fb394d74 100644 --- a/doc/board/ti/j784s4_evm.rst +++ b/doc/board/ti/j784s4_evm.rst @@ -81,14 +81,14 @@ 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 +.. prompt:: bash - $ export UBOOT_CFG_CORTEXR=j784s4_evm_r5_defconfig - $ export UBOOT_CFG_CORTEXA=j784s4_evm_a72_defconfig - $ export TFA_BOARD=j784s4 - $ export TFA_EXTRA_ARGS="K3_USART=0x8" - $ export OPTEE_PLATFORM=k3-j784s4 - $ export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x8" + export UBOOT_CFG_CORTEXR=j784s4_evm_r5_defconfig + export UBOOT_CFG_CORTEXA=j784s4_evm_a72_defconfig + export TFA_BOARD=j784s4 + export TFA_EXTRA_ARGS="K3_USART=0x8" + export OPTEE_PLATFORM=k3-j784s4 + export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x8" .. j784s4_evm_rst_include_start_build_steps @@ -326,6 +326,6 @@ Debugging U-Boot on J784S4-EVM and AM69-SK To start OpenOCD and connect to J784S4-EVM or AM69-SK board, use the following. -.. code-block:: bash +.. prompt:: bash openocd -f board/ti_j784s4evm.cfg diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 0deb4d768f9..b79f1526446 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -460,7 +460,7 @@ The Kernel FIT Image that we have has Kernel Image, DTB and the DTBOs. It supports packing multiple images and configurations that allow you to choose any configuration at runtime to boot from. -.. code-block:: +.. code-block:: dts /dts-v1/; @@ -484,7 +484,7 @@ choose any configuration at runtime to boot from. * Sample Images -.. code-block:: +.. code-block:: dts kernel-1 { description = "Linux kernel"; @@ -533,7 +533,7 @@ corresponding configuration node as follows. * Sample Configurations -.. code-block:: +.. code-block:: dts conf-ti_k3-j721e-common-proc-board.dtb { description = "Linux kernel, FDT blob"; @@ -585,7 +585,7 @@ Generating the fitImage For e.g - .. code-block:: + .. code-block:: diff diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index a5c1df7e0054..6d0126d955ef 100644 @@ -605,7 +605,7 @@ Generating the fitImage For e.g - .. code-block:: + .. code-block:: diff diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi index 673be646b1e3..752fa805fe8d 100644 diff --git a/include/efi_loader.h b/include/efi_loader.h index 144b749278a..84e8cfe320e 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -597,6 +597,8 @@ efi_status_t efi_env_set_load_options(efi_handle_t handle, const char *env_var, void *efi_get_configuration_table(const efi_guid_t *guid); /* Install device tree */ efi_status_t efi_install_fdt(void *fdt); +/* Install initrd */ +efi_status_t efi_install_initrd(void *initrd, size_t initd_sz); /* Execute loaded UEFI image */ efi_status_t do_bootefi_exec(efi_handle_t handle, void *load_options); /* Run loaded UEFI image with given fdt */ diff --git a/include/uthread.h b/include/uthread.h index 89fa552a6f6..11a19aa9488 100644 --- a/include/uthread.h +++ b/include/uthread.h @@ -51,7 +51,10 @@ struct uthread { }; /** - * Internal state of a struct uthread_mutex + * enum uthread_mutex_state - internal state of a struct uthread_mutex + * + * @UTHREAD_MUTEX_UNLOCKED: mutex has no owner + * @UTHREAD_MUTEX_LOCKED: mutex has one owner */ enum uthread_mutex_state { UTHREAD_MUTEX_UNLOCKED = 0, @@ -59,7 +62,9 @@ enum uthread_mutex_state { }; /** - * Uthread mutex + * struct uthread_mutex - a mutex object + * + * @state: the internal state of the mutex */ struct uthread_mutex { enum uthread_mutex_state state; diff --git a/lib/efi_loader/efi_bootbin.c b/lib/efi_loader/efi_bootbin.c index d0f7da309ce..94ba7c5589b 100644 --- a/lib/efi_loader/efi_bootbin.c +++ b/lib/efi_loader/efi_bootbin.c @@ -215,12 +215,11 @@ out: * Return: status code */ static efi_status_t efi_binary_run_dp(void *image, size_t size, void *fdt, - void *initrd, size_t initd_sz, + void *initrd, size_t initrd_sz, struct efi_device_path *dp_dev, struct efi_device_path *dp_img) { efi_status_t ret; - struct efi_device_path *dp_initrd; /* Initialize EFI drivers */ ret = efi_init_obj_list(); @@ -234,11 +233,7 @@ static efi_status_t efi_binary_run_dp(void *image, size_t size, void *fdt, if (ret != EFI_SUCCESS) return ret; - dp_initrd = efi_dp_from_mem(EFI_LOADER_DATA, (uintptr_t)initrd, initd_sz); - if (!dp_initrd) - return EFI_OUT_OF_RESOURCES; - - ret = efi_initrd_register(dp_initrd); + ret = efi_install_initrd(initrd, initrd_sz); if (ret != EFI_SUCCESS) return ret; diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 3936139ca41..19fb5d03fec 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -623,6 +623,35 @@ efi_status_t efi_install_fdt(void *fdt) } /** + * efi_install_initrd() - install initrd + * + * Install the initrd located at @initrd using the EFI_LOAD_FILE2 + * protocol. + * + * @initrd: address of initrd or NULL if none is provided + * @initrd_sz: size of initrd + * Return: status code + */ +efi_status_t efi_install_initrd(void *initrd, size_t initd_sz) +{ + efi_status_t ret; + struct efi_device_path *dp_initrd; + + if (!initrd) + return EFI_SUCCESS; + + dp_initrd = efi_dp_from_mem(EFI_LOADER_DATA, (uintptr_t)initrd, initd_sz); + if (!dp_initrd) + return EFI_OUT_OF_RESOURCES; + + ret = efi_initrd_register(dp_initrd); + if (ret != EFI_SUCCESS) + efi_free_pool(dp_initrd); + + return ret; +} + +/** * do_bootefi_exec() - execute EFI binary * * The image indicated by @handle is started. When it returns the allocated |