Sat Dec 19 21:54:00 2020 UTC ()
implement boot -d for arm64.

could be done at the end of initarm() except it hangs currently.
this gets you a db> prompt before devices are configured.

ok @skrll.


(mrg)
diff -r1.22 -r1.23 src/sys/arch/evbarm/evbarm/autoconf.c

cvs diff -r1.22 -r1.23 src/sys/arch/evbarm/evbarm/autoconf.c (expand / switch to unified diff)

--- src/sys/arch/evbarm/evbarm/autoconf.c 2018/08/27 09:52:16 1.22
+++ src/sys/arch/evbarm/evbarm/autoconf.c 2020/12/19 21:54:00 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: autoconf.c,v 1.22 2018/08/27 09:52:16 jmcneill Exp $ */ 1/* $NetBSD: autoconf.c,v 1.23 2020/12/19 21:54:00 mrg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas <matt@3am-software.com>. 8 * by Matt Thomas <matt@3am-software.com>.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,29 +20,30 @@ @@ -20,29 +20,30 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.22 2018/08/27 09:52:16 jmcneill Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.23 2020/12/19 21:54:00 mrg Exp $");
34 34
35#include "opt_md.h" 35#include "opt_md.h"
 36#include "opt_ddb.h"
36 37
37#include <sys/param.h> 38#include <sys/param.h>
38#include <sys/systm.h> 39#include <sys/systm.h>
39#include <sys/reboot.h> 40#include <sys/reboot.h>
40#include <sys/disklabel.h> 41#include <sys/disklabel.h>
41#include <sys/device.h> 42#include <sys/device.h>
42#include <sys/conf.h> 43#include <sys/conf.h>
43#include <sys/kernel.h> 44#include <sys/kernel.h>
44#include <sys/kmem.h> 45#include <sys/kmem.h>
45 46
46#include <machine/autoconf.h> 47#include <machine/autoconf.h>
47#include <machine/intr.h> 48#include <machine/intr.h>
48#include <machine/bootconfig.h> 49#include <machine/bootconfig.h>
@@ -161,26 +162,33 @@ cpu_rootconf(void) @@ -161,26 +162,33 @@ cpu_rootconf(void)
161 162
162/* 163/*
163 * void cpu_configure() 164 * void cpu_configure()
164 * 165 *
165 * Configure all the root devices 166 * Configure all the root devices
166 * The root devices are expected to configure their own children 167 * The root devices are expected to configure their own children
167 */ 168 */
168void 169void
169cpu_configure(void) 170cpu_configure(void)
170{ 171{
171 struct mainbus_attach_args maa; 172 struct mainbus_attach_args maa;
172 struct cfdata *cf; 173 struct cfdata *cf;
173 174
 175#ifdef DDB
 176 if (boothowto & RB_KDB) {
 177 printf("Entering DDB...\n");
 178 cpu_Debugger();
 179 }
 180#endif
 181
174 (void) splhigh(); 182 (void) splhigh();
175 183
176 for (cf = &cfdata[0]; cf->cf_name; cf++) { 184 for (cf = &cfdata[0]; cf->cf_name; cf++) {
177 if (cf->cf_pspec == NULL) { 185 if (cf->cf_pspec == NULL) {
178 maa.ma_name = cf->cf_name; 186 maa.ma_name = cf->cf_name;
179 if (config_rootfound(cf->cf_name, &maa) != NULL) 187 if (config_rootfound(cf->cf_name, &maa) != NULL)
180 break; 188 break;
181 } 189 }
182 } 190 }
183 191
184 /* Time to start taking interrupts so lets open the flood gates .... */ 192 /* Time to start taking interrupts so lets open the flood gates .... */
185 spl0(); 193 spl0();
186} 194}