[PATCH 0/2] ARM: Introduce function to switch to hypervisor mode

On SoCs like DRA7, OMAP5 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.

Patch 1: Introduces a weak function which can be overridden specific to
SoCs to switch to hypervisor mode.

Patch 2: overrides weak function in patch 1 switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for hypervisor mode on OMAP5 based SoCs.

Based on top of http://patchwork.dal.design.ti.com/patch/24937/.

Keerthy (2):
  ARM: Introduce function to switch to hypervisor mode
  ARM: OMAP5+: Override switch_to_hypervisor function

arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 21 +++++++++++++++++++++
arch/arm/cpu/armv7/start.S | 15 +++++++++++++++
arch/arm/include/asm/system.h | 1 +
3 files changed, 37 insertions(+)

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.

Signed-off-by: Keerthy <j-keerthy@ti.com>

Override the switch_to_hypervisor function to switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for HYP mode.

Based on the work done by Jonathan Bergsagel jbergsagel@ti.com.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>

On SoCs like DRA7, OMAP5 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.

Patch 1: Introduces a weak function which can be overridden specific to
SoCs to switch to hypervisor mode.

Patch 2: overrides weak function in patch 1 switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for hypervisor mode on OMAP5 based SoCs.

Based on top of http://patchwork.dal.design.ti.com/patch/24937/.

Please ignore the above link.

Based on:

http://lists.denx.de/pipermail/u-boot/2016-June/258300.html

On SoCs like DRA7, OMAP5 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.

Patch 1: Introduces a weak function which can be overridden specific to
SoCs to switch to hypervisor mode.

Patch 2: overrides weak function in patch 1 switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for hypervisor mode on OMAP5 based SoCs.

Based on top of http://patchwork.dal.design.ti.com/patch/24937/.

Please ignore the above link.

Based on:

[U-Boot] [RFC 3/9] arm: omap-common: add secure smc entry

Please resubmit fixed patch. Also please add your full name as the
author, otherwise the patches can not be applied.

See ie. Code of (still) uncertain origin [LWN.net]

Hi Marek,

On SoCs like DRA7, OMAP5 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.

Patch 1: Introduces a weak function which can be overridden specific to
SoCs to switch to hypervisor mode.

Patch 2: overrides weak function in patch 1 switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for hypervisor mode on OMAP5 based SoCs.

Based on top of http://patchwork.dal.design.ti.com/patch/24937/.

Please ignore the above link.

Based on:

[U-Boot] [RFC 3/9] arm: omap-common: add secure smc entry

Please resubmit fixed patch. Also please add your full name as the
author, otherwise the patches can not be applied.

I will re-submit the patches with the correct link.

Coming to the name. My full name is Keerthy and that is the name i have been using for the last 4-5 years in the mailing list. I do not have a surname.

- Keerthy

That's just a bad link in 0/2, nothing to resubmit.

Reviewed-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>