Module Name: src Committed By: thorpej Date: Sat Mar 2 20:15:33 UTC 2024
Modified Files: src/sys/arch/alpha/alpha: cpuconf.c src/sys/arch/alpha/conf: GENERIC INSTALL files.alpha src/sys/arch/alpha/include: prom.h Added Files: src/sys/arch/alpha/alpha: dec_kn7aa.c Log Message: Add the basic framework for the DEC KN7AA ("Ruby") systems -- DEC 7000 and DEC 10000. This is a work-in-progress, but this should be sufficient for the system to boot, using the PROM console routines (and then proceed to not find any devices because we don't yet support the "Laser System Bus"). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/alpha/cpuconf.c cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/alpha/dec_kn7aa.c cvs rdiff -u -r1.419 -r1.420 src/sys/arch/alpha/conf/GENERIC cvs rdiff -u -r1.118 -r1.119 src/sys/arch/alpha/conf/INSTALL cvs rdiff -u -r1.195 -r1.196 src/sys/arch/alpha/conf/files.alpha cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/include/prom.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/alpha/cpuconf.c diff -u src/sys/arch/alpha/alpha/cpuconf.c:1.37 src/sys/arch/alpha/alpha/cpuconf.c:1.38 --- src/sys/arch/alpha/alpha/cpuconf.c:1.37 Mon Apr 8 00:47:21 2019 +++ src/sys/arch/alpha/alpha/cpuconf.c Sat Mar 2 20:15:33 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.c,v 1.37 2019/04/08 00:47:21 thorpej Exp $ */ +/* $NetBSD: cpuconf.c,v 1.38 2024/03/02 20:15:33 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpuconf.c,v 1.37 2019/04/08 00:47:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpuconf.c,v 1.38 2024/03/02 20:15:33 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -68,6 +68,13 @@ __KERNEL_RCSID(0, "$NetBSD: cpuconf.c,v #include <machine/cpuconf.h> #include <machine/rpb.h> +#include "opt_dec_kn7aa.h" +#ifdef DEC_KN7AA +extern void dec_kn7aa_init(void); +#else +#define dec_kn7aa_init platform_not_configured +#endif + #include "opt_dec_3000_500.h" #ifdef DEC_3000_500 extern void dec_3000_500_init(void); @@ -208,7 +215,7 @@ extern void dec_2000_300_init(void); static const struct cpuinit cpuinit[] = { cpu_notsupp(ST_ADU, "Alpha Demo Unit"), cpu_notsupp(ST_DEC_4000, "DEC 4000 (``Cobra'')"), - cpu_notsupp(ST_DEC_7000, "DEC 7000 (``Ruby'')"), + cpu_init(ST_DEC_7000, dec_kn7aa_init, "DEC_KN7AA"), cpu_init(ST_DEC_3000_500, dec_3000_500_init, "DEC_3000_500"), cpu_init(ST_DEC_2000_300, dec_2000_300_init, "DEC_2000_300"), cpu_init(ST_DEC_3000_300, dec_3000_300_init, "DEC_3000_300"), Index: src/sys/arch/alpha/conf/GENERIC diff -u src/sys/arch/alpha/conf/GENERIC:1.419 src/sys/arch/alpha/conf/GENERIC:1.420 --- src/sys/arch/alpha/conf/GENERIC:1.419 Sun Dec 17 18:48:53 2023 +++ src/sys/arch/alpha/conf/GENERIC Sat Mar 2 20:15:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.419 2023/12/17 18:48:53 andvar Exp $ +# $NetBSD: GENERIC,v 1.420 2024/03/02 20:15:33 thorpej Exp $ # # This machine description file is used to generate the default NetBSD # kernel. @@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident "GENERIC-$Revision: 1.419 $" +ident "GENERIC-$Revision: 1.420 $" maxusers 32 @@ -34,6 +34,7 @@ options DEC_AXPPCI_33 # NoName: AXPpci3 options DEC_EB164 # EB164: AlphaPC 164 options DEC_EB64PLUS # EB64+: AlphaPC 64, etc. options DEC_KN20AA # KN20AA: AlphaStation 500 and 600 +options DEC_KN7AA # KN7AA: DEC 7000 and 10000 options DEC_KN8AE # KN8AE: AlphaServer 8200 and 8400 options DEC_KN300 # KN300: AlphaServer 4100 and 1200 options DEC_550 # Miata: Digital Personal Workstation Index: src/sys/arch/alpha/conf/INSTALL diff -u src/sys/arch/alpha/conf/INSTALL:1.118 src/sys/arch/alpha/conf/INSTALL:1.119 --- src/sys/arch/alpha/conf/INSTALL:1.118 Fri Jul 23 14:38:58 2021 +++ src/sys/arch/alpha/conf/INSTALL Sat Mar 2 20:15:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.118 2021/07/23 14:38:58 thorpej Exp $ +# $NetBSD: INSTALL,v 1.119 2024/03/02 20:15:33 thorpej Exp $ # # Alpha INSTALL kernel. @@ -29,6 +29,7 @@ options DEC_AXPPCI_33 # NoName: AXPpci3 options DEC_EB164 # EB164: AlphaPC 164 options DEC_EB64PLUS # EB64+: AlphaPC 64, etc. options DEC_KN20AA # KN20AA: AlphaStation 500 and 600 +options DEC_KN7AA # KN7AA: DEC 7000 and 10000 options DEC_KN8AE # KN8AE: AlphaServer 8200 and 8400 options DEC_KN300 # KN300: AlphaServer 4100 and 1200 options DEC_550 # Miata: Digital Personal Workstation Index: src/sys/arch/alpha/conf/files.alpha diff -u src/sys/arch/alpha/conf/files.alpha:1.195 src/sys/arch/alpha/conf/files.alpha:1.196 --- src/sys/arch/alpha/conf/files.alpha:1.195 Sat Mar 2 19:57:57 2024 +++ src/sys/arch/alpha/conf/files.alpha Sat Mar 2 20:15:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.alpha,v 1.195 2024/03/02 19:57:57 thorpej Exp $ +# $NetBSD: files.alpha,v 1.196 2024/03/02 20:15:33 thorpej Exp $ # # alpha-specific configuration info @@ -19,6 +19,7 @@ defflag DEC_AXPPCI_33 # NoName: AXPpci3 defflag DEC_EB164 # EB164: AlphaPC 164 defflag DEC_EB64PLUS # EB64+: AlphaPC 64, etc. defflag DEC_KN20AA # KN20AA: AlphaStation 500 and 600 +defflag DEC_KN7AA # KN7AA: DEC 7000 and 10000 defflag DEC_KN8AE # KN8AE: AlphaServer 8200 and 8400 defflag DEC_KN300 # KN300: AlphaServer 4X00 defflag DEC_1000 # Mikasa etc: AlphaServer 1000 @@ -416,6 +417,7 @@ file arch/alpha/alpha/dec_eb164.c dec_e file arch/alpha/alpha/dec_eb64plus.c dec_eb64plus file arch/alpha/alpha/dec_eb66.c dec_eb66 file arch/alpha/alpha/dec_kn20aa.c dec_kn20aa +file arch/alpha/alpha/dec_kn7aa.c dec_kn7aa file arch/alpha/alpha/dec_kn8ae.c dec_kn8ae file arch/alpha/alpha/dec_kn300.c dec_kn300 file arch/alpha/alpha/api_up1000.c api_up1000 Index: src/sys/arch/alpha/include/prom.h diff -u src/sys/arch/alpha/include/prom.h:1.16 src/sys/arch/alpha/include/prom.h:1.17 --- src/sys/arch/alpha/include/prom.h:1.16 Sat Oct 3 17:31:46 2020 +++ src/sys/arch/alpha/include/prom.h Sat Mar 2 20:15:33 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: prom.h,v 1.16 2020/10/03 17:31:46 thorpej Exp $ */ +/* $NetBSD: prom.h,v 1.17 2024/03/02 20:15:33 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -121,10 +121,11 @@ void hwrpb_restart_setup(void); #ifdef _KERNEL #ifdef _KERNEL_OPT +#include "opt_dec_kn7aa.h" #include "opt_dec_kn8ae.h" -#if defined(DEC_KN8AE) -#define _PROM_MAY_USE_PROM_CONSOLE +#if defined(DEC_KN7AA) || defined(DEC_KN8AE) +#define _PROM_MAY_USE_PROM_CONSOLE /* XXX */ #endif /* DEC_KN8AE */ #endif /* _KERNEL_OPT */ Added files: Index: src/sys/arch/alpha/alpha/dec_kn7aa.c diff -u /dev/null src/sys/arch/alpha/alpha/dec_kn7aa.c:1.1 --- /dev/null Sat Mar 2 20:15:33 2024 +++ src/sys/arch/alpha/alpha/dec_kn7aa.c Sat Mar 2 20:15:33 2024 @@ -0,0 +1,84 @@ +/* $NetBSD: dec_kn7aa.c,v 1.1 2024/03/02 20:15:33 thorpej Exp $ */ + +/*- + * Copyright (c) 2024 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ + +__KERNEL_RCSID(0, "$NetBSD: dec_kn7aa.c,v 1.1 2024/03/02 20:15:33 thorpej Exp $"); + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/device.h> +#include <sys/conf.h> + +#include <dev/cons.h> + +#include <machine/rpb.h> +#include <machine/autoconf.h> +#include <machine/cpuconf.h> + +void dec_kn7aa_init(void); +void dec_kn7aa_cons_init(void); +static void dec_kn7aa_device_register(device_t, void *); + +const struct alpha_variation_table dec_kn7aa_variations[] = { + { 0, "DEC 7000" }, + { 1, "DEC 10000" }, + { 0, NULL }, +}; + +void +dec_kn7aa_init(void) +{ + uint64_t variation; + + platform.family = "KN7AA (\"Ruby\")"; + + if ((platform.model = alpha_dsr_sysname()) == NULL) { + variation = hwrpb->rpb_variation & SV_ST_MASK; + if ((platform.model = alpha_variation_name(variation, + dec_kn7aa_variations)) == NULL) + platform.model = alpha_unknown_sysname(); + } + + platform.iobus = "lsb"; + platform.cons_init = dec_kn7aa_cons_init; + platform.device_register = dec_kn7aa_device_register; +} + +void +dec_kn7aa_cons_init(void) +{ +} + +static void +dec_kn7aa_device_register(device_t dev, void *aux) +{ +}