bootwrapper: Fix check for architected timer

We need to set the flags when checking the feature register.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
bootwrapper: Enable non-secure access to the CCI

We boot the kernel in non-secure mode and by default access to
the CCI device is not enabled for non-secure access, so we must
enable this if we want Linux to manage CPU hotplug on big.LITTLE
models.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
bootwrapper: CPU hotplug aware boot protocol

To enable CPU hotplug the need to provide some boot code at the reset
vector and which survives after the kernel has booted without being
overwritten. We achieve this by the getting the linker script to place
the code in boot.S at address zero. This now means we can delete the
code that relocates the secondary CPU pen code to "a location less
likely to be overridden".

We then modify the boot protocol slightly to allow hot-plugging of any
CPU, including CPU #0, when the system is already booted. This is done
by checking if SYS_FLAGS is already set before the normal check for CPU0
and the boot-or-wait decision made.

This patch is based on work by Nicolas Pitre.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>