asm/head: set skiboot TOC in interrupt handler entry
asm/head: set skiboot TOC in interrupt handler entry

Some code runs with r2 not set to the skiboot TOC, for example the
secureboot CVC (see call_rom_entry). If a system reset or machine
check is taken at this time, the skiboot interrupt handler will
crash badly rather than report it.

So set the skiboot TOC into r2 in the interrupt entry code. r2 is
already saved and restored, so in the case of recoverable exceptions,
this will restore the correct r2 when returning to such code.

This issue was found by Stewart, and this patch is based on his
initial fix, with some modification.

Cc: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.ibm.com>
Signed-off-by: Nicholas Piggin <24829078df5003d9dd1dd871ca2aeb0b1cf95ef4@gmail.com>
Signed-off-by: Oliver O'Halloran <3dfaff8fa6ae977f042064a112a6aac576279b9b@gmail.com>

qemu/skiboot,qemu/skiboot,qemu/skiboot,legoater/skiboot,legoater/skiboot,legoater/skiboot,legoater/skiboot,shenki/skiboot,open-power/skiboot,shenki/skiboot,legoater/skiboot,open-power/skiboot,qemu/skiboot,open-power/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,open-power/skiboot,qemu/skiboot,open-power/skiboot