Adapt secondary CPU bootstrapping to the new generic startup code.
This commit is contained in:
parent
3b2af45d20
commit
09f9468abf
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cycv_platform.c,v 1.8 2018/11/02 18:11:24 aymeric Exp $ */
|
||||
/* $NetBSD: cycv_platform.c,v 1.9 2018/11/02 18:13:11 aymeric Exp $ */
|
||||
|
||||
/* This file is in the public domain. */
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
|||
#include "opt_multiprocessor.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.8 2018/11/02 18:11:24 aymeric Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.9 2018/11/02 18:13:11 aymeric Exp $");
|
||||
|
||||
#define _ARM32_BUS_DMA_PRIVATE
|
||||
#include <sys/param.h>
|
||||
|
@ -72,6 +72,8 @@ cycv_platform_bootstrap(void)
|
|||
#if NARML2CC > 0
|
||||
arml2cc_init(bst, bsh_l2c, 0);
|
||||
#endif
|
||||
|
||||
arm_fdt_cpu_bootstrap();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -103,11 +105,16 @@ cycv_mpstart(void)
|
|||
htole32(0xea000000 | ((startfunc - 8 - 0x0) >> 2));
|
||||
pmap_unmap_chunk(kernel_l1pt.pv_va, CYCV_SDRAM_VBASE, L1_S_SIZE);
|
||||
|
||||
arm_cpu_max = 2;
|
||||
|
||||
bus_space_write_4(bst, bsh_rst, CYCV_RSTMGR_MPUMODRST,
|
||||
bus_space_read_4(bst, bsh_rst, CYCV_RSTMGR_MPUMODRST) &
|
||||
~CYCV_RSTMGR_MPUMODRST_CPU1);
|
||||
|
||||
/* Wait for secondary processor to start */
|
||||
for (int i = 0x10000000; i > 0; i--) {
|
||||
membar_consumer();
|
||||
if (arm_cpu_hatched == (1 << 1))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue