qemu-e2k/include/hw
Clement Deschamps 45c078f163 hw/arm/boot: Set NSACR.{CP11, CP10} in dummy SMC setup routine
The boot.c code usually puts the CPU into NS mode directly when it is
booting a kernel.  Since fc1120a7f5 this has included a
requirement to set NSACR to give NS state access to the FPU; we fixed
that for the usual code path in ece628fcf6.  However, it is also
possible for a board model to request an alternative mode of booting,
where its 'board_setup' code hook runs in Secure state and is
responsible for doing the S->NS transition after it has done whatever
work it must do in Secure state.  In this situation the board_setup
code now also needs to update NSACR.

This affects all boards which set info->secure_board_setup, which is
currently the 'raspi' and 'highbank' families.  They both use the
common arm_write_secure_board_setup_dummy_smc().

Set the NSACR CP11 and CP10 bits in the code written by that
function, to allow FPU access in Non-Secure state when using dummy
SMC setup routine.  Otherwise an AArch32 kernel booted on the
highbank or raspi boards will UNDEF as soon as it tries to use the
FPU.

Update the comment describing secure_board_setup to note the new
requirements on users of it.

This fixes a kernel panic when booting raspbian on raspi2.

Successfully tested with:
  2017-01-11-raspbian-jessie-lite.img
  2018-11-13-raspbian-stretch-lite.img
  2019-07-10-raspbian-buster-lite.img

Fixes: fc1120a7f5
Signed-off-by: Clement Deschamps <clement.deschamps@greensocs.com>
Tested-by: Laurent Bonnans <laurent.bonnans@here.com>
Message-id: 20191104151137.81931-1-clement.deschamps@greensocs.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: updated comment to boot.h to note new requirement on
 users of secure_board_setup; edited/rewrote commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-11 13:44:16 +00:00
..
acpi piix4: Add a MC146818 RTC Controller as specified in datasheet 2019-11-05 23:33:12 +01:00
adc
arm hw/arm/boot: Set NSACR.{CP11, CP10} in dummy SMC setup routine 2019-11-11 13:44:16 +00:00
audio
block block: Support providing LCHS from user 2019-10-31 11:47:11 -04:00
char
core Remove unassigned_access CPU hook 2019-11-11 13:44:16 +00:00
cpu
cris
display hw/m68k: add Nubus macfb video card 2019-10-28 19:06:49 +01:00
dma
firmware
gpio
hyperv
i2c aspeed/i2c: Add AST2600 support 2019-10-15 18:09:04 +01:00
i386 hw/pci-host/piix: Move i440FX declarations to hw/pci-host/i440fx.h 2019-11-05 23:33:12 +01:00
ide
input
intc
ipack
ipmi ipmi: Allow a size value to be passed for I/O space 2019-09-20 14:08:10 -05:00
isa piix4: Rename PIIX4 object to piix4-isa 2019-11-05 23:33:12 +01:00
kvm
lm32
m68k
mem
mips
misc hw/m68k: implement ADB bus support for via 2019-10-28 19:06:45 +01:00
net aspeed: add support for the Aspeed MII controller of the AST2600 2019-10-15 18:09:05 +01:00
nubus hw/m68k: add Nubus support 2019-10-28 19:06:47 +01:00
nvram fw_cfg: add "modify" functions for all types 2019-10-22 09:39:54 +02:00
pci pci: mark devices partially unplugged 2019-10-29 18:55:26 -04:00
pci-bridge
pci-host hw/pci-host/i440fx: Remove the last PIIX3 traces 2019-11-05 23:33:12 +01:00
ppc spapr/xive: Set the OS CAM line at reset 2019-10-24 13:34:15 +11:00
rdma
riscv riscv/virt: Add the PFlash CFI01 device 2019-10-28 07:47:28 -07:00
rtc Merge commit 'df84f17' into HEAD 2019-10-26 15:38:02 +02:00
s390x
scsi scsi: Propagate unrealize() callback to scsi-hd 2019-10-31 11:47:25 -04:00
sd hw/sd/sdhci: Add dummy Samsung SDHCI controller 2019-10-22 17:44:00 +01:00
semihosting
sh4
southbridge hw/pci-host/piix: Extract PIIX3 functions to hw/isa/piix3.c 2019-11-05 23:33:12 +01:00
sparc
ssi aspeed/smc: Introduce segment operations 2019-10-15 18:09:04 +01:00
timer Fix typos and docs, trivial changes and RTC devices split 2019-10-25 14:17:08 +01:00
tricore
unicore32
usb
vfio vfio: Turn the container error into an Error handle 2019-10-04 18:49:18 +02:00
virtio virtio: notify virtqueue via host notifier when available 2019-11-06 06:35:00 -05:00
watchdog hw: wdt_aspeed: Add AST2600 support 2019-10-15 18:09:04 +01:00
xen global: Squash 'the the' 2019-11-06 17:19:40 +01:00
xtensa
boards.h numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node 2019-10-15 18:18:08 -03:00
bt.h
elf_ops.h
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h Revert "irq: introduce qemu_irq_proxy()" 2019-11-05 23:33:12 +01:00
loader-fit.h
loader.h
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h ptimer: Remove old ptimer_init_with_bh() API 2019-11-11 13:44:16 +00:00
qdev-core.h migration: allow unplug during migration for failover devices 2019-10-29 18:55:26 -04:00
qdev-dma.h
qdev-properties.h qdev: Add a no default uuid property 2019-09-20 14:09:02 -05:00
register.h
registerfields.h
stream.h
sysbus.h
usb.h