Add code to identify the CPUs on arm64 systems. The primary CPU is attached
authorkettenis <kettenis@openbsd.org>
Thu, 27 Apr 2017 10:23:19 +0000 (10:23 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 27 Apr 2017 10:23:19 +0000 (10:23 +0000)
commit3f1731310f2625bad45b67b7c7026a9ff2a4f1e1
tree3918d5571d341f95b9bd3feb10cfe822712bbf66
parentf63ef27043beeace0dfd226bc6f578bc9f0708d6
Add code to identify the CPUs on arm64 systems.  The primary CPU is attached
and identified early on.  For the secondary CPUs this happens late, such that
the drivers we need to spin up CPUs, such as psci(4), will be available.

This also fixes some code in simplebus(4) where the return value of
OF_getprop() was not properly checked.

Heavily based on an earlier diff from drahn@.

ok drahn@, jsg@
sys/arch/arm64/arm64/cpu.c [new file with mode: 0644]
sys/arch/arm64/conf/GENERIC
sys/arch/arm64/conf/RAMDISK
sys/arch/arm64/conf/files.arm64
sys/arch/arm64/dev/mainbus.c
sys/arch/arm64/dev/mainbus.h
sys/arch/arm64/dev/simplebus.c
sys/arch/arm64/include/armreg.h