ARM: Introduce function to switch to hypervisor mode

On some of the SoCs one cannot enable hypervisor mode directly from the
u-boot because the ROM code puts the chip to supervisor mode after it
jumps to boot loader. Hence introduce a weak function which can be
overridden based on the SoC type and switch to hypervisor mode in a
custom way.

Cc: beagleboard-x15@googlegroups.com
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Keerthy
2016-09-14 10:43:32 +05:30
committed by Tom Rini
parent 60d42e9d51
commit d31d4a2d75
2 changed files with 25 additions and 0 deletions

View File

@@ -223,6 +223,10 @@ void __noreturn psci_system_reset(bool smc);
*/
void save_boot_params_ret(void);
#ifdef CONFIG_ARMV7_LPAE
void switch_to_hypervisor_ret(void);
#endif
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
#ifdef __ARM_ARCH_7A__