hw/arm/raspi: Don't do board-setup or secure-boot for raspi3
For the rpi1 and 2 we want to boot the Linux kernel via some custom setup code that makes sure that the SMC instruction acts as a no-op, because it's used for cache maintenance. The rpi3 boots AArch64 kernels, which don't need SMC for cache maintenance and always expect to be booted non-secure. Don't fill in the aarch32-specific parts of the binfo struct. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180313153458.26822-2-peter.maydell@linaro.org
This commit is contained in:
parent
46d3fb634c
commit
01e02f5aa7
|
@ -82,10 +82,19 @@ static void setup_boot(MachineState *machine, int version, size_t ram_size)
|
||||||
binfo.board_id = raspi_boardid[version];
|
binfo.board_id = raspi_boardid[version];
|
||||||
binfo.ram_size = ram_size;
|
binfo.ram_size = ram_size;
|
||||||
binfo.nb_cpus = smp_cpus;
|
binfo.nb_cpus = smp_cpus;
|
||||||
binfo.board_setup_addr = BOARDSETUP_ADDR;
|
|
||||||
binfo.write_board_setup = write_board_setup;
|
if (version <= 2) {
|
||||||
binfo.secure_board_setup = true;
|
/* The rpi1 and 2 require some custom setup code to run in Secure
|
||||||
binfo.secure_boot = true;
|
* mode before booting a kernel (to set up the SMC vectors so
|
||||||
|
* that we get a no-op SMC; this is used by Linux to call the
|
||||||
|
* firmware for some cache maintenance operations.
|
||||||
|
* The rpi3 doesn't need this.
|
||||||
|
*/
|
||||||
|
binfo.board_setup_addr = BOARDSETUP_ADDR;
|
||||||
|
binfo.write_board_setup = write_board_setup;
|
||||||
|
binfo.secure_board_setup = true;
|
||||||
|
binfo.secure_boot = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* Pi2 and Pi3 requires SMP setup */
|
/* Pi2 and Pi3 requires SMP setup */
|
||||||
if (version >= 2) {
|
if (version >= 2) {
|
||||||
|
|
Loading…
Reference in a new issue