Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips Major merge forward from matt-nb5-mips64.
details: https://anonhg.NetBSD.org/src/rev/3aab344183bc
branches: trunk
changeset: 762362:3aab344183bc
user: matt <matt%NetBSD.org@localhost>
date: Sun Feb 20 07:45:46 2011 +0000
description:
Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU
diffstat:
sys/arch/mips/conf/Makefile.mips | 6 +-
sys/arch/mips/conf/files.mips | 27 +-
sys/arch/mips/conf/files.rmixl | 64 +-
sys/arch/mips/conf/files.sibyte | 17 +-
sys/arch/mips/conf/kern.ldscript | 10 +-
sys/arch/mips/include/asm.h | 140 +-
sys/arch/mips/include/bus_dma.h | 201 +-
sys/arch/mips/include/cache.h | 105 +-
sys/arch/mips/include/cache_r5900.h | 140 -
sys/arch/mips/include/cpu.h | 296 +-
sys/arch/mips/include/cpu_counter.h | 15 +-
sys/arch/mips/include/cpuregs.h | 96 +-
sys/arch/mips/include/cpuset.h | 50 +
sys/arch/mips/include/db_machdep.h | 30 +-
sys/arch/mips/include/elf_machdep.h | 23 +-
sys/arch/mips/include/intr.h | 154 +
sys/arch/mips/include/lock.h | 13 +-
sys/arch/mips/include/locore.h | 454 +-
sys/arch/mips/include/mcontext.h | 4 +-
sys/arch/mips/include/mips1_pte.h | 6 +-
sys/arch/mips/include/mips3_pte.h | 22 +-
sys/arch/mips/include/mips_opcode.h | 20 +-
sys/arch/mips/include/mips_param.h | 16 +-
sys/arch/mips/include/mutex.h | 7 +-
sys/arch/mips/include/pcb.h | 13 +-
sys/arch/mips/include/pmap.h | 238 +-
sys/arch/mips/include/proc.h | 27 +-
sys/arch/mips/include/profile.h | 10 +-
sys/arch/mips/include/pte.h | 74 +-
sys/arch/mips/include/r5900regs.h | 55 -
sys/arch/mips/include/rwlock.h | 9 +-
sys/arch/mips/include/softintr.h | 39 -
sys/arch/mips/include/sysarch.h | 2 +-
sys/arch/mips/include/trap.h | 10 +-
sys/arch/mips/include/types.h | 32 +-
sys/arch/mips/include/vmparam.h | 52 +-
sys/arch/mips/mips/bds_emul.S | 629 +++
sys/arch/mips/mips/bus_dma.c | 730 +++-
sys/arch/mips/mips/bus_space_alignstride_chipdep.c | 19 +-
sys/arch/mips/mips/cache.c | 746 ++--
sys/arch/mips/mips/cache_mipsNN.c | 58 +-
sys/arch/mips/mips/cache_r10k.c | 37 +-
sys/arch/mips/mips/cache_r3k.c | 12 +-
sys/arch/mips/mips/cache_r4k.c | 46 +-
sys/arch/mips/mips/cache_r5900.c | 224 -
sys/arch/mips/mips/cache_r5k.c | 28 +-
sys/arch/mips/mips/cache_r5k_subr.S | 4 +-
sys/arch/mips/mips/cache_tx39.c | 18 +-
sys/arch/mips/mips/compat_13_machdep.c | 21 +-
sys/arch/mips/mips/compat_16_machdep.c | 73 +-
sys/arch/mips/mips/core_machdep.c | 11 +-
sys/arch/mips/mips/cpu_exec.c | 53 +-
sys/arch/mips/mips/cpu_subr.c | 960 +++++
sys/arch/mips/mips/db_interface.c | 661 ++-
sys/arch/mips/mips/db_trace.c | 119 +-
sys/arch/mips/mips/fp.S | 1952 ++++-------
sys/arch/mips/mips/genassym.cf | 203 +-
sys/arch/mips/mips/ipifuncs.c | 150 +
sys/arch/mips/mips/kgdb_machdep.c | 76 +-
sys/arch/mips/mips/lock_stubs.S | 427 +-
sys/arch/mips/mips/lock_stubs_llsc.S | 376 ++
sys/arch/mips/mips/lock_stubs_ras.S | 464 ++
sys/arch/mips/mips/locore.S | 582 +-
sys/arch/mips/mips/locore_mips1.S | 2286 ++++++++-----
sys/arch/mips/mips/locore_mips3.S | 188 +-
sys/arch/mips/mips/mem.c | 29 +-
sys/arch/mips/mips/mips32_subr.S | 8 +-
sys/arch/mips/mips/mips3_clock.c | 7 +-
sys/arch/mips/mips/mips3_clockintr.c | 42 +-
sys/arch/mips/mips/mips3_subr.S | 8 +-
sys/arch/mips/mips/mips5900_subr.S | 48 -
sys/arch/mips/mips/mips64_subr.S | 8 +-
sys/arch/mips/mips/mipsX_subr.S | 3337 ++++++++++---------
sys/arch/mips/mips/mips_emul.c | 618 +-
sys/arch/mips/mips/mips_fixup.c | 526 +++
sys/arch/mips/mips/mips_fpu.c | 353 ++
sys/arch/mips/mips/mips_fputrap.c | 34 +-
sys/arch/mips/mips/mips_machdep.c | 1496 +++-----
sys/arch/mips/mips/mips_mcclock.c | 8 +-
sys/arch/mips/mips/mips_mcclock.h | 7 +-
sys/arch/mips/mips/mips_softint.c | 146 +
sys/arch/mips/mips/netbsd32_machdep.c | 33 +-
sys/arch/mips/mips/pmap.c | 2063 +++++++-----
sys/arch/mips/mips/pmap_segtab.c | 492 ++
sys/arch/mips/mips/pmap_tlb.c | 1044 ++++++
sys/arch/mips/mips/process_machdep.c | 28 +-
sys/arch/mips/mips/sig_machdep.c | 58 +-
sys/arch/mips/mips/softintr.c | 82 -
sys/arch/mips/mips/spl.S | 399 ++
sys/arch/mips/mips/spl_stubs.c | 154 +
sys/arch/mips/mips/sys_machdep.c | 4 +-
sys/arch/mips/mips/syscall.c | 58 +-
sys/arch/mips/mips/trap.c | 617 ++-
sys/arch/mips/mips/vm_machdep.c | 208 +-
sys/arch/mips/mips/wired_map.c | 8 +-
95 files changed, 16456 insertions(+), 9097 deletions(-)
diffs (truncated from 34752 to 300 lines):
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/conf/Makefile.mips
--- a/sys/arch/mips/conf/Makefile.mips Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/conf/Makefile.mips Sun Feb 20 07:45:46 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.mips,v 1.57 2011/02/01 06:18:40 matt Exp $
+# $NetBSD: Makefile.mips,v 1.58 2011/02/20 07:45:46 matt Exp $
# Makefile for NetBSD
#
@@ -46,7 +46,7 @@
CPPFLAGS+= -D${MACHINE}
DEFGP?= -G 0
GP?= ${DEFGP}
-CFLAGS+= ${GP} -mno-abicalls -msoft-float -ffixed-23
+CFLAGS+= ${GP} -mno-abicalls -msoft-float -ffixed-24
.if defined(LP64) && ${LP64} == "yes"
.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
CFLAGS+= -msym32 -mabi=64
@@ -117,7 +117,7 @@
# various assembly files that depend on assym.h
copy.o fp.o locore.o locore_mips1.o locore_mips3.o: assym.h
-lock_stubs.o mips32_subr.o mips3_subr.o mips5900_subr.o: assym.h
+lock_stubs.o mips32_subr.o mips3_subr.o: assym.h
mips64_subr.o mipsX_subr.o sigcode.o: assym.h
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/conf/files.mips
--- a/sys/arch/mips/conf/files.mips Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/conf/files.mips Sun Feb 20 07:45:46 2011 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: files.mips,v 1.64 2009/12/14 00:46:04 matt Exp $
+# $NetBSD: files.mips,v 1.65 2011/02/20 07:45:46 matt Exp $
#
-defflag opt_cputype.h NOFPU
+defflag opt_cputype.h NOFPU FPEMUL
MIPS64_SB1
MIPS3_LOONGSON2F
ENABLE_MIPS_16KB_PAGE
@@ -10,7 +10,6 @@
# MIPS1 MIPS2 MIPS3 MIPS4 MIPS5
# MIPS32 MIPS64
# MIPS3_4100
- # MIPS3_5900
# ENABLE_MIPS_4KB_PAGE
# ENABLE_MIPS_TX3900
# ENABLE_MIPS_R4700
@@ -20,27 +19,37 @@
defflag opt_mips3_wired.h ENABLE_MIPS3_WIRED_MAP
defflag opt_ddb.h DDB_TRACE
+defflag opt_ddb.h MIPS_DDB_WATCH
file arch/mips/mips/locore_mips1.S mips1
file arch/mips/mips/locore_mips3.S mips3 | mips4 | mips32 | mips64
-file arch/mips/mips/mips3_subr.S (mips3 | mips4) & !mips3_5900
-file arch/mips/mips/mips5900_subr.S mips3 & mips3_5900
+file arch/mips/mips/mips3_subr.S mips3 | mips4
file arch/mips/mips/mips32_subr.S mips32
file arch/mips/mips/mips64_subr.S mips64
file arch/mips/mips/sigcode.S
file arch/mips/mips/copy.S
-file arch/mips/mips/lock_stubs.S
+file arch/mips/mips/lock_stubs_llsc.S multiprocessor
+file arch/mips/mips/lock_stubs_ras.S
+file arch/mips/mips/spl.S
+file arch/mips/mips/spl_stubs.c
file arch/mips/mips/core_machdep.c coredump
+file arch/mips/mips/cpu_subr.c
file arch/mips/mips/db_disasm.c ddb
file arch/mips/mips/db_interface.c ddb | kgdb
file arch/mips/mips/db_trace.c ddb
+file arch/mips/mips/ipifuncs.c multiprocessor
file arch/mips/mips/kgdb_machdep.c kgdb
file arch/mips/mips/mem.c
file arch/mips/mips/pmap.c
+file arch/mips/mips/pmap_segtab.c
+file arch/mips/mips/pmap_tlb.c
file arch/mips/mips/trap.c # trap handlers
file arch/mips/mips/syscall.c # syscall entries
+file arch/mips/mips/mips_fixup.c
+file arch/mips/mips/mips_fpu.c
file arch/mips/mips/mips_machdep.c
+file arch/mips/mips/mips_softint.c
file arch/mips/mips/sig_machdep.c # signal delivery
file arch/mips/mips/sys_machdep.c
file arch/mips/mips/vm_machdep.c
@@ -57,13 +66,13 @@
file arch/mips/mips/cache_r4k.c mips3 | mips4
file arch/mips/mips/cache_r5k.c mips3 | mips4
file arch/mips/mips/cache_r5k_subr.S mips3 | mips4
-file arch/mips/mips/cache_r5900.c mips3 & mips3_5900
file arch/mips/mips/cache_r10k.c (mips3|mips4) & enable_mips4_cache_r10k
file arch/mips/mips/cache_mipsNN.c mips32 | mips64
-file arch/mips/mips/mips_fputrap.c softfloat | !nofpu
+file arch/mips/mips/mips_fputrap.c !nofpu | fpemul
file arch/mips/mips/mips_emul.c
-file arch/mips/mips/fp.S softfloat | !nofpu
+file arch/mips/mips/fp.S !nofpu | fpemul
+file arch/mips/mips/bds_emul.S fpemul
file arch/mips/mips/procfs_machdep.c procfs
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/conf/files.rmixl
--- a/sys/arch/mips/conf/files.rmixl Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/conf/files.rmixl Sun Feb 20 07:45:46 2011 +0000
@@ -1,29 +1,67 @@
-# $NetBSD: files.rmixl,v 1.2 2009/12/14 00:46:04 matt Exp $
+# $NetBSD: files.rmixl,v 1.3 2011/02/20 07:45:46 matt Exp $
#
# Configuration info for RMI XLP, XLR, XLS
#
+file arch/mips/rmi/rmixl_spl.S
file arch/mips/rmi/rmixl_intr.c
file arch/mips/rmi/rmixl_subr.S
+file arch/mips/rmi/rmixl_fmn.c
+
+
+# node is parent of one or more core
+device cpunode { [ core = -1] }
+attach cpunode at mainbus with cpunode_rmixl
+file arch/mips/rmi/rmixl_cpunode.c cpunode_rmixl
+
+# core is parent of one or more cpu
+device cpucore { [ thread = -1] }
+attach cpucore at cpunode with cpucore_rmixl
+file arch/mips/rmi/rmixl_cpucore.c cpucore_rmixl
+
+# each cpu is a RMI 'thread' or 'vCPU'
+device cpu
+attach cpu at cpucore with cpu_rmixl
+file arch/mips/rmi/rmixl_cpu.c cpu_rmixl
# OBIO: offsets are from System Bridge Controller base
-define obio { [addr=-1], [size=0], [intr=-1], [mult=1] }
+define obio { [addr=-1], [size=0], [intr=-1], [tmsk=-1], [mult=1] }
device obio: obio
-attach obio at mainbus
-file arch/mips/rmi/rmixl_obio.c obio needs-count
-file arch/mips/rmi/rmixl_obio_space.c obio
-file arch/mips/rmi/rmixl_pcie_cfg_space.c pci
-file arch/mips/rmi/rmixl_pcie_ecfg_space.c pci
-file arch/mips/rmi/rmixl_pcie_io_space.c pci
-file arch/mips/rmi/rmixl_pcie_mem_space.c pci
+attach obio at cpunode with obio_rmixl
+file arch/mips/rmi/rmixl_obio.c obio_rmixl
+file arch/mips/rmi/rmixl_obio_eb_space.c obio_rmixl
+file arch/mips/rmi/rmixl_obio_el_space.c obio_rmixl
+file arch/mips/rmi/rmixl_pci_cfg_space.c rmixl_pcix | rmixl_pcie
+file arch/mips/rmi/rmixl_pci_ecfg_space.c rmixl_pcie
+file arch/mips/rmi/rmixl_pci_io_space.c rmixl_pcix | rmixl_pcie
+file arch/mips/rmi/rmixl_pci_mem_space.c rmixl_pcix | rmixl_pcie
# NS16550 compatible serial ports
-attach com at obio with rmixl_com
-file arch/mips/rmi/rmixl_com.c rmixl_com
+attach com at obio with com_rmixl
+file arch/mips/rmi/rmixl_com.c com_rmixl
defparam opt_com.h CONSADDR CONSFREQ CONSPEED CONMODE
-# PCI
+# PCIe
device rmixl_pcie: pcibus
attach rmixl_pcie at obio
-file arch/mips/rmi/rmixl_pcie.c rmixl_pcie
+file arch/mips/rmi/rmixl_pcie.c rmixl_pcie needs-flag
+
+# PCI-X
+device rmixl_pcix: pcibus
+attach rmixl_pcix at obio
+file arch/mips/rmi/rmixl_pcix.c rmixl_pcix needs-flag
+# On-chip USB interface
+define rmixl_usbi { [addr=-1], [size=-1], [intr=-1] }
+device rmixl_usbi: rmixl_usbi
+attach rmixl_usbi at obio
+file arch/mips/rmi/rmixl_usbi.c rmixl_usbi
+
+# On-chip OHCI USB controller
+attach ohci at rmixl_usbi with rmixl_ohci
+file arch/mips/rmi/rmixl_ohci.c ohci
+
+# On-chip EHCI USB controller
+attach ehci at rmixl_usbi with rmixl_ehci
+file arch/mips/rmi/rmixl_ehci.c ehci
+
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/conf/files.sibyte
--- a/sys/arch/mips/conf/files.sibyte Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/conf/files.sibyte Sun Feb 20 07:45:46 2011 +0000
@@ -3,12 +3,12 @@
###
# System Control/Debug
-device sbscd {[addr = -1], [intr[2] = {-1,-1}]}
+device sbscd {[offset = -1], [intr[2] = {-1,-1}]}
attach sbscd at zbbus
file arch/mips/sibyte/dev/sbscd.c sbscd
# On-board I/O (slow I/O bridge)
-device sbobio {[addr = -1], [intr[2] = {-1,-1}]}
+device sbobio {[offset = -1], [intr[2] = {-1,-1}]}
attach sbobio at zbbus
file arch/mips/sibyte/dev/sbobio.c sbobio
@@ -22,16 +22,9 @@
attach sbbrz at zbbus
file arch/mips/sibyte/pci/sbbrz.c sbbrz
file arch/mips/sibyte/pci/sbbrz_pci.c sbbrz
+file arch/mips/sibyte/pci/sbbrz_bus_io.c sbbrz
+file arch/mips/sibyte/pci/sbbrz_bus_mem.c sbbrz
-# Instantiated SB-1250 PCI Host bridge
-device sbpcihb
-attach sbpcihb at pci
-file arch/mips/sibyte/pci/sbpcihb.c sbpcihb
-
-# SB-1250 LDT Host bridge (acts like ppb)
-device sbldthb: pcibus
-attach sbldthb at pci
-file arch/mips/sibyte/pci/sbldthb.c sbldthb
# sbscd children
@@ -74,3 +67,5 @@
attach m41t81rtc at smbus
file arch/sbmips/sbmips/rtc.c xirtc | m41t81rtc
+
+file arch/mips/sibyte/dev/sbbuswatch.c
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/conf/kern.ldscript
--- a/sys/arch/mips/conf/kern.ldscript Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/conf/kern.ldscript Sun Feb 20 07:45:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript,v 1.5 2006/08/27 04:48:44 tsutsui Exp $ */
+/* $NetBSD: kern.ldscript,v 1.6 2011/02/20 07:45:46 matt Exp $ */
/* ldscript for NetBSD/mips kernels and LKMs */
OUTPUT_ARCH(mips)
@@ -15,6 +15,9 @@
{
_ftext = . ;
*(.text)
+ __stub_start = . ;
+ *(.stub*)
+ __stub_end = . ;
*(.gnu.warning)
} =0
_etext = .;
@@ -27,6 +30,11 @@
_fdata = . ;
*(.data)
CONSTRUCTORS
+ . = ALIGN(32); /* COHERENCY_UNIT */
+ *(.data.cacheline_aligned)
+ . = ALIGN(32); /* COHERENCY_UNIT */
+ *(.data.read_mostly)
+ . = ALIGN(32); /* COHERENCY_UNIT */
}
_gp = ALIGN(16) + 0x7ff0;
.lit8 : { *(.lit8) }
diff -r 1f9f46142b48 -r 3aab344183bc sys/arch/mips/include/asm.h
--- a/sys/arch/mips/include/asm.h Sun Feb 20 07:40:24 2011 +0000
+++ b/sys/arch/mips/include/asm.h Sun Feb 20 07:45:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.43 2010/12/20 21:11:25 joerg Exp $ */
+/* $NetBSD: asm.h,v 1.44 2011/02/20 07:45:47 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -54,7 +54,7 @@
#ifndef _MIPS_ASM_H
#define _MIPS_ASM_H
-#include <machine/cdefs.h> /* for API selection */
+#include <sys/cdefs.h> /* for API selection */
#include <mips/regdef.h>
/*
@@ -87,11 +87,7 @@
#ifdef __NO_LEADING_UNDERSCORES__
# define _C_LABEL(x) x
#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
+# define _C_LABEL(x) __CONCAT(_,x)
#endif
#ifdef USE_AENT
@@ -117,17 +113,35 @@
/*
* WARN_REFERENCES: create a warning if the specified symbol is referenced.
*/
-#ifdef __STDC__
Home |
Main Index |
Thread Index |
Old Index