Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/altera Adapt secondary CPU bootstrapping to the...
details: https://anonhg.NetBSD.org/src/rev/cc2f964b9410
branches: trunk
changeset: 445563:cc2f964b9410
user: aymeric <aymeric%NetBSD.org@localhost>
date: Fri Nov 02 18:13:11 2018 +0000
description:
Adapt secondary CPU bootstrapping to the new generic startup code.
diffstat:
sys/arch/arm/altera/cycv_platform.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 41bf9221ca03 -r cc2f964b9410 sys/arch/arm/altera/cycv_platform.c
--- a/sys/arch/arm/altera/cycv_platform.c Fri Nov 02 18:11:24 2018 +0000
+++ b/sys/arch/arm/altera/cycv_platform.c Fri Nov 02 18:13:11 2018 +0000
@@ -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 @@
#if NARML2CC > 0
arml2cc_init(bst, bsh_l2c, 0);
#endif
+
+ arm_fdt_cpu_bootstrap();
}
static void
@@ -103,11 +105,16 @@
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
Home |
Main Index |
Thread Index |
Old Index