mostly converted sbmips -> evbmips. the SBMIPS kernel builds fully

sans disksubr.c.  intr.h does not need any additional fixes now,
only disklabel.h.

also test-built some other mips kernels.
This commit is contained in:
mrg 2017-07-24 09:56:45 +00:00
parent 70e231c947
commit 7ed56e8c18
23 changed files with 100 additions and 63 deletions

View File

@ -1,10 +1,10 @@
# $NetBSD: SBMIPS,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $
# $NetBSD: SBMIPS,v 1.2 2017/07/24 09:56:45 mrg Exp $
include "arch/sbmips/conf/std.sbmips"
include "arch/evbmips/conf/std.sbmips"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.1.1.1 $"
#ident "GENERIC-$Revision: 1.2 $"
#options LOCKDEBUG # XXX XXX XXX XXX
#options DEBUG # extra kernel debugging support

View File

@ -1,5 +1,6 @@
# $NetBSD: SBMIPS.MP,v 1.2 2017/07/24 09:56:45 mrg Exp $
include "arch/sbmips/conf/GENERIC"
include "arch/evbmips/conf/SBMIPS"
options MULTIPROCESSOR
options LOCKDEBUG

View File

@ -1,5 +1,6 @@
# $NetBSD: SBMIPS64,v 1.2 2017/07/24 09:56:45 mrg Exp $
include "arch/sbmips/conf/GENERIC"
include "arch/evbmips/conf/SBMIPS"
makeoptions LP64="yes"
options EXEC_ELF64

View File

@ -1,5 +1,6 @@
# $NetBSD: SBMIPS64.MP,v 1.2 2017/07/24 09:56:45 mrg Exp $
include "arch/sbmips/conf/GENERIC64"
include "arch/evbmips/conf/SBMIPS64"
options MULTIPROCESSOR
options LOCKDEBUG

View File

@ -1,17 +1,16 @@
# $NetBSD: files.sbmips,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $
# $NetBSD: files.sbmips,v 1.2 2017/07/24 09:56:45 mrg Exp $
maxpartitions 8
maxusers 1 8 64
#maxusers 1 8 64
file arch/sbmips/sbmips/autoconf.c
file arch/sbmips/sbmips/machdep.c
file arch/sbmips/sbmips/console.c
file arch/sbmips/sbmips/disksubr.c
file arch/sbmips/sbmips/systemsw.c
file dev/cons.c
file arch/evbmips/sbmips/autoconf.c
file arch/evbmips/sbmips/machdep.c
file arch/evbmips/sbmips/console.c
file arch/evbmips/sbmips/disksubr.c
file arch/evbmips/sbmips/systemsw.c
file arch/sbmips/sbmips/sb1250_icu.c
file arch/evbmips/sbmips/sb1250_icu.c
file arch/mips/cfe/cfe_api.c
file arch/mips/mips/mips3_clock.c
@ -51,7 +50,7 @@ file arch/alpha/isa/isapnp_machdep.c isapnp
# PCI Bus support
# include "dev/pci/files.pci" XXX SEE ABOVE
#file arch/sbmips/dev/pci/pci_machdep.c pci
#file arch/evbmips/sbmips/pci_machdep.c pci
# XXXCGD macdep pci files
# XXXX pcic here because it needs to be late. The catch: pcic needs
@ -103,11 +102,9 @@ include "dev/usb/files.usb"
# Ze Big Bus: main system bus
device zbbus {[busid = -1]}
attach zbbus at root
file arch/sbmips/sbmips/zbbus.c zbbus
file arch/evbmips/sbmips/zbbus.c zbbus
# CPUs
device cpu
attach cpu at zbbus
file arch/sbmips/sbmips/cpu.c cpu
include "arch/evbmips/conf/majors.evbmips"
file arch/evbmips/sbmips/cpu.c cpu

View File

@ -1,6 +1,6 @@
# $NetBSD: std.sbmips,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $
# $NetBSD: std.sbmips,v 1.2 2017/07/24 09:56:45 mrg Exp $
machine sbmips mips
machine evbmips mips
include "conf/std" # MI standard options
options MIPS64
@ -13,4 +13,5 @@ makeoptions CFLAGS+="-mips64 -mtune=sb1"
makeoptions AFLAGS+="-mips64 -mtune=sb1"
makeoptions DEFTEXTADDR="0x80001000"
include "arch/evbmips/conf/files.sbmips"
include "arch/mips/conf/files.sibyte"

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.9 2011/03/18 16:30:01 tsutsui Exp $ */
/* $NetBSD: param.h,v 1.10 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -55,7 +55,7 @@
#ifndef _LOCORE
void delay(int n);
#define DELAY delay
#define DELAY(x) delay(x)
#include <machine/intr.h>

View File

@ -1,6 +1,13 @@
/* $NetBSD: pci_machdep.h,v 1.2 2002/03/18 10:10:15 simonb Exp $ */
/* $NetBSD: pci_machdep.h,v 1.3 2017/07/24 09:56:45 mrg Exp $ */
#ifdef _KERNEL_OPT
#include "opt_cputype.h"
#endif
/* SB1 PCI isn't finished */
#ifndef MIPS64_SB1
/* Before including <mips/pci_machdep.h> */
#define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
#endif
#include <mips/pci_machdep.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: cpu.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#include "opt_multiprocessor.h"
@ -46,7 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
#include <mips/locore.h>
#include <mips/cache.h>
#include <sbmips/cpuvar.h>
#include <evbmips/sbmips/cpuvar.h>
#include <evbmips/sbmips/systemsw.h>
#include <mips/sibyte/include/zbbusvar.h>
#include <mips/sibyte/include/sb1250_regs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@ -93,13 +93,14 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
#include <mips/cfe/cfe_api.h>
#include <sbmips/autoconf.h>
#include <sbmips/swarm.h>
#include <evbmips/sbmips/autoconf.h>
#include <evbmips/sbmips/swarm.h>
#include <evbmips/sbmips/systemsw.h>
#if 0 /* XXXCGD */
#include <sbmips/nvram.h>
#include <evbmips/sbmips/nvram.h>
#endif /* XXXCGD */
#include <sbmips/leds.h>
#include <evbmips/sbmips/leds.h>
#include <mips/sibyte/dev/sbbuswatchvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtc.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: rtc.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -46,8 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
#include <dev/clock_subr.h>
#include <sbmips/swarm.h>
#include <sbmips/systemsw.h>
#include <evbmips/sbmips/swarm.h>
#include <evbmips/sbmips/systemsw.h>
#include <mips/locore.h>
#include <mips/sibyte/dev/sbsmbusvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sb1250_icu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: sb1250_icu.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#define __INTR_PRIVATE
@ -49,8 +49,8 @@ __KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $
#include <mips/locore.h>
#include <sbmips/cpuvar.h>
#include <sbmips/systemsw.h>
#include <evbmips/sbmips/cpuvar.h>
#include <evbmips/sbmips/systemsw.h>
#include <mips/sibyte/include/sb1250_regs.h>
#include <mips/sibyte/include/sb1250_int.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: systemsw.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: systemsw.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: systemsw.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: systemsw.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: systemsw.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $")
#include <mips/locore.h>
#include <mips/mips3_clock.h>
#include <sbmips/systemsw.h>
#include <evbmips/sbmips/systemsw.h>
/* trivial functions for function switch */

View File

@ -1,4 +1,4 @@
/* $NetBSD: zbbus.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
/* $NetBSD: zbbus.c,v 1.2 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zbbus.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: zbbus.c,v 1.2 2017/07/24 09:56:45 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -41,6 +41,8 @@ __KERNEL_RCSID(0, "$NetBSD: zbbus.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $");
#include <mips/sibyte/include/zbbusvar.h>
#include <evbmips/sbmips/systemsw.h>
#include "locators.h"
static int zbbus_match(device_t, cfdata_t, void *);

View File

@ -66,6 +66,7 @@ attach xirtc at smbus
device m41t81rtc
attach m41t81rtc at smbus
file arch/sbmips/sbmips/rtc.c xirtc | m41t81rtc
# XXX move to arch/mips/sibyte?
file arch/evbmips/sbmips/rtc.c xirtc | m41t81rtc
file arch/mips/sibyte/dev/sbbuswatch.c

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.69 2016/12/23 07:15:27 cherry Exp $ */
/* $NetBSD: pmap.h,v 1.70 2017/07/24 09:56:45 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@ -77,6 +77,7 @@
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
#include "opt_uvmhist.h"
#include "opt_cputype.h"
#endif
#include <sys/evcnt.h>
@ -242,5 +243,16 @@ vaddr_t pmap_md_pool_phystov(paddr_t);
#define POOL_VTOPHYS(va) pmap_md_pool_vtophys((vaddr_t)va)
#define POOL_PHYSTOV(pa) pmap_md_pool_phystov((paddr_t)pa)
#ifdef MIPS64_SB1
/* uncached accesses are bad; all accesses should be cached (and coherent) */
#undef PMAP_PAGEIDLEZERO
#define PMAP_PAGEIDLEZERO(pa) (pmap_zero_page(pa), true)
int sbmips_cca_for_pa(paddr_t);
#undef PMAP_CCA_FOR_PA
#define PMAP_CCA_FOR_PA(pa) sbmips_cca_for_pa(pa)
#endif
#endif /* _KERNEL */
#endif /* _MIPS_PMAP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbbuswatch.c,v 1.3 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbbuswatch.c,v 1.4 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright (c) 2010, The NetBSD Foundation, Inc. All rights reserved.
*
@ -38,6 +38,8 @@
#include <mips/sibyte/include/sb1250_regs.h>
#include <mips/sibyte/dev/sbbuswatchvar.h>
#include <evbmips/sbmips/systemsw.h>
#define READ_REG(rp) mips3_ld((register_t)(rp))
#define WRITE_REG(rp, val) mips3_sd((register_t)(rp), (val))

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbmac.c,v 1.48 2017/02/20 08:25:57 ozaki-r Exp $ */
/* $NetBSD: sbmac.c,v 1.49 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright 2000, 2001, 2004
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.48 2017/02/20 08:25:57 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.49 2017/07/24 09:56:46 mrg Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -75,6 +75,8 @@ __KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.48 2017/02/20 08:25:57 ozaki-r Exp $");
#include <mips/sibyte/include/sb1250_dma.h>
#include <mips/sibyte/include/sb1250_scd.h>
#include <evbmips/sbmips/systemsw.h>
/* Simple types */
typedef u_long sbmac_port_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbscn.c,v 1.43 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -109,7 +109,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.43 2017/07/24 09:56:46 mrg Exp $");
#define SBSCN_DEBUG
@ -146,6 +146,8 @@ __KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $");
#include <dev/cons.h>
#include <mips/locore.h>
#include <evbmips/sbmips/systemsw.h>
void sbscn_attach_channel(struct sbscn_softc *sc, int chan, int intr);
#if defined(DDB) || defined(KGDB)
static void sbscn_enable_debugport(struct sbscn_channel *ch);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbsmbus.c,v 1.16 2011/07/10 23:32:03 matt Exp $ */
/* $NetBSD: sbsmbus.c,v 1.17 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -36,13 +36,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbsmbus.c,v 1.16 2011/07/10 23:32:03 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbsmbus.c,v 1.17 2017/07/24 09:56:46 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
#include <sys/systm.h>
#include <sbmips/swarm.h>
#include <evbmips/sbmips/swarm.h>
#include <mips/sibyte/dev/sbsmbusvar.h>
#include <dev/smbus/x1241reg.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbtimer.c,v 1.20 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbtimer.c,v 1.21 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbtimer.c,v 1.20 2016/07/21 17:02:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbtimer.c,v 1.21 2017/07/24 09:56:46 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -47,6 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: sbtimer.c,v 1.20 2016/07/21 17:02:47 christos Exp $"
#include <mips/sibyte/include/sb1250_scd.h>
#include <mips/sibyte/dev/sbscdvar.h>
#include <evbmips/sbmips/systemsw.h>
struct sbtimer_softc {
device_t sc_dev;
void *sc_intrhand;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbwdog.c,v 1.14 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbwdog.c,v 1.15 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbwdog.c,v 1.14 2016/07/21 17:02:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbwdog.c,v 1.15 2017/07/24 09:56:46 mrg Exp $");
#include "locators.h"
@ -57,6 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: sbwdog.c,v 1.14 2016/07/21 17:02:47 christos Exp $")
#include <mips/sibyte/include/sb1250_scd.h>
#include <mips/sibyte/dev/sbscdvar.h>
#include <evbmips/sbmips/systemsw.h>
#define SBWDOG_DEFAULT_PERIOD 5 /* Default to 5 seconds. */
struct sbwdog_softc {

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbbrz_pci.c,v 1.7 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbbrz_pci.c,v 1.8 2017/07/24 09:56:46 mrg Exp $ */
/*
* Copyright 2000, 2001
@ -64,7 +64,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.7 2016/07/21 17:02:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.8 2017/07/24 09:56:46 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -81,6 +81,8 @@ __KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.7 2016/07/21 17:02:47 christos Exp $
#include <mips/sibyte/include/sb1250_int.h>
#include <mips/sibyte/pci/sbbrzvar.h>
#include <evbmips/sbmips/systemsw.h>
void sbbrz_pci_attach_hook(device_t, device_t,
struct pcibus_attach_args *);
static int sbbrz_pci_bus_maxdevs(void *, int);