]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/powernv: Add OPAL takeover from PowerVM
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 19 Sep 2011 18:27:58 +0000 (18:27 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 20 Sep 2011 06:09:47 +0000 (16:09 +1000)
commit27f4488872d9ef2a4b9aa2be58fb0789d6c0ba84
tree204a12bb5b61beda8df7b5eaa78499191cb28721
parent344eb010b2e399069bac474a9fd0ba04908a2601
powerpc/powernv: Add OPAL takeover from PowerVM

On machines supporting the OPAL firmware version 1, the system
is initially booted under pHyp. We then use a special hypercall
to verify if OPAL is available and if it is, we then trigger
a "takeover" which disables pHyp and loads the OPAL runtime
firmware, giving control to the kernel in hypervisor mode.

This patch add the necessary code to detect that the OPAL takeover
capability is present when running under PowerVM (aka pHyp) and
perform said takeover to get hypervisor control of the processor.

To perform the takeover, we must first use RTAS (within Open
Firmware runtime environment) to start all processors & threads,
in order to give control to OPAL on all of them. We then call
the takeover hypercall on everybody, OPAL will re-enter the kernel
main entry point passing it a flat device-tree.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/opal.h [new file with mode: 0644]
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/prom_init_check.sh
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/opal-takeover.S [new file with mode: 0644]