diff options
author | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-05-23 11:00:04 +0100 |
---|---|---|
committer | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-05-23 11:00:04 +0100 |
commit | db0de0eb50db3712b271a7a4ef8ca494ab79bffa (patch) | |
tree | 03809d832bf357a05a4449e5b35c121c2bcab9d7 /include/common/asm_macros.S | |
parent | 3ea8540d3c582787218a8c621c36d1468e9dea93 (diff) | |
parent | dbad1bacba0a7adfd3c7c559f0fd0805087aeddd (diff) |
Merge pull request #99 from vikramkanigiri:vk/tf-issues-133_V3
Diffstat (limited to 'include/common/asm_macros.S')
-rw-r--r-- | include/common/asm_macros.S | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/common/asm_macros.S b/include/common/asm_macros.S index 3dbd9f2a..2bccf581 100644 --- a/include/common/asm_macros.S +++ b/include/common/asm_macros.S @@ -88,6 +88,41 @@ \_name: .endm + /* --------------------------------------------- + * Find the type of reset and jump to handler + * if present. If the handler is null then it is + * a cold boot. The primary cpu will set up the + * platform while the secondaries wait for + * their turn to be woken up + * --------------------------------------------- + */ + .macro wait_for_entrypoint +wait_for_entrypoint: + mrs x0, mpidr_el1 + bl platform_get_entrypoint + cbnz x0, do_warm_boot + mrs x0, mpidr_el1 + bl platform_is_primary_cpu + cbnz x0, do_cold_boot + + /* --------------------------------------------- + * Perform any platform specific secondary cpu + * actions + * --------------------------------------------- + */ + bl plat_secondary_cold_boot_setup + b wait_for_entrypoint + + do_warm_boot: + /* --------------------------------------------- + * Jump to BL31 for all warm boot init. + * --------------------------------------------- + */ + blr x0 + + do_cold_boot: + .endm + /* * This macro declares an array of 1 or more stacks, properly * aligned and in the requested section |