Commit feb5aa24 authored by Wayne Lin's avatar Wayne Lin Committed by Varun Wadekar
Browse files

spd: trusty: pass boot params to the Trusted OS



This patch passes the boot parameters, provided by the previous
bootloader, to the Trusted OS via X0, X1 and X2.

Original change by: Wayne Lin <wlin@nvidia.com>

Change-Id: I2039612a8a8226158babfd505ce8c31c4212319c
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 64c07d0f
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
/* macro to check if Hypervisor is enabled in the HCR_EL2 register */ /* macro to check if Hypervisor is enabled in the HCR_EL2 register */
#define HYP_ENABLE_FLAG 0x286001 #define HYP_ENABLE_FLAG 0x286001
/* length of Trusty's input parameters (in bytes) */
#define TRUSTY_PARAMS_LEN_BYTES (4096*2)
struct trusty_stack { struct trusty_stack {
uint8_t space[PLATFORM_STACK_SIZE] __aligned(16); uint8_t space[PLATFORM_STACK_SIZE] __aligned(16);
}; };
...@@ -414,6 +417,14 @@ static int32_t trusty_setup(void) ...@@ -414,6 +417,14 @@ static int32_t trusty_setup(void)
DAIF_IRQ_BIT | DAIF_IRQ_BIT |
DAIF_ABT_BIT); DAIF_ABT_BIT);
/*
* arg0 = TZDRAM aperture available for BL32
* arg1 = BL32 boot params
* arg2 = BL32 boot params length
*/
ep_info->args.arg1 = ep_info->args.arg2;
ep_info->args.arg2 = TRUSTY_PARAMS_LEN_BYTES;
bl31_register_bl32_init(trusty_init); bl31_register_bl32_init(trusty_init);
psci_register_spd_pm_hook(&trusty_pm); psci_register_spd_pm_hook(&trusty_pm);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment