aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r--sys/sparc64/include/_align.h46
-rw-r--r--sys/sparc64/include/_bus.h40
-rw-r--r--sys/sparc64/include/_inttypes.h215
-rw-r--r--sys/sparc64/include/_limits.h87
-rw-r--r--sys/sparc64/include/_stdint.h160
-rw-r--r--sys/sparc64/include/_types.h102
-rw-r--r--sys/sparc64/include/asi.h262
-rw-r--r--sys/sparc64/include/asm.h128
-rw-r--r--sys/sparc64/include/asmacros.h226
-rw-r--r--sys/sparc64/include/atomic.h446
-rw-r--r--sys/sparc64/include/bus.h852
-rw-r--r--sys/sparc64/include/bus_common.h77
-rw-r--r--sys/sparc64/include/bus_dma.h221
-rw-r--r--sys/sparc64/include/bus_private.h82
-rw-r--r--sys/sparc64/include/cache.h129
-rw-r--r--sys/sparc64/include/ccr.h48
-rw-r--r--sys/sparc64/include/clock.h10
-rw-r--r--sys/sparc64/include/cmt.h41
-rw-r--r--sys/sparc64/include/counter.h98
-rw-r--r--sys/sparc64/include/cpu.h74
-rw-r--r--sys/sparc64/include/cpufunc.h272
-rw-r--r--sys/sparc64/include/db_machdep.h64
-rw-r--r--sys/sparc64/include/dcr.h72
-rw-r--r--sys/sparc64/include/dump.h68
-rw-r--r--sys/sparc64/include/efi.h14
-rw-r--r--sys/sparc64/include/elf.h84
-rw-r--r--sys/sparc64/include/endian.h126
-rw-r--r--sys/sparc64/include/exec.h36
-rw-r--r--sys/sparc64/include/fireplane.h42
-rw-r--r--sys/sparc64/include/float.h101
-rw-r--r--sys/sparc64/include/floatingpoint.h39
-rw-r--r--sys/sparc64/include/fp.h41
-rw-r--r--sys/sparc64/include/frame.h95
-rw-r--r--sys/sparc64/include/fsr.h116
-rw-r--r--sys/sparc64/include/gdb_machdep.h72
-rw-r--r--sys/sparc64/include/idprom.h64
-rw-r--r--sys/sparc64/include/ieee.h139
-rw-r--r--sys/sparc64/include/ieeefp.h37
-rw-r--r--sys/sparc64/include/in_cksum.h177
-rw-r--r--sys/sparc64/include/instr.h620
-rw-r--r--sys/sparc64/include/intr_machdep.h115
-rw-r--r--sys/sparc64/include/iommureg.h214
-rw-r--r--sys/sparc64/include/iommuvar.h115
-rw-r--r--sys/sparc64/include/jbus.h41
-rw-r--r--sys/sparc64/include/kdb.h59
-rw-r--r--sys/sparc64/include/kerneldump.h54
-rw-r--r--sys/sparc64/include/ktr.h101
-rw-r--r--sys/sparc64/include/limits.h43
-rw-r--r--sys/sparc64/include/lsu.h88
-rw-r--r--sys/sparc64/include/mcntl.h64
-rw-r--r--sys/sparc64/include/md_var.h80
-rw-r--r--sys/sparc64/include/memdev.h42
-rw-r--r--sys/sparc64/include/metadata.h47
-rw-r--r--sys/sparc64/include/nexusvar.h36
-rw-r--r--sys/sparc64/include/ofw_machdep.h50
-rw-r--r--sys/sparc64/include/ofw_mem.h48
-rw-r--r--sys/sparc64/include/ofw_nexus.h81
-rw-r--r--sys/sparc64/include/param.h155
-rw-r--r--sys/sparc64/include/pcb.h65
-rw-r--r--sys/sparc64/include/pcpu.h103
-rw-r--r--sys/sparc64/include/pcpu_aux.h50
-rw-r--r--sys/sparc64/include/pmap.h138
-rw-r--r--sys/sparc64/include/pmc_mdep.h28
-rw-r--r--sys/sparc64/include/proc.h80
-rw-r--r--sys/sparc64/include/procctl.h4
-rw-r--r--sys/sparc64/include/profile.h104
-rw-r--r--sys/sparc64/include/pstate.h65
-rw-r--r--sys/sparc64/include/ptrace.h38
-rw-r--r--sys/sparc64/include/reg.h121
-rw-r--r--sys/sparc64/include/reloc.h32
-rw-r--r--sys/sparc64/include/resource.h45
-rw-r--r--sys/sparc64/include/runq.h60
-rw-r--r--sys/sparc64/include/sc_machdep.h78
-rw-r--r--sys/sparc64/include/setjmp.h59
-rw-r--r--sys/sparc64/include/sf_buf.h37
-rw-r--r--sys/sparc64/include/sigframe.h42
-rw-r--r--sys/sparc64/include/signal.h49
-rw-r--r--sys/sparc64/include/smp.h404
-rw-r--r--sys/sparc64/include/stack.h42
-rw-r--r--sys/sparc64/include/stdarg.h39
-rw-r--r--sys/sparc64/include/sysarch.h76
-rw-r--r--sys/sparc64/include/tick.h39
-rw-r--r--sys/sparc64/include/tlb.h177
-rw-r--r--sys/sparc64/include/trap.h101
-rw-r--r--sys/sparc64/include/tsb.h97
-rw-r--r--sys/sparc64/include/tstate.h84
-rw-r--r--sys/sparc64/include/tte.h168
-rw-r--r--sys/sparc64/include/ucontext.h66
-rw-r--r--sys/sparc64/include/upa.h43
-rw-r--r--sys/sparc64/include/utrap.h112
-rw-r--r--sys/sparc64/include/vdso.h36
-rw-r--r--sys/sparc64/include/ver.h94
-rw-r--r--sys/sparc64/include/vm.h38
-rw-r--r--sys/sparc64/include/vmparam.h248
-rw-r--r--sys/sparc64/include/watch.h43
-rw-r--r--sys/sparc64/include/wstate.h68
96 files changed, 0 insertions, 10229 deletions
diff --git a/sys/sparc64/include/_align.h b/sys/sparc64/include/_align.h
deleted file mode 100644
index daf6de7c3524..000000000000
--- a/sys/sparc64/include/_align.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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 REGENTS 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 REGENTS 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.
- *
- * from: @(#)param.h 5.8 (Berkeley) 6/28/91
- * $FreeBSD$
- */
-
-#ifndef _SPARC64_INCLUDE__ALIGN_H_
-#define _SPARC64_INCLUDE__ALIGN_H_
-
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is unsigned int
- * and must be cast to any desired pointer type.
- */
-#define _ALIGNBYTES 0xf
-#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
-
-#endif /* !_SPARC64_INCLUDE__ALIGN_H_ */
diff --git a/sys/sparc64/include/_bus.h b/sys/sparc64/include/_bus.h
deleted file mode 100644
index e6b6101b9c54..000000000000
--- a/sys/sparc64/include/_bus.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2005 M. Warner Losh <imp@FreeBSD.org>
- *
- * 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,
- * without modification, immediately at the beginning of the file.
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef SPARC64_INCLUDE__BUS_H
-#define SPARC64_INCLUDE__BUS_H
-
-typedef u_long bus_addr_t;
-typedef u_long bus_size_t;
-typedef u_long bus_space_handle_t;
-typedef struct bus_space_tag *bus_space_tag_t;
-
-#endif /* SPARC64_INCLUDE__BUS_H */
diff --git a/sys/sparc64/include/_inttypes.h b/sys/sparc64/include/_inttypes.h
deleted file mode 100644
index 46c13582d70a..000000000000
--- a/sys/sparc64/include/_inttypes.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Klaus Klein.
- *
- * 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.
- *
- * From: $NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:36 martin Exp $
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_INTTYPES_H_
-#define _MACHINE_INTTYPES_H_
-
-/*
- * Macros for format specifiers.
- */
-
-/* fprintf(3) macros for signed integers. */
-
-#define PRId8 "d" /* int8_t */
-#define PRId16 "d" /* int16_t */
-#define PRId32 "d" /* int32_t */
-#define PRId64 "ld" /* int64_t */
-#define PRIdLEAST8 "d" /* int_least8_t */
-#define PRIdLEAST16 "d" /* int_least16_t */
-#define PRIdLEAST32 "d" /* int_least32_t */
-#define PRIdLEAST64 "ld" /* int_least64_t */
-#define PRIdFAST8 "d" /* int_fast8_t */
-#define PRIdFAST16 "d" /* int_fast16_t */
-#define PRIdFAST32 "d" /* int_fast32_t */
-#define PRIdFAST64 "ld" /* int_fast64_t */
-#define PRIdMAX "jd" /* intmax_t */
-#define PRIdPTR "ld" /* intptr_t */
-
-#define PRIi8 "i" /* int8_t */
-#define PRIi16 "i" /* int16_t */
-#define PRIi32 "i" /* int32_t */
-#define PRIi64 "li" /* int64_t */
-#define PRIiLEAST8 "i" /* int_least8_t */
-#define PRIiLEAST16 "i" /* int_least16_t */
-#define PRIiLEAST32 "i" /* int_least32_t */
-#define PRIiLEAST64 "li" /* int_least64_t */
-#define PRIiFAST8 "i" /* int_fast8_t */
-#define PRIiFAST16 "i" /* int_fast16_t */
-#define PRIiFAST32 "i" /* int_fast32_t */
-#define PRIiFAST64 "li" /* int_fast64_t */
-#define PRIiMAX "ji" /* intmax_t */
-#define PRIiPTR "li" /* intptr_t */
-
-/* fprintf(3) macros for unsigned integers. */
-
-#define PRIo8 "o" /* uint8_t */
-#define PRIo16 "o" /* uint16_t */
-#define PRIo32 "o" /* uint32_t */
-#define PRIo64 "lo" /* uint64_t */
-#define PRIoLEAST8 "o" /* uint_least8_t */
-#define PRIoLEAST16 "o" /* uint_least16_t */
-#define PRIoLEAST32 "o" /* uint_least32_t */
-#define PRIoLEAST64 "lo" /* uint_least64_t */
-#define PRIoFAST8 "o" /* uint_fast8_t */
-#define PRIoFAST16 "o" /* uint_fast16_t */
-#define PRIoFAST32 "o" /* uint_fast32_t */
-#define PRIoFAST64 "lo" /* uint_fast64_t */
-#define PRIoMAX "jo" /* uintmax_t */
-#define PRIoPTR "lo" /* uintptr_t */
-
-#define PRIu8 "u" /* uint8_t */
-#define PRIu16 "u" /* uint16_t */
-#define PRIu32 "u" /* uint32_t */
-#define PRIu64 "lu" /* uint64_t */
-#define PRIuLEAST8 "u" /* uint_least8_t */
-#define PRIuLEAST16 "u" /* uint_least16_t */
-#define PRIuLEAST32 "u" /* uint_least32_t */
-#define PRIuLEAST64 "lu" /* uint_least64_t */
-#define PRIuFAST8 "u" /* uint_fast8_t */
-#define PRIuFAST16 "u" /* uint_fast16_t */
-#define PRIuFAST32 "u" /* uint_fast32_t */
-#define PRIuFAST64 "lu" /* uint_fast64_t */
-#define PRIuMAX "ju" /* uintmax_t */
-#define PRIuPTR "lu" /* uintptr_t */
-
-#define PRIx8 "x" /* uint8_t */
-#define PRIx16 "x" /* uint16_t */
-#define PRIx32 "x" /* uint32_t */
-#define PRIx64 "lx" /* uint64_t */
-#define PRIxLEAST8 "x" /* uint_least8_t */
-#define PRIxLEAST16 "x" /* uint_least16_t */
-#define PRIxLEAST32 "x" /* uint_least32_t */
-#define PRIxLEAST64 "lx" /* uint_least64_t */
-#define PRIxFAST8 "x" /* uint_fast8_t */
-#define PRIxFAST16 "x" /* uint_fast16_t */
-#define PRIxFAST32 "x" /* uint_fast32_t */
-#define PRIxFAST64 "lx" /* uint_fast64_t */
-#define PRIxMAX "jx" /* uintmax_t */
-#define PRIxPTR "lx" /* uintptr_t */
-
-#define PRIX8 "X" /* uint8_t */
-#define PRIX16 "X" /* uint16_t */
-#define PRIX32 "X" /* uint32_t */
-#define PRIX64 "lX" /* uint64_t */
-#define PRIXLEAST8 "X" /* uint_least8_t */
-#define PRIXLEAST16 "X" /* uint_least16_t */
-#define PRIXLEAST32 "X" /* uint_least32_t */
-#define PRIXLEAST64 "lX" /* uint_least64_t */
-#define PRIXFAST8 "X" /* uint_fast8_t */
-#define PRIXFAST16 "X" /* uint_fast16_t */
-#define PRIXFAST32 "X" /* uint_fast32_t */
-#define PRIXFAST64 "lX" /* uint_fast64_t */
-#define PRIXMAX "jX" /* uintmax_t */
-#define PRIXPTR "lX" /* uintptr_t */
-
-/* fscanf(3) macros for signed integers. */
-
-#define SCNd8 "hhd" /* int8_t */
-#define SCNd16 "hd" /* int16_t */
-#define SCNd32 "d" /* int32_t */
-#define SCNd64 "ld" /* int64_t */
-#define SCNdLEAST8 "hhd" /* int_least8_t */
-#define SCNdLEAST16 "hd" /* int_least16_t */
-#define SCNdLEAST32 "d" /* int_least32_t */
-#define SCNdLEAST64 "ld" /* int_least64_t */
-#define SCNdFAST8 "d" /* int_fast8_t */
-#define SCNdFAST16 "d" /* int_fast16_t */
-#define SCNdFAST32 "d" /* int_fast32_t */
-#define SCNdFAST64 "ld" /* int_fast64_t */
-#define SCNdMAX "jd" /* intmax_t */
-#define SCNdPTR "ld" /* intptr_t */
-
-#define SCNi8 "hhi" /* int8_t */
-#define SCNi16 "hi" /* int16_t */
-#define SCNi32 "i" /* int32_t */
-#define SCNi64 "li" /* int64_t */
-#define SCNiLEAST8 "hhi" /* int_least8_t */
-#define SCNiLEAST16 "hi" /* int_least16_t */
-#define SCNiLEAST32 "i" /* int_least32_t */
-#define SCNiLEAST64 "li" /* int_least64_t */
-#define SCNiFAST8 "i" /* int_fast8_t */
-#define SCNiFAST16 "i" /* int_fast16_t */
-#define SCNiFAST32 "i" /* int_fast32_t */
-#define SCNiFAST64 "li" /* int_fast64_t */
-#define SCNiMAX "ji" /* intmax_t */
-#define SCNiPTR "li" /* intptr_t */
-
-/* fscanf(3) macros for unsigned integers. */
-
-#define SCNo8 "hho" /* uint8_t */
-#define SCNo16 "ho" /* uint16_t */
-#define SCNo32 "o" /* uint32_t */
-#define SCNo64 "lo" /* uint64_t */
-#define SCNoLEAST8 "hho" /* uint_least8_t */
-#define SCNoLEAST16 "ho" /* uint_least16_t */
-#define SCNoLEAST32 "o" /* uint_least32_t */
-#define SCNoLEAST64 "lo" /* uint_least64_t */
-#define SCNoFAST8 "o" /* uint_fast8_t */
-#define SCNoFAST16 "o" /* uint_fast16_t */
-#define SCNoFAST32 "o" /* uint_fast32_t */
-#define SCNoFAST64 "lo" /* uint_fast64_t */
-#define SCNoMAX "jo" /* uintmax_t */
-#define SCNoPTR "lo" /* uintptr_t */
-
-#define SCNu8 "hhu" /* uint8_t */
-#define SCNu16 "hu" /* uint16_t */
-#define SCNu32 "u" /* uint32_t */
-#define SCNu64 "lu" /* uint64_t */
-#define SCNuLEAST8 "hhu" /* uint_least8_t */
-#define SCNuLEAST16 "hu" /* uint_least16_t */
-#define SCNuLEAST32 "u" /* uint_least32_t */
-#define SCNuLEAST64 "lu" /* uint_least64_t */
-#define SCNuFAST8 "u" /* uint_fast8_t */
-#define SCNuFAST16 "u" /* uint_fast16_t */
-#define SCNuFAST32 "u" /* uint_fast32_t */
-#define SCNuFAST64 "lu" /* uint_fast64_t */
-#define SCNuMAX "ju" /* uintmax_t */
-#define SCNuPTR "lu" /* uintptr_t */
-
-#define SCNx8 "hhx" /* uint8_t */
-#define SCNx16 "hx" /* uint16_t */
-#define SCNx32 "x" /* uint32_t */
-#define SCNx64 "lx" /* uint64_t */
-#define SCNxLEAST8 "hhx" /* uint_least8_t */
-#define SCNxLEAST16 "hx" /* uint_least16_t */
-#define SCNxLEAST32 "x" /* uint_least32_t */
-#define SCNxLEAST64 "lx" /* uint_least64_t */
-#define SCNxFAST8 "x" /* uint_fast8_t */
-#define SCNxFAST16 "x" /* uint_fast16_t */
-#define SCNxFAST32 "x" /* uint_fast32_t */
-#define SCNxFAST64 "lx" /* uint_fast64_t */
-#define SCNxMAX "jx" /* uintmax_t */
-#define SCNxPTR "lx" /* uintptr_t */
-
-#endif /* !_MACHINE_INTTYPES_H_ */
diff --git a/sys/sparc64/include/_limits.h b/sys/sparc64/include/_limits.h
deleted file mode 100644
index 62ee07db3f60..000000000000
--- a/sys/sparc64/include/_limits.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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 REGENTS 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 REGENTS 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.
- *
- * @(#)limits.h 8.3 (Berkeley) 1/4/94
- * $FreeBSD$
- */
-
-#ifndef _MACHINE__LIMITS_H_
-#define _MACHINE__LIMITS_H_
-
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives. Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions. The subtraction for
- * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- */
-
-#define __CHAR_BIT 8 /* number of bits in a char */
-
-#define __SCHAR_MAX 0x7f /* max value for a signed char */
-#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-
-#define __UCHAR_MAX 0xff /* max value for an unsigned char */
-
-#define __USHRT_MAX 0xffff /* max value for an unsigned short */
-#define __SHRT_MAX 0x7fff /* max value for a short */
-#define __SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define __UINT_MAX 0xffffffff /* max value for an unsigned int */
-#define __INT_MAX 0x7fffffff /* max value for an int */
-#define __INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */
-#define __LONG_MAX 0x7fffffffffffffff /* max for a long */
-#define __LONG_MIN (-0x7fffffffffffffff-1) /* min for a long */
-
-/* Long longs have the same size but not the same type as longs. */
- /* max for an unsigned long long */
-#define __ULLONG_MAX 0xffffffffffffffffULL
-#define __LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
-#define __LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
-
-#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
-
-#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */
-
-#define __OFF_MAX __LONG_MAX /* max value for an off_t */
-#define __OFF_MIN __LONG_MIN /* min value for an off_t */
-
-/* Quads and longs are the same size. Ensure they stay in sync. */
-#define __UQUAD_MAX (__ULONG_MAX) /* max value for a uquad_t */
-#define __QUAD_MAX (__LONG_MAX) /* max value for a quad_t */
-#define __QUAD_MIN (__LONG_MIN) /* min value for a quad_t */
-
-#define __LONG_BIT 64
-#define __WORD_BIT 32
-
-/* Minimum signal stack size. */
-#define __MINSIGSTKSZ (1024 * 4)
-
-#endif /* !_MACHINE__LIMITS_H_ */
diff --git a/sys/sparc64/include/_stdint.h b/sys/sparc64/include/_stdint.h
deleted file mode 100644
index a21274ef1875..000000000000
--- a/sys/sparc64/include/_stdint.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org>
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Klaus Klein.
- *
- * 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE__STDINT_H_
-#define _MACHINE__STDINT_H_
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
-
-#define INT8_C(c) (c)
-#define INT16_C(c) (c)
-#define INT32_C(c) (c)
-#define INT64_C(c) (c ## L)
-
-#define UINT8_C(c) (c)
-#define UINT16_C(c) (c)
-#define UINT32_C(c) (c ## U)
-#define UINT64_C(c) (c ## UL)
-
-#define INTMAX_C(c) INT64_C(c)
-#define UINTMAX_C(c) UINT64_C(c)
-
-#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.2.1 Limits of exact-width integer types
- */
-/* Minimum values of exact-width signed integer types. */
-#define INT8_MIN (-0x7f-1)
-#define INT16_MIN (-0x7fff-1)
-#define INT32_MIN (-0x7fffffff-1)
-#define INT64_MIN (-0x7fffffffffffffffL-1)
-
-/* Maximum values of exact-width signed integer types. */
-#define INT8_MAX 0x7f
-#define INT16_MAX 0x7fff
-#define INT32_MAX 0x7fffffff
-#define INT64_MAX 0x7fffffffffffffffL
-
-/* Maximum values of exact-width unsigned integer types. */
-#define UINT8_MAX 0xff
-#define UINT16_MAX 0xffff
-#define UINT32_MAX 0xffffffffU
-#define UINT64_MAX 0xffffffffffffffffUL
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.2.2 Limits of minimum-width integer types
- */
-/* Minimum values of minimum-width signed integer types. */
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST64_MIN INT64_MIN
-
-/* Maximum values of minimum-width signed integer types. */
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MAX INT64_MAX
-
-/* Maximum values of minimum-width unsigned integer types. */
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.2.3 Limits of fastest minimum-width integer types
- */
-/* Minimum values of fastest minimum-width signed integer types. */
-#define INT_FAST8_MIN INT32_MIN
-#define INT_FAST16_MIN INT32_MIN
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST64_MIN INT64_MIN
-
-/* Maximum values of fastest minimum-width signed integer types. */
-#define INT_FAST8_MAX INT32_MAX
-#define INT_FAST16_MAX INT32_MAX
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MAX INT64_MAX
-
-/* Maximum values of fastest minimum-width unsigned integer types. */
-#define UINT_FAST8_MAX UINT32_MAX
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.2.4 Limits of integer types capable of holding object pointers
- */
-#define INTPTR_MIN INT64_MIN
-#define INTPTR_MAX INT64_MAX
-#define UINTPTR_MAX UINT64_MAX
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.2.5 Limits of greatest-width integer types
- */
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-/*
- * ISO/IEC 9899:1999
- * 7.18.3 Limits of other integer types
- */
-/* Limits of ptrdiff_t. */
-#define PTRDIFF_MIN INT64_MIN
-#define PTRDIFF_MAX INT64_MAX
-
-/* Limits of sig_atomic_t. */
-#define SIG_ATOMIC_MIN INT32_MIN
-#define SIG_ATOMIC_MAX INT32_MAX
-
-/* Limit of size_t. */
-#define SIZE_MAX UINT64_MAX
-
-/* Limits of wint_t. */
-#define WINT_MIN INT32_MIN
-#define WINT_MAX INT32_MAX
-
-#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
-
-#endif /* !_MACHINE__STDINT_H_ */
diff --git a/sys/sparc64/include/_types.h b/sys/sparc64/include/_types.h
deleted file mode 100644
index 9d71fefc52eb..000000000000
--- a/sys/sparc64/include/_types.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
- * From: @(#)types.h 8.3 (Berkeley) 1/5/94
- * $FreeBSD$
- */
-
-#ifndef _MACHINE__TYPES_H_
-#define _MACHINE__TYPES_H_
-
-#ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
-#endif
-
-/*
- * Basic types upon which most other types are built.
- */
-typedef signed char __int8_t;
-typedef unsigned char __uint8_t;
-typedef short __int16_t;
-typedef unsigned short __uint16_t;
-typedef int __int32_t;
-typedef unsigned int __uint32_t;
-typedef long __int64_t;
-typedef unsigned long __uint64_t;
-
-/*
- * Standard type definitions.
- */
-typedef __int32_t __clock_t; /* clock()... */
-typedef __int64_t __critical_t;
-#ifndef _STANDALONE
-typedef double __double_t;
-typedef float __float_t;
-#endif
-typedef __int64_t __intfptr_t;
-typedef __int64_t __intmax_t;
-typedef __int64_t __intptr_t;
-typedef __int32_t __int_fast8_t;
-typedef __int32_t __int_fast16_t;
-typedef __int32_t __int_fast32_t;
-typedef __int64_t __int_fast64_t;
-typedef __int8_t __int_least8_t;
-typedef __int16_t __int_least16_t;
-typedef __int32_t __int_least32_t;
-typedef __int64_t __int_least64_t;
-typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
-typedef __int64_t __register_t;
-typedef __int64_t __segsz_t; /* segment size (in pages) */
-typedef __uint64_t __size_t; /* sizeof() */
-typedef __int64_t __ssize_t; /* byte count or error */
-typedef __int64_t __time_t; /* time()... */
-typedef __uint64_t __uintfptr_t;
-typedef __uint64_t __uintmax_t;
-typedef __uint64_t __uintptr_t;
-typedef __uint32_t __uint_fast8_t;
-typedef __uint32_t __uint_fast16_t;
-typedef __uint32_t __uint_fast32_t;
-typedef __uint64_t __uint_fast64_t;
-typedef __uint8_t __uint_least8_t;
-typedef __uint16_t __uint_least16_t;
-typedef __uint32_t __uint_least32_t;
-typedef __uint64_t __uint_least64_t;
-typedef __uint64_t __u_register_t;
-typedef __uint64_t __vm_offset_t;
-typedef __uint64_t __vm_paddr_t;
-typedef __uint64_t __vm_size_t;
-typedef int ___wchar_t;
-
-#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */
-#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */
-
-#endif /* !_MACHINE__TYPES_H_ */
diff --git a/sys/sparc64/include/asi.h b/sys/sparc64/include/asi.h
deleted file mode 100644
index 2a40eb89c357..000000000000
--- a/sys/sparc64/include/asi.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
- *
- * 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.
- * 3. Berkeley Software Design Inc's name may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
- *
- * from: BSDI: asi.h,v 1.3 1997/08/08 14:31:42 torek
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ASI_H_
-#define _MACHINE_ASI_H_
-
-/*
- * Standard v9 ASIs
- */
-#define ASI_N 0x4
-#define ASI_NL 0xc
-#define ASI_AIUP 0x10
-#define ASI_AIUS 0x11
-#define ASI_AIUPL 0x18
-#define ASI_AIUSL 0x19
-#define ASI_P 0x80
-#define ASI_S 0x81
-#define ASI_PNF 0x82
-#define ASI_SNF 0x83
-#define ASI_PL 0x88
-#define ASI_SL 0x89
-#define ASI_PNFL 0x8a
-#define ASI_SNFL 0x8b
-
-/*
- * UltraSPARC extensions - ASIs limited to a certain family are annotated.
- */
-#define ASI_PHYS_USE_EC 0x14
-#define ASI_PHYS_BYPASS_EC_WITH_EBIT 0x15
-#define ASI_PHYS_USE_EC_L 0x1c
-#define ASI_PHYS_BYPASS_EC_WITH_EBIT_L 0x1d
-
-#define ASI_NUCLEUS_QUAD_LDD 0x24
-#define ASI_NUCLEUS_QUAD_LDD_L 0x2c
-
-#define ASI_PCACHE_STATUS_DATA 0x30 /* US-III Cu */
-#define ASI_PCACHE_DATA 0x31 /* US-III Cu */
-#define ASI_PCACHE_TAG 0x32 /* US-III Cu */
-#define ASI_PCACHE_SNOOP_TAG 0x33 /* US-III Cu */
-
-#define ASI_ATOMIC_QUAD_LDD_PHYS 0x34 /* US-III Cu */
-
-#define ASI_WCACHE_VALID_BITS 0x38 /* US-III Cu */
-#define ASI_WCACHE_DATA 0x39 /* US-III Cu */
-#define ASI_WCACHE_TAG 0x3a /* US-III Cu */
-#define ASI_WCACHE_SNOOP_TAG 0x3b /* US-III Cu */
-
-#define ASI_ATOMIC_QUAD_LDD_PHYS_L 0x3c /* US-III Cu */
-
-#define ASI_SRAM_FAST_INIT 0x40 /* US-III Cu */
-
-#define ASI_DCACHE_INVALIDATE 0x42 /* US-III Cu */
-#define ASI_DCACHE_UTAG 0x43 /* US-III Cu */
-#define ASI_DCACHE_SNOOP_TAG 0x44 /* US-III Cu */
-
-/* Named ASI_DCUCR on US-III, but is mostly identical except for added bits. */
-#define ASI_LSU_CTL_REG 0x45 /* US only */
-
-#define ASI_MCNTL 0x45 /* SPARC64 only */
-#define AA_MCNTL 0x08
-
-#define ASI_DCACHE_DATA 0x46
-#define ASI_DCACHE_TAG 0x47
-
-#define ASI_INTR_DISPATCH_STATUS 0x48
-#define ASI_INTR_RECEIVE 0x49
-#define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */
-
-#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III{,+}, IV{,+} */
-#define AA_FIREPLANE_CONFIG 0x0 /* US-III{,+}, IV{,+} */
-#define AA_FIREPLANE_ADDRESS 0x8 /* US-III{,+}, IV{,+} */
-#define AA_FIREPLANE_CONFIG_2 0x10 /* US-IV{,+} */
-
-#define ASI_JBUS_CONFIG_REG 0x4a /* US-IIIi{,+} */
-
-#define ASI_ESTATE_ERROR_EN_REG 0x4b
-#define AA_ESTATE_CEEN 0x1
-#define AA_ESTATE_NCEEN 0x2
-#define AA_ESTATE_ISAPEN 0x4
-
-#define ASI_AFSR 0x4c
-#define ASI_AFAR 0x4d
-
-#define ASI_ECACHE_TAG_DATA 0x4e
-
-#define ASI_IMMU_TAG_TARGET_REG 0x50
-#define ASI_IMMU 0x50
-#define AA_IMMU_TTR 0x0
-#define AA_IMMU_SFSR 0x18
-#define AA_IMMU_TSB 0x28
-#define AA_IMMU_TAR 0x30
-#define AA_IMMU_TSB_PEXT_REG 0x48 /* US-III family */
-#define AA_IMMU_TSB_SEXT_REG 0x50 /* US-III family */
-#define AA_IMMU_TSB_NEXT_REG 0x58 /* US-III family */
-
-#define ASI_IMMU_TSB_8KB_PTR_REG 0x51
-#define ASI_IMMU_TSB_64KB_PTR_REG 0x52
-
-#define ASI_SERIAL_ID 0x53 /* US-III family */
-
-#define ASI_ITLB_DATA_IN_REG 0x54
-/* US-III Cu: also ASI_ITLB_CAM_ADDRESS_REG */
-#define ASI_ITLB_DATA_ACCESS_REG 0x55
-#define ASI_ITLB_TAG_READ_REG 0x56
-#define ASI_IMMU_DEMAP 0x57
-
-#define ASI_DMMU_TAG_TARGET_REG 0x58
-#define ASI_DMMU 0x58
-#define AA_DMMU_TTR 0x0
-#define AA_DMMU_PCXR 0x8
-#define AA_DMMU_SCXR 0x10
-#define AA_DMMU_SFSR 0x18
-#define AA_DMMU_SFAR 0x20
-#define AA_DMMU_TSB 0x28
-#define AA_DMMU_TAR 0x30
-#define AA_DMMU_VWPR 0x38
-#define AA_DMMU_PWPR 0x40
-#define AA_DMMU_TSB_PEXT_REG 0x48
-#define AA_DMMU_TSB_SEXT_REG 0x50
-#define AA_DMMU_TSB_NEXT_REG 0x58
-#define AA_DMMU_TAG_ACCESS_EXT 0x60 /* US-III family */
-
-#define ASI_DMMU_TSB_8KB_PTR_REG 0x59
-#define ASI_DMMU_TSB_64KB_PTR_REG 0x5a
-#define ASI_DMMU_TSB_DIRECT_PTR_REG 0x5b
-#define ASI_DTLB_DATA_IN_REG 0x5c
-/* US-III Cu: also ASI_DTLB_CAM_ADDRESS_REG */
-#define ASI_DTLB_DATA_ACCESS_REG 0x5d
-#define ASI_DTLB_TAG_READ_REG 0x5e
-#define ASI_DMMU_DEMAP 0x5f
-
-#define ASI_IIU_INST_TRAP 0x60 /* US-III family */
-
-#define ASI_INTR_ID 0x63 /* US-IV{,+} */
-#define AA_INTR_ID 0x0 /* US-IV{,+} */
-#define AA_CORE_ID 0x10 /* US-IV{,+} */
-#define AA_CESR_ID 0x40 /* US-IV{,+} */
-
-#define ASI_ICACHE_INSTR 0x66
-#define ASI_ICACHE_TAG 0x67
-#define ASI_ICACHE_SNOOP_TAG 0x68 /* US-III family */
-#define ASI_ICACHE_PRE_DECODE 0x6e /* US-I, II */
-#define ASI_ICACHE_PRE_NEXT_FIELD 0x6f /* US-I, II */
-
-#define ASI_FLUSH_L1I 0x67 /* SPARC64 only */
-
-#define ASI_BLK_AUIP 0x70
-#define ASI_BLK_AIUS 0x71
-
-#define ASI_MCU_CONFIG_REG 0x72 /* US-III Cu */
-#define AA_MCU_TIMING1_REG 0x0 /* US-III Cu */
-#define AA_MCU_TIMING2_REG 0x8 /* US-III Cu */
-#define AA_MCU_TIMING3_REG 0x10 /* US-III Cu */
-#define AA_MCU_TIMING4_REG 0x18 /* US-III Cu */
-#define AA_MCU_DEC1_REG 0x20 /* US-III Cu */
-#define AA_MCU_DEC2_REG 0x28 /* US-III Cu */
-#define AA_MCU_DEC3_REG 0x30 /* US-III Cu */
-#define AA_MCU_DEC4_REG 0x38 /* US-III Cu */
-#define AA_MCU_ADDR_CNTL_REG 0x40 /* US-III Cu */
-
-#define ASI_ECACHE_DATA 0x74 /* US-III Cu */
-#define ASI_ECACHE_CONTROL 0x75 /* US-III Cu */
-#define ASI_ECACHE_W 0x76
-
-/*
- * With the advent of the US-III, the numbering has changed, as additional
- * registers were inserted in between. We retain the original ordering for
- * now, and append an A to the inserted registers.
- * Exceptions are AA_SDB_INTR_D6 and AA_SDB_INTR_D7, which were appended
- * at the end.
- */
-#define ASI_SDB_ERROR_W 0x77
-#define ASI_SDB_CONTROL_W 0x77
-#define ASI_SDB_INTR_W 0x77
-#define AA_SDB_ERR_HIGH 0x0
-#define AA_SDB_ERR_LOW 0x18
-#define AA_SDB_CNTL_HIGH 0x20
-#define AA_SDB_CNTL_LOW 0x38
-#define AA_SDB_INTR_D0 0x40
-#define AA_SDB_INTR_D0A 0x48 /* US-III family */
-#define AA_SDB_INTR_D1 0x50
-#define AA_SDB_INTR_D1A 0x5A /* US-III family */
-#define AA_SDB_INTR_D2 0x60
-#define AA_SDB_INTR_D2A 0x68 /* US-III family */
-#define AA_INTR_SEND 0x70
-#define AA_SDB_INTR_D6 0x80 /* US-III family */
-#define AA_SDB_INTR_D7 0x88 /* US-III family */
-
-#define ASI_BLK_AIUPL 0x78
-#define ASI_BLK_AIUSL 0x79
-
-#define ASI_ECACHE_R 0x7e
-
-/*
- * These have the same registers as their corresponding write versions
- * except for AA_INTR_SEND.
- */
-#define ASI_SDB_ERROR_R 0x7f
-#define ASI_SDB_CONTROL_R 0x7f
-#define ASI_SDB_INTR_R 0x7f
-
-#define ASI_PST8_P 0xc0
-#define ASI_PST8_S 0xc1
-#define ASI_PST16_P 0xc2
-#define ASI_PST16_S 0xc3
-#define ASI_PST32_P 0xc4
-#define ASI_PST32_S 0xc5
-
-#define ASI_PST8_PL 0xc8
-#define ASI_PST8_SL 0xc9
-#define ASI_PST16_PL 0xca
-#define ASI_PST16_SL 0xcb
-#define ASI_PST32_PL 0xcc
-#define ASI_PST32_SL 0xcd
-
-#define ASI_FL8_P 0xd0
-#define ASI_FL8_S 0xd1
-#define ASI_FL16_P 0xd2
-#define ASI_FL16_S 0xd3
-#define ASI_FL8_PL 0xd8
-#define ASI_FL8_SL 0xd9
-#define ASI_FL16_PL 0xda
-#define ASI_FL16_SL 0xdb
-
-#define ASI_BLK_COMMIT_P 0xe0
-#define ASI_BLK_COMMIT_S 0xe1
-#define ASI_BLK_P 0xf0
-#define ASI_BLK_S 0xf1
-#define ASI_BLK_PL 0xf8
-#define ASI_BLK_SL 0xf9
-
-#endif /* !_MACHINE_ASI_H_ */
diff --git a/sys/sparc64/include/asm.h b/sys/sparc64/include/asm.h
deleted file mode 100644
index e8ca4af257f1..000000000000
--- a/sys/sparc64/include/asm.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90
- * from: FreeBSD: src/sys/i386/include/asm.h,v 1.7 2000/01/25
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ASM_H_
-#define _MACHINE_ASM_H_
-
-#define __ASM__
-
-#include <sys/cdefs.h>
-
-#ifdef PIC
-#define PIC_PROLOGUE(r1, r2) \
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), r1 ; \
- rd %pc, r2 ; \
- or r1, %lo(_GLOBAL_OFFSET_TABLE_+4), r1 ; \
- add r2, r1, r2
-#define SET(name, r1, r2) \
- set name, r2 ; \
- ldx [r1 + r2], r2
-#else
-#define PIC_PROLOGUE(r1, r2)
-#define SET(name, r1, r2) \
- set name, r2
-#endif
-
-/*
- * CNAME and HIDENAME manage the relationship between symbol names in C
- * and the equivalent assembly language names. CNAME is given a name as
- * it would be used in a C program. It expands to the equivalent assembly
- * language name. HIDENAME is given an assembly-language name, and expands
- * to a possibly-modified form that will be invisible to C programs.
- */
-#define CNAME(csym) csym
-#define HIDENAME(asmsym) __CONCAT(.,asmsym)
-
-#define CCFSZ 192
-#define SPOFF 2047
-
-#define _ALIGN_TEXT .align 32
-
-#define _START_ENTRY \
- .text ; \
- _ALIGN_TEXT
-
-/*
- * Define function entry and alternate entry points.
- *
- * The compiler produces #function for the .type pseudo-op, but the '#'
- * character has special meaning in cpp macros, so we use @function like
- * other architectures. The assembler seems to accept both.
- * The assembler also accepts a .proc pseudo-op, which is used by the
- * peep hole optimizer, whose argument is the type code of the return
- * value. Since this is difficult to predict and its expected that
- * assembler code is already optimized, we leave it out.
- */
-
-#define _ALTENTRY(x) \
- .globl CNAME(x) ; \
- .type CNAME(x),@function ; \
-CNAME(x):
-
-#define _ENTRY(x) \
- _START_ENTRY ; \
- .globl CNAME(x) ; \
- .type CNAME(x),@function ; \
-CNAME(x):
-
-#define ALTENTRY(x) _ALTENTRY(x)
-#define ENTRY(x) _ENTRY(x)
-#define END(x) .size x, . - x
-
-/*
- * WEAK_REFERENCE(): create a weak reference alias from sym.
- * The macro is not a general asm macro that takes arbitrary names,
- * but one that takes only C names. It does the non-null name
- * translation inside the macro.
- */
-#define WEAK_REFERENCE(sym, alias) \
- .weak CNAME(alias); \
- .equ CNAME(alias),CNAME(sym)
-
-/*
- * Kernel RCS ID tag and copyright macros
- */
-
-#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
-#define __FBSDID(s) .ident s
-#else
-#define __FBSDID(s) /* nothing */
-#endif /* not lint and not STRIP_FBSDID */
-
-#endif /* !_MACHINE_ASM_H_ */
diff --git a/sys/sparc64/include/asmacros.h b/sys/sparc64/include/asmacros.h
deleted file mode 100644
index cb39694387e4..000000000000
--- a/sys/sparc64/include/asmacros.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * Copyright (c) 2011 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ASMACROS_H_
-#define _MACHINE_ASMACROS_H_
-
-#ifdef _KERNEL
-
-/*
- * Normal and alternate %g6 point to the pcb of the current process. Normal,
- * alternate and interrupt %g7 point to per-cpu data.
- */
-#define PCB_REG %g6
-#define PCPU_REG %g7
-
-/*
- * Alternate %g5 points to a per-cpu panic stack, which is used as a last
- * resort, and for temporarily saving alternate globals.
- */
-#define ASP_REG %g5
-
-#ifdef LOCORE
-
-/*
- * Atomically decrement an integer in memory.
- */
-#define ATOMIC_DEC_INT(r1, r2, r3) \
- lduw [r1], r2 ; \
-9: sub r2, 1, r3 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %icc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically increment an integer in memory.
- */
-#define ATOMIC_INC_INT(r1, r2, r3) \
- lduw [r1], r2 ; \
-9: add r2, 1, r3 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %icc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically increment a long in memory.
- */
-#define ATOMIC_INC_LONG(r1, r2, r3) \
- ldx [r1], r2 ; \
-9: add r2, 1, r3 ; \
- casxa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %xcc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically clear a number of bits of an integer in memory.
- */
-#define ATOMIC_CLEAR_INT(r1, r2, r3, bits) \
- lduw [r1], r2 ; \
-9: andn r2, bits, r3 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %icc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically clear a number of bits of a long in memory.
- */
-#define ATOMIC_CLEAR_LONG(r1, r2, r3, bits) \
- ldx [r1], r2 ; \
-9: andn r2, bits, r3 ; \
- casxa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %xcc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically load an integer from memory.
- */
-#define ATOMIC_LOAD_INT(r1, val) \
- clr val ; \
- casa [r1] ASI_N, %g0, val
-
-/*
- * Atomically load a long from memory.
- */
-#define ATOMIC_LOAD_LONG(r1, val) \
- clr val ; \
- casxa [r1] ASI_N, %g0, val
-
-/*
- * Atomically set a number of bits of an integer in memory.
- */
-#define ATOMIC_SET_INT(r1, r2, r3, bits) \
- lduw [r1], r2 ; \
-9: or r2, bits, r3 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %icc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically set a number of bits of a long in memory.
- */
-#define ATOMIC_SET_LONG(r1, r2, r3, bits) \
- ldx [r1], r2 ; \
-9: or r2, bits, r3 ; \
- casxa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %xcc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically store an integer in memory.
- */
-#define ATOMIC_STORE_INT(r1, r2, r3, val) \
- lduw [r1], r2 ; \
-9: mov val, r3 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %icc, 9b ; \
- mov r3, r2
-
-/*
- * Atomically store a long in memory.
- */
-#define ATOMIC_STORE_LONG(r1, r2, r3, val) \
- ldx [r1], r2 ; \
-9: mov val, r3 ; \
- casxa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne,pn %xcc, 9b ; \
- mov r3, r2
-
-#define PCPU(member) PCPU_REG + PC_ ## member
-#define PCPU_ADDR(member, reg) \
- add PCPU_REG, PC_ ## member, reg
-
-#define DEBUGGER() \
- ta %xcc, 1
-
-#define PANIC(msg, r1) \
- .sect .rodata ; \
-9: .asciz msg ; \
- .previous ; \
- SET(9b, r1, %o0) ; \
- call panic ; \
- nop
-
-#ifdef INVARIANTS
-#define KASSERT(r1, msg) \
- brnz,pt r1, 8f ; \
- nop ; \
- PANIC(msg, r1) ; \
-8:
-#else
-#define KASSERT(r1, msg)
-#endif
-
-#define PUTS(msg, r1) \
- .sect .rodata ; \
-9: .asciz msg ; \
- .previous ; \
- SET(9b, r1, %o0) ; \
- call printf ; \
- nop
-
-#define _ALIGN_DATA .align 8
-
-#define DATA(name) \
- .data ; \
- _ALIGN_DATA ; \
- .globl name ; \
- .type name, @object ; \
-name:
-
-#define EMPTY
-
-/*
- * Generate atomic compare and swap, load and store instructions for the
- * corresponding width and ASI (or not). Note that we want to evaluate the
- * macro args before concatenating, so that EMPTY really turns into nothing.
- */
-#define _LD(w, a) ld ## w ## a
-#define _ST(w, a) st ## w ## a
-#define _CAS(w, a) cas ## w ## a
-
-#define LD(w, a) _LD(w, a)
-#define ST(w, a) _ST(w, a)
-#define CAS(w, a) _CAS(w, a)
-
-#endif /* LOCORE */
-
-#endif /* _KERNEL */
-
-#endif /* !_MACHINE_ASMACROS_H_ */
diff --git a/sys/sparc64/include/atomic.h b/sys/sparc64/include/atomic.h
deleted file mode 100644
index e98da0f5e49c..000000000000
--- a/sys/sparc64/include/atomic.h
+++ /dev/null
@@ -1,446 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1998 Doug Rabson.
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/i386/include/atomic.h,v 1.20 2001/02/11
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ATOMIC_H_
-#define _MACHINE_ATOMIC_H_
-
-#include <machine/cpufunc.h>
-
-#define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory")
-#define wmb() mb()
-#define rmb() mb()
-
-#include <sys/atomic_common.h>
-
-/* Userland needs different ASI's. */
-#ifdef _KERNEL
-#define __ASI_ATOMIC ASI_N
-#else
-#define __ASI_ATOMIC ASI_P
-#endif
-
-static __inline int atomic_cmpset_8(__volatile uint8_t *, uint8_t, uint8_t);
-static __inline int atomic_fcmpset_8(__volatile uint8_t *, uint8_t *, uint8_t);
-static __inline int atomic_cmpset_16(__volatile uint16_t *, uint16_t, uint16_t);
-static __inline int atomic_fcmpset_16(__volatile uint16_t *, uint16_t *, uint16_t);
-
-/*
- * Various simple arithmetic on memory which is atomic in the presence
- * of interrupts and multiple processors. See atomic(9) for details.
- * Note that efficient hardware support exists only for the 32 and 64
- * bit variants; the 8 and 16 bit versions are not provided and should
- * not be used in MI code.
- *
- * This implementation takes advantage of the fact that the sparc64
- * cas instruction is both a load and a store. The loop is often coded
- * as follows:
- *
- * do {
- * expect = *p;
- * new = expect + 1;
- * } while (cas(p, expect, new) != expect);
- *
- * which performs an unnnecessary load on each iteration that the cas
- * operation fails. Modified as follows:
- *
- * expect = *p;
- * for (;;) {
- * new = expect + 1;
- * result = cas(p, expect, new);
- * if (result == expect)
- * break;
- * expect = result;
- * }
- *
- * the return value of cas is used to avoid the extra reload.
- *
- * We only include a memory barrier in the rel variants as in total store
- * order which we use for running the kernel and all of the userland atomic
- * loads and stores behave as if the were followed by a membar with a mask
- * of #LoadLoad | #LoadStore | #StoreStore. In order to be also sufficient
- * for use of relaxed memory ordering, the atomic_cas() in the acq variants
- * additionally would have to be followed by a membar #LoadLoad | #LoadStore.
- * Due to the suggested assembly syntax of the membar operands containing a
- * # character, they cannot be used in macros. The cmask and mmask bits thus
- * are hard coded in machine/cpufunc.h and used here through macros.
- * Hopefully the bit numbers won't change in the future.
- */
-
-#define itype(sz) uint ## sz ## _t
-
-#define atomic_cas_32(p, e, s) casa((p), (e), (s), __ASI_ATOMIC)
-#define atomic_cas_64(p, e, s) casxa((p), (e), (s), __ASI_ATOMIC)
-
-#define atomic_cas(p, e, s, sz) \
- atomic_cas_ ## sz((p), (e), (s))
-
-#define atomic_cas_acq(p, e, s, sz) ({ \
- itype(sz) v; \
- v = atomic_cas((p), (e), (s), sz); \
- __compiler_membar(); \
- v; \
-})
-
-#define atomic_cas_rel(p, e, s, sz) ({ \
- itype(sz) v; \
- membar(LoadStore | StoreStore); \
- v = atomic_cas((p), (e), (s), sz); \
- v; \
-})
-
-#define atomic_op(p, op, v, sz) ({ \
- itype(sz) e, r, s; \
- for (e = *(volatile itype(sz) *)(p);; e = r) { \
- s = e op (v); \
- r = atomic_cas_ ## sz((p), e, s); \
- if (r == e) \
- break; \
- } \
- e; \
-})
-
-#define atomic_op_acq(p, op, v, sz) ({ \
- itype(sz) t; \
- t = atomic_op((p), op, (v), sz); \
- __compiler_membar(); \
- t; \
-})
-
-#define atomic_op_rel(p, op, v, sz) ({ \
- itype(sz) t; \
- membar(LoadStore | StoreStore); \
- t = atomic_op((p), op, (v), sz); \
- t; \
-})
-
-#define atomic_ld_acq(p, sz) ({ \
- itype(sz) v; \
- v = atomic_cas((p), 0, 0, sz); \
- __compiler_membar(); \
- v; \
-})
-
-#define atomic_ld_clear(p, sz) ({ \
- itype(sz) e, r; \
- for (e = *(volatile itype(sz) *)(p);; e = r) { \
- r = atomic_cas((p), e, 0, sz); \
- if (r == e) \
- break; \
- } \
- e; \
-})
-
-#define atomic_st(p, v, sz) ({ \
- itype(sz) e, r; \
- for (e = *(volatile itype(sz) *)(p);; e = r) { \
- r = atomic_cas((p), e, (v), sz); \
- if (r == e) \
- break; \
- } \
- e; \
-})
-
-#define atomic_st_acq(p, v, sz) do { \
- atomic_st((p), (v), sz); \
- __compiler_membar(); \
-} while (0)
-
-#define atomic_st_rel(p, v, sz) do { \
- membar(LoadStore | StoreStore); \
- atomic_st((p), (v), sz); \
-} while (0)
-
-#define ATOMIC_GEN(name, ptype, vtype, atype, sz) \
- \
-static __inline vtype \
-atomic_add_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op((p), +, (v), sz)); \
-} \
-static __inline vtype \
-atomic_add_acq_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_acq((p), +, (v), sz)); \
-} \
-static __inline vtype \
-atomic_add_rel_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_rel((p), +, (v), sz)); \
-} \
- \
-static __inline vtype \
-atomic_clear_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op((p), &, ~(v), sz)); \
-} \
-static __inline vtype \
-atomic_clear_acq_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_acq((p), &, ~(v), sz)); \
-} \
-static __inline vtype \
-atomic_clear_rel_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_rel((p), &, ~(v), sz)); \
-} \
- \
-static __inline int \
-atomic_cmpset_ ## name(volatile ptype p, vtype e, vtype s) \
-{ \
- return (((vtype)atomic_cas((p), (e), (s), sz)) == (e)); \
-} \
-static __inline int \
-atomic_cmpset_acq_ ## name(volatile ptype p, vtype e, vtype s) \
-{ \
- return (((vtype)atomic_cas_acq((p), (e), (s), sz)) == (e)); \
-} \
-static __inline int \
-atomic_cmpset_rel_ ## name(volatile ptype p, vtype e, vtype s) \
-{ \
- return (((vtype)atomic_cas_rel((p), (e), (s), sz)) == (e)); \
-} \
- \
-static __inline int \
-atomic_fcmpset_ ## name(volatile ptype p, vtype *ep, vtype s) \
-{ \
- vtype t; \
- \
- t = (vtype)atomic_cas((p), (*ep), (s), sz); \
- if (t == (*ep)) \
- return (1); \
- *ep = t; \
- return (0); \
-} \
-static __inline int \
-atomic_fcmpset_acq_ ## name(volatile ptype p, vtype *ep, vtype s) \
-{ \
- vtype t; \
- \
- t = (vtype)atomic_cas_acq((p), (*ep), (s), sz); \
- if (t == (*ep)) \
- return (1); \
- *ep = t; \
- return (0); \
-} \
-static __inline int \
-atomic_fcmpset_rel_ ## name(volatile ptype p, vtype *ep, vtype s) \
-{ \
- vtype t; \
- \
- t = (vtype)atomic_cas_rel((p), (*ep), (s), sz); \
- if (t == (*ep)) \
- return (1); \
- *ep = t; \
- return (0); \
-} \
- \
-static __inline vtype \
-atomic_load_acq_ ## name(volatile ptype p) \
-{ \
- return ((vtype)atomic_cas_acq((p), 0, 0, sz)); \
-} \
- \
-static __inline vtype \
-atomic_readandclear_ ## name(volatile ptype p) \
-{ \
- return ((vtype)atomic_ld_clear((p), sz)); \
-} \
- \
-static __inline vtype \
-atomic_set_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op((p), |, (v), sz)); \
-} \
-static __inline vtype \
-atomic_set_acq_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_acq((p), |, (v), sz)); \
-} \
-static __inline vtype \
-atomic_set_rel_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_rel((p), |, (v), sz)); \
-} \
- \
-static __inline vtype \
-atomic_subtract_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op((p), -, (v), sz)); \
-} \
-static __inline vtype \
-atomic_subtract_acq_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_acq((p), -, (v), sz)); \
-} \
-static __inline vtype \
-atomic_subtract_rel_ ## name(volatile ptype p, atype v) \
-{ \
- return ((vtype)atomic_op_rel((p), -, (v), sz)); \
-} \
- \
-static __inline void \
-atomic_store_acq_ ## name(volatile ptype p, vtype v) \
-{ \
- atomic_st_acq((p), (v), sz); \
-} \
-static __inline void \
-atomic_store_rel_ ## name(volatile ptype p, vtype v) \
-{ \
- atomic_st_rel((p), (v), sz); \
-} \
- \
-static __inline vtype \
-atomic_swap_ ## name(volatile ptype p, vtype v) \
-{ \
- return ((vtype)atomic_st((p), (v), sz)); \
-}
-
-static __inline void
-atomic_thread_fence_acq(void)
-{
-
- __compiler_membar();
-}
-
-static __inline void
-atomic_thread_fence_rel(void)
-{
-
- __compiler_membar();
-}
-
-static __inline void
-atomic_thread_fence_acq_rel(void)
-{
-
- __compiler_membar();
-}
-
-static __inline void
-atomic_thread_fence_seq_cst(void)
-{
-
- membar(LoadLoad | LoadStore | StoreStore | StoreLoad);
-}
-
-
-ATOMIC_GEN(int, u_int *, u_int, u_int, 32);
-ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32);
-
-ATOMIC_GEN(long, u_long *, u_long, u_long, 64);
-ATOMIC_GEN(64, uint64_t *, uint64_t, uint64_t, 64);
-
-ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64);
-
-#define ATOMIC_CMPSET_ACQ_REL(WIDTH) \
-static __inline int \
-atomic_cmpset_acq_##WIDTH(__volatile uint##WIDTH##_t *p, \
- uint##WIDTH##_t cmpval, uint##WIDTH##_t newval) \
-{ \
- int retval; \
- \
- retval = atomic_cmpset_##WIDTH(p, cmpval, newval); \
- mb(); \
- return (retval); \
-} \
- \
-static __inline int \
-atomic_cmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \
- uint##WIDTH##_t cmpval, uint##WIDTH##_t newval) \
-{ \
- mb(); \
- return (atomic_cmpset_##WIDTH(p, cmpval, newval)); \
-}
-
-#define ATOMIC_FCMPSET_ACQ_REL(WIDTH) \
-static __inline int \
-atomic_fcmpset_acq_##WIDTH(__volatile uint##WIDTH##_t *p, \
- uint##WIDTH##_t *cmpval, uint##WIDTH##_t newval) \
-{ \
- int retval; \
- \
- retval = atomic_fcmpset_##WIDTH(p, cmpval, newval); \
- mb(); \
- return (retval); \
-} \
- \
-static __inline int \
-atomic_fcmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \
- uint##WIDTH##_t *cmpval, uint##WIDTH##_t newval) \
-{ \
- mb(); \
- return (atomic_fcmpset_##WIDTH(p, cmpval, newval)); \
-}
-
-/*
- * Atomically compare the value stored at *p with cmpval and if the
- * two values are equal, update the value of *p with newval. Returns
- * zero if the compare failed, nonzero otherwise.
- */
-ATOMIC_CMPSET_ACQ_REL(8);
-ATOMIC_CMPSET_ACQ_REL(16);
-ATOMIC_FCMPSET_ACQ_REL(8);
-ATOMIC_FCMPSET_ACQ_REL(16);
-
-#define atomic_cmpset_char atomic_cmpset_8
-#define atomic_cmpset_acq_char atomic_cmpset_acq_8
-#define atomic_cmpset_rel_char atomic_cmpset_rel_8
-#define atomic_fcmpset_acq_char atomic_fcmpset_acq_8
-#define atomic_fcmpset_rel_char atomic_fcmpset_rel_8
-
-#define atomic_cmpset_short atomic_cmpset_16
-#define atomic_cmpset_acq_short atomic_cmpset_acq_16
-#define atomic_cmpset_rel_short atomic_cmpset_rel_16
-#define atomic_fcmpset_acq_short atomic_fcmpset_acq_16
-#define atomic_fcmpset_rel_short atomic_fcmpset_rel_16
-
-#define atomic_fetchadd_int atomic_add_int
-#define atomic_fetchadd_32 atomic_add_32
-#define atomic_fetchadd_long atomic_add_long
-#define atomic_fetchadd_64 atomic_add_64
-
-#undef ATOMIC_GEN
-#undef atomic_cas
-#undef atomic_cas_acq
-#undef atomic_cas_rel
-#undef atomic_op
-#undef atomic_op_acq
-#undef atomic_op_rel
-#undef atomic_ld_acq
-#undef atomic_ld_clear
-#undef atomic_st
-#undef atomic_st_acq
-#undef atomic_st_rel
-
-#include <sys/_atomic_subword.h>
-
-#endif /* !_MACHINE_ATOMIC_H_ */
diff --git a/sys/sparc64/include/bus.h b/sys/sparc64/include/bus.h
deleted file mode 100644
index e36c6863f80a..000000000000
--- a/sys/sparc64/include/bus.h
+++ /dev/null
@@ -1,852 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-NetBSD AND BSD-4-Clause
- *
- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * 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.
- */
-/*
- * Copyright (c) 1997-1999 Eduardo E. Horvath. All rights reserved.
- * Copyright (c) 1996 Charles M. Hannum. All rights reserved.
- * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou
- * for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp
- * and
- * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_BUS_H_
-#define _MACHINE_BUS_H_
-
-#ifdef BUS_SPACE_DEBUG
-#include <sys/ktr.h>
-#endif
-
-#include <machine/_bus.h>
-#include <machine/cpufunc.h>
-
-/*
- * Nexus and SBus spaces are non-cached and big endian
- * (except for RAM and PROM)
- *
- * PCI spaces are non-cached and little endian
- */
-#define NEXUS_BUS_SPACE 0
-#define SBUS_BUS_SPACE 1
-#define PCI_CONFIG_BUS_SPACE 2
-#define PCI_IO_BUS_SPACE 3
-#define PCI_MEMORY_BUS_SPACE 4
-#define LAST_BUS_SPACE 5
-
-extern const int bus_type_asi[];
-extern const int bus_stream_asi[];
-
-#define __BUS_SPACE_HAS_STREAM_METHODS 1
-
-#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
-#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
-#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF
-#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF
-#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF
-#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFF
-
-#define BUS_SPACE_UNRESTRICTED (~0)
-
-struct bus_space_tag {
- void *bst_cookie;
- int bst_type;
-};
-
-/*
- * Bus space function prototypes.
- */
-static void bus_space_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- bus_size_t, int);
-static int bus_space_subregion(bus_space_tag_t, bus_space_handle_t,
- bus_size_t, bus_size_t, bus_space_handle_t *);
-
-/*
- * Map a region of device bus space into CPU virtual address space.
- */
-int bus_space_map(bus_space_tag_t tag, bus_addr_t address, bus_size_t size,
- int flags, bus_space_handle_t *handlep);
-
-/*
- * Unmap a region of device bus space.
- */
-void bus_space_unmap(bus_space_tag_t tag, bus_space_handle_t handle,
- bus_size_t size);
-
-static __inline void
-bus_space_barrier(bus_space_tag_t t __unused, bus_space_handle_t h __unused,
- bus_size_t o __unused, bus_size_t s __unused, int f __unused)
-{
-
- /*
- * We have lots of alternatives depending on whether we're
- * synchronizing loads with loads, loads with stores, stores
- * with loads, or stores with stores. The only ones that seem
- * generic are #Sync and #MemIssue. We use #Sync for safety.
- */
- membar(Sync);
-}
-
-static __inline int
-bus_space_subregion(bus_space_tag_t t __unused, bus_space_handle_t h,
- bus_size_t o __unused, bus_size_t s __unused, bus_space_handle_t *hp)
-{
-
- *hp = h + o;
- return (0);
-}
-
-/* flags for bus space map functions */
-#define BUS_SPACE_MAP_CACHEABLE 0x0001
-#define BUS_SPACE_MAP_LINEAR 0x0002
-#define BUS_SPACE_MAP_READONLY 0x0004
-#define BUS_SPACE_MAP_PREFETCHABLE 0x0008
-/* placeholders for bus functions... */
-#define BUS_SPACE_MAP_BUS1 0x0100
-#define BUS_SPACE_MAP_BUS2 0x0200
-#define BUS_SPACE_MAP_BUS3 0x0400
-#define BUS_SPACE_MAP_BUS4 0x0800
-
-/* flags for bus_space_barrier() */
-#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
-#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
-
-#ifdef BUS_SPACE_DEBUG
-#define KTR_BUS KTR_SPARE2
-#define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \
- CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \
- (desc), (sz), (h), (o)); \
-} while (0)
-#else
-#define __BUS_DEBUG_ACCESS(h, o, desc, sz)
-#endif
-
-static __inline uint8_t
-bus_space_read_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read", 1);
- return (lduba_nc((caddr_t)(h + o), bus_type_asi[t->bst_type]));
-}
-
-static __inline uint16_t
-bus_space_read_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read", 2);
- return (lduha_nc((caddr_t)(h + o), bus_type_asi[t->bst_type]));
-}
-
-static __inline uint32_t
-bus_space_read_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read", 4);
- return (lduwa_nc((caddr_t)(h + o), bus_type_asi[t->bst_type]));
-}
-
-static __inline uint64_t
-bus_space_read_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read", 8);
- return (ldxa_nc((caddr_t)(h + o), bus_type_asi[t->bst_type]));
-}
-
-static __inline void
-bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_1(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_2(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_4(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint64_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_8(t, h, o);
-}
-
-static __inline void
-bus_space_write_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write", 1);
- stba_nc((caddr_t)(h + o), bus_type_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write", 2);
- stha_nc((caddr_t)(h + o), bus_type_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write", 4);
- stwa_nc((caddr_t)(h + o), bus_type_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint64_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write", 8);
- stxa_nc((caddr_t)(h + o), bus_type_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint8_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_1(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint16_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_2(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint32_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_4(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint64_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_8(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_1(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_2(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_4(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint64_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_8(t, h, o, v);
-}
-
-static __inline void
-bus_space_read_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o++)
- *a = bus_space_read_1(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 2)
- *a = bus_space_read_2(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 4)
- *a = bus_space_read_4(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint64_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 8)
- *a = bus_space_read_8(t, h, o);
-}
-
-static __inline void
-bus_space_write_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint8_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o++)
- bus_space_write_1(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint16_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 2)
- bus_space_write_2(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint32_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 4)
- bus_space_write_4(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint64_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 8)
- bus_space_write_8(t, h, o, *a);
-}
-
-static __inline void
-bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint8_t v, bus_size_t c)
-{
-
- for (; c; c--, o++)
- bus_space_write_1(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint16_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 2)
- bus_space_write_2(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint32_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 4)
- bus_space_write_4(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- const uint64_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 8)
- bus_space_write_8(t, h, o, v);
-}
-
-static __inline void
-bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1++, o2++)
- bus_space_write_1(t, h1, o1, bus_space_read_1(t, h2, o2));
-}
-
-static __inline void
-bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 2, o2 += 2)
- bus_space_write_2(t, h1, o1, bus_space_read_2(t, h2, o2));
-}
-
-static __inline void
-bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 4, o2 += 4)
- bus_space_write_4(t, h1, o1, bus_space_read_4(t, h2, o2));
-}
-
-static __inline void
-bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 8, o2 += 8)
- bus_space_write_8(t, h1, o1, bus_space_read_8(t, h2, o2));
-}
-
-static __inline uint8_t
-bus_space_read_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read stream", 1);
- return (lduba_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type]));
-}
-
-static __inline uint16_t
-bus_space_read_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read stream", 2);
- return (lduha_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type]));
-}
-
-static __inline uint32_t
-bus_space_read_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read stream", 4);
- return (lduwa_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type]));
-}
-
-static __inline uint64_t
-bus_space_read_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "read stream", 8);
- return (ldxa_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type]));
-}
-
-static __inline void
-bus_space_read_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint8_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_stream_1(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint16_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_stream_2(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint32_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_stream_4(t, h, o);
-}
-
-static __inline void
-bus_space_read_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint64_t *a, size_t c)
-{
-
- while (c-- > 0)
- *a++ = bus_space_read_stream_8(t, h, o);
-}
-
-static __inline void
-bus_space_write_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write stream", 1);
- stba_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write stream", 2);
- stha_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write stream", 4);
- stwa_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_stream_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint64_t v)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "write stream", 8);
- stxa_nc((caddr_t)(h + o), bus_stream_asi[t->bst_type], v);
-}
-
-static __inline void
-bus_space_write_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint8_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_1(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint16_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_2(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint32_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_4(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_write_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint64_t *a, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_8(t, h, o, *a++);
-}
-
-static __inline void
-bus_space_set_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint8_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_1(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint16_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_2(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint32_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_4(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_multi_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint64_t v, size_t c)
-{
-
- while (c-- > 0)
- bus_space_write_stream_8(t, h, o, v);
-}
-
-static __inline void
-bus_space_read_region_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint8_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o++)
- *a = bus_space_read_stream_1(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint16_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 2)
- *a = bus_space_read_stream_2(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint32_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 4)
- *a = bus_space_read_stream_4(t, h, o);
-}
-
-static __inline void
-bus_space_read_region_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, uint64_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 8)
- *a = bus_space_read_stream_8(t, h, o);
-}
-
-static __inline void
-bus_space_write_region_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint8_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o++)
- bus_space_write_stream_1(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint16_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 2)
- bus_space_write_stream_2(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint32_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 4)
- bus_space_write_stream_4(t, h, o, *a);
-}
-
-static __inline void
-bus_space_write_region_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint64_t *a, bus_size_t c)
-{
-
- for (; c; a++, c--, o += 8)
- bus_space_write_stream_8(t, h, o, *a);
-}
-
-static __inline void
-bus_space_set_region_stream_1(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint8_t v, bus_size_t c)
-{
-
- for (; c; c--, o++)
- bus_space_write_stream_1(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_stream_2(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint16_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 2)
- bus_space_write_stream_2(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_stream_4(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint32_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 4)
- bus_space_write_stream_4(t, h, o, v);
-}
-
-static __inline void
-bus_space_set_region_stream_8(bus_space_tag_t t, bus_space_handle_t h,
- bus_size_t o, const uint64_t v, bus_size_t c)
-{
-
- for (; c; c--, o += 8)
- bus_space_write_stream_8(t, h, o, v);
-}
-
-static __inline void
-bus_space_copy_region_stream_1(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1++, o2++)
- bus_space_write_stream_1(t, h1, o1, bus_space_read_stream_1(t, h2,
- o2));
-}
-
-static __inline void
-bus_space_copy_region_stream_2(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 2, o2 += 2)
- bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2,
- o2));
-}
-
-static __inline void
-bus_space_copy_region_stream_4(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 4, o2 += 4)
- bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2,
- o2));
-}
-
-static __inline void
-bus_space_copy_region_stream_8(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
-{
-
- for (; c; c--, o1 += 8, o2 += 8)
- bus_space_write_stream_8(t, h1, o1, bus_space_read_8(t, h2, o2));
-}
-
-static __inline int
-bus_space_peek_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t *a)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "peek", 1);
- return (fasword8(bus_type_asi[t->bst_type], (caddr_t)(h + o), a));
-}
-
-static __inline int
-bus_space_peek_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t *a)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "peek", 2);
- return (fasword16(bus_type_asi[t->bst_type], (caddr_t)(h + o), a));
-}
-
-static __inline int
-bus_space_peek_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t *a)
-{
-
- __BUS_DEBUG_ACCESS(h, o, "peek", 4);
- return (fasword32(bus_type_asi[t->bst_type], (caddr_t)(h + o), a));
-}
-
-#include <machine/bus_dma.h>
-
-#endif /* !_MACHINE_BUS_H_ */
diff --git a/sys/sparc64/include/bus_common.h b/sys/sparc64/include/bus_common.h
deleted file mode 100644
index 6d04a9cbe27d..000000000000
--- a/sys/sparc64/include/bus_common.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * form: @(#)sbusreg.h 8.1 (Berkeley) 6/11/93
- * from: NetBSD: iommureg.h,v 1.6 2001/07/20 00:07:13 eeh Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_BUS_COMMON_H_
-#define _MACHINE_BUS_COMMON_H_
-
-#define INTCLR_PENDING 0x000000003ULL /* Interrupt queued to CPU */
-#define INTCLR_RECEIVED 0x000000001ULL /* Interrupt received */
-#define INTCLR_IDLE 0x000000000ULL /* Interrupt idle */
-
-#define INTMAP_V 0x080000000ULL /* Interrupt valid (enabled) */
-#define INTMAP_TID_MASK 0x07c000000ULL /* UPA target ID */
-#define INTMAP_TID_SHIFT 26
-#define INTMAP_IGN_MASK 0x0000007c0ULL /* Interrupt group no. */
-#define INTMAP_IGN_SHIFT 6
-#define INTMAP_INO_MASK 0x00000003fULL /* Interrupt number */
-#define INTMAP_INR_MASK (INTMAP_IGN_MASK | INTMAP_INO_MASK)
-#define INTMAP_SBUSSLOT_MASK 0x000000018ULL /* SBus slot # */
-#define INTMAP_PCIBUS_MASK 0x000000010ULL /* PCI bus number (A or B) */
-#define INTMAP_PCISLOT_MASK 0x00000000cULL /* PCI slot # */
-#define INTMAP_PCIINT_MASK 0x000000003ULL /* PCI interrupt #A,#B,#C,#D */
-#define INTMAP_OBIO_MASK 0x000000020ULL /* Onboard device */
-#define INTIGN(x) (((x) & INTMAP_IGN_MASK) >> INTMAP_IGN_SHIFT)
-#define INTVEC(x) ((x) & INTMAP_INR_MASK)
-#define INTSLOT(x) (((x) >> 3) & 0x7)
-#define INTPRI(x) ((x) & 0x7)
-#define INTINO(x) ((x) & INTMAP_INO_MASK)
-#define INTMAP_ENABLE(mr, mid) \
- (INTMAP_TID((mr), (mid)) | INTMAP_V)
-#define INTMAP_TID(mr, mid) \
- (((mr) & ~INTMAP_TID_MASK) | ((mid) << INTMAP_TID_SHIFT))
-#define INTMAP_VEC(ign, ino) \
- ((((ign) << INTMAP_IGN_SHIFT) & INTMAP_IGN_MASK) | \
- ((ino) & INTMAP_INO_MASK))
-
-/* counter-timer support. */
-void sparc64_counter_init(const char *name, bus_space_tag_t tag,
- bus_space_handle_t handle, bus_addr_t offset);
-
-#endif /* !_MACHINE_BUS_COMMON_H_ */
diff --git a/sys/sparc64/include/bus_dma.h b/sys/sparc64/include/bus_dma.h
deleted file mode 100644
index 0edb92860bd5..000000000000
--- a/sys/sparc64/include/bus_dma.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-NetBSD AND BSD-4-Clause
- *
- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * 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.
- */
-/*
- * Copyright (c) 1997-1999 Eduardo E. Horvath. All rights reserved.
- * Copyright (c) 1996 Charles M. Hannum. All rights reserved.
- * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou
- * for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp
- * and
- * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09
- *
- * $FreeBSD$
- */
-
-#ifndef _SPARC64_BUS_DMA_H
-#define _SPARC64_BUS_DMA_H
-
-#define WANT_INLINE_DMAMAP
-#include <sys/bus_dma.h>
-
-/* DMA support */
-
-/*
- * Method table for a bus_dma_tag.
- */
-struct bus_dma_methods {
- int (*dm_dmamap_create)(bus_dma_tag_t, int, bus_dmamap_t *);
- int (*dm_dmamap_destroy)(bus_dma_tag_t, bus_dmamap_t);
- int (*dm_dmamap_load_phys)(bus_dma_tag_t dmat, bus_dmamap_t map,
- vm_paddr_t buf, bus_size_t buflen, int flags,
- bus_dma_segment_t *segs, int *segp);
- int (*dm_dmamap_load_buffer)(bus_dma_tag_t dmat, bus_dmamap_t map,
- void *buf, bus_size_t buflen, struct pmap *pmap, int flags,
- bus_dma_segment_t *segs, int *segp);
- void (*dm_dmamap_waitok)(bus_dma_tag_t dmat, bus_dmamap_t map,
- struct memdesc *mem, bus_dmamap_callback_t *callback,
- void *callback_arg);
- bus_dma_segment_t *(*dm_dmamap_complete)(bus_dma_tag_t dmat,
- bus_dmamap_t map, bus_dma_segment_t *segs, int nsegs, int error);
- void (*dm_dmamap_unload)(bus_dma_tag_t, bus_dmamap_t);
- void (*dm_dmamap_sync)(bus_dma_tag_t, bus_dmamap_t,
- bus_dmasync_op_t);
- int (*dm_dmamem_alloc)(bus_dma_tag_t, void **, int, bus_dmamap_t *);
- void (*dm_dmamem_free)(bus_dma_tag_t, void *, bus_dmamap_t);
-};
-
-/*
- * bus_dma_tag_t
- *
- * A machine-dependent opaque type describing the implementation of
- * DMA for a given bus.
- */
-struct bus_dma_tag {
- void *dt_cookie; /* cookie used in the guts */
- bus_dma_tag_t dt_parent;
- bus_size_t dt_alignment;
- bus_addr_t dt_boundary;
- bus_addr_t dt_lowaddr;
- bus_addr_t dt_highaddr;
- bus_dma_filter_t *dt_filter;
- void *dt_filterarg;
- bus_size_t dt_maxsize;
- int dt_nsegments;
- bus_size_t dt_maxsegsz;
- int dt_flags;
- int dt_ref_count;
- int dt_map_count;
- bus_dma_lock_t *dt_lockfunc;
- void * *dt_lockfuncarg;
- bus_dma_segment_t *dt_segments;
-
- struct bus_dma_methods *dt_mt;
-};
-
-static inline int
-bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
-{
-
- return (dmat->dt_mt->dm_dmamap_create(dmat, flags, mapp));
-}
-
-static inline int
-bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
-{
-
- return (dmat->dt_mt->dm_dmamap_destroy(dmat, map));
-}
-
-static inline void
-bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
-{
-
- dmat->dt_mt->dm_dmamap_sync(dmat, map, op);
-}
-
-static inline void
-bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
-{
-
- dmat->dt_mt->dm_dmamap_unload(dmat, map);
-}
-
-static inline int
-bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp)
-{
-
- return (dmat->dt_mt->dm_dmamem_alloc(dmat, vaddr, flags, mapp));
-}
-
-static inline void
-bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
-{
-
- dmat->dt_mt->dm_dmamem_free(dmat, vaddr, map);
-}
-
-static inline bus_dma_segment_t*
-_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map,
- bus_dma_segment_t *segs, int nsegs, int error)
-{
-
- return (dmat->dt_mt->dm_dmamap_complete(dmat, map, segs,
- nsegs, error));
-}
-
-static inline int
-_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map,
- void *buf, bus_size_t buflen, struct pmap *pmap,
- int flags, bus_dma_segment_t *segs, int *segp)
-{
-
- return (dmat->dt_mt->dm_dmamap_load_buffer(dmat, map, buf, buflen,
- pmap, flags, segs, segp));
-}
-
-static inline int
-_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map,
- struct vm_page **ma, bus_size_t tlen, int ma_offs,
- int flags, bus_dma_segment_t *segs, int *segp)
-{
-
- return (bus_dmamap_load_ma_triv(dmat, map, ma, tlen, ma_offs, flags,
- segs, segp));
-}
-
-static inline int
-_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
- vm_paddr_t paddr, bus_size_t buflen,
- int flags, bus_dma_segment_t *segs, int *segp)
-{
-
- return (dmat->dt_mt->dm_dmamap_load_phys(dmat, map, paddr, buflen,
- flags, segs, segp));
-}
-
-static inline void
-_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map,
- struct memdesc *mem, bus_dmamap_callback_t *callback,
- void *callback_arg)
-{
-
- return (dmat->dt_mt->dm_dmamap_waitok(dmat, map, mem, callback,
- callback_arg));
-}
-
-#endif /* !_SPARC64_BUS_DMA_H_ */
diff --git a/sys/sparc64/include/bus_private.h b/sys/sparc64/include/bus_private.h
deleted file mode 100644
index 57f25a678c81..000000000000
--- a/sys/sparc64/include/bus_private.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1997, 1998 Justin T. Gibbs.
- * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.25 2002/01/05
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_BUS_PRIVATE_H_
-#define _MACHINE_BUS_PRIVATE_H_
-
-#include <sys/queue.h>
-
-/*
- * Helpers
- */
-int sparc64_bus_mem_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size,
- int flags, vm_offset_t vaddr, bus_space_handle_t *hp);
-int sparc64_bus_mem_unmap(bus_space_tag_t tag, bus_space_handle_t handle,
- bus_size_t size);
-bus_space_tag_t sparc64_alloc_bus_tag(void *cookie, int type);
-bus_space_handle_t sparc64_fake_bustag(int space, bus_addr_t addr,
- struct bus_space_tag *ptag);
-
-struct bus_dmamap_res {
- struct resource *dr_res;
- bus_size_t dr_used;
- SLIST_ENTRY(bus_dmamap_res) dr_link;
-};
-
-/*
- * Callers of the bus_dma interfaces must always protect their tags and maps
- * appropriately against concurrent access. However, when a map is on a LRU
- * queue, there is a second access path to it; for this case, the locking rules
- * are given in the parenthesized comments below:
- * q - locked by the mutex protecting the queue.
- * p - private to the owner of the map, no access through the queue.
- * * - comment refers to pointer target.
- * Only the owner of the map is allowed to insert the map into a queue. Removal
- * and repositioning (i.e. temporal removal and reinsertion) is allowed to all
- * if the queue lock is held.
- */
-struct bus_dmamap {
- TAILQ_ENTRY(bus_dmamap) dm_maplruq; /* (q) */
- SLIST_HEAD(, bus_dmamap_res) dm_reslist; /* (q, *q) */
- int dm_onq; /* (q) */
- int dm_flags; /* (p) */
-};
-
-/* Flag values */
-#define DMF_LOADED (1 << 0) /* Map is loaded. */
-#define DMF_COHERENT (1 << 1) /* Coherent mapping requested. */
-#define DMF_STREAMED (1 << 2) /* Streaming cache used. */
-
-int sparc64_dma_alloc_map(bus_dma_tag_t dmat, bus_dmamap_t *mapp);
-void sparc64_dma_free_map(bus_dma_tag_t dmat, bus_dmamap_t map);
-
-#endif /* !_MACHINE_BUS_PRIVATE_H_ */
diff --git a/sys/sparc64/include/cache.h b/sys/sparc64/include/cache.h
deleted file mode 100644
index a299f2e4974a..000000000000
--- a/sys/sparc64/include/cache.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-4-Clause
- *
- * Copyright (c) 1996
- * The President and Fellows of Harvard College. All rights reserved.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Aaron Brown and
- * Harvard University.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)cache.h 8.1 (Berkeley) 6/11/93
- * from: NetBSD: cache.h,v 1.3 2000/08/01 00:28:02 eeh Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CACHE_H_
-#define _MACHINE_CACHE_H_
-
-#define DCACHE_COLOR_BITS (1)
-#define DCACHE_COLORS (1 << DCACHE_COLOR_BITS)
-#define DCACHE_COLOR_MASK (DCACHE_COLORS - 1)
-#define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK)
-#define DCACHE_OTHER_COLOR(color) \
- ((color) ^ DCACHE_COLOR_BITS)
-
-#define DC_TAG_SHIFT 2
-#define DC_VALID_SHIFT 0
-
-#define DC_TAG_BITS 28
-#define DC_VALID_BITS 2
-
-#define DC_TAG_MASK ((1 << DC_TAG_BITS) - 1)
-#define DC_VALID_MASK ((1 << DC_VALID_BITS) - 1)
-
-#define IC_TAG_SHIFT 7
-#define IC_VALID_SHIFT 36
-
-#define IC_TAG_BITS 28
-#define IC_VALID_BITS 1
-
-#define IC_TAG_MASK ((1 << IC_TAG_BITS) - 1)
-#define IC_VALID_MASK ((1 << IC_VALID_BITS) - 1)
-
-#ifndef LOCORE
-
-/*
- * Cache control information
- */
-struct cacheinfo {
- u_int ic_size; /* instruction cache */
- u_int ic_assoc;
- u_int ic_linesize;
- u_int dc_size; /* data cache */
- u_int dc_assoc;
- u_int dc_linesize;
- u_int ec_size; /* external cache info */
- u_int ec_assoc;
- u_int ec_linesize;
-};
-
-#ifdef _KERNEL
-
-extern u_int dcache_color_ignore;
-
-struct pcpu;
-
-typedef void cache_enable_t(u_int cpu_impl);
-typedef void cache_flush_t(void);
-typedef void dcache_page_inval_t(vm_paddr_t pa);
-typedef void icache_page_inval_t(vm_paddr_t pa);
-
-void cache_init(struct pcpu *pcpu);
-
-cache_enable_t cheetah_cache_enable;
-cache_flush_t cheetah_cache_flush;
-dcache_page_inval_t cheetah_dcache_page_inval;
-icache_page_inval_t cheetah_icache_page_inval;
-
-cache_enable_t spitfire_cache_enable;
-cache_flush_t spitfire_cache_flush;
-dcache_page_inval_t spitfire_dcache_page_inval;
-icache_page_inval_t spitfire_icache_page_inval;
-
-cache_enable_t zeus_cache_enable;
-cache_flush_t zeus_cache_flush;
-dcache_page_inval_t zeus_dcache_page_inval;
-icache_page_inval_t zeus_icache_page_inval;
-
-extern cache_enable_t *cache_enable;
-extern cache_flush_t *cache_flush;
-extern dcache_page_inval_t *dcache_page_inval;
-extern icache_page_inval_t *icache_page_inval;
-
-#endif /* KERNEL */
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_CACHE_H_ */
diff --git a/sys/sparc64/include/ccr.h b/sys/sparc64/include/ccr.h
deleted file mode 100644
index d370684ddd73..000000000000
--- a/sys/sparc64/include/ccr.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CCR_H_
-#define _MACHINE_CCR_H_
-
-#define ICC_SHIFT 0
-#define ICC_BITS 4
-#define ICC_MASK ((1UL << ICC_BITS) - 1)
-#define ICC_C (1UL << 0)
-#define ICC_V (1UL << 1)
-#define ICC_Z (1UL << 2)
-#define ICC_N (1UL << 3)
-
-#define XCC_SHIFT 4
-#define XCC_BITS 4
-#define XCC_MASK (((1UL << XCC_BITS) - 1) << XCC_SHIFT)
-#define XCC_C (1UL << 4)
-#define XCC_V (1UL << 5)
-#define XCC_Z (1UL << 6)
-#define XCC_N (1UL << 7)
-
-#endif /* !_MACHINE_CCR_H_ */
diff --git a/sys/sparc64/include/clock.h b/sys/sparc64/include/clock.h
deleted file mode 100644
index 34b59d8c8b77..000000000000
--- a/sys/sparc64/include/clock.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*-
- * This file is in the public domain.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CLOCK_H_
-#define _MACHINE_CLOCK_H_
-
-#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/sparc64/include/cmt.h b/sys/sparc64/include/cmt.h
deleted file mode 100644
index 770f71616a8f..000000000000
--- a/sys/sparc64/include/cmt.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CMT_H_
-#define _MACHINE_CMT_H_
-
-#define INTR_ID_ID_SHIFT (0)
-#define INTR_ID_ID_SIZE (10)
-#define INTR_ID_ID_MASK \
- (((1 << INTR_ID_ID_SIZE) - 1) << INTR_ID_ID_SHIFT)
-
-#define INTR_ID_GET_ID(cr) ((cr & INTR_ID_ID_MASK) >> INTR_ID_ID_SHIFT)
-
-#endif /* _MACHINE_CMT_H_ */
diff --git a/sys/sparc64/include/counter.h b/sys/sparc64/include/counter.h
deleted file mode 100644
index 128d5c0fce7e..000000000000
--- a/sys/sparc64/include/counter.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef __MACHINE_COUNTER_H__
-#define __MACHINE_COUNTER_H__
-
-#include <sys/pcpu.h>
-#ifdef INVARIANTS
-#include <sys/proc.h>
-#endif
-
-extern struct pcpu dummy_pcpu[];
-#define EARLY_COUNTER &dummy_pcpu[0].pc_early_dummy_counter
-
-#define counter_enter() critical_enter()
-#define counter_exit() critical_exit()
-
-#ifdef IN_SUBR_COUNTER_C
-static inline uint64_t
-counter_u64_read_one(uint64_t *p, int cpu)
-{
-
- return (*(uint64_t *)((char *)p + UMA_PCPU_ALLOC_SIZE * cpu));
-}
-
-static inline uint64_t
-counter_u64_fetch_inline(uint64_t *p)
-{
- uint64_t r;
- int i;
-
- r = 0;
- for (i = 0; i < mp_ncpus; i++)
- r += counter_u64_read_one((uint64_t *)p, i);
-
- return (r);
-}
-
-/* XXXKIB might interrupt increment */
-static void
-counter_u64_zero_one_cpu(void *arg)
-{
-
- *((uint64_t *)((char *)arg + UMA_PCPU_ALLOC_SIZE *
- PCPU_GET(cpuid))) = 0;
-}
-
-static inline void
-counter_u64_zero_inline(counter_u64_t c)
-{
-
- smp_rendezvous(smp_no_rendezvous_barrier, counter_u64_zero_one_cpu,
- smp_no_rendezvous_barrier, c);
-}
-#endif
-
-#define counter_u64_add_protected(c, inc) do { \
- CRITICAL_ASSERT(curthread); \
- *(uint64_t *)zpcpu_get(c) += (inc); \
-} while (0)
-
-static inline void
-counter_u64_add(counter_u64_t c, int64_t inc)
-{
-
- counter_enter();
- counter_u64_add_protected(c, inc);
- counter_exit();
-}
-
-#endif /* ! __MACHINE_COUNTER_H__ */
diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h
deleted file mode 100644
index a91159f6a7a2..000000000000
--- a/sys/sparc64/include/cpu.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
- * from: FreeBSD: src/sys/i386/include/cpu.h,v 1.62 2001/06/29
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CPU_H_
-#define _MACHINE_CPU_H_
-
-#include <machine/frame.h>
-#include <machine/tstate.h>
-
-#define TRAPF_PC(tfp) ((tfp)->tf_tpc)
-#define TRAPF_USERMODE(tfp) (((tfp)->tf_tstate & TSTATE_PRIV) == 0)
-
-#define cpu_getstack(td) ((td)->td_frame->tf_sp)
-#define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp))
-#define cpu_spinwait() /* nothing */
-#define cpu_lock_delay() DELAY(1)
-
-#ifdef _KERNEL
-
-extern char btext[];
-extern char etext[];
-
-void cheetah_init(u_int cpu_impl);
-void cpu_halt(void) __dead2;
-void cpu_reset(void) __dead2;
-void fork_trampoline(void);
-void swi_vm(void *v);
-void zeus_init(u_int cpu_impl);
-
-static __inline u_int64_t
-get_cyclecount(void)
-{
-
- return (rd(tick));
-}
-
-#endif
-
-#endif /* !_MACHINE_CPU_H_ */
diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h
deleted file mode 100644
index 934e671707b9..000000000000
--- a/sys/sparc64/include/cpufunc.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_CPUFUNC_H_
-#define _MACHINE_CPUFUNC_H_
-
-#include <machine/asi.h>
-#include <machine/pstate.h>
-
-struct thread;
-
-/*
- * Membar operand macros for use in other macros when # is a special
- * character. Keep these in sync with what the hardware expects.
- */
-#define C_Lookaside (0)
-#define C_MemIssue (1)
-#define C_Sync (2)
-#define M_LoadLoad (0)
-#define M_StoreLoad (1)
-#define M_LoadStore (2)
-#define M_StoreStore (3)
-
-#define CMASK_SHIFT (4)
-#define MMASK_SHIFT (0)
-
-#define CMASK_GEN(bit) ((1 << (bit)) << CMASK_SHIFT)
-#define MMASK_GEN(bit) ((1 << (bit)) << MMASK_SHIFT)
-
-#define Lookaside CMASK_GEN(C_Lookaside)
-#define MemIssue CMASK_GEN(C_MemIssue)
-#define Sync CMASK_GEN(C_Sync)
-#define LoadLoad MMASK_GEN(M_LoadLoad)
-#define StoreLoad MMASK_GEN(M_StoreLoad)
-#define LoadStore MMASK_GEN(M_LoadStore)
-#define StoreStore MMASK_GEN(M_StoreStore)
-
-#define casa(rs1, rs2, rd, asi) ({ \
- u_int __rd = (uint32_t)(rd); \
- __asm __volatile("casa [%2] %3, %4, %0" \
- : "+r" (__rd), "=m" (*rs1) \
- : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \
- __rd; \
-})
-
-#define casxa(rs1, rs2, rd, asi) ({ \
- u_long __rd = (uint64_t)(rd); \
- __asm __volatile("casxa [%2] %3, %4, %0" \
- : "+r" (__rd), "=m" (*rs1) \
- : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \
- __rd; \
-})
-
-#define flush(va) do { \
- __asm __volatile("flush %0" : : "r" (va)); \
-} while (0)
-
-#define flushw() do { \
- __asm __volatile("flushw" : :); \
-} while (0)
-
-#define mov(val, reg) do { \
- __asm __volatile("mov %0, %" __XSTRING(reg) : : "r" (val)); \
-} while (0)
-
-/* Generate ld*a/st*a functions for non-constant ASIs. */
-#define LDNC_GEN(tp, o) \
- static __inline tp \
- o ## _nc(caddr_t va, int asi) \
- { \
- tp r; \
- __asm __volatile("wr %2, 0, %%asi;" #o " [%1] %%asi, %0"\
- : "=r" (r) : "r" (va), "r" (asi)); \
- return (r); \
- }
-
-LDNC_GEN(u_char, lduba);
-LDNC_GEN(u_short, lduha);
-LDNC_GEN(u_int, lduwa);
-LDNC_GEN(u_long, ldxa);
-
-#define LD_GENERIC(va, asi, op, type) ({ \
- type __r; \
- __asm __volatile(#op " [%1] %2, %0" \
- : "=r" (__r) : "r" (va), "n" (asi)); \
- __r; \
-})
-
-#define lduba(va, asi) LD_GENERIC(va, asi, lduba, u_char)
-#define lduha(va, asi) LD_GENERIC(va, asi, lduha, u_short)
-#define lduwa(va, asi) LD_GENERIC(va, asi, lduwa, u_int)
-#define ldxa(va, asi) LD_GENERIC(va, asi, ldxa, u_long)
-
-#define STNC_GEN(tp, o) \
- static __inline void \
- o ## _nc(caddr_t va, int asi, tp val) \
- { \
- __asm __volatile("wr %2, 0, %%asi;" #o " %0, [%1] %%asi"\
- : : "r" (val), "r" (va), "r" (asi)); \
- }
-
-STNC_GEN(u_char, stba);
-STNC_GEN(u_short, stha);
-STNC_GEN(u_int, stwa);
-STNC_GEN(u_long, stxa);
-
-#define ST_GENERIC(va, asi, val, op) \
- __asm __volatile(#op " %0, [%1] %2" \
- : : "r" (val), "r" (va), "n" (asi)); \
-
-#define stba(va, asi, val) ST_GENERIC(va, asi, val, stba)
-#define stha(va, asi, val) ST_GENERIC(va, asi, val, stha)
-#define stwa(va, asi, val) ST_GENERIC(va, asi, val, stwa)
-#define stxa(va, asi, val) ST_GENERIC(va, asi, val, stxa)
-
-/*
- * Attempt to read from addr, val. If a Data Access Error trap happens,
- * they return -1 and the contents of val is undefined. A return of 0
- * means no trap happened, and the contents of val is valid.
- */
-int fasword8(u_long asi, void *addr, uint8_t *val);
-int fasword16(u_long asi, void *addr, uint16_t *val);
-int fasword32(u_long asi, void *addr, uint32_t *val);
-
-#define membar(mask) do { \
- __asm __volatile("membar %0" : : "n" (mask) : "memory"); \
-} while (0)
-
-#define rd(name) ({ \
- uint64_t __sr; \
- __asm __volatile("rd %%" #name ", %0" : "=r" (__sr) :); \
- __sr; \
-})
-
-#define wr(name, val, xorval) do { \
- __asm __volatile("wr %0, %1, %%" #name \
- : : "r" (val), "rI" (xorval)); \
-} while (0)
-
-#define rdpr(name) ({ \
- uint64_t __pr; \
- __asm __volatile("rdpr %%" #name", %0" : "=r" (__pr) :); \
- __pr; \
-})
-
-#define wrpr(name, val, xorval) do { \
- __asm __volatile("wrpr %0, %1, %%" #name \
- : : "r" (val), "rI" (xorval)); \
-} while (0)
-
-/*
- * Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently
- * of the selected instruction set.
- */
-#define rdtickcmpr() rd(asr23)
-#define rdstick() rd(asr24)
-#define rdstickcmpr() rd(asr25)
-#define wrtickcmpr(val, xorval) wr(asr23, (val), (xorval))
-#define wrstick(val, xorval) wr(asr24, (val), (xorval))
-#define wrstickcmpr(val, xorval) wr(asr25, (val), (xorval))
-
-/*
- * Macro intended to be used instead of wr(asr23, val, xorval) for writing to
- * the TICK_COMPARE register in order to avoid a bug in BlackBird CPUs that
- * can cause these writes to fail under certain conditions which in turn
- * causes the hardclock to stop. The workaround is to read the TICK_COMPARE
- * register back immediately after writing to it with these two instructions
- * aligned to a quadword boundary in order to ensure that I$ misses won't
- * split them up.
- */
-#define wrtickcmpr_bbwar(val, xorval) ({ \
- __asm __volatile( \
- " ba,pt %%xcc, 1f ; " \
- " nop ; " \
- " .align 128 ; " \
- "1: wr %0, %1, %%asr23 ; " \
- " rd %%asr23, %%g0 ; " \
- : : "r" (val), "rI" (xorval)); \
-})
-
-static __inline void
-breakpoint(void)
-{
-
- __asm __volatile("ta %%xcc, 1" : :);
-}
-
-static __inline register_t
-intr_disable(void)
-{
- register_t s;
-
- s = rdpr(pstate);
- wrpr(pstate, s & ~PSTATE_IE, 0);
- return (s);
-}
-#define intr_restore(s) wrpr(pstate, (s), 0)
-
-/*
- * In some places, it is required that the store is directly followed by a
- * membar #Sync. Don't trust the compiler to not insert instructions in
- * between. We also need to disable interrupts completely.
- */
-#define stxa_sync(va, asi, val) do { \
- register_t s; \
- s = intr_disable(); \
- __asm __volatile("stxa %0, [%1] %2; membar #Sync" \
- : : "r" (val), "r" (va), "n" (asi)); \
- intr_restore(s); \
-} while (0)
-
-void ascopy(u_long asi, vm_offset_t src, vm_offset_t dst, size_t len);
-void ascopyfrom(u_long sasi, vm_offset_t src, caddr_t dst, size_t len);
-void ascopyto(caddr_t src, u_long dasi, vm_offset_t dst, size_t len);
-void aszero(u_long asi, vm_offset_t dst, size_t len);
-
-/*
- * Ultrasparc II doesn't implement popc in hardware.
- */
-#if 0
-#define HAVE_INLINE_FFS
-/*
- * See page 202 of the SPARC v9 Architecture Manual.
- */
-static __inline int
-ffs(int mask)
-{
- int result;
- int neg;
- int tmp;
-
- __asm __volatile(
- " neg %3, %1 ; "
- " xnor %3, %1, %2 ; "
- " popc %2, %0 ; "
- " movrz %3, %%g0, %0 ; "
- : "=r" (result), "=r" (neg), "=r" (tmp) : "r" (mask));
- return (result);
-}
-#endif
-
-#undef LDNC_GEN
-#undef STNC_GEN
-
-#endif /* !_MACHINE_CPUFUNC_H_ */
diff --git a/sys/sparc64/include/db_machdep.h b/sys/sparc64/include/db_machdep.h
deleted file mode 100644
index 73d737c739c4..000000000000
--- a/sys/sparc64/include/db_machdep.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Mach Operating System
- * Copyright (c) 1991,1990 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- *
- * from: FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_DB_MACHDEP_H_
-#define _MACHINE_DB_MACHDEP_H_
-
-#include <machine/frame.h>
-#include <machine/trap.h>
-
-typedef vm_offset_t db_addr_t;
-typedef long db_expr_t;
-
-#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_pc)
-
-#define BKPT_INST (0x91d03001)
-#define BKPT_SIZE (4)
-#define BKPT_SET(inst) (BKPT_INST)
-
-#define BKPT_SKIP do { \
- kdb_frame->tf_tpc = kdb_frame->tf_tnpc + 4; \
- kdb_frame->tf_tnpc += 8; \
-} while (0)
-
-#define db_clear_single_step kdb_cpu_clear_singlestep
-#define db_set_single_step kdb_cpu_set_singlestep
-
-#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
-#define IS_WATCHPOINT_TRAP(type, code) (0)
-
-#define inst_trap_return(ins) (0)
-#define inst_return(ins) (0)
-#define inst_call(ins) (0)
-#define inst_load(ins) (0)
-#define inst_store(ins) (0)
-
-#define DB_ELFSIZE 64
-
-#endif /* !_MACHINE_DB_MACHDEP_H_ */
diff --git a/sys/sparc64/include/dcr.h b/sys/sparc64/include/dcr.h
deleted file mode 100644
index f6e45d8c4d66..000000000000
--- a/sys/sparc64/include/dcr.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2008 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_DCR_H_
-#define _MACHINE_DCR_H_
-
-/*
- * Definitions for the UltraSPARC-III Depatch Control Register (ASR 18).
- */
-#define DCR_MS (1UL << 0)
-#define DCR_IFPOE (1UL << 1)
-#define DCR_SI (1UL << 3)
-#define DCR_RPE (1UL << 4)
-#define DCR_BPE (1UL << 5)
-
-#define DCR_OBSDATA_SHIFT 6
-#define DCR_OBSDATA_CT_BITS 8
-#define DCR_OBSDATA_CT_MASK \
- (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT)
-
-/* The following bits are valid for the UltraSPARC-III++/IV+ only. */
-#define DCR_IPE (1UL << 2)
-
-#define DCR_OBSDATA_CTP_BITS 6
-#define DCR_OBSDATA_CTP_MASK \
- (((1UL << DCR_OBSDATA_CTP_BITS) - 1) << DCR_OBSDATA_SHIFT)
-
-#define DCR_DPE (1UL << 12)
-
-/* The following bits are valid for the UltraSPARC-IV+ only. */
-#define DCR_BPM_SHIFT 13
-#define DCR_BPM_BITS 2
-#define DCR_BPM_MASK \
- (((1UL << DCR_BPM_BITS) - 1) << DCR_BPM_SHIFT)
-#define DCR_BPM_1HIST_GSHARE (0UL << DCR_BPM_SHIFT)
-#define DCR_BPM_2HIST_GSHARE (1UL << DCR_BPM_SHIFT)
-#define DCR_BPM_PC (2UL << DCR_BPM_SHIFT)
-#define DCR_BPM_2HIST_MIXED (3UL << DCR_BPM_SHIFT)
-
-#define DCR_JPE (1UL << 15)
-#define DCR_ITPE (1UL << 16)
-#define DCR_DTPE (1UL << 17)
-#define DCR_PPE (1UL << 18)
-
-#endif /* _MACHINE_DCR_H_ */
diff --git a/sys/sparc64/include/dump.h b/sys/sparc64/include/dump.h
deleted file mode 100644
index f1546603f6cf..000000000000
--- a/sys/sparc64/include/dump.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 2014 EMC Corp.
- * Author: Conrad Meyer <conrad.meyer@isilon.com>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_DUMP_H_
-#define _MACHINE_DUMP_H_
-
-#define DUMPSYS_MD_PA_NPAIRS 128
-#define DUMPSYS_NUM_AUX_HDRS 0
-#define KERNELDUMP_ARCH_VERSION KERNELDUMP_SPARC64_VERSION
-#define EM_VALUE EM_SPARCV9
-
-int dumpsys(struct dumperinfo *);
-
-static inline struct dump_pa *
-dumpsys_pa_next(struct dump_pa *p)
-{
-
- return (dumpsys_gen_pa_next(p));
-}
-
-static inline void
-dumpsys_wbinv_all(void)
-{
-
- dumpsys_gen_wbinv_all();
-}
-
-static inline void
-dumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va)
-{
-
- dumpsys_gen_unmap_chunk(pa, s, va);
-}
-
-static inline int
-minidumpsys(struct dumperinfo *di)
-{
-
- return (-ENOSYS);
-}
-
-#endif /* !_MACHINE_DUMP_H_ */
diff --git a/sys/sparc64/include/efi.h b/sys/sparc64/include/efi.h
deleted file mode 100644
index 1f7ad0da18af..000000000000
--- a/sys/sparc64/include/efi.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*-
- * This file is in the public domain since it's just boilerplate.
- *
- * $FreeBSD$
- */
-
-#ifndef __SPARC64_INCLUDE_EFI_H_
-#define __SPARC64_INCLUDE_EFI_H_
-
-#define EFIABI_ATTR
-
-/* Note: we don't actually support this on sparc64 */
-
-#endif /* __I386_INCLUDE_EFI_H_ */
diff --git a/sys/sparc64/include/elf.h b/sys/sparc64/include/elf.h
deleted file mode 100644
index 4642864cda47..000000000000
--- a/sys/sparc64/include/elf.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1996-1997 John D. Polstra.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ELF_H_
-#define _MACHINE_ELF_H_ 1
-
-/*
- * ELF definitions for the sparc64 architecture.
- */
-
-#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
-#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
-
-#ifndef __ELF_WORD_SIZE
-#define __ELF_WORD_SIZE 64 /* Used by <sys/elf_generic.h> */
-#endif
-#include <sys/elf_generic.h>
-
-#define ELF_ARCH EM_SPARCV9
-
-#define ELF_MACHINE_OK(x) ((x) == ELF_ARCH)
-
-/*
- * Auxiliary vector entries for passing information to the interpreter.
- */
-
-typedef struct { /* Auxiliary vector entry on initial stack */
- int a_type; /* Entry type. */
- union {
- int a_val; /* Integer value. */
- } a_un;
-} Elf32_Auxinfo;
-
-typedef struct { /* Auxiliary vector entry on initial stack */
- long a_type; /* Entry type. */
- union {
- long a_val; /* Integer value. */
- void *a_ptr; /* Address. */
- void (*a_fcn)(void); /* Function pointer (not used). */
- } a_un;
-} Elf64_Auxinfo;
-
-__ElfType(Auxinfo);
-
-/* Define "machine" characteristics */
-#if __ELF_WORD_SIZE == 32
-#define ELF_TARG_CLASS ELFCLASS32
-#else
-#define ELF_TARG_CLASS ELFCLASS64
-#endif
-#define ELF_TARG_DATA ELFDATA2MSB
-#define ELF_TARG_MACH ELF_ARCH
-#define ELF_TARG_VER 1
-
-#define ET_DYN_LOAD_ADDR 0x100000
-
-#endif /* !_MACHINE_ELF_H_ */
diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h
deleted file mode 100644
index f94a6df29b89..000000000000
--- a/sys/sparc64/include/endian.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1987, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)endian.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-#include <sys/cdefs.h>
-#include <sys/_types.h>
-
-/*
- * Define the order of 32-bit words in 64-bit words.
- */
-#define _QUAD_HIGHWORD 0
-#define _QUAD_LOWWORD 1
-
-/*
- * Definitions for byte order, according to byte significance from low
- * address to high.
- */
-#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
-#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
-#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
-
-#define _BYTE_ORDER _BIG_ENDIAN
-
-/*
- * Deprecated variants that don't have enough underscores to be useful in more
- * strict namespaces.
- */
-#if __BSD_VISIBLE
-#define LITTLE_ENDIAN _LITTLE_ENDIAN
-#define BIG_ENDIAN _BIG_ENDIAN
-#define PDP_ENDIAN _PDP_ENDIAN
-#define BYTE_ORDER _BYTE_ORDER
-#endif
-
-#if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) && defined(__OPTIMIZE__)
-#define __is_constant(x) __builtin_constant_p(x)
-#else
-#define __is_constant(x) 0
-#endif
-
-#define __bswap16_const(x) ((((__uint16_t)(x) >> 8) & 0xff) | \
- (((__uint16_t)(x) << 8) & 0xff00))
-#define __bswap32_const(x) ((((__uint32_t)(x) >> 24) & 0xff) | \
- (((__uint32_t)(x) >> 8) & 0xff00) | \
- (((__uint32_t)(x)<< 8) & 0xff0000) | \
- (((__uint32_t)(x) << 24) & 0xff000000))
-#define __bswap64_const(x) ((((__uint64_t)(x) >> 56) & 0xff) | \
- (((__uint64_t)(x) >> 40) & 0xff00) | \
- (((__uint64_t)(x) >> 24) & 0xff0000) | \
- (((__uint64_t)(x) >> 8) & 0xff000000) | \
- (((__uint64_t)(x) << 8) & ((__uint64_t)0xff << 32)) | \
- (((__uint64_t)(x) << 24) & ((__uint64_t)0xff << 40)) | \
- (((__uint64_t)(x) << 40) & ((__uint64_t)0xff << 48)) | \
- (((__uint64_t)(x) << 56) & ((__uint64_t)0xff << 56)))
-
-static __inline __uint16_t
-__bswap16_var(__uint16_t _x)
-{
-
- return ((_x >> 8) | ((_x << 8) & 0xff00));
-}
-
-static __inline __uint32_t
-__bswap32_var(__uint32_t _x)
-{
-
- return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) |
- ((_x << 24) & 0xff000000));
-}
-
-static __inline __uint64_t
-__bswap64_var(__uint64_t _x)
-{
-
- return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) |
- ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) |
- ((_x << 24) & ((__uint64_t)0xff << 40)) |
- ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
-}
-
-#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \
- __bswap16_var(x)))
-#define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \
- __bswap32_var(x))
-#define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \
- __bswap64_var(x))
-
-#define __htonl(x) ((__uint32_t)(x))
-#define __htons(x) ((__uint16_t)(x))
-#define __ntohl(x) ((__uint32_t)(x))
-#define __ntohs(x) ((__uint16_t)(x))
-
-#endif /* !_MACHINE_ENDIAN_H_ */
diff --git a/sys/sparc64/include/exec.h b/sys/sparc64/include/exec.h
deleted file mode 100644
index 68f933f6dd53..000000000000
--- a/sys/sparc64/include/exec.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_EXEC_H_
-#define _MACHINE_EXEC_H_
-
-#define __LDPGSZ 8192
-
-#endif /* !_MACHINE_EXEC_H_ */
diff --git a/sys/sparc64/include/fireplane.h b/sys/sparc64/include/fireplane.h
deleted file mode 100644
index 5a95b52bc8c9..000000000000
--- a/sys/sparc64/include/fireplane.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_FIREPLANE_H_
-#define _MACHINE_FIREPLANE_H_
-
-#define FIREPLANE_CR_AID_SHIFT (17)
-#define FIREPLANE_CR_AID_SIZE (10)
-#define FIREPLANE_CR_AID_MASK \
- (((1 << FIREPLANE_CR_AID_SIZE) - 1) << FIREPLANE_CR_AID_SHIFT)
-
-#define FIREPLANE_CR_GET_AID(cr) \
- ((cr & FIREPLANE_CR_AID_MASK) >> FIREPLANE_CR_AID_SHIFT)
-
-#endif /* _MACHINE_FIREPLANE_H_ */
diff --git a/sys/sparc64/include/float.h b/sys/sparc64/include/float.h
deleted file mode 100644
index 104fc50fd79e..000000000000
--- a/sys/sparc64/include/float.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1992, 1993, 2001
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)float.h 8.1 (Berkeley) 6/11/93
- * from: NetBSD: float.h,v 1.3 2001/09/21 20:48:02 eeh Exp
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_FLOAT_H_
-#define _MACHINE_FLOAT_H_
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int __flt_rounds(void);
-__END_DECLS
-
-#define FLT_RADIX 2 /* b */
-#define FLT_ROUNDS __flt_rounds()
-#if __ISO_C_VISIBLE >= 1999
-#define FLT_EVAL_METHOD 0 /* no promotion */
-#define DECIMAL_DIG 36 /* max precision in decimal digits */
-#endif
-
-#define FLT_MANT_DIG 24 /* p */
-#define FLT_EPSILON 1.19209290E-7F /* b**(1-p) */
-#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
-#define FLT_MIN_EXP (-125) /* emin */
-#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
-#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
-#define FLT_MAX_EXP 128 /* emax */
-#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
-#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
-#if __ISO_C_VISIBLE >= 2011
-#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
-#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
-#define FLT_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#define DBL_MANT_DIG 53
-#define DBL_EPSILON 2.2204460492503131E-16
-#define DBL_DIG 15
-#define DBL_MIN_EXP (-1021)
-#define DBL_MIN 2.2250738585072014E-308
-#define DBL_MIN_10_EXP (-307)
-#define DBL_MAX_EXP 1024
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MAX_10_EXP 308
-#if __ISO_C_VISIBLE >= 2011
-#define DBL_TRUE_MIN 4.9406564584124654E-324
-#define DBL_DECIMAL_DIG 17
-#define DBL_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#define LDBL_MANT_DIG 113
-#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
-#define LDBL_DIG 33
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_EXP (+16384)
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#define LDBL_MAX_10_EXP (+4932)
-#if __ISO_C_VISIBLE >= 2011
-#define LDBL_TRUE_MIN 6.475175119438025110924438958227646552E-4966L
-#define LDBL_DECIMAL_DIG 36
-#define LDBL_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/sparc64/include/floatingpoint.h b/sys/sparc64/include/floatingpoint.h
deleted file mode 100644
index d91efcebeefd..000000000000
--- a/sys/sparc64/include/floatingpoint.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 2002 David O'Brien <obrien@FreeBSD.org>.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DAVID O'BRIEN 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 REGENTS 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _FLOATINGPOINT_H_
-#define _FLOATINGPOINT_H_
-
-#include <machine/ieeefp.h>
-
-#endif /* !_FLOATINGPOINT_H_ */
diff --git a/sys/sparc64/include/fp.h b/sys/sparc64/include/fp.h
deleted file mode 100644
index 67e0932880f1..000000000000
--- a/sys/sparc64/include/fp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_FP_H_
-#define _MACHINE_FP_H_
-
-#ifdef _KERNEL
-
-/*
- * Note: The pointer passed to savefpctx must be aligned on a 64 byte
- * boundary.
- */
-void savefpctx(uint32_t *fp);
-
-#endif /* _KERNEL */
-#endif /* !_MACHINE_FP_H_ */
diff --git a/sys/sparc64/include/frame.h b/sys/sparc64/include/frame.h
deleted file mode 100644
index 3bb28298ad80..000000000000
--- a/sys/sparc64/include/frame.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_FRAME_H_
-#define _MACHINE_FRAME_H_
-
-#define RW_SHIFT 7
-#define SPOFF 2047
-#define BIAS SPOFF /* XXX - open/netbsd compat */
-
-#ifndef LOCORE
-
-/*
- * NOTE: keep this structure in sync with struct reg and struct mcontext.
- */
-struct trapframe {
- uint64_t tf_global[8];
- uint64_t tf_out[8];
- uint64_t tf_fprs;
- uint64_t tf_fsr;
- uint64_t tf_gsr;
- uint64_t tf_level;
- uint64_t tf_pil;
- uint64_t tf_sfar;
- uint64_t tf_sfsr;
- uint64_t tf_tar;
- uint64_t tf_tnpc;
- uint64_t tf_tpc;
- uint64_t tf_tstate;
- uint64_t tf_type;
- uint64_t tf_y;
- uint64_t tf_wstate;
- uint64_t tf_pad[2];
-};
-#define tf_sp tf_out[6]
-
-#define TF_DONE(tf) do { \
- tf->tf_tpc = tf->tf_tnpc; \
- tf->tf_tnpc += 4; \
-} while (0)
-
-struct frame {
- u_long fr_local[8];
- u_long fr_in[8];
- u_long fr_pad[8];
-};
-#define fr_arg fr_in
-#define fr_fp fr_in[6]
-#define fr_pc fr_in[7]
-
-#define v9next_frame(fp) ((struct frame *)(fp->fr_fp + BIAS))
-
-/*
- * Frame used for pcb_rw.
- */
-struct rwindow {
- u_long rw_local[8];
- u_long rw_in[8];
-};
-
-struct thread;
-
-int rwindow_save(struct thread *td);
-int rwindow_load(struct thread *td, struct trapframe *tf, int n);
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_FRAME_H_ */
diff --git a/sys/sparc64/include/fsr.h b/sys/sparc64/include/fsr.h
deleted file mode 100644
index ec8c17d91a7a..000000000000
--- a/sys/sparc64/include/fsr.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_FSR_H_
-#define _MACHINE_FSR_H_
-
-#define FPRS_DL (1 << 0)
-#define FPRS_DU (1 << 1)
-#define FPRS_FEF (1 << 2)
-
-#define VIS_BLOCKSIZE 64
-
-#ifndef LOCORE
-
-#define FSR_EXC_BITS 5
-#define FSR_EXC_MASK ((1UL << FSR_EXC_BITS) - 1)
-#define FSR_CEXC_SHIFT 0
-#define FSR_CEXC_MASK (FSR_EXC_MASK << FSR_CEXC_SHIFT)
-#define FSR_CEXC(b) ((unsigned long)(b) << FSR_CEXC_SHIFT)
-#define FSR_GET_CEXC(x) (((x) & FSR_CEXC_MASK) >> FSR_CEXC_SHIFT)
-#define FSR_AEXC_SHIFT 5
-#define FSR_AEXC_MASK (FSR_EXC_MASK << FSR_AEXC_SHIFT)
-#define FSR_AEXC(b) ((unsigned long)(b) << FSR_AEXC_SHIFT)
-#define FSR_GET_AEXC(x) (((x) & FSR_AEXC_MASK) >> FSR_AEXC_SHIFT)
-#define FSR_QNE (1UL << 13)
-#define FSR_NS (1UL << 22)
-#define FSR_TEM_SHIFT 23
-#define FSR_TEM_MASK (FSR_EXC_MASK << FSR_TEM_SHIFT)
-#define FSR_TEM(b) ((unsigned long)(b) << FSR_TEM_SHIFT)
-#define FSR_GET_TEM(x) (((x) & FSR_TEM_MASK) >> FSR_TEM_SHIFT)
-#define FSR_FCC0_SHIFT 10
-#define FSR_FCC0_BITS 2
-#define FSR_FCC0_MASK (((1UL << FSR_FCC0_BITS) - 1) << FSR_FCC0_SHIFT)
-#define FSR_FCC0(x) ((unsigned long)(x) << FSR_FCC0_SHIFT)
-#define FSR_GET_FCC0(x) (((x) & FSR_FCC0_MASK) >> FSR_FCC0_SHIFT)
-#define FSR_FTT_SHIFT 14
-#define FSR_FTT_BITS 3
-#define FSR_FTT_MASK (((1UL << FSR_FTT_BITS) - 1) << FSR_FTT_SHIFT)
-#define FSR_FTT(x) ((unsigned long)(x) << FSR_FTT_SHIFT)
-#define FSR_GET_FTT(x) (((x) & FSR_FTT_MASK) >> FSR_FTT_SHIFT)
-#define FSR_VER_SHIFT 17
-#define FSR_GET_VER(x) (((x) >> FSR_VER_SHIFT) & 7)
-#define FSR_RD_SHIFT 30
-#define FSR_RD_BITS 2
-#define FSR_RD_MASK (((1UL << FSR_RD_BITS) - 1) << FSR_RD_SHIFT)
-#define FSR_RD(x) ((unsigned long)(x) << FSR_RD_SHIFT)
-#define FSR_GET_RD(x) (((x) & FSR_RD_MASK) >> FSR_RD_SHIFT)
-#define FSR_FCC1_SHIFT 32
-#define FSR_FCC1_BITS 2
-#define FSR_FCC1_MASK (((1UL << FSR_FCC1_BITS) - 1) << FSR_FCC1_SHIFT)
-#define FSR_FCC1(x) ((unsigned long)(x) << FSR_FCC1_SHIFT)
-#define FSR_GET_FCC1(x) (((x) & FSR_FCC1_MASK) >> FSR_FCC1_SHIFT)
-#define FSR_FCC2_SHIFT 34
-#define FSR_FCC2_BITS 2
-#define FSR_FCC2_MASK (((1UL << FSR_FCC2_BITS) - 1) << FSR_FCC2_SHIFT)
-#define FSR_FCC2(x) ((unsigned long)(x) << FSR_FCC2_SHIFT)
-#define FSR_GET_FCC2(x) (((x) & FSR_FCC2_MASK) >> FSR_FCC2_SHIFT)
-#define FSR_FCC3_SHIFT 36
-#define FSR_FCC3_BITS 2
-#define FSR_FCC3_MASK (((1UL << FSR_FCC3_BITS) - 1) << FSR_FCC3_SHIFT)
-#define FSR_FCC3(x) ((unsigned long)(x) << FSR_FCC3_SHIFT)
-#define FSR_GET_FCC3(x) (((x) & FSR_FCC3_MASK) >> FSR_FCC3_SHIFT)
-
-/* CEXC/AEXC/TEM exception values */
-#define FSR_NX (1 << 0)
-#define FSR_DZ (1 << 1)
-#define FSR_UF (1 << 2)
-#define FSR_OF (1 << 3)
-#define FSR_NV (1 << 4)
-/* FTT values. */
-#define FSR_FTT_NONE 0
-#define FSR_FTT_IEEE 1
-#define FSR_FTT_UNFIN 2
-#define FSR_FTT_UNIMP 3
-#define FSR_FTT_SEQERR 4
-#define FSR_FTT_HWERR 5
-#define FSR_FTT_INVREG 6
-/* RD values */
-#define FSR_RD_N 0 /* nearest */
-#define FSR_RD_Z 1 /* zero */
-#define FSR_RD_PINF 2 /* +infinity */
-#define FSR_RD_NINF 3 /* -infinity */
-/* condition codes */
-#define FSR_CC_EQ 0 /* a = b */
-#define FSR_CC_LT 1 /* a < b */
-#define FSR_CC_GT 2 /* a > b */
-#define FSR_CC_UO 3 /* unordered */
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_FSR_H_ */
diff --git a/sys/sparc64/include/gdb_machdep.h b/sys/sparc64/include/gdb_machdep.h
deleted file mode 100644
index 502d0c2e347b..000000000000
--- a/sys/sparc64/include/gdb_machdep.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004 Marcel Moolenaar
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_GDB_MACHDEP_H_
-#define _MACHINE_GDB_MACHDEP_H_
-
-#define GDB_BUFSZ 600
-#define GDB_NREGS 86
-#define GDB_REG_PC 80
-
-static __inline size_t
-gdb_cpu_regsz(int regnum)
-{
- return ((regnum >= 32 && regnum < 64) ? sizeof(float) : sizeof(long));
-}
-
-static __inline int
-gdb_cpu_query(void)
-{
- return (0);
-}
-
-static __inline int
-gdb_cpu_signal(int vector, int _)
-{
- return (vector);
-}
-
-static __inline void *
-gdb_begin_write(void)
-{
-
- return (NULL);
-}
-
-static __inline void
-gdb_end_write(void *arg __unused)
-{
-
-}
-
-void *gdb_cpu_getreg(int, size_t *);
-void gdb_cpu_setreg(int, void *);
-
-#endif /* !_MACHINE_GDB_MACHDEP_H_ */
diff --git a/sys/sparc64/include/idprom.h b/sys/sparc64/include/idprom.h
deleted file mode 100644
index 442b6b32bbff..000000000000
--- a/sys/sparc64/include/idprom.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-NetBSD
- *
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Adam Glass.
- *
- * 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.
- *
- * from: NetBSD: idprom.h,v 1.3 2008/04/28 20:23:58 martin Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IDPROM_H_
-#define _MACHINE_IDPROM_H_
-
-/*
- * ID prom format. The ``host id'' is set up by taking the machine
- * ID as the top byte and the hostid field as the remaining three.
- * The id_xxx0 field appears to contain some other number. The id_xxx1
- * contains a bunch of 00's and a5's on my machines, suggesting it is
- * not actually used. The checksum seems to include them, however.
- */
-struct idprom {
- u_char id_format; /* format identifier (= 1) */
- u_char id_machine; /* machine type (see param.h) */
- u_char id_ether[6]; /* ethernet address */
- int id_date; /* date of manufacture */
- u_char id_hostid[3]; /* ``host id'' bytes */
- u_char id_checksum; /* xor of everything else */
- /* Note: The rest is excluded from the checksum! */
- char id_undef[16]; /* undefined */
-};
-
-#define ID_SUN4_100 0x22 /* Sun 4/100 */
-#define ID_SUN4_200 0x21 /* Sun 4/200 */
-#define ID_SUN4_300 0x23 /* Sun 4/300 */
-#define ID_SUN4_400 0x24 /* Sun 4/400 */
-
-#define IDPROM_VERSION 1
-
-#endif /* !_MACHINE_IDPROM_H_ */
diff --git a/sys/sparc64/include/ieee.h b/sys/sparc64/include/ieee.h
deleted file mode 100644
index 773af1356cc6..000000000000
--- a/sys/sparc64/include/ieee.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)ieee.h 8.1 (Berkeley) 6/11/93
- * from: NetBSD: ieee.h,v 1.1.1.1 1998/06/20 04:58:51 eeh Exp
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IEEE_H_
-#define _MACHINE_IEEE_H_
-
-/*
- * ieee.h defines the machine-dependent layout of the machine's IEEE
- * floating point. It does *not* define (yet?) any of the rounding
- * mode bits, exceptions, and so forth.
- */
-
-/*
- * Define the number of bits in each fraction and exponent.
- *
- * k k+1
- * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented
- *
- * (-exp_bias+1)
- * as fractions that look like 0.fffff x 2 . This means that
- *
- * -126
- * the number 0.10000 x 2 , for instance, is the same as the normalized
- *
- * -127 -128
- * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero
- *
- * -129
- * in the fraction; to represent 2 , we need two, and so on. This
- *
- * (-exp_bias-fracbits+1)
- * implies that the smallest denormalized number is 2
- *
- * for whichever format we are talking about: for single precision, for
- *
- * -126 -149
- * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and
- *
- * -149 == -127 - 23 + 1.
- */
-#define SNG_EXPBITS 8
-#define SNG_FRACBITS 23
-
-#define DBL_EXPBITS 11
-#define DBL_FRACBITS 52
-
-#ifdef notyet
-#define E80_EXPBITS 15
-#define E80_FRACBITS 64
-#endif
-
-#define EXT_EXPBITS 15
-#define EXT_FRACBITS 112
-
-struct ieee_single {
- u_int sng_sign:1;
- u_int sng_exp:8;
- u_int sng_frac:23;
-};
-
-struct ieee_double {
- u_int dbl_sign:1;
- u_int dbl_exp:11;
- u_int dbl_frach:20;
- u_int dbl_fracl;
-};
-
-struct ieee_ext {
- u_int ext_sign:1;
- u_int ext_exp:15;
- u_int ext_frach:16;
- u_int ext_frachm;
- u_int ext_fraclm;
- u_int ext_fracl;
-};
-
-/*
- * Floats whose exponent is in [1..INFNAN) (of whatever type) are
- * `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
- * Floats whose exponent is zero are either zero (iff all fraction
- * bits are zero) or subnormal values.
- *
- * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
- * high fraction; if the bit is set, it is a `quiet NaN'.
- */
-#define SNG_EXP_INFNAN 255
-#define DBL_EXP_INFNAN 2047
-#define EXT_EXP_INFNAN 32767
-
-#if 0
-#define SNG_QUIETNAN (1 << 22)
-#define DBL_QUIETNAN (1 << 19)
-#define EXT_QUIETNAN (1 << 15)
-#endif
-
-/*
- * Exponent biases.
- */
-#define SNG_EXP_BIAS 127
-#define DBL_EXP_BIAS 1023
-#define EXT_EXP_BIAS 16383
-
-#endif
diff --git a/sys/sparc64/include/ieeefp.h b/sys/sparc64/include/ieeefp.h
deleted file mode 100644
index bb0773730aa0..000000000000
--- a/sys/sparc64/include/ieeefp.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * Written by J.T. Conklin, Apr 6, 1995
- * Public domain.
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IEEEFP_H_
-#define _MACHINE_IEEEFP_H_
-
-/* Deprecated FPU control interface */
-
-#include <machine/fsr.h>
-
-typedef int fp_except_t;
-#define FP_X_IMP FSR_NX /* imprecise (loss of precision) */
-#define FP_X_DZ FSR_DZ /* divide-by-zero exception */
-#define FP_X_UFL FSR_UF /* underflow exception */
-#define FP_X_OFL FSR_OF /* overflow exception */
-#define FP_X_INV FSR_NV /* invalid operation exception */
-
-typedef enum {
- FP_RN = FSR_RD_N, /* round to nearest representable number */
- FP_RZ = FSR_RD_Z, /* round to zero (truncate) */
- FP_RP = FSR_RD_PINF, /* round toward positive infinity */
- FP_RM = FSR_RD_NINF /* round toward negative infinity */
-} fp_rnd_t;
-
-__BEGIN_DECLS
-extern fp_rnd_t fpgetround(void);
-extern fp_rnd_t fpsetround(fp_rnd_t);
-extern fp_except_t fpgetmask(void);
-extern fp_except_t fpsetmask(fp_except_t);
-extern fp_except_t fpgetsticky(void);
-__END_DECLS
-
-
-#endif /* _MACHINE_IEEEFP_H_ */
diff --git a/sys/sparc64/include/in_cksum.h b/sys/sparc64/include/in_cksum.h
deleted file mode 100644
index 6f80d6996759..000000000000
--- a/sys/sparc64/include/in_cksum.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- */
-/*-
- * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * from tahoe: in_cksum.c 1.2 86/01/05
- * from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
- * from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * from: FreeBSD: src/sys/alpha/include/in_cksum.h,v 1.5 2000/05/06
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IN_CKSUM_H_
-#define _MACHINE_IN_CKSUM_H_ 1
-
-#include <sys/cdefs.h>
-
-#define in_cksum(m, len) in_cksum_skip(m, len, 0)
-
-#if defined(IPVERSION) && (IPVERSION == 4)
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmp;
-
- __tmp = (int)ip->ip_sum + 1;
- ip->ip_sum = __tmp + (__tmp >> 16);
-}
-#endif
-
-static __inline u_short
-in_addword(u_short sum, u_short b)
-{
- u_long __ret, __tmp;
-
- __asm(
- "sll %2, 16, %0\n"
- "sll %3, 16, %1\n"
- "addcc %0, %1, %0\n"
- "srl %0, 16, %0\n"
- "addc %0, 0, %0\n"
- : "=&r" (__ret), "=&r" (__tmp) : "r" (sum), "r" (b) : "cc");
- return (__ret);
-}
-
-static __inline u_short
-in_pseudo(u_int sum, u_int b, u_int c)
-{
- u_long __tmp;
-
- __asm(
- "addcc %0, %3, %0\n"
- "addccc %0, %4, %0\n"
- "addc %0, 0, %0\n"
- "sll %0, 16, %1\n"
- "addcc %0, %1, %0\n"
- "srl %0, 16, %0\n"
- "addc %0, 0, %0\n"
- : "=r" (sum), "=&r" (__tmp) : "0" (sum), "r" (b), "r" (c) : "cc");
- return (sum);
-}
-
-#if defined(IPVERSION) && (IPVERSION == 4)
-static __inline u_int
-in_cksum_hdr(struct ip *ip)
-{
- u_long __ret, __tmp1, __tmp2, __tmp3, __tmp4;
-
- /*
- * Use 32-bit memory accesses and additions - addition with carry only
- * works for 32 bits, and fixing up alignment issues for 64 is probably
- * more trouble than it's worth.
- * This may read outside of the ip header, but does not cross a page
- * boundary in doing so, so that should be OK.
- * Actually, this specialized implementation might be overkill - using
- * a generic implementation for both in_cksum_skip and in_cksum_hdr
- * should not be too much more expensive.
- */
-#define __LD_ADD(addr, tmp, sum, offs, mod) \
- "lduw [" #addr " + " #offs "], " #tmp "\n" \
- "add" # mod " " #sum ", " #tmp ", " #sum "\n"
-
- __asm(
- "and %5, 3, %3\n"
- "andn %5, 3, %1\n"
- "brz,pt %3, 0f\n"
- " lduw [%1], %0\n"
- "mov 4, %4\n"
- "sub %4, %3, %4\n"
- "sll %4, 3, %4\n" /* fix up unaligned buffers */
- "mov 1, %2\n"
- "sll %2, %4, %4\n"
- "sub %4, 1, %4\n"
- "lduw [%1 + 20], %2\n"
- "andn %2, %4, %2\n"
- "and %0, %4, %0\n"
- "or %0, %2, %0\n"
- "0:\n"
- __LD_ADD(%1, %2, %0, 4, cc)
- __LD_ADD(%1, %2, %0, 8, ccc)
- __LD_ADD(%1, %2, %0, 12, ccc)
- __LD_ADD(%1, %2, %0, 16, ccc)
- "addc %0, 0, %0\n" /* reduce */
- "1:\n"
- "sll %0, 16, %2\n"
- "addcc %0, %2, %0\n"
- "srl %0, 16, %0\n"
- "addc %0, 0, %0\n"
- "andcc %3, 1, %3\n" /* need to byte-swap? */
- "clr %3\n"
- "bne,a,pn %%xcc, 1b\n"
- " sll %0, 8, %0\n"
- "not %0\n"
- "sll %0, 16, %0\n"
- "srl %0, 16, %0\n"
- : "=&r" (__ret), "=r" (__tmp1), "=&r" (__tmp2), "=&r" (__tmp3),
- "=&r" (__tmp4) : "1" (ip) : "cc");
-#undef __LD_ADD
- return (__ret);
-}
-#endif
-
-#ifdef _KERNEL
-u_short in_cksum_skip(struct mbuf *m, int len, int skip);
-#endif
-
-#endif /* _MACHINE_IN_CKSUM_H_ */
diff --git a/sys/sparc64/include/instr.h b/sys/sparc64/include/instr.h
deleted file mode 100644
index 54d2a806d93a..000000000000
--- a/sys/sparc64/include/instr.h
+++ /dev/null
@@ -1,620 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-4-Clause
- *
- * Copyright (c) 1994 David S. Miller, davem@nadzieja.rutgers.edu
- * Copyright (c) 1995 Paul Kranenburg
- * Copyright (c) 2001 Thomas Moestl <tmm@FreeBSD.org>
- * All rights reserved.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by David Miller.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: NetBSD: db_disasm.c,v 1.9 2000/08/16 11:29:42 pk Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_INSTR_H_
-#define _MACHINE_INSTR_H_
-
-/*
- * Definitions for all instruction formats
- */
-#define IF_OP_SHIFT 30
-#define IF_OP_BITS 2
-#define IF_IMM_SHIFT 0 /* Immediate/Displacement */
-
-/*
- * Definitions for format 2
- */
-#define IF_F2_RD_SHIFT 25
-#define IF_F2_RD_BITS 5
-#define IF_F2_A_SHIFT 29
-#define IF_F2_A_BITS 1
-#define IF_F2_COND_SHIFT 25
-#define IF_F2_COND_BITS 4
-#define IF_F2_RCOND_SHIFT 25
-#define IF_F2_RCOND_BITS 3
-#define IF_F2_OP2_SHIFT 22
-#define IF_F2_OP2_BITS 3
-#define IF_F2_CC1_SHIFT 21
-#define IF_F2_CC1_BITS 1
-#define IF_F2_CC0_SHIFT 20
-#define IF_F2_CC0_BITS 1
-#define IF_F2_CC_SHIFT 20 /* CC0 and CC1 combined. */
-#define IF_F2_CC_BITS 2
-#define IF_F2_D16HI_SHIFT 20
-#define IF_F2_D16HI_BITS 2
-#define IF_F2_P_SHIFT 19
-#define IF_F2_P_BITS 1
-#define IF_F2_RS1_SHIFT 14
-#define IF_F2_RS1_BITS 5
-
-/*
- * Definitions for format 3
- */
-#define IF_F3_OP3_SHIFT 19
-#define IF_F3_OP3_BITS 6
-#define IF_F3_RD_SHIFT IF_F2_RD_SHIFT
-#define IF_F3_RD_BITS IF_F2_RD_BITS
-#define IF_F3_FCN_SHIFT 25
-#define IF_F3_FCN_BITS 5
-#define IF_F3_CC1_SHIFT 26
-#define IF_F3_CC1_BITS 1
-#define IF_F3_CC0_SHIFT 25
-#define IF_F3_CC0_BITS 1
-#define IF_F3_CC_SHIFT 25 /* CC0 and CC1 combined. */
-#define IF_F3_CC_BITS 2
-#define IF_F3_RS1_SHIFT IF_F2_RS1_SHIFT
-#define IF_F3_RS1_BITS IF_F2_RS1_BITS
-#define IF_F3_I_SHIFT 13
-#define IF_F3_I_BITS 1
-#define IF_F3_X_SHIFT 12
-#define IF_F3_X_BITS 1
-#define IF_F3_RCOND_SHIFT 10
-#define IF_F3_RCOND_BITS 3
-#define IF_F3_IMM_ASI_SHIFT 5
-#define IF_F3_IMM_ASI_BITS 8
-#define IF_F3_OPF_SHIFT 5
-#define IF_F3_OPF_BITS 9
-#define IF_F3_CMASK_SHIFT 4
-#define IF_F3_CMASK_BITS 3
-#define IF_F3_RS2_SHIFT 0
-#define IF_F3_RS2_BITS 5
-#define IF_F3_SHCNT32_SHIFT 0
-#define IF_F3_SHCNT32_BITS 5
-#define IF_F3_SHCNT64_SHIFT 0
-#define IF_F3_SHCNT64_BITS 6
-
-/*
- * Definitions for format 4
- */
-#define IF_F4_OP3_SHIFT IF_F3_OP3_SHIFT
-#define IF_F4_OP3_BITS IF_F3_OP3_BITS
-#define IF_F4_RD_SHIFT IF_F2_RD_SHIFT
-#define IF_F4_RD_BITS IF_F2_RD_BITS
-#define IF_F4_RS1_SHIFT IF_F2_RS1_SHIFT
-#define IF_F4_RS1_BITS IF_F2_RS1_BITS
-#define IF_F4_TCOND_SHIFT IF_F2_COND_SHIFT /* cond for Tcc */
-#define IF_F4_TCOND_BITS IF_F2_COND_BITS
-#define IF_F4_CC2_SHIFT 18
-#define IF_F4_CC2_BITS 1
-#define IF_F4_COND_SHIFT 14
-#define IF_F4_COND_BITS 4
-#define IF_F4_I_SHIFT IF_F3_I_SHIFT
-#define IF_F4_I_BITS IF_F3_I_BITS
-#define IF_F4_OPF_CC_SHIFT 11
-#define IF_F4_OPF_CC_BITS 3
-#define IF_F4_CC1_SHIFT 12
-#define IF_F4_CC1_BITS 1
-#define IF_F4_CC0_SHIFT 11
-#define IF_F4_CC0_BITS 1
-#define IF_F4_RCOND_SHIFT IF_F3_RCOND_SHIFT
-#define IF_F4_RCOND_BITS IF_F3_RCOND_BITS
-#define IF_F4_OPF_LOW_SHIFT 5
-#define IF_F4_RS2_SHIFT IF_F3_RS2_SHIFT
-#define IF_F4_RS2_BITS IF_F3_RS2_BITS
-#define IF_F4_SW_TRAP_SHIFT 0
-#define IF_F4_SW_TRAP_BITS 7
-
-/*
- * Macros to decode instructions
- */
-/* Extract a field */
-#define IF_MASK(s, w) (((1 << (w)) - 1) << (s))
-#define IF_EXTRACT(x, s, w) (((x) & IF_MASK((s), (w))) >> (s))
-#define IF_DECODE(x, f) \
- IF_EXTRACT((x), IF_ ## f ## _SHIFT, IF_ ## f ## _BITS)
-
-/* Sign-extend a field of width W */
-#define IF_SEXT(x, w) \
- (((x) & (1L << ((w) - 1))) != 0 ? \
- (-1L - ((x) ^ ((1L << (w)) - 1))) : (x))
-
-#if 0
-/*
- * The following C variant is from db_disassemble.c, and surely faster, but it
- * relies on behaviour that is undefined by the C standard (>> in conjunction
- * with signed negative arguments).
- */
-#define IF_SEXT(v, w) ((((long long)(v)) << (64 - w)) >> (64 - w))
-/* Assembler version of the above */
-#define IF_SEXT(v, w) \
- { u_long t; ( __asm __volatile("sllx %1, %2, %0; srax %0, %2, %0" :
- "=r" (t) : "r" (v) : "i" (64 - w)); t)}
-#endif
-
-/* All instruction formats */
-#define IF_OP(i) IF_DECODE(i, OP)
-
-/* Instruction format 2 */
-#define IF_F2_RD(i) IF_DECODE((i), F2_RD)
-#define IF_F2_A(i) IF_DECODE((i), F2_A)
-#define IF_F2_COND(i) IF_DECODE((i), F2_COND)
-#define IF_F2_RCOND(i) IF_DECODE((i), F2_RCOND)
-#define IF_F2_OP2(i) IF_DECODE((i), F2_OP2)
-#define IF_F2_CC1(i) IF_DECODE((i), F2_CC1)
-#define IF_F2_CC0(i) IF_DECODE((i), F2_CC0)
-#define IF_F2_CC(i) IF_DECODE((i), F2_CC)
-#define IF_F2_D16HI(i) IF_DECODE((i), F2_D16HI)
-#define IF_F2_P(i) IF_DECODE((i), F2_P)
-#define IF_F2_RS1(i) IF_DECODE((i), F2_RS1)
-
-/* Instruction format 3 */
-#define IF_F3_OP3(i) IF_DECODE((i), F3_OP3)
-#define IF_F3_RD(i) IF_F2_RD((i))
-#define IF_F3_FCN(i) IF_DECODE((i), F3_FCN)
-#define IF_F3_CC1(i) IF_DECODE((i), F3_CC1)
-#define IF_F3_CC0(i) IF_DECODE((i), F3_CC0)
-#define IF_F3_CC(i) IF_DECODE((i), F3_CC)
-#define IF_F3_RS1(i) IF_F2_RS1((i))
-#define IF_F3_I(i) IF_DECODE((i), F3_I)
-#define IF_F3_X(i) IF_DECODE((i), F3_X)
-#define IF_F3_RCOND(i) IF_DECODE((i), F3_RCOND)
-#define IF_F3_IMM_ASI(i) IF_DECODE((i), F3_IMM_ASI)
-#define IF_F3_OPF(i) IF_DECODE((i), F3_OPF)
-#define IF_F3_CMASK(i) IF_DECODE((i), F3_CMASK)
-#define IF_F3_RS2(i) IF_DECODE((i), F3_RS2)
-#define IF_F3_SHCNT32(i) IF_DECODE((i), F3_SHCNT32)
-#define IF_F3_SHCNT64(i) IF_DECODE((i), F3_SHCNT64)
-
-/* Instruction format 4 */
-#define IF_F4_OP3(i) IF_F3_OP3((i))
-#define IF_F4_RD(i) IF_F3_RD((i))
-#define IF_F4_TCOND(i) IF_DECODE((i), F4_TCOND)
-#define IF_F4_RS1(i) IF_F3_RS1((i))
-#define IF_F4_CC2(i) IF_DECODE((i), F4_CC2)
-#define IF_F4_COND(i) IF_DECODE((i), F4_COND)
-#define IF_F4_I(i) IF_F3_I((i))
-#define IF_F4_OPF_CC(i) IF_DECODE((i), F4_OPF_CC)
-#define IF_F4_RCOND(i) IF_F3_RCOND((i))
-#define IF_F4_OPF_LOW(i, w) IF_EXTRACT((i), IF_F4_OPF_LOW_SHIFT, (w))
-#define IF_F4_RS2(i) IF_F3_RS2((i))
-#define IF_F4_SW_TRAP(i) IF_DECODE((i), F4_SW_TRAP)
-
-/* Extract an immediate from an instruction, with an without sign extension */
-#define IF_IMM(i, w) IF_EXTRACT((i), IF_IMM_SHIFT, (w))
-#define IF_SIMM(i, w) ({ u_long b = (w), x = IF_IMM((i), b); IF_SEXT((x), b); })
-
-/*
- * Macros to encode instructions
- */
-#define IF_INSERT(x, s, w) (((x) & ((1 << (w)) - 1)) << (s))
-#define IF_ENCODE(x, f) \
- IF_INSERT((x), IF_ ## f ## _SHIFT, IF_ ## f ## _BITS)
-
-/* All instruction formats */
-#define EIF_OP(x) IF_ENCODE((x), OP)
-
-/* Instruction format 2 */
-#define EIF_F2_RD(x) IF_ENCODE((x), F2_RD)
-#define EIF_F2_A(x) IF_ENCODE((x), F2_A)
-#define EIF_F2_COND(x) IF_ENCODE((x), F2_COND)
-#define EIF_F2_RCOND(x) IF_ENCODE((x), F2_RCOND)
-#define EIF_F2_OP2(x) IF_ENCODE((x), F2_OP2)
-#define EIF_F2_CC1(x) IF_ENCODE((x), F2_CC1)
-#define EIF_F2_CC0(x) IF_ENCODE((x), F2_CC0)
-#define EIF_F2_D16HI(x) IF_ENCODE((x), F2_D16HI)
-#define EIF_F2_P(x) IF_ENCODE((x), F2_P)
-#define EIF_F2_RS1(x) IF_ENCODE((x), F2_RS1)
-
-/* Instruction format 3 */
-#define EIF_F3_OP3(x) IF_ENCODE((x), F3_OP3)
-#define EIF_F3_RD(x) EIF_F2_RD((x))
-#define EIF_F3_FCN(x) IF_ENCODE((x), F3_FCN)
-#define EIF_F3_CC1(x) IF_ENCODE((x), F3_CC1)
-#define EIF_F3_CC0(x) IF_ENCODE((x), F3_CC0)
-#define EIF_F3_RS1(x) EIF_F2_RS1((x))
-#define EIF_F3_I(x) IF_ENCODE((x), F3_I)
-#define EIF_F3_X(x) IF_ENCODE((x), F3_X)
-#define EIF_F3_RCOND(x) IF_ENCODE((x), F3_RCOND)
-#define EIF_F3_IMM_ASI(x) IF_ENCODE((x), F3_IMM_ASI)
-#define EIF_F3_OPF(x) IF_ENCODE((x), F3_OPF)
-#define EIF_F3_CMASK(x) IF_ENCODE((x), F3_CMASK)
-#define EIF_F3_RS2(x) IF_ENCODE((x), F3_RS2)
-#define EIF_F3_SHCNT32(x) IF_ENCODE((x), F3_SHCNT32)
-#define EIF_F3_SHCNT64(x) IF_ENCODE((x), F3_SHCNT64)
-
-/* Instruction format 4 */
-#define EIF_F4_OP3(x) EIF_F3_OP3((x))
-#define EIF_F4_RD(x) EIF_F2_RD((x))
-#define EIF_F4_TCOND(x) IF_ENCODE((x), F4_TCOND)
-#define EIF_F4_RS1(x) EIF_F2_RS1((x))
-#define EIF_F4_CC2(x) IF_ENCODE((x), F4_CC2)
-#define EIF_F4_COND(x) IF_ENCODE((x), F4_COND)
-#define EIF_F4_I(x) EIF_F3_I((x))
-#define EIF_F4_OPF_CC(x) IF_ENCODE((x), F4_OPF_CC)
-#define EIF_F4_RCOND(x) EIF_F3_RCOND((x))
-#define EIF_F4_OPF_LOW(i, w) IF_INSERT((x), IF_F4_OPF_CC_SHIFT, (w))
-#define EIF_F4_RS2(x) EIF_F3_RS2((x))
-#define EIF_F4_SW_TRAP(x) IF_ENCODE((x), F4_SW_TRAP)
-
-/* Immediates */
-#define EIF_IMM(x, w) IF_INSERT((x), IF_IMM_SHIFT, (w))
-#define EIF_SIMM(x, w) IF_EIMM((x), (w))
-
-/*
- * OP field values (specifying the instruction format)
- */
-#define IOP_FORM2 0x00 /* Format 2: sethi, branches */
-#define IOP_CALL 0x01 /* Format 1: call */
-#define IOP_MISC 0x02 /* Format 3 or 4: arith & misc */
-#define IOP_LDST 0x03 /* Format 4: loads and stores */
-
-/*
- * OP2/OP3 values (specifying the actual instruction)
- */
-/* OP2 values for format 2 (OP = 0) */
-#define INS0_ILLTRAP 0x00
-#define INS0_BPcc 0x01
-#define INS0_Bicc 0x02
-#define INS0_BPr 0x03
-#define INS0_SETHI 0x04 /* with rd = 0 and imm22 = 0, nop */
-#define INS0_FBPfcc 0x05
-#define INS0_FBfcc 0x06
-/* undefined 0x07 */
-
-/* OP3 values for Format 3 and 4 (OP = 2) */
-#define INS2_ADD 0x00
-#define INS2_AND 0x01
-#define INS2_OR 0x02
-#define INS2_XOR 0x03
-#define INS2_SUB 0x04
-#define INS2_ANDN 0x05
-#define INS2_ORN 0x06
-#define INS2_XNOR 0x07
-#define INS2_ADDC 0x08
-#define INS2_MULX 0x09
-#define INS2_UMUL 0x0a
-#define INS2_SMUL 0x0b
-#define INS2_SUBC 0x0c
-#define INS2_UDIVX 0x0d
-#define INS2_UDIV 0x0e
-#define INS2_SDIV 0x0f
-#define INS2_ADDcc 0x10
-#define INS2_ANDcc 0x11
-#define INS2_ORcc 0x12
-#define INS2_XORcc 0x13
-#define INS2_SUBcc 0x14
-#define INS2_ANDNcc 0x15
-#define INS2_ORNcc 0x16
-#define INS2_XNORcc 0x17
-#define INS2_ADDCcc 0x18
-/* undefined 0x19 */
-#define INS2_UMULcc 0x1a
-#define INS2_SMULcc 0x1b
-#define INS2_SUBCcc 0x1c
-/* undefined 0x1d */
-#define INS2_UDIVcc 0x1e
-#define INS2_SDIVcc 0x1f
-#define INS2_TADDcc 0x20
-#define INS2_TSUBcc 0x21
-#define INS2_TADDccTV 0x22
-#define INS2_TSUBccTV 0x23
-#define INS2_MULScc 0x24
-#define INS2_SSL 0x25 /* SLLX when IF_X(i) == 1 */
-#define INS2_SRL 0x26 /* SRLX when IF_X(i) == 1 */
-#define INS2_SRA 0x27 /* SRAX when IF_X(i) == 1 */
-#define INS2_RD 0x28 /* and MEMBAR, STBAR */
-/* undefined 0x29 */
-#define INS2_RDPR 0x2a
-#define INS2_FLUSHW 0x2b
-#define INS2_MOVcc 0x2c
-#define INS2_SDIVX 0x2d
-#define INS2_POPC 0x2e /* undefined if IF_RS1(i) != 0 */
-#define INS2_MOVr 0x2f
-#define INS2_WR 0x30 /* and SIR */
-#define INS2_SV_RSTR 0x31 /* saved, restored */
-#define INS2_WRPR 0x32
-/* undefined 0x33 */
-#define INS2_FPop1 0x34 /* further encoded in opf field */
-#define INS2_FPop2 0x35 /* further encoded in opf field */
-#define INS2_IMPLDEP1 0x36
-#define INS2_IMPLDEP2 0x37
-#define INS2_JMPL 0x38
-#define INS2_RETURN 0x39
-#define INS2_Tcc 0x3a
-#define INS2_FLUSH 0x3b
-#define INS2_SAVE 0x3c
-#define INS2_RESTORE 0x3d
-#define INS2_DONE_RETR 0x3e /* done, retry */
-/* undefined 0x3f */
-
-/* OP3 values for format 3 (OP = 3) */
-#define INS3_LDUW 0x00
-#define INS3_LDUB 0x01
-#define INS3_LDUH 0x02
-#define INS3_LDD 0x03
-#define INS3_STW 0x04
-#define INS3_STB 0x05
-#define INS3_STH 0x06
-#define INS3_STD 0x07
-#define INS3_LDSW 0x08
-#define INS3_LDSB 0x09
-#define INS3_LDSH 0x0a
-#define INS3_LDX 0x0b
-/* undefined 0x0c */
-#define INS3_LDSTUB 0x0d
-#define INS3_STX 0x0e
-#define INS3_SWAP 0x0f
-#define INS3_LDUWA 0x10
-#define INS3_LDUBA 0x11
-#define INS3_LDUHA 0x12
-#define INS3_LDDA 0x13
-#define INS3_STWA 0x14
-#define INS3_STBA 0x15
-#define INS3_STHA 0x16
-#define INS3_STDA 0x17
-#define INS3_LDSWA 0x18
-#define INS3_LDSBA 0x19
-#define INS3_LDSHA 0x1a
-#define INS3_LDXA 0x1b
-/* undefined 0x1c */
-#define INS3_LDSTUBA 0x1d
-#define INS3_STXA 0x1e
-#define INS3_SWAPA 0x1f
-#define INS3_LDF 0x20
-#define INS3_LDFSR 0x21 /* and LDXFSR */
-#define INS3_LDQF 0x22
-#define INS3_LDDF 0x23
-#define INS3_STF 0x24
-#define INS3_STFSR 0x25 /* and STXFSR */
-#define INS3_STQF 0x26
-#define INS3_STDF 0x27
-/* undefined 0x28 - 0x2c */
-#define INS3_PREFETCH 0x2d
-/* undefined 0x2e - 0x2f */
-#define INS3_LDFA 0x30
-/* undefined 0x31 */
-#define INS3_LDQFA 0x32
-#define INS3_LDDFA 0x33
-#define INS3_STFA 0x34
-/* undefined 0x35 */
-#define INS3_STQFA 0x36
-#define INS3_STDFA 0x37
-/* undefined 0x38 - 0x3b */
-#define INS3_CASA 0x39
-#define INS3_PREFETCHA 0x3a
-#define INS3_CASXA 0x3b
-
-/*
- * OPF values (floating point instructions, IMPLDEP)
- */
-/*
- * These values are or'ed to the FPop values to get the instructions.
- * They describe the operand type(s).
- */
-#define INSFP_i 0x000 /* 32-bit int */
-#define INSFP_s 0x001 /* 32-bit single */
-#define INSFP_d 0x002 /* 64-bit double */
-#define INSFP_q 0x003 /* 128-bit quad */
-/* FPop1. The comments give the types for which this instruction is defined. */
-#define INSFP1_FMOV 0x000 /* s, d, q */
-#define INSFP1_FNEG 0x004 /* s, d, q */
-#define INSFP1_FABS 0x008 /* s, d, q */
-#define INSFP1_FSQRT 0x028 /* s, d, q */
-#define INSFP1_FADD 0x040 /* s, d, q */
-#define INSFP1_FSUB 0x044 /* s, d, q */
-#define INSFP1_FMUL 0x048 /* s, d, q */
-#define INSFP1_FDIV 0x04c /* s, d, q */
-#define INSFP1_FsMULd 0x068 /* s */
-#define INSFP1_FdMULq 0x06c /* d */
-#define INSFP1_FTOx 0x080 /* s, d, q */
-#define INSFP1_FxTOs 0x084 /* special: i only */
-#define INSFP1_FxTOd 0x088 /* special: i only */
-#define INSFP1_FxTOq 0x08c /* special: i only */
-#define INSFP1_FTOs 0x0c4 /* i, d, q */
-#define INSFP1_FTOd 0x0c8 /* i, s, q */
-#define INSFP1_FTOq 0x0cc /* i, s, d */
-#define INSFP1_FTOi 0x0d0 /* i, s, d */
-
-/* FPop2 */
-#define INSFP2_FMOV_CCMUL 0x40
-#define INSFP2_FMOV_CCOFFS 0x00
-/* Use the IFCC_* constants for cc. Operand types: s, d, q */
-#define INSFP2_FMOV_CC(cc) ((cc) * INSFP2_FMOV_CCMUL + INSFP2_FMOV_CCOFFS)
-#define INSFP2_FMOV_RCMUL 0x20
-#define INSFP2_FMOV_RCOFFS 0x04
-/* Use the IRCOND_* constants for rc. Operand types: s, d, q */
-#define INSFP2_FMOV_RC(rc) ((rc) * INSFP2_FMOV_RCMUL + INSFP2_FMOV_RCOFFS)
-#define INSFP2_FCMP 0x050 /* s, d, q */
-#define INSFP2_FCMPE 0x054 /* s, d, q */
-
-/* Decode 5-bit register field into 6-bit number (for doubles and quads). */
-#define INSFPdq_RN(rn) (((rn) & ~1) | (((rn) & 1) << 5))
-
-/* IMPLDEP1 for Sun UltraSparc */
-#define IIDP1_EDGE8 0x00
-#define IIDP1_EDGE8N 0x01 /* US-III */
-#define IIDP1_EDGE8L 0x02
-#define IIDP1_EDGE8LN 0x03 /* US-III */
-#define IIDP1_EDGE16 0x04
-#define IIDP1_EDGE16N 0x05 /* US-III */
-#define IIDP1_EDGE16L 0x06
-#define IIDP1_EDGE16LN 0x07 /* US-III */
-#define IIDP1_EDGE32 0x08
-#define IIDP1_EDGE32N 0x09 /* US-III */
-#define IIDP1_EDGE32L 0x0a
-#define IIDP1_EDGE32LN 0x0b /* US-III */
-#define IIDP1_ARRAY8 0x10
-#define IIDP1_ARRAY16 0x12
-#define IIDP1_ARRAY32 0x14
-#define IIDP1_ALIGNADDRESS 0x18
-#define IIDP1_BMASK 0x19 /* US-III */
-#define IIDP1_ALIGNADDRESS_L 0x1a
-#define IIDP1_FCMPLE16 0x20
-#define IIDP1_FCMPNE16 0x22
-#define IIDP1_FCMPLE32 0x24
-#define IIDP1_FCMPNE32 0x26
-#define IIDP1_FCMPGT16 0x28
-#define IIDP1_FCMPEQ16 0x2a
-#define IIDP1_FCMPGT32 0x2c
-#define IIDP1_FCMPEQ32 0x2e
-#define IIDP1_FMUL8x16 0x31
-#define IIDP1_FMUL8x16AU 0x33
-#define IIDP1_FMUL8X16AL 0x35
-#define IIDP1_FMUL8SUx16 0x36
-#define IIDP1_FMUL8ULx16 0x37
-#define IIDP1_FMULD8SUx16 0x38
-#define IIDP1_FMULD8ULx16 0x39
-#define IIDP1_FPACK32 0x3a
-#define IIDP1_FPACK16 0x3b
-#define IIDP1_FPACKFIX 0x3d
-#define IIDP1_PDIST 0x3e
-#define IIDP1_FALIGNDATA 0x48
-#define IIDP1_FPMERGE 0x4b
-#define IIDP1_BSHUFFLE 0x4c /* US-III */
-#define IIDP1_FEXPAND 0x4d
-#define IIDP1_FPADD16 0x50
-#define IIDP1_FPADD16S 0x51
-#define IIDP1_FPADD32 0x52
-#define IIDP1_FPADD32S 0x53
-#define IIDP1_SUB16 0x54
-#define IIDP1_SUB16S 0x55
-#define IIDP1_SUB32 0x56
-#define IIDP1_SUB32S 0x57
-#define IIDP1_FZERO 0x60
-#define IIDP1_FZEROS 0x61
-#define IIDP1_FNOR 0x62
-#define IIDP1_FNORS 0x63
-#define IIDP1_FANDNOT2 0x64
-#define IIDP1_FANDNOT2S 0x65
-#define IIDP1_NOT2 0x66
-#define IIDP1_NOT2S 0x67
-#define IIDP1_FANDNOT1 0x68
-#define IIDP1_FANDNOT1S 0x69
-#define IIDP1_FNOT1 0x6a
-#define IIDP1_FNOT1S 0x6b
-#define IIDP1_FXOR 0x6c
-#define IIDP1_FXORS 0x6d
-#define IIDP1_FNAND 0x6e
-#define IIDP1_FNANDS 0x6f
-#define IIDP1_FAND 0x70
-#define IIDP1_FANDS 0x71
-#define IIDP1_FXNOR 0x72
-#define IIDP1_FXNORS 0x73
-#define IIDP1_FSRC1 0x74
-#define IIDP1_FSRC1S 0x75
-#define IIDP1_FORNOT2 0x76
-#define IIDP1_FORNOT2S 0x77
-#define IIDP1_FSRC2 0x78
-#define IIDP1_FSRC2S 0x79
-#define IIDP1_FORNOT1 0x7a
-#define IIDP1_FORNOT1S 0x7b
-#define IIDP1_FOR 0x7c
-#define IIDP1_FORS 0x7d
-#define IIDP1_FONE 0x7e
-#define IIDP1_FONES 0x7f
-#define IIDP1_SHUTDOWN 0x80
-#define IIDP1_SIAM 0x81 /* US-III */
-
-/*
- * Instruction modifiers
- */
-/* cond values for integer ccr's */
-#define IICOND_N 0x00
-#define IICOND_E 0x01
-#define IICOND_LE 0x02
-#define IICOND_L 0x03
-#define IICOND_LEU 0x04
-#define IICOND_CS 0x05
-#define IICOND_NEG 0x06
-#define IICOND_VS 0x07
-#define IICOND_A 0x08
-#define IICOND_NE 0x09
-#define IICOND_G 0x0a
-#define IICOND_GE 0x0b
-#define IICOND_GU 0x0c
-#define IICOND_CC 0x0d
-#define IICOND_POS 0x0e
-#define IICOND_VC 0x0f
-
-/* cond values for fp ccr's */
-#define IFCOND_N 0x00
-#define IFCOND_NE 0x01
-#define IFCOND_LG 0x02
-#define IFCOND_UL 0x03
-#define IFCOND_L 0x04
-#define IFCOND_UG 0x05
-#define IFCOND_G 0x06
-#define IFCOND_U 0x07
-#define IFCOND_A 0x08
-#define IFCOND_E 0x09
-#define IFCOND_UE 0x0a
-#define IFCOND_GE 0x0b
-#define IFCOND_UGE 0x0c
-#define IFCOND_LE 0x0d
-#define IFCOND_ULE 0x0e
-#define IFCOND_O 0x0f
-
-/* rcond values for BPr, MOVr, FMOVr */
-#define IRCOND_Z 0x01
-#define IRCOND_LEZ 0x02
-#define IRCOND_LZ 0x03
-#define IRCOND_NZ 0x05
-#define IRCOND_GZ 0x06
-#define IRCOND_GEZ 0x07
-
-/* cc values for MOVcc and FMOVcc */
-#define IFCC_ICC 0x04
-#define IFCC_XCC 0x06
-/* if true, the lower 2 bits are the fcc number */
-#define IFCC_FCC(c) ((c) & 3)
-#define IFCC_GET_FCC(c) ((c) & 3)
-#define IFCC_ISFCC(c) (((c) & 4) == 0)
-
-/* cc values for BPc and Tcc */
-#define IBCC_ICC 0x00
-#define IBCC_XCC 0x02
-
-/*
- * Integer registers
- */
-#define IREG_G0 0x00
-#define IREG_O0 0x08
-#define IREG_L0 0x10
-#define IREQ_I0 0x18
-
-#endif /* !_MACHINE_INSTR_H_ */
diff --git a/sys/sparc64/include/intr_machdep.h b/sys/sparc64/include/intr_machdep.h
deleted file mode 100644
index b612893f1c35..000000000000
--- a/sys/sparc64/include/intr_machdep.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_INTR_MACHDEP_H_
-#define _MACHINE_INTR_MACHDEP_H_
-
-#define IRSR_BUSY (1 << 5)
-
-#define PIL_MAX (1 << 4)
-#define IV_MAX (1 << 11)
-
-#define IR_FREE (PIL_MAX * 2)
-
-#define IH_SHIFT PTR_SHIFT
-#define IQE_SHIFT 5
-#define IV_SHIFT 6
-
-#define PIL_LOW 1 /* stray interrupts */
-#define PIL_PREEMPT 2 /* preempt idle thread CPU IPI */
-#define PIL_ITHREAD 3 /* interrupts that use ithreads */
-#define PIL_RENDEZVOUS 4 /* SMP rendezvous IPI */
-#define PIL_AST 5 /* asynchronous trap IPI */
-#define PIL_HARDCLOCK 6 /* hardclock broadcast */
-#define PIL_FILTER 11 /* filter interrupts */
-#define PIL_BRIDGE 12 /* bridge interrupts */
-#define PIL_STOP 13 /* stop CPU IPI */
-#define PIL_TICK 14 /* tick interrupts */
-
-#ifndef LOCORE
-
-#define INTR_BRIDGE INTR_MD1
-
-struct trapframe;
-
-typedef void ih_func_t(struct trapframe *);
-typedef void iv_func_t(void *);
-
-struct intr_request {
- struct intr_request *ir_next;
- iv_func_t *ir_func;
- void *ir_arg;
- u_int ir_vec;
- u_int ir_pri;
-};
-
-struct intr_controller {
- void (*ic_enable)(void *);
- void (*ic_disable)(void *);
- void (*ic_assign)(void *);
- void (*ic_clear)(void *);
-};
-
-struct intr_vector {
- iv_func_t *iv_func;
- void *iv_arg;
- const struct intr_controller *iv_ic;
- void *iv_icarg;
- struct intr_event *iv_event;
- u_int iv_pri;
- u_int iv_vec;
- u_int iv_mid;
- u_int iv_refcnt;
- u_int iv_pad[2];
-};
-
-extern ih_func_t *intr_handlers[];
-extern struct intr_vector intr_vectors[];
-
-#ifdef SMP
-void intr_add_cpu(u_int cpu);
-#endif
-int intr_bind(int vec, u_char cpu);
-int intr_describe(int vec, void *ih, const char *descr);
-void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf,
- void *iva);
-void intr_init1(void);
-void intr_init2(void);
-int intr_controller_register(int vec, const struct intr_controller *ic,
- void *icarg);
-int inthand_add(const char *name, int vec, int (*filt)(void *),
- void (*handler)(void *), void *arg, int flags, void **cookiep);
-int inthand_remove(int vec, void *cookie);
-
-ih_func_t intr_fast;
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_INTR_MACHDEP_H_ */
diff --git a/sys/sparc64/include/iommureg.h b/sys/sparc64/include/iommureg.h
deleted file mode 100644
index de794cd1e449..000000000000
--- a/sys/sparc64/include/iommureg.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)sbusreg.h 8.1 (Berkeley) 6/11/93
- * from: NetBSD: iommureg.h,v 1.6 2001/07/20 00:07:13 eeh Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IOMMUREG_H_
-#define _MACHINE_IOMMUREG_H_
-
-/*
- * UltraSPARC IOMMU registers, common to both the PCI and SBus
- * controllers.
- */
-
-/* IOMMU registers */
-#define IMR_CTL 0x0000 /* IOMMU control register */
-#define IMR_TSB 0x0008 /* IOMMU TSB base register */
-#define IMR_FLUSH 0x0010 /* IOMMU flush register */
-/* The TTE Cache is Fire and Oberon only. */
-#define IMR_CACHE_FLUSH 0x0100 /* IOMMU TTE cache flush address register */
-#define IMR_CACHE_INVAL 0x0108 /* IOMMU TTE cache invalidate register */
-
-/* streaming buffer registers */
-#define ISR_CTL 0x0000 /* streaming buffer control reg */
-#define ISR_PGFLUSH 0x0008 /* streaming buffer page flush */
-#define ISR_FLUSHSYNC 0x0010 /* streaming buffer flush sync */
-
-/* streaming buffer diagnostics registers */
-#define ISD_DATA_DIAG 0x0000 /* streaming buffer data RAM diag 0..127 */
-#define ISD_ERROR_DIAG 0x0400 /* streaming buffer error status diag 0..127 */
-#define ISD_PG_TAG_DIAG 0x0800 /* streaming buffer page tag diag 0..15 */
-#define ISD_LN_TAG_DIAG 0x0900 /* streaming buffer line tag diag 0..15 */
-
-/* streaming buffer control register */
-#define STRBUF_EN 0x0000000000000001UL
-#define STRBUF_D 0x0000000000000002UL
-#define STRBUF_RR_DIS 0x0000000000000004UL
-
-#define IOMMU_MAXADDR(bits) ((1UL << (bits)) - 1)
-
-/*
- * control register bits
- */
-/* Nummber of entries in the IOTSB - pre-Fire only */
-#define IOMMUCR_TSBSZ_MASK 0x0000000000070000UL
-#define IOMMUCR_TSBSZ_SHIFT 16
-/* TSB cache snoop enable */
-#define IOMMUCR_SE 0x0000000000000400UL
-/* Cache modes - Fire and Oberon */
-#define IOMMUCR_CM_NC_TLB_TBW 0x0000000000000000UL
-#define IOMMUCR_CM_LC_NTLB_NTBW 0x0000000000000100UL
-#define IOMMUCR_CM_LC_TLB_TBW 0x0000000000000200UL
-#define IOMMUCR_CM_C_TLB_TBW 0x0000000000000300UL
-/* IOMMU page size - pre-Fire only */
-#define IOMMUCR_8KPG 0x0000000000000000UL
-#define IOMMUCR_64KPG 0x0000000000000004UL
-/* Bypass enable - Fire and Oberon */
-#define IOMMUCR_BE 0x0000000000000002UL
-/* Diagnostic mode enable - pre-Fire only */
-#define IOMMUCR_DE 0x0000000000000002UL
-/* IOMMU/translation enable */
-#define IOMMUCR_EN 0x0000000000000001UL
-
-/*
- * TSB base register bits
- */
- /* TSB base address */
-#define IOMMUTB_TB_MASK 0x000007ffffffe000UL
-#define IOMMUTB_TB_SHIFT 13
-/* IOMMU page size - Fire and Oberon */
-#define IOMMUTB_8KPG 0x0000000000000000UL
-#define IOMMUTB_64KPG 0x0000000000000100UL
-/* Nummber of entries in the IOTSB - Fire and Oberon */
-#define IOMMUTB_TSBSZ_MASK 0x0000000000000004UL
-#define IOMMUTB_TSBSZ_SHIFT 0
-
-/*
- * TSB size definitions for both control and TSB base register */
-#define IOMMU_TSB1K 0
-#define IOMMU_TSB2K 1
-#define IOMMU_TSB4K 2
-#define IOMMU_TSB8K 3
-#define IOMMU_TSB16K 4
-#define IOMMU_TSB32K 5
-#define IOMMU_TSB64K 6
-#define IOMMU_TSB128K 7
-/* Fire and Oberon */
-#define IOMMU_TSB256K 8
-/* Fire and Oberon */
-#define IOMMU_TSB512K 9
-#define IOMMU_TSBENTRIES(tsbsz) \
- ((1 << (tsbsz)) << (IO_PAGE_SHIFT - IOTTE_SHIFT))
-
-/*
- * Diagnostic register definitions
- */
-#define IOMMU_DTAG_VPNBITS 19
-#define IOMMU_DTAG_VPNMASK ((1 << IOMMU_DTAG_VPNBITS) - 1)
-#define IOMMU_DTAG_VPNSHIFT 13
-#define IOMMU_DTAG_ERRBITS 3
-#define IOMMU_DTAG_ERRSHIFT 22
-#define IOMMU_DTAG_ERRMASK \
- (((1 << IOMMU_DTAG_ERRBITS) - 1) << IOMMU_DTAG_ERRSHIFT)
-
-#define IOMMU_DDATA_PGBITS 21
-#define IOMMU_DDATA_PGMASK ((1 << IOMMU_DDATA_PGBITS) - 1)
-#define IOMMU_DDATA_PGSHIFT 13
-#define IOMMU_DDATA_C (1 << 28)
-#define IOMMU_DDATA_V (1 << 30)
-
-/*
- * IOMMU stuff
- */
-/* Entry valid */
-#define IOTTE_V 0x8000000000000000UL
-/* Page size - pre-Fire only */
-#define IOTTE_64K 0x2000000000000000UL
-#define IOTTE_8K 0x0000000000000000UL
-/* Streamable page - streaming buffer equipped variants only */
-#define IOTTE_STREAM 0x1000000000000000UL
-/* Accesses to the same bus segment - SBus only */
-#define IOTTE_LOCAL 0x0800000000000000UL
-/* Physical address mask (based on Oberon) */
-#define IOTTE_PAMASK 0x00007fffffffe000UL
-/* Accesses to cacheable space - pre-Fire only */
-#define IOTTE_C 0x0000000000000010UL
-/* Writeable */
-#define IOTTE_W 0x0000000000000002UL
-
-/* log2 of the IOMMU TTE size */
-#define IOTTE_SHIFT 3
-
-/* Streaming buffer line size */
-#define STRBUF_LINESZ 64
-
-/*
- * Number of bytes written by a stream buffer flushsync operation to indicate
- * completion.
- */
-#define STRBUF_FLUSHSYNC_NBYTES STRBUF_LINESZ
-
-/*
- * On sun4u each bus controller has a separate IOMMU. The IOMMU has
- * a TSB which must be page aligned and physically contiguous. Mappings
- * can be of 8K IOMMU pages or 64K IOMMU pages. We use 8K for compatibility
- * with the CPU's MMU.
- *
- * On sysio, psycho, and psycho+, IOMMU TSBs using 8K pages can map the
- * following size segments:
- *
- * VA size VA base TSB size tsbsize
- * -------- -------- --------- -------
- * 8MB ff800000 8K 0
- * 16MB ff000000 16K 1
- * 32MB fe000000 32K 2
- * 64MB fc000000 64K 3
- * 128MB f8000000 128K 4
- * 256MB f0000000 256K 5
- * 512MB e0000000 512K 6
- * 1GB c0000000 1MB 7
- *
- * Unfortunately, sabres on UltraSPARC IIi and IIe processors does not use
- * this scheme to determine the IOVA base address. Instead, bits 31-29 are
- * used to check against the Target Address Space register in the IIi and
- * the IOMMU is used if they hit. God knows what goes on in the IIe.
- *
- */
-
-#define IOTSB_BASESZ (1024 << IOTTE_SHIFT)
-#define IOTSB_VEND (~IO_PAGE_MASK)
-#define IOTSB_VSTART(sz) (u_int)(IOTSB_VEND << ((sz) + 10))
-
-#define MAKEIOTTE(pa, w, c, s) \
- (((pa) & IOTTE_PAMASK) | ((w) ? IOTTE_W : 0) | \
- ((c) ? IOTTE_C : 0) | ((s) ? IOTTE_STREAM : 0) | \
- (IOTTE_V | IOTTE_8K))
-#define IOTSBSLOT(va) \
- ((u_int)(((vm_offset_t)(va)) - (is->is_dvmabase)) >> IO_PAGE_SHIFT)
-
-#endif /* !_MACHINE_IOMMUREG_H_ */
diff --git a/sys/sparc64/include/iommuvar.h b/sys/sparc64/include/iommuvar.h
deleted file mode 100644
index f2fdd6c6dc75..000000000000
--- a/sys/sparc64/include/iommuvar.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1999 Matthew R. Green
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * from: NetBSD: iommuvar.h,v 1.6 2008/05/29 14:51:26 mrg Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_IOMMUVAR_H_
-#define _MACHINE_IOMMUVAR_H_
-
-#define IO_PAGE_SIZE PAGE_SIZE_8K
-#define IO_PAGE_MASK PAGE_MASK_8K
-#define IO_PAGE_SHIFT PAGE_SHIFT_8K
-#define round_io_page(x) round_page(x)
-#define trunc_io_page(x) trunc_page(x)
-
-/*
- * LRU queue handling for lazy resource allocation
- */
-TAILQ_HEAD(iommu_maplruq_head, bus_dmamap);
-
-/*
- * Per-IOMMU state; the parenthesized comments indicate the locking strategy:
- * i - protected by is_mtx.
- * r - read-only after initialization.
- * * - comment refers to pointer target / target hardware registers
- * (for bus_addr_t).
- * is_maplruq is also locked by is_mtx. Elements of is_tsb may only be
- * accessed from functions operating on the map owning the corresponding
- * resource, so the locking the user is required to do to protect the
- * map is sufficient.
- * dm_reslist of all maps are locked by is_mtx as well.
- * is_dvma_rman has its own internal lock.
- */
-struct iommu_state {
- struct mtx is_mtx;
- struct rman is_dvma_rman; /* DVMA space rman */
- struct iommu_maplruq_head is_maplruq; /* (i) LRU queue */
- vm_paddr_t is_ptsb; /* (r) TSB physical address */
- uint64_t *is_tsb; /* (*i) TSB virtual address */
- int is_tsbsize; /* (r) 0 = 8K, ... */
- uint64_t is_pmaxaddr; /* (r) max. physical address */
- uint64_t is_dvmabase; /* (r) */
- uint64_t is_cr; /* (r) Control reg value */
-
- vm_paddr_t is_flushpa[2]; /* (r) */
- volatile uint64_t *is_flushva[2]; /* (r, *i) */
- /*
- * (i)
- * When a flush is completed, 64 bytes will be stored at the given
- * location, the first double word being 1, to indicate completion.
- * The lower 6 address bits are ignored, so the addresses need to be
- * suitably aligned; over-allocate a large enough margin to be able
- * to adjust it.
- * Two such buffers are needed.
- */
- volatile char is_flush[STRBUF_FLUSHSYNC_NBYTES * 3 - 1];
-
- /* copies of our parent's state, to allow us to be self contained */
- bus_space_tag_t is_bustag; /* (r) Our bus tag */
- bus_space_handle_t is_bushandle; /* (r) */
- bus_addr_t is_iommu; /* (r, *i) IOMMU registers */
- bus_addr_t is_sb[2]; /* (r, *i) Streaming buffer */
- /* Tag diagnostics access */
- bus_addr_t is_dtag; /* (r, *r) */
- /* Data RAM diagnostic access */
- bus_addr_t is_ddram; /* (r, *r) */
- /* LRU queue diag. access */
- bus_addr_t is_dqueue; /* (r, *r) */
- /* Virtual address diagnostics register */
- bus_addr_t is_dva; /* (r, *r) */
- /* Tag compare diagnostics access */
- bus_addr_t is_dtcmp; /* (r, *r) */
- /* behavior flags */
- u_int is_flags; /* (r) */
-#define IOMMU_RERUN_DISABLE (1 << 0)
-#define IOMMU_FIRE (1 << 1)
-#define IOMMU_FLUSH_CACHE (1 << 2)
-#define IOMMU_PRESERVE_PROM (1 << 3)
-};
-
-/* interfaces for PCI/SBus code */
-void iommu_init(const char *name, struct iommu_state *is, u_int tsbsize,
- uint32_t iovabase, u_int resvpg);
-void iommu_reset(struct iommu_state *is);
-void iommu_decode_fault(struct iommu_state *is, vm_offset_t phys);
-
-extern struct bus_dma_methods iommu_dma_methods;
-
-#endif /* !_MACHINE_IOMMUVAR_H_ */
diff --git a/sys/sparc64/include/jbus.h b/sys/sparc64/include/jbus.h
deleted file mode 100644
index d644594f172f..000000000000
--- a/sys/sparc64/include/jbus.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_JBUS_H_
-#define _MACHINE_JBUS_H_
-
-#define JBUS_CR_JID_SHIFT (17)
-#define JBUS_CR_JID_SIZE (3)
-#define JBUS_CR_JID_MASK \
- (((1 << JBUS_CR_JID_SIZE) - 1) << JBUS_CR_JID_SHIFT)
-
-#define JBUS_CR_GET_JID(cr) ((cr & JBUS_CR_JID_MASK) >> JBUS_CR_JID_SHIFT)
-
-#endif /* _MACHINE_JBUS_H_ */
diff --git a/sys/sparc64/include/kdb.h b/sys/sparc64/include/kdb.h
deleted file mode 100644
index 8f3876e4a0e5..000000000000
--- a/sys/sparc64/include/kdb.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004 Marcel Moolenaar
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_KDB_H_
-#define _MACHINE_KDB_H_
-
-#include <machine/cpufunc.h>
-
-#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid]
-
-static __inline void
-kdb_cpu_clear_singlestep(void)
-{
-}
-
-static __inline void
-kdb_cpu_set_singlestep(void)
-{
-}
-
-static __inline void
-kdb_cpu_sync_icache(unsigned char *addr, size_t size)
-{
-}
-
-static __inline void
-kdb_cpu_trap(int vector, int _)
-{
- flushw();
-}
-
-#endif /* _MACHINE_KDB_H_ */
diff --git a/sys/sparc64/include/kerneldump.h b/sys/sparc64/include/kerneldump.h
deleted file mode 100644
index 975b566d0ce3..000000000000
--- a/sys/sparc64/include/kerneldump.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_KERNELDUMP_H_
-#define _MACHINE_KERNELDUMP_H_
-
-struct sparc64_dump_reg {
- uint64_t dr_pa;
- uint64_t dr_size;
- uint64_t dr_offs;
-};
-
-/*
- * Kernel dump format for sparc64. This does not use ELF because it is of no
- * avail (only libkvm knows how to translate addresses properly anyway) and
- * would require some ugly hacks.
- */
-struct sparc64_dump_hdr {
- uint64_t dh_hdr_size;
- uint64_t dh_tsb_pa;
- uint64_t dh_tsb_size;
- uint64_t dh_tsb_mask;
- int32_t dh_nregions;
- int32_t dh_pad;
- struct sparc64_dump_reg dh_regions[];
-};
-
-#endif /* _MACHINE_KERNELDUMP_H_ */
diff --git a/sys/sparc64/include/ktr.h b/sys/sparc64/include/ktr.h
deleted file mode 100644
index 01bb6a2d384c..000000000000
--- a/sys/sparc64/include/ktr.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved.
- *
- * 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.
- * 3. Berkeley Software Design Inc's name may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
- *
- * from BSDI $Id: ktr.h,v 1.10.2.7 2000/03/16 21:44:42 cp Exp $
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_KTR_H_
-#define _MACHINE_KTR_H_
-
-#include <sys/ktr.h>
-
-#ifdef LOCORE
-
-/*
- * XXX could really use another register ...
- */
-#define ATR(desc, r1, r2, r3, l1, l2) \
- .sect .rodata ; \
-l1: .asciz desc ; \
- .previous ; \
- SET(ktr_idx, r2, r1) ; \
- lduw [r1], r2 ; \
-l2: add r2, 1, r3 ; \
- set KTR_ENTRIES - 1, r1 ; \
- and r3, r1, r3 ; \
- set ktr_idx, r1 ; \
- casa [r1] ASI_N, r2, r3 ; \
- cmp r2, r3 ; \
- bne %icc, l2 ## b ; \
- mov r3, r2 ; \
- SET(ktr_buf, r3, r1) ; \
- ldx [r1], r1 ; \
- mulx r2, KTR_SIZEOF, r2 ; \
- add r1, r2, r1 ; \
- rd %tick, r2 ; \
- stx r2, [r1 + KTR_TIMESTAMP] ; \
- lduw [PCPU(CPUID)], r2 ; \
- stw r2, [r1 + KTR_CPU] ; \
- stw %g0, [r1 + KTR_LINE] ; \
- stx %g0, [r1 + KTR_FILE] ; \
- SET(l1 ## b, r3, r2) ; \
- stx r2, [r1 + KTR_DESC]
-
-#define CATR(mask, desc, r1, r2, r3, l1, l2, l3) \
- setx mask, r3, r1 ; \
- setx ktr_mask, r3, r2 ; \
- ldx [r2], r2 ; \
- and r2, r1, r1 ; \
- brz r1, l3 ## f ; \
- nop ; \
- lduw [PCPU(CPUID)], r2 ; \
- mov _NCPUBITS, r3 ; \
- udivx r2, r3, r2 ; \
- srl r2, 0, r2 ; \
- sllx r2, PTR_SHIFT, r2 ; \
- SET(ktr_cpumask, r3, r1) ; \
- ldx [r1 + r2], r1 ; \
- lduw [PCPU(CPUID)], r2 ; \
- mov _NCPUBITS, r3 ; \
- udivx r2, r3, r2 ; \
- srl r2, 0, r2 ; \
- smul r2, r3, r3 ; \
- lduw [PCPU(CPUID)], r2 ; \
- sub r2, r3, r3 ; \
- mov 1, r2 ; \
- sllx r2, r3, r2 ; \
- andn r1, r2, r1 ; \
- brz r1, l3 ## f ; \
- nop ; \
- ATR(desc, r1, r2, r3, l1, l2)
-
-#endif /* LOCORE */
-
-#endif /* !_MACHINE_KTR_H_ */
diff --git a/sys/sparc64/include/limits.h b/sys/sparc64/include/limits.h
deleted file mode 100644
index 689e8a91072b..000000000000
--- a/sys/sparc64/include/limits.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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 REGENTS 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 REGENTS 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.
- *
- * @(#)limits.h 8.3 (Berkeley) 1/4/94
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_LIMITS_H_
-#define _MACHINE_LIMITS_H_
-
-#include <sys/cdefs.h>
-
-#if __CC_SUPPORTS_WARNING
-#warning "machine/limits.h is deprecated. Include sys/limits.h instead."
-#endif
-
-#include <sys/limits.h>
-
-#endif /* !_MACHINE_LIMITS_H_ */
diff --git a/sys/sparc64/include/lsu.h b/sys/sparc64/include/lsu.h
deleted file mode 100644
index 1f62df9c8eee..000000000000
--- a/sys/sparc64/include/lsu.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_LSU_H_
-#define _MACHINE_LSU_H_
-
-/*
- * Definitions for the Load-Store-Unit Control Register. This is called
- * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater.
- */
-#define LSU_IC (1UL << 0)
-#define LSU_DC (1UL << 1)
-#define LSU_IM (1UL << 2)
-#define LSU_DM (1UL << 3)
-
-/* Parity control mask, UltraSPARC-I and II series only. */
-#define LSU_FM_SHIFT 4
-#define LSU_FM_BITS 16
-#define LSU_FM_MASK (((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT)
-
-#define LSU_VM_SHIFT 25
-#define LSU_VM_BITS 8
-#define LSU_VM_MASK (((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT)
-
-#define LSU_PM_SHIFT 33
-#define LSU_PM_BITS 8
-#define LSU_PM_MASK (((1UL << LSU_PM_BITS) - 1) << LSU_PM_SHIFT)
-
-#define LSU_VW (1UL << 21)
-#define LSU_VR (1UL << 22)
-#define LSU_PW (1UL << 23)
-#define LSU_PR (1UL << 24)
-
-/* The following bits are valid for the UltraSPARC-III series only. */
-#define LSU_WE (1UL << 41)
-#define LSU_SL (1UL << 42)
-#define LSU_SPE (1UL << 43)
-#define LSU_HPE (1UL << 44)
-#define LSU_PE (1UL << 45)
-#define LSU_RE (1UL << 46)
-#define LSU_ME (1UL << 47)
-#define LSU_CV (1UL << 48)
-#define LSU_CP (1UL << 49)
-
-/* The following bit is valid for the UltraSPARC-IV only. */
-#define LSU_WIH (1UL << 4)
-
-/* The following bits are valid for the UltraSPARC-IV+ only. */
-#define LSU_PPS_SHIFT 50
-#define LSU_PPS_BITS 2
-#define LSU_PPS_MASK (((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT)
-
-#define LSU_IPS_SHIFT 52
-#define LSU_IPS_BITS 2
-#define LSU_IPS_MASK (((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT)
-
-#define LSU_PCM (1UL << 54)
-#define LSU_WCE (1UL << 55)
-
-/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */
-#define LSU_WEAK_SPCA (1UL << 41)
-
-#endif /* _MACHINE_LSU_H_ */
diff --git a/sys/sparc64/include/mcntl.h b/sys/sparc64/include/mcntl.h
deleted file mode 100644
index 8dcc62868cbd..000000000000
--- a/sys/sparc64/include/mcntl.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_MCNTL_H
-#define _MACHINE_MCNTL_H
-
-/*
- * Definitions for the SPARC64 V, VI, VII and VIIIfx Memory Control Register
- */
-#define MCNTL_JPS1_TSBP (1UL << 8)
-
-#define MCNTL_RMD_SHIFT 12
-#define MCNTL_RMD_BITS 2
-#define MCNTL_RMD_MASK \
- (((1UL << MCNTL_RMD_BITS) - 1) << MCNTL_RMD_SHIFT)
-#define MCNTL_RMD_FULL (0UL << MCNTL_RMD_SHIFT)
-#define MCNTL_RMD_1024 (2UL << MCNTL_RMD_SHIFT)
-#define MCNTL_RMD_512 (3UL << MCNTL_RMD_SHIFT)
-
-#define MCNTL_FW_FDTLB (1UL << 14)
-#define MCNTL_FW_FITLB (1UL << 15)
-#define MCNTL_NC_CACHE (1UL << 16)
-
-/* The following bits are valid for the SPARC64 VI, VII and VIIIfx only. */
-#define MCNTL_MPG_SDTLB (1UL << 6)
-#define MCNTL_MPG_SITLB (1UL << 7)
-
-/* The following bits are valid for the SPARC64 VIIIfx only. */
-#define MCNTL_HPF_SHIFT 18
-#define MCNTL_HPF_BITS 2
-#define MCNTL_HPF_MASK \
- (((1UL << MCNTL_HPF_BITS) - 1) << MCNTL_HPF_SHIFT)
-#define MCNTL_HPF_STRONG (0UL << MCNTL_HPF_SHIFT)
-#define MCNTL_HPF_NOT (1UL << MCNTL_HPF_SHIFT)
-#define MCNTL_HPF_WEAK (2UL << MCNTL_HPF_SHIFT)
-
-#endif /* _MACHINE_MCNTL_H */
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h
deleted file mode 100644
index 3a30b2355935..000000000000
--- a/sys/sparc64/include/md_var.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1995 Bruce D. Evans.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the author nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/i386/include/md_var.h,v 1.40 2001/07/12
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_MD_VAR_H_
-#define _MACHINE_MD_VAR_H_
-
-typedef void cpu_block_copy_t(const void *src, void *dst, size_t len);
-typedef void cpu_block_zero_t(void *dst, size_t len);
-
-extern char tl0_base[];
-extern char _end[];
-
-extern long Maxmem;
-
-extern vm_offset_t kstack0;
-extern vm_paddr_t kstack0_phys;
-
-struct pcpu;
-struct md_utrap;
-
-uint32_t cpu_get_mid(u_int cpu_impl);
-void cpu_identify(u_long vers, u_int clock, u_int id);
-const char *cpu_portid_prop(u_int cpu_impl);
-void cpu_setregs(struct pcpu *pc);
-int is_physical_memory(vm_paddr_t addr);
-struct md_utrap *utrap_alloc(void);
-void utrap_free(struct md_utrap *ut);
-struct md_utrap *utrap_hold(struct md_utrap *ut);
-
-cpu_block_copy_t spitfire_block_copy;
-cpu_block_zero_t spitfire_block_zero;
-cpu_block_copy_t zeus_block_copy;
-cpu_block_zero_t zeus_block_zero;
-
-extern cpu_block_copy_t *cpu_block_copy;
-extern cpu_block_zero_t *cpu_block_zero;
-
-/*
- * Given that the VTOC8 disk label only uses 16-bit fields for cylinders,
- * heads and sectors we might need to adjust the geometry of large disks.
- */
-struct ccb_calc_geometry;
-int scsi_da_bios_params(struct ccb_calc_geometry *ccg);
-struct disk;
-void sparc64_ata_disk_firmware_geom_adjust(struct disk *disk);
-#define ata_disk_firmware_geom_adjust(disk) \
- sparc64_ata_disk_firmware_geom_adjust(disk)
-
-#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/sparc64/include/memdev.h b/sys/sparc64/include/memdev.h
deleted file mode 100644
index 486dbb5a5bfa..000000000000
--- a/sys/sparc64/include/memdev.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004 Mark R V Murray
- * All rights reserved.
- *
- * 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
- * in this position and unchanged.
- * 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 AUTHORS ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_MEMDEV_H_
-#define _MACHINE_MEMDEV_H_
-
-#define CDEV_MINOR_MEM 0
-#define CDEV_MINOR_KMEM 1
-
-d_open_t memopen;
-d_read_t memrw;
-#define memioctl (d_ioctl_t *)NULL
-#define memmmap (d_mmap_t *)NULL
-
-#endif /* _MACHINE_MEMDEV_H_ */
diff --git a/sys/sparc64/include/metadata.h b/sys/sparc64/include/metadata.h
deleted file mode 100644
index 8eaa485469e7..000000000000
--- a/sys/sparc64/include/metadata.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_METADATA_H_
-#define _MACHINE_METADATA_H_
-
-#define MODINFOMD_ENVP 0x1001
-#define MODINFOMD_HOWTO 0x1002
-#define MODINFOMD_KERNEND 0x1003
-#define MODINFOMD_DTLB_SLOTS 0x1004
-#define MODINFOMD_ITLB_SLOTS 0x1005
-#define MODINFOMD_DTLB 0x1006
-#define MODINFOMD_ITLB 0x1007
-
-struct tlb_entry {
- vm_offset_t te_pa;
- vm_offset_t te_va;
-};
-
-#endif /* !_MACHINE_METADATA_H_ */
diff --git a/sys/sparc64/include/nexusvar.h b/sys/sparc64/include/nexusvar.h
deleted file mode 100644
index 2e5f46183417..000000000000
--- a/sys/sparc64/include/nexusvar.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_NEXUSVAR_H_
-#define _MACHINE_NEXUSVAR_H_
-
-DECLARE_CLASS(nexus_driver);
-
-#endif /* _MACHINE_NEXUSVAR_H_ */
diff --git a/sys/sparc64/include/ofw_machdep.h b/sys/sparc64/include/ofw_machdep.h
deleted file mode 100644
index b3c33f449d03..000000000000
--- a/sys/sparc64/include/ofw_machdep.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_OFW_MACHDEP_H_
-#define _MACHINE_OFW_MACHDEP_H_
-
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <dev/ofw/openfirm.h>
-
-typedef uint64_t cell_t;
-
-/* sparc64 doesn't use the interrupt parent #address-cells in interrupt maps */
-#define OFW_IMAP_NO_IPARENT_ADDR_CELLS
-
-int OF_decode_addr(phandle_t, int, int *, bus_addr_t *);
-void OF_getetheraddr(device_t, u_char *);
-u_int OF_getscsinitid(device_t);
-void OF_panic(const char *fmt, ...) __dead2 __printflike(1, 2);
-void cpu_shutdown(void *) __dead2;
-int ofw_entry(void *);
-void ofw_exit(void *) __dead2;
-
-#endif /* _MACHINE_OFW_MACHDEP_H_ */
diff --git a/sys/sparc64/include/ofw_mem.h b/sys/sparc64/include/ofw_mem.h
deleted file mode 100644
index 44d7c18f36d5..000000000000
--- a/sys/sparc64/include/ofw_mem.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_OFW_MEM_H_
-#define _MACHINE_OFW_MEM_H_
-
-struct ofw_mem_region {
- vm_paddr_t mr_start;
- vm_size_t mr_size;
-};
-
-struct ofw_map {
- vm_offset_t om_start;
- vm_size_t om_size;
- u_long om_tte;
-};
-
-extern struct ofw_mem_region sparc64_memreg[];
-extern int sparc64_nmemreg;
-
-#endif
diff --git a/sys/sparc64/include/ofw_nexus.h b/sys/sparc64/include/ofw_nexus.h
deleted file mode 100644
index 247a311b1989..000000000000
--- a/sys/sparc64/include/ofw_nexus.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1999 Matthew R. Green
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- */
-
-/*-
- * Copyright (c) 1998, 1999 Eduardo E. Horvath
- * All rights reserved.
- *
- * 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.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_OFW_NEXUS_H_
-#define _MACHINE_OFW_NEXUS_H_
-
-/*
- * These are the regs used for devices on the nexus. They apply to all of
- * Fireplane/Safari, JBus and UPA.
- */
-
-struct nexus_regs {
- uint32_t phys_hi;
- uint32_t phys_lo;
- uint32_t size_hi;
- uint32_t size_lo;
-};
-
-#define NEXUS_REG_PHYS(r) \
- (((uint64_t)(r)->phys_hi << 32) | (uint64_t)(r)->phys_lo)
-#define NEXUS_REG_SIZE(r) \
- (((uint64_t)(r)->size_hi << 32) | (uint64_t)(r)->size_lo)
-
-#endif /* !_MACHINE_OFW_NEXUS_H_ */
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
deleted file mode 100644
index 32083f65a111..000000000000
--- a/sys/sparc64/include/param.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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 REGENTS 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 REGENTS 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.
- *
- * from: @(#)param.h 5.8 (Berkeley) 6/28/91
- * $FreeBSD$
- */
-
-#ifndef _SPARC64_INCLUDE_PARAM_H_
-#define _SPARC64_INCLUDE_PARAM_H_
-
-/*
- * Machine dependent constants for sparc64.
- */
-
-#include <machine/_align.h>
-
-#define __PCI_BAR_ZERO_VALID
-
-#ifndef MACHINE
-#define MACHINE "sparc64"
-#endif
-#ifndef MACHINE_ARCH
-#define MACHINE_ARCH "sparc64"
-#endif
-#define MID_MACHINE MID_SPARC64
-
-#if defined(SMP) || defined(KLD_MODULE)
-#ifndef MAXCPU
-#define MAXCPU 64
-#endif
-#else
-#define MAXCPU 1
-#endif /* SMP || KLD_MODULE */
-
-#ifndef MAXMEMDOM
-#define MAXMEMDOM 1
-#endif
-
-#define INT_SHIFT 2
-#define PTR_SHIFT 3
-
-#define ALIGNBYTES _ALIGNBYTES
-#define ALIGN(p) _ALIGN(p)
-/*
- * ALIGNED_POINTER is a boolean macro that checks whether an address
- * is valid to fetch data elements of type t from on this architecture.
- * This does not reflect the optimal alignment, just the possibility
- * (within reasonable limits).
- */
-#define ALIGNED_POINTER(p, t) ((((u_long)(p)) & (sizeof (t) - 1)) == 0)
-
-/*
- * CACHE_LINE_SIZE is the compile-time maximum cache line size for an
- * architecture. It should be used with appropriate caution.
- */
-#define CACHE_LINE_SHIFT 7
-#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
-
-#define PAGE_SHIFT_8K 13
-#define PAGE_SIZE_8K (1L<<PAGE_SHIFT_8K)
-#define PAGE_MASK_8K (PAGE_SIZE_8K-1)
-
-#define PAGE_SHIFT_64K 16
-#define PAGE_SIZE_64K (1L<<PAGE_SHIFT_64K)
-#define PAGE_MASK_64K (PAGE_SIZE_64K-1)
-
-#define PAGE_SHIFT_512K 19
-#define PAGE_SIZE_512K (1L<<PAGE_SHIFT_512K)
-#define PAGE_MASK_512K (PAGE_SIZE_512K-1)
-
-#define PAGE_SHIFT_4M 22
-#define PAGE_SIZE_4M (1L<<PAGE_SHIFT_4M)
-#define PAGE_MASK_4M (PAGE_SIZE_4M-1)
-
-#define PAGE_SHIFT_32M 25
-#define PAGE_SIZE_32M (1L<<PAGE_SHIFT_32M)
-#define PAGE_MASK_32M (PAGE_SIZE_32M-1)
-
-#define PAGE_SHIFT_256M 28
-#define PAGE_SIZE_256M (1L<<PAGE_SHIFT_256M)
-#define PAGE_MASK_256M (PAGE_SIZE_256M-1)
-
-#define PAGE_SHIFT_MIN PAGE_SHIFT_8K
-#define PAGE_SIZE_MIN PAGE_SIZE_8K
-#define PAGE_MASK_MIN PAGE_MASK_8K
-#define PAGE_SHIFT PAGE_SHIFT_8K /* LOG2(PAGE_SIZE) */
-#define PAGE_SIZE PAGE_SIZE_8K /* bytes/page */
-#define PAGE_MASK PAGE_MASK_8K
-#define PAGE_SHIFT_MAX PAGE_SHIFT_4M
-#define PAGE_SIZE_MAX PAGE_SIZE_4M
-#define PAGE_MASK_MAX PAGE_MASK_4M
-
-#define MAXPAGESIZES 1 /* maximum number of supported page sizes */
-
-#ifndef KSTACK_PAGES
-#define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */
-#endif
-#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */
-#define PCPU_PAGES 1
-
-/*
- * Ceiling on size of buffer cache (really only effects write queueing,
- * the VM page cache is not effected), can be changed via
- * the kern.maxbcache /boot/loader.conf variable.
- */
-#ifndef VM_BCACHE_SIZE_MAX
-#define VM_BCACHE_SIZE_MAX (400 * 1024 * 1024)
-#endif
-
-/*
- * Mach derived conversion macros
- */
-#define round_page(x) (((unsigned long)(x) + PAGE_MASK) & ~PAGE_MASK)
-#define trunc_page(x) ((unsigned long)(x) & ~PAGE_MASK)
-
-#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT)
-
-#define sparc64_btop(x) ((unsigned long)(x) >> PAGE_SHIFT)
-#define sparc64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT)
-
-#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
-
-#ifdef _KERNEL
-#define NO_FUEWORD 1
-#endif
-
-#endif /* !_SPARC64_INCLUDE_PARAM_H_ */
diff --git a/sys/sparc64/include/pcb.h b/sys/sparc64/include/pcb.h
deleted file mode 100644
index e5a8c1bd9b94..000000000000
--- a/sys/sparc64/include/pcb.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PCB_H_
-#define _MACHINE_PCB_H_
-
-#ifndef LOCORE
-#include <machine/frame.h>
-#endif
-
-#define MAXWIN 8
-
-#define PCB_FEF (1 << 0)
-
-#ifndef LOCORE
-
-/* NOTE: pcb_ufp must be aligned on a 64 byte boundary. */
-struct pcb {
- struct rwindow pcb_rw[MAXWIN];
- uint32_t pcb_kfp[64];
- uint32_t pcb_ufp[64];
- uint64_t pcb_rwsp[MAXWIN];
- uint64_t pcb_flags;
- uint64_t pcb_nsaved;
- uint64_t pcb_pc;
- uint64_t pcb_sp;
- uint64_t pcb_tpc;
- uint64_t pcb_pad[3];
-} __aligned(64);
-
-#ifdef _KERNEL
-void makectx(struct trapframe *tf, struct pcb *pcb);
-int savectx(struct pcb *pcb) __returns_twice;
-#endif
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_PCB_H_ */
diff --git a/sys/sparc64/include/pcpu.h b/sys/sparc64/include/pcpu.h
deleted file mode 100644
index 1716d95a0891..000000000000
--- a/sys/sparc64/include/pcpu.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PCPU_H_
-#define _MACHINE_PCPU_H_
-
-#include <machine/asmacros.h>
-#include <machine/cache.h>
-#include <machine/frame.h>
-#include <machine/intr_machdep.h>
-
-#define ALT_STACK_SIZE 128
-
-struct pmap;
-
-/*
- * Inside the kernel, the globally reserved register g7 is used to
- * point at the globaldata structure.
- */
-#define PCPU_MD_FIELDS \
- struct cacheinfo pc_cache; \
- struct intr_request pc_irpool[IR_FREE]; \
- struct intr_request *pc_irhead; \
- struct intr_request **pc_irtail; \
- struct intr_request *pc_irfree; \
- struct pmap *pc_pmap; \
- vm_offset_t pc_addr; \
- vm_offset_t pc_qmap_addr; \
- u_long pc_tickref; \
- u_long pc_tickadj; \
- u_long pc_tickincrement; \
- u_int pc_clock; \
- u_int pc_impl; \
- u_int pc_mid; \
- u_int pc_node; \
- u_int pc_tlb_ctx; \
- u_int pc_tlb_ctx_max; \
- u_int pc_tlb_ctx_min; \
- char __pad[653]
-
-#ifdef _KERNEL
-
-extern void *dpcpu0;
-
-struct pcb;
-struct pcpu;
-
-register struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
-register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
-
-#define get_pcpu() (pcpup)
-#define PCPU_GET(member) (pcpup->pc_ ## member)
-
-static __inline __pure2 struct thread *
-__curthread(void)
-{
- struct thread *td;
-
- __asm("ldx [%" __XSTRING(PCPU_REG) "], %0" : "=r" (td));
- return (td);
-}
-#define curthread (__curthread())
-
-/*
- * XXX The implementation of this operation should be made atomic
- * with respect to preemption.
- */
-#define PCPU_ADD(member, value) (pcpup->pc_ ## member += (value))
-#define PCPU_INC(member) PCPU_ADD(member, 1)
-#define PCPU_PTR(member) (&pcpup->pc_ ## member)
-#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value))
-
-#endif /* _KERNEL */
-
-#endif /* !_MACHINE_PCPU_H_ */
diff --git a/sys/sparc64/include/pcpu_aux.h b/sys/sparc64/include/pcpu_aux.h
deleted file mode 100644
index db79491b538f..000000000000
--- a/sys/sparc64/include/pcpu_aux.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2019 The FreeBSD Foundation
- *
- * This software was developed by Konstantin Belousov <kib@FreeBSD.org>
- * under sponsorship from the FreeBSD Foundation.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PCPU_AUX_H_
-#define _MACHINE_PCPU_AUX_H_
-
-#ifndef _KERNEL
-#error "Not for userspace"
-#endif
-
-#ifndef _SYS_PCPU_H_
-#error "Do not include machine/pcpu_aux.h directly"
-#endif
-
-/*
- * To minimize memory waste in per-cpu UMA zones, the page size should
- * be a multiple of the size of struct pcpu.
- */
-_Static_assert(PAGE_SIZE % sizeof(struct pcpu) == 0, "fix pcpu size");
-
-#endif /* _MACHINE_PCPU_AUX_H_ */
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h
deleted file mode 100644
index 8ad192782f8c..000000000000
--- a/sys/sparc64/include/pmap.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1991 Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department and William Jolitz of UUNET Technologies Inc.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
- * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PMAP_H_
-#define _MACHINE_PMAP_H_
-
-#include <sys/queue.h>
-#include <sys/_cpuset.h>
-#include <sys/_lock.h>
-#include <sys/_mutex.h>
-#include <sys/_rwlock.h>
-#include <machine/cache.h>
-#include <machine/tte.h>
-
-#define PMAP_CONTEXT_MAX 8192
-#define PMAP_ENTER_QUICK_LOCKED 0x10000000
-
-typedef struct pmap *pmap_t;
-
-struct md_page {
- TAILQ_HEAD(, tte) tte_list;
- struct pmap *pmap;
- uint32_t colors[DCACHE_COLORS];
- int32_t color;
-};
-
-struct pmap {
- struct mtx pm_mtx;
- struct tte *pm_tsb;
- vm_object_t pm_tsb_obj;
- cpuset_t pm_active;
- u_int pm_context[MAXCPU];
- struct pmap_statistics pm_stats;
-};
-
-#define PMAP_LOCK(pmap) mtx_lock(&(pmap)->pm_mtx)
-#define PMAP_LOCK_ASSERT(pmap, type) \
- mtx_assert(&(pmap)->pm_mtx, (type))
-#define PMAP_LOCK_DESTROY(pmap) mtx_destroy(&(pmap)->pm_mtx)
-#define PMAP_LOCK_INIT(pmap) mtx_init(&(pmap)->pm_mtx, "pmap", \
- NULL, MTX_DEF | MTX_DUPOK)
-#define PMAP_LOCKED(pmap) mtx_owned(&(pmap)->pm_mtx)
-#define PMAP_MTX(pmap) (&(pmap)->pm_mtx)
-#define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx)
-#define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx)
-
-#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT
-#define pmap_page_is_write_mapped(m) (((m)->a.flags & PGA_WRITEABLE) != 0)
-#define pmap_page_set_memattr(m, ma) (void)0
-
-void pmap_bootstrap(u_int cpu_impl);
-vm_paddr_t pmap_kextract(vm_offset_t va);
-void pmap_kenter(vm_offset_t va, vm_page_t m);
-void pmap_kremove(vm_offset_t);
-void pmap_kenter_flags(vm_offset_t va, vm_paddr_t pa, u_long flags);
-void pmap_kremove_flags(vm_offset_t va);
-boolean_t pmap_page_is_mapped(vm_page_t m);
-
-int pmap_cache_enter(vm_page_t m, vm_offset_t va);
-
-int pmap_remove_tte(struct pmap *pm1, struct pmap *pm2, struct tte *tp,
- vm_offset_t va);
-
-void pmap_map_tsb(void);
-void pmap_set_kctx(void);
-
-#define vtophys(va) pmap_kextract((vm_offset_t)(va))
-
-extern struct pmap kernel_pmap_store;
-#define kernel_pmap (&kernel_pmap_store)
-extern struct rwlock_padalign tte_list_global_lock;
-extern vm_offset_t virtual_avail;
-extern vm_offset_t virtual_end;
-
-#ifdef PMAP_STATS
-
-SYSCTL_DECL(_debug_pmap_stats);
-
-#define PMAP_STATS_VAR(name) \
- static long name; \
- SYSCTL_LONG(_debug_pmap_stats, OID_AUTO, name, CTLFLAG_RW, \
- &name, 0, "")
-
-#define PMAP_STATS_INC(var) \
- atomic_add_long(&var, 1)
-
-#else
-
-#define PMAP_STATS_VAR(name)
-#define PMAP_STATS_INC(var)
-
-#endif
-
-static inline int
-pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused)
-{
-
- return (0);
-}
-
-#endif /* !_MACHINE_PMAP_H_ */
diff --git a/sys/sparc64/include/pmc_mdep.h b/sys/sparc64/include/pmc_mdep.h
deleted file mode 100644
index 7ced0b9559e9..000000000000
--- a/sys/sparc64/include/pmc_mdep.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*-
- * This file is in the public domain.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PMC_MDEP_H_
-#define _MACHINE_PMC_MDEP_H_
-
-union pmc_md_op_pmcallocate {
- uint64_t __pad[4];
-};
-
-/* Logging */
-#define PMCLOG_READADDR PMCLOG_READ64
-#define PMCLOG_EMITADDR PMCLOG_EMIT64
-
-#if _KERNEL
-union pmc_md_pmc {
-};
-
-#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */
-#define PMC_TRAPFRAME_TO_FP(TF) (0)
-#define PMC_TRAPFRAME_TO_SP(TF) (0)
-
-#endif
-
-#endif /* !_MACHINE_PMC_MDEP_H_ */
diff --git a/sys/sparc64/include/proc.h b/sys/sparc64/include/proc.h
deleted file mode 100644
index a581f511bdb1..000000000000
--- a/sys/sparc64/include/proc.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1991 Regents of the University of California.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)proc.h 7.1 (Berkeley) 5/15/91
- * from: FreeBSD: src/sys/i386/include/proc.h,v 1.11 2001/06/29
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PROC_H_
-#define _MACHINE_PROC_H_
-
-#include <machine/utrap.h>
-
-struct md_utrap {
- utrap_entry_t *ut_precise[UT_MAX]; /* must be first */
- int ut_refcnt;
-};
-
-struct mdthread {
- int md_spinlock_count; /* (k) */
- register_t md_saved_pil; /* (k) */
-};
-
-struct mdproc {
- struct md_utrap *md_utrap;
- void *md_sigtramp;
-};
-
-#define KINFO_PROC_SIZE 1088
-
-struct syscall_args {
- u_int code;
- struct sysent *callp;
- register_t args[8];
- int narg;
-};
-
-#ifdef _KERNEL
-
-#include <machine/pcb.h>
-
-/* Get the current kernel thread stack usage. */
-#define GET_STACK_USAGE(total, used) do { \
- struct thread *td = curthread; \
- (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \
- (used) = (char *)td->td_kstack + \
- td->td_kstack_pages * PAGE_SIZE - \
- (char *)&td; \
-} while (0)
-
-#endif
-
-#endif /* !_MACHINE_PROC_H_ */
diff --git a/sys/sparc64/include/procctl.h b/sys/sparc64/include/procctl.h
deleted file mode 100644
index 5221cfcd7be1..000000000000
--- a/sys/sparc64/include/procctl.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*-
- * This file is in the public domain.
- */
-/* $FreeBSD$ */
diff --git a/sys/sparc64/include/profile.h b/sys/sparc64/include/profile.h
deleted file mode 100644
index 59cdec6b67c5..000000000000
--- a/sys/sparc64/include/profile.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * SPDX-License-Identifier: MIT-CMU
- *
- * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- *
- * from: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp
- * from: FreeBSD: src/sys/alpha/include/profile.h,v 1.4 1999/12/29
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PROFILE_H_
-#define _MACHINE_PROFILE_H_
-
-#if !defined(_KERNEL) && !defined(_SYS_CDEFS_H_)
-#error this file needs sys/cdefs.h as a prerequisite
-#endif
-
-#define FUNCTION_ALIGNMENT 32
-
-typedef u_long fptrdiff_t;
-
-#ifdef _KERNEL
-
-#include <machine/cpufunc.h>
-#include <machine/intr_machdep.h>
-
-#define _MCOUNT_DECL void mcount
-#define MCOUNT
-
-#define MCOUNT_DECL(s) register_t s;
-#define MCOUNT_ENTER(s) s = rdpr(pil); wrpr(pil, 0, PIL_TICK)
-#define MCOUNT_EXIT(s) wrpr(pil, 0, s)
-
-void bintr(void);
-void btrap(void);
-void eintr(void);
-void user(void);
-
-#define MCOUNT_FROMPC_USER(pc) \
- ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc)
-
-#define MCOUNT_FROMPC_INTR(pc) \
- ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \
- ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \
- (uintfptr_t)btrap) : ~0UL)
-
-void mcount(uintfptr_t frompc, uintfptr_t selfpc);
-
-#else /* !_KERNEL */
-
-typedef u_long uintfptr_t;
-
-#define _MCOUNT_DECL static __inline void __mcount
-
-#ifdef __GNUCLIKE_ASM
-#define MCOUNT \
-void \
-_mcount() \
-{ \
- uintfptr_t frompc, selfpc; \
- \
- /* \
- * Find the return address for mcount, \
- * and the return address for mcount's caller. \
- * \
- * selfpc = pc pushed by call to mcount \
- */ \
- __asm("add %%o7, 8, %0" : "=r" (selfpc)); \
- /* \
- * frompc = pc pushed by call to mcount's caller. \
- */ \
- __asm("add %%i7, 8, %0" : "=r" (frompc)); \
- __mcount(frompc, selfpc); \
-}
-#else /* !__GNUCLIKE_ASM */
-#define MCOUNT
-#endif /* __GNUCLIKE_ASM */
-
-#endif /* _KERNEL */
-
-#endif /* !_MACHINE_PROFILE_H_ */
diff --git a/sys/sparc64/include/pstate.h b/sys/sparc64/include/pstate.h
deleted file mode 100644
index df3a25bd751b..000000000000
--- a/sys/sparc64/include/pstate.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PSTATE_H_
-#define _MACHINE_PSTATE_H_
-
-#define PSTATE_AG (1<<0)
-#define PSTATE_IE (1<<1)
-#define PSTATE_PRIV (1<<2)
-#define PSTATE_AM (1<<3)
-#define PSTATE_PEF (1<<4)
-#define PSTATE_RED (1<<5)
-
-#define PSTATE_MM_SHIFT (6)
-#define PSTATE_MM_SIZE (2)
-#define PSTATE_MM_MASK (((1<<PSTATE_MM_SIZE)-1)<<PSTATE_MM_SHIFT)
-#define PSTATE_MM_TSO (0<<PSTATE_MM_SHIFT)
-#define PSTATE_MM_PSO (1<<PSTATE_MM_SHIFT)
-#define PSTATE_MM_RMO (2<<PSTATE_MM_SHIFT)
-
-#define PSTATE_TLE (1<<8)
-#define PSTATE_CLE (1<<9)
-#define PSTATE_MG (1<<10)
-#define PSTATE_IG (1<<11)
-
-#define PSTATE_MM PSTATE_MM_TSO
-
-#define PSTATE_NORMAL (PSTATE_MM | PSTATE_PEF | PSTATE_PRIV)
-#define PSTATE_ALT (PSTATE_NORMAL | PSTATE_AG)
-#define PSTATE_INTR (PSTATE_NORMAL | PSTATE_IG)
-#define PSTATE_MMU (PSTATE_NORMAL | PSTATE_MG)
-
-#define PSTATE_KERNEL (PSTATE_NORMAL | PSTATE_IE)
-
-#define PSTATE_SECURE(pstate) \
- (((pstate) & ~(PSTATE_AM|PSTATE_MM_MASK)) == (PSTATE_IE|PSTATE_PEF))
-
-#endif /* !_MACHINE_PSTATE_H_ */
diff --git a/sys/sparc64/include/ptrace.h b/sys/sparc64/include/ptrace.h
deleted file mode 100644
index 4c71f7539525..000000000000
--- a/sys/sparc64/include/ptrace.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)ptrace.h 8.1 (Berkeley) 6/11/93
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_PTRACE_H_
-#define _MACHINE_PTRACE_H_
-
-#endif
diff --git a/sys/sparc64/include/reg.h b/sys/sparc64/include/reg.h
deleted file mode 100644
index fcb260851054..000000000000
--- a/sys/sparc64/include/reg.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)reg.h 5.5 (Berkeley) 1/18/91
- * from: FreeBSD: src/sys/i386/include/reg.h,v 1.23 2000/09/21
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_REG_H_
-#define _MACHINE_REG_H_
-
-/*
- * Register set accessible via /proc/$pid/regs and PT_{SET,GET}REGS.
- *
- * NOTE: DO NOT CHANGE THESE STRUCTURES. The offsets of the fields are
- * hardcoded in gdb. Changing them and recompiling doesn't help, the
- * constants in nm-fbsd.h must also be updated.
- */
-
-struct reg32 {
- uint32_t r_global[8];
- uint32_t r_out[8];
- uint32_t r_npc;
- uint32_t r_pc;
- uint32_t r_psr;
- uint32_t r_wim;
- uint32_t r_pad[4];
-};
-
-struct reg {
- uint64_t r_global[8];
- uint64_t r_out[8];
- uint64_t r_fprs;
- uint64_t r_fsr;
- uint64_t r_gsr;
- uint64_t r_level;
- uint64_t r_pil;
- uint64_t r_sfar;
- uint64_t r_sfsr;
- uint64_t r_tar;
- uint64_t r_tnpc;
- uint64_t r_tpc;
- uint64_t r_tstate;
- uint64_t r_type;
- uint64_t r_y;
- uint64_t r_wstate;
- uint64_t r_pad[2];
-};
-
-/*
- * Register set accessible via /proc/$pid/fpregs.
- */
-
-struct fpreg32 {
- uint32_t fr_regs[32];
- uint32_t fr_fsr;
-};
-
-struct fpreg {
- uint32_t fr_regs[64]; /* our view is 64 32-bit registers */
- int64_t fr_fsr; /* %fsr */
- int32_t fr_gsr; /* %gsr */
- int32_t fr_pad[1];
-};
-
-/*
- * Register set accessible via /proc/$pid/dbregs.
- */
-struct dbreg {
- int dummy;
-};
-
-/*
- * NB: sparcv8 binaries are not supported even though this header
- * defines the relevant structures.
- */
-#define __HAVE_REG32
-
-#ifdef _KERNEL
-/*
- * XXX these interfaces are MI, so they should be declared in a MI place.
- */
-int fill_regs(struct thread *, struct reg *);
-int set_regs(struct thread *, struct reg *);
-int fill_fpregs(struct thread *, struct fpreg *);
-int set_fpregs(struct thread *, struct fpreg *);
-int fill_dbregs(struct thread *, struct dbreg *);
-int set_dbregs(struct thread *, struct dbreg *);
-#endif
-
-#endif /* !_MACHINE_REG_H_ */
diff --git a/sys/sparc64/include/reloc.h b/sys/sparc64/include/reloc.h
deleted file mode 100644
index d99dc8b05d60..000000000000
--- a/sys/sparc64/include/reloc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL 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 REGENTS 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.
- *
- * $FreeBSD$
- */
diff --git a/sys/sparc64/include/resource.h b/sys/sparc64/include/resource.h
deleted file mode 100644
index 229d14f253b0..000000000000
--- a/sys/sparc64/include/resource.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright 1998 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_RESOURCE_H_
-#define _MACHINE_RESOURCE_H_ 1
-
-/*
- * Definitions of resource types for Intel Architecture machines
- * with support for legacy ISA devices and drivers.
- */
-
-#define SYS_RES_IRQ 1 /* interrupt lines */
-#define SYS_RES_DRQ 2 /* isa dma lines */
-#define SYS_RES_MEMORY 3 /* i/o memory */
-#define SYS_RES_IOPORT 4 /* i/o ports */
-
-#endif /* !_MACHINE_RESOURCE_H_ */
diff --git a/sys/sparc64/include/runq.h b/sys/sparc64/include/runq.h
deleted file mode 100644
index 1fb8d1bdcfe6..000000000000
--- a/sys/sparc64/include/runq.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder <jake@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_RUNQ_H_
-#define _MACHINE_RUNQ_H_
-
-#define RQB_LEN (1UL) /* Number of priority status words. */
-#define RQB_L2BPW (6UL) /* Log2(sizeof(rqb_word_t) * NBBY)). */
-#define RQB_BPW (1UL<<RQB_L2BPW) /* Bits in an rqb_word_t. */
-
-#define RQB_BIT(pri) (1UL << ((pri) & (RQB_BPW - 1)))
-#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
-
-#define RQB_FFS(word) (ffs64(word) - 1)
-
-/*
- * Type of run queue status word.
- */
-typedef u_int64_t rqb_word_t;
-
-static __inline u_long
-ffs64(u_long mask)
-{
- u_long bit;
-
- if (mask == 0)
- return (0);
- for (bit = 1; (mask & 1UL) == 0; bit++)
- mask >>= 1UL;
- return (bit);
-}
-
-#endif
diff --git a/sys/sparc64/include/sc_machdep.h b/sys/sparc64/include/sc_machdep.h
deleted file mode 100644
index d50ef4867f7b..000000000000
--- a/sys/sparc64/include/sc_machdep.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2003 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SC_MACHDEP_H_
-#define _MACHINE_SC_MACHDEP_H_
-
-/* Color attributes for foreground text */
-
-#define FG_BLACK 0x0
-#define FG_BLUE 0x1
-#define FG_GREEN 0x2
-#define FG_CYAN 0x3
-#define FG_RED 0x4
-#define FG_MAGENTA 0x5
-#define FG_BROWN 0x6
-#define FG_LIGHTGREY 0x7
-#define FG_DARKGREY 0x8
-#define FG_LIGHTBLUE 0x9
-#define FG_LIGHTGREEN 0xa
-#define FG_LIGHTCYAN 0xb
-#define FG_LIGHTRED 0xc
-#define FG_LIGHTMAGENTA 0xd
-#define FG_YELLOW 0xe
-#define FG_WHITE 0xf
-#define FG_BLINK 0x80
-
-/* Color attributes for text background */
-
-#define BG_BLACK 0x00
-#define BG_BLUE 0x10
-#define BG_GREEN 0x20
-#define BG_CYAN 0x30
-#define BG_RED 0x40
-#define BG_MAGENTA 0x50
-#define BG_BROWN 0x60
-#define BG_LIGHTGREY 0x70
-#define BG_DARKGREY 0x80
-#define BG_LIGHTBLUE 0x90
-#define BG_LIGHTGREEN 0xa0
-#define BG_LIGHTCYAN 0xb0
-#define BG_LIGHTRED 0xc0
-#define BG_LIGHTMAGENTA 0xd0
-#define BG_YELLOW 0xe0
-#define BG_WHITE 0xf0
-
-#define SC_NORM_ATTR (FG_BLACK | BG_WHITE)
-#define SC_NORM_REV_ATTR (FG_WHITE | BG_BLACK)
-#define SC_KERNEL_CONS_ATTR (FG_BLACK | BG_WHITE)
-#define SC_KERNEL_CONS_REV_ATTR (FG_WHITE | BG_BLACK)
-
-#endif /* !_MACHINE_SC_MACHDEP_H_ */
diff --git a/sys/sparc64/include/setjmp.h b/sys/sparc64/include/setjmp.h
deleted file mode 100644
index 12035418cbbe..000000000000
--- a/sys/sparc64/include/setjmp.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL 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 REGENTS 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.
- *
- * From: FreeBSD: src/sys/i386/include/setjmp.h,v 1.5 2000/10/06
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SETJMP_H_
-#define _MACHINE_SETJMP_H_
-
-#include <sys/cdefs.h>
-
-#define _JBLEN 5
-
-#define _JB_FP 0
-#define _JB_PC 1
-#define _JB_SP 2
-#define _JB_SIGMASK 3
-#define _JB_SIGFLAG 5
-
-/*
- * jmp_buf and sigjmp_buf are encapsulated in different structs to force
- * compile-time diagnostics for mismatches. The structs are the same
- * internally to avoid some run-time errors for mismatches.
- */
-#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
-typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
-#endif
-
-typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1];
-
-#endif /* !_MACHINE_SETJMP_H_ */
diff --git a/sys/sparc64/include/sf_buf.h b/sys/sparc64/include/sf_buf.h
deleted file mode 100644
index 10bbd888b592..000000000000
--- a/sys/sparc64/include/sf_buf.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2014 Gleb Smirnoff <glebius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SF_BUF_H_
-#define _MACHINE_SF_BUF_H_
-
-void sf_buf_map(struct sf_buf *, int);
-int sf_buf_unmap(struct sf_buf *);
-
-#endif /* !_MACHINE_SF_BUF_H_ */
diff --git a/sys/sparc64/include/sigframe.h b/sys/sparc64/include/sigframe.h
deleted file mode 100644
index b52238785d46..000000000000
--- a/sys/sparc64/include/sigframe.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1999 Marcel Moolenaar
- * All rights reserved.
- *
- * 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
- * in this position and unchanged.
- * 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.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/alpha/include/sigframe.h,v 1.1 1999/09/29
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SIGFRAME_H_
-#define _MACHINE_SIGFRAME_H_ 1
-
-struct sigframe {
- ucontext_t sf_uc;
- siginfo_t sf_si;
-};
-
-#endif /* _MACHINE_SIGFRAME_H_ */
diff --git a/sys/sparc64/include/signal.h b/sys/sparc64/include/signal.h
deleted file mode 100644
index f0df6f512810..000000000000
--- a/sys/sparc64/include/signal.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1986, 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)signal.h 8.1 (Berkeley) 6/11/93
- * from: FreeBSD: src/sys/i386/include/signal.h,v 1.13 2000/11/09
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SIGNAL_H_
-#define _MACHINE_SIGNAL_H_
-
-#include <sys/cdefs.h>
-
-typedef long sig_atomic_t;
-
-#if __BSD_VISIBLE
-struct sigcontext {
- int _dummy;
-};
-#endif /* __BSD_VISIBLE */
-
-#endif /* !_MACHINE_SIGNAL_H_ */
diff --git a/sys/sparc64/include/smp.h b/sys/sparc64/include/smp.h
deleted file mode 100644
index 18b8d97268f8..000000000000
--- a/sys/sparc64/include/smp.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * Copyright (c) 2007 - 2011 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_SMP_H_
-#define _MACHINE_SMP_H_
-
-#ifdef SMP
-
-#define CPU_TICKSYNC 1
-#define CPU_STICKSYNC 2
-#define CPU_INIT 3
-#define CPU_BOOTSTRAP 4
-
-#ifndef LOCORE
-
-#include <sys/param.h>
-#include <sys/cpuset.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/proc.h>
-#include <sys/sched.h>
-#include <sys/smp.h>
-
-#include <machine/atomic.h>
-#include <machine/intr_machdep.h>
-#include <machine/tte.h>
-
-#define IDR_BUSY 0x0000000000000001ULL
-#define IDR_NACK 0x0000000000000002ULL
-#define IDR_CHEETAH_ALL_BUSY 0x5555555555555555ULL
-#define IDR_CHEETAH_ALL_NACK (~IDR_CHEETAH_ALL_BUSY)
-#define IDR_CHEETAH_MAX_BN_PAIRS 32
-#define IDR_JALAPENO_MAX_BN_PAIRS 4
-
-#define IDC_ITID_SHIFT 14
-#define IDC_BN_SHIFT 24
-
-#define IPI_AST PIL_AST
-#define IPI_RENDEZVOUS PIL_RENDEZVOUS
-#define IPI_PREEMPT PIL_PREEMPT
-#define IPI_HARDCLOCK PIL_HARDCLOCK
-#define IPI_STOP PIL_STOP
-#define IPI_STOP_HARD PIL_STOP
-
-#define IPI_RETRIES 5000
-
-struct cpu_start_args {
- u_int csa_count;
- u_int csa_mid;
- u_int csa_state;
- vm_offset_t csa_pcpu;
- u_long csa_tick;
- u_long csa_stick;
- u_long csa_ver;
- struct tte csa_ttes[PCPU_PAGES];
-};
-
-struct ipi_cache_args {
- cpuset_t ica_mask;
- vm_paddr_t ica_pa;
-};
-
-struct ipi_rd_args {
- cpuset_t ira_mask;
- register_t *ira_val;
-};
-
-struct ipi_tlb_args {
- cpuset_t ita_mask;
- struct pmap *ita_pmap;
- u_long ita_start;
- u_long ita_end;
-};
-#define ita_va ita_start
-
-struct pcb;
-struct pcpu;
-
-extern struct pcb stoppcbs[];
-
-void cpu_mp_bootstrap(struct pcpu *pc);
-void cpu_mp_shutdown(void);
-
-typedef void cpu_ipi_selected_t(cpuset_t, u_long, u_long, u_long);
-extern cpu_ipi_selected_t *cpu_ipi_selected;
-typedef void cpu_ipi_single_t(u_int, u_long, u_long, u_long);
-extern cpu_ipi_single_t *cpu_ipi_single;
-
-void mp_init(void);
-
-extern struct mtx ipi_mtx;
-extern struct ipi_cache_args ipi_cache_args;
-extern struct ipi_rd_args ipi_rd_args;
-extern struct ipi_tlb_args ipi_tlb_args;
-
-extern char *mp_tramp_code;
-extern u_long mp_tramp_code_len;
-extern u_long mp_tramp_tlb_slots;
-extern u_long mp_tramp_func;
-
-extern void mp_startup(void);
-
-extern char tl_ipi_cheetah_dcache_page_inval[];
-extern char tl_ipi_spitfire_dcache_page_inval[];
-extern char tl_ipi_spitfire_icache_page_inval[];
-
-extern char tl_ipi_level[];
-
-extern char tl_ipi_stick_rd[];
-extern char tl_ipi_tick_rd[];
-
-extern char tl_ipi_tlb_context_demap[];
-extern char tl_ipi_tlb_page_demap[];
-extern char tl_ipi_tlb_range_demap[];
-
-static __inline void
-ipi_all_but_self(u_int ipi)
-{
- cpuset_t cpus;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return;
- cpus = all_cpus;
- sched_pin();
- CPU_CLR(PCPU_GET(cpuid), &cpus);
- mtx_lock_spin(&ipi_mtx);
- cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi);
- mtx_unlock_spin(&ipi_mtx);
- sched_unpin();
-}
-
-static __inline void
-ipi_selected(cpuset_t cpus, u_int ipi)
-{
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0 ||
- CPU_EMPTY(&cpus)))
- return;
- mtx_lock_spin(&ipi_mtx);
- cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi);
- mtx_unlock_spin(&ipi_mtx);
-}
-
-static __inline void
-ipi_cpu(int cpu, u_int ipi)
-{
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return;
- mtx_lock_spin(&ipi_mtx);
- cpu_ipi_single(cpu, 0, (u_long)tl_ipi_level, ipi);
- mtx_unlock_spin(&ipi_mtx);
-}
-
-#if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_)
-
-static __inline void *
-ipi_dcache_page_inval(void *func, vm_paddr_t pa)
-{
- struct ipi_cache_args *ica;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- ica = &ipi_cache_args;
- mtx_lock_spin(&ipi_mtx);
- ica->ica_mask = all_cpus;
- CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask);
- ica->ica_pa = pa;
- cpu_ipi_selected(ica->ica_mask, 0, (u_long)func, (u_long)ica);
- return (&ica->ica_mask);
-}
-
-static __inline void *
-ipi_icache_page_inval(void *func, vm_paddr_t pa)
-{
- struct ipi_cache_args *ica;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- ica = &ipi_cache_args;
- mtx_lock_spin(&ipi_mtx);
- ica->ica_mask = all_cpus;
- CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask);
- ica->ica_pa = pa;
- cpu_ipi_selected(ica->ica_mask, 0, (u_long)func, (u_long)ica);
- return (&ica->ica_mask);
-}
-
-static __inline void *
-ipi_rd(u_int cpu, void *func, u_long *val)
-{
- struct ipi_rd_args *ira;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- ira = &ipi_rd_args;
- mtx_lock_spin(&ipi_mtx);
- CPU_SETOF(cpu, &ira->ira_mask);
- ira->ira_val = val;
- cpu_ipi_single(cpu, 0, (u_long)func, (u_long)ira);
- return (&ira->ira_mask);
-}
-
-static __inline void *
-ipi_tlb_context_demap(struct pmap *pm)
-{
- struct ipi_tlb_args *ita;
- cpuset_t cpus;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- cpus = pm->pm_active;
- CPU_AND(&cpus, &all_cpus);
- CPU_CLR(PCPU_GET(cpuid), &cpus);
- if (CPU_EMPTY(&cpus)) {
- sched_unpin();
- return (NULL);
- }
- ita = &ipi_tlb_args;
- mtx_lock_spin(&ipi_mtx);
- ita->ita_mask = cpus;
- ita->ita_pmap = pm;
- cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_context_demap,
- (u_long)ita);
- return (&ita->ita_mask);
-}
-
-static __inline void *
-ipi_tlb_page_demap(struct pmap *pm, vm_offset_t va)
-{
- struct ipi_tlb_args *ita;
- cpuset_t cpus;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- cpus = pm->pm_active;
- CPU_AND(&cpus, &all_cpus);
- CPU_CLR(PCPU_GET(cpuid), &cpus);
- if (CPU_EMPTY(&cpus)) {
- sched_unpin();
- return (NULL);
- }
- ita = &ipi_tlb_args;
- mtx_lock_spin(&ipi_mtx);
- ita->ita_mask = cpus;
- ita->ita_pmap = pm;
- ita->ita_va = va;
- cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_page_demap, (u_long)ita);
- return (&ita->ita_mask);
-}
-
-static __inline void *
-ipi_tlb_range_demap(struct pmap *pm, vm_offset_t start, vm_offset_t end)
-{
- struct ipi_tlb_args *ita;
- cpuset_t cpus;
-
- if (__predict_false(atomic_load_acq_int(&smp_started) == 0))
- return (NULL);
- sched_pin();
- cpus = pm->pm_active;
- CPU_AND(&cpus, &all_cpus);
- CPU_CLR(PCPU_GET(cpuid), &cpus);
- if (CPU_EMPTY(&cpus)) {
- sched_unpin();
- return (NULL);
- }
- ita = &ipi_tlb_args;
- mtx_lock_spin(&ipi_mtx);
- ita->ita_mask = cpus;
- ita->ita_pmap = pm;
- ita->ita_start = start;
- ita->ita_end = end;
- cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_range_demap,
- (u_long)ita);
- return (&ita->ita_mask);
-}
-
-static __inline void
-ipi_wait(void *cookie)
-{
- volatile cpuset_t *mask;
-
- if (__predict_false((mask = cookie) != NULL)) {
- while (!CPU_EMPTY(mask))
- ;
- mtx_unlock_spin(&ipi_mtx);
- sched_unpin();
- }
-}
-
-#endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */
-
-#endif /* !LOCORE */
-
-#else
-
-#ifndef LOCORE
-
-static __inline void *
-ipi_dcache_page_inval(void *func __unused, vm_paddr_t pa __unused)
-{
-
- return (NULL);
-}
-
-static __inline void *
-ipi_icache_page_inval(void *func __unused, vm_paddr_t pa __unused)
-{
-
- return (NULL);
-}
-
-static __inline void *
-ipi_rd(u_int cpu __unused, void *func __unused, u_long *val __unused)
-{
-
- return (NULL);
-}
-
-static __inline void *
-ipi_tlb_context_demap(struct pmap *pm __unused)
-{
-
- return (NULL);
-}
-
-static __inline void *
-ipi_tlb_page_demap(struct pmap *pm __unused, vm_offset_t va __unused)
-{
-
- return (NULL);
-}
-
-static __inline void *
-ipi_tlb_range_demap(struct pmap *pm __unused, vm_offset_t start __unused,
- __unused vm_offset_t end)
-{
-
- return (NULL);
-}
-
-static __inline void
-ipi_wait(void *cookie __unused)
-{
-
-}
-
-static __inline void
-tl_ipi_cheetah_dcache_page_inval(void)
-{
-
-}
-
-static __inline void
-tl_ipi_spitfire_dcache_page_inval(void)
-{
-
-}
-
-static __inline void
-tl_ipi_spitfire_icache_page_inval(void)
-{
-
-}
-
-#endif /* !LOCORE */
-
-#endif /* SMP */
-
-#endif /* !_MACHINE_SMP_H_ */
diff --git a/sys/sparc64/include/stack.h b/sys/sparc64/include/stack.h
deleted file mode 100644
index a553a7a14314..000000000000
--- a/sys/sparc64/include/stack.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_STACK_H_
-#define _MACHINE_STACK_H_
-
-extern char tl_trap_begin[];
-extern char tl_trap_end[];
-extern char tl_text_begin[];
-extern char tl_text_end[];
-
-#define INKERNEL(va) \
- ((va) >= VM_MIN_KERNEL_ADDRESS && (va) <= VM_MAX_KERNEL_ADDRESS)
-
-#endif /* !_MACHINE_STACK_H_ */
diff --git a/sys/sparc64/include/stdarg.h b/sys/sparc64/include/stdarg.h
deleted file mode 100644
index acb526429ac2..000000000000
--- a/sys/sparc64/include/stdarg.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2017 Poul-Henning Kamp. All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_STDARG_H_
-#define _MACHINE_STDARG_H_
-
-#include <sys/_stdarg.h>
-
-#ifndef va_start
- #error this file needs to be ported to your compiler
-#endif
-
-#endif /* !_MACHINE_STDARG_H_ */
diff --git a/sys/sparc64/include/sysarch.h b/sys/sparc64/include/sysarch.h
deleted file mode 100644
index fefaeb326868..000000000000
--- a/sys/sparc64/include/sysarch.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1993 The Regents of the University of California.
- * All rights reserved.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: FreeBSD: src/sys/i386/include/sysarch.h,v 1.14 2000/09/21
- * $FreeBSD$
- */
-
-/*
- * Architecture specific syscalls (sparc64)
- */
-#ifndef _MACHINE_SYSARCH_H_
-#define _MACHINE_SYSARCH_H_
-
-#include <machine/utrap.h>
-
-#define SPARC_UTRAP_INSTALL 1
-#define SPARC_SIGTRAMP_INSTALL 2
-
-struct sparc_utrap_install_args {
- int num;
- const struct sparc_utrap_args *handlers;
-};
-
-struct sparc_sigtramp_install_args {
- void *sia_new;
- void **sia_old;
-};
-
-struct sparc_utrap_args {
- utrap_entry_t type;
- utrap_handler_t new_precise;
- utrap_handler_t new_deferred;
- utrap_handler_t *old_precise;
- utrap_handler_t *old_deferred;
-};
-
-#ifndef _KERNEL
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int __sparc_utrap_install(utrap_entry_t _type,
- utrap_handler_t _new_precise, utrap_handler_t _new_deferred,
- utrap_handler_t *_old_precise, utrap_handler_t *_old_deferred);
-int sysarch(int _number, void *_args);
-__END_DECLS
-
-#endif
-
-#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/sparc64/include/tick.h b/sys/sparc64/include/tick.h
deleted file mode 100644
index 44ed91dd972f..000000000000
--- a/sys/sparc64/include/tick.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TICK_H_
-#define _MACHINE_TICK_H_
-
-extern u_int tick_et_use_stick;
-
-void tick_clear(u_int cpu_impl);
-void tick_stop(u_int cpu_impl);
-
-#endif
diff --git a/sys/sparc64/include/tlb.h b/sys/sparc64/include/tlb.h
deleted file mode 100644
index 7ee4101ea8ab..000000000000
--- a/sys/sparc64/include/tlb.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * Copyright (c) 2008, 2010 Marius Strobl <marius@FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TLB_H_
-#define _MACHINE_TLB_H_
-
-#define TLB_DIRECT_ADDRESS_BITS (43)
-#define TLB_DIRECT_PAGE_BITS (PAGE_SHIFT_4M)
-
-#define TLB_DIRECT_ADDRESS_MASK ((1UL << TLB_DIRECT_ADDRESS_BITS) - 1)
-#define TLB_DIRECT_PAGE_MASK ((1UL << TLB_DIRECT_PAGE_BITS) - 1)
-
-#define TLB_PHYS_TO_DIRECT(pa) \
- ((pa) | VM_MIN_DIRECT_ADDRESS)
-#define TLB_DIRECT_TO_PHYS(va) \
- ((va) & TLB_DIRECT_ADDRESS_MASK)
-#define TLB_DIRECT_TO_TTE_MASK \
- (TD_V | TD_4M | (TLB_DIRECT_ADDRESS_MASK - TLB_DIRECT_PAGE_MASK))
-
-#define TLB_DAR_SLOT_SHIFT (3)
-#define TLB_DAR_TLB_SHIFT (16)
-#define TLB_DAR_SLOT(tlb, slot) \
- ((tlb) << TLB_DAR_TLB_SHIFT | (slot) << TLB_DAR_SLOT_SHIFT)
-#define TLB_DAR_T16 (0) /* US-III{,i,+}, IV{,+} */
-#define TLB_DAR_T32 (0) /* US-I, II{,e,i} */
-#define TLB_DAR_DT512_0 (2) /* US-III{,i,+}, IV{,+} */
-#define TLB_DAR_DT512_1 (3) /* US-III{,i,+}, IV{,+} */
-#define TLB_DAR_IT128 (2) /* US-III{,i,+}, IV */
-#define TLB_DAR_IT512 (2) /* US-IV+ */
-#define TLB_DAR_FTLB (0) /* SPARC64 V, VI, VII, VIIIfx */
-#define TLB_DAR_STLB (2) /* SPARC64 V, VI, VII, VIIIfx */
-
-#define TAR_VPN_SHIFT (13)
-#define TAR_CTX_MASK ((1 << TAR_VPN_SHIFT) - 1)
-
-#define TLB_TAR_VA(va) ((va) & ~TAR_CTX_MASK)
-#define TLB_TAR_CTX(ctx) ((ctx) & TAR_CTX_MASK)
-
-#define TLB_CXR_CTX_BITS (13)
-#define TLB_CXR_CTX_MASK \
- (((1UL << TLB_CXR_CTX_BITS) - 1) << TLB_CXR_CTX_SHIFT)
-#define TLB_CXR_CTX_SHIFT (0)
-#define TLB_CXR_PGSZ_BITS (3)
-#define TLB_CXR_PGSZ_MASK (~TLB_CXR_CTX_MASK)
-#define TLB_PCXR_N_IPGSZ0_SHIFT (53) /* SPARC64 VI, VII, VIIIfx */
-#define TLB_PCXR_N_IPGSZ1_SHIFT (50) /* SPARC64 VI, VII, VIIIfx */
-#define TLB_PCXR_N_PGSZ0_SHIFT (61)
-#define TLB_PCXR_N_PGSZ1_SHIFT (58)
-#define TLB_PCXR_N_PGSZ_I_SHIFT (55) /* US-IV+ */
-#define TLB_PCXR_P_IPGSZ0_SHIFT (24) /* SPARC64 VI, VII, VIIIfx */
-#define TLB_PCXR_P_IPGSZ1_SHIFT (27) /* SPARC64 VI, VII, VIIIfx */
-#define TLB_PCXR_P_PGSZ0_SHIFT (16)
-#define TLB_PCXR_P_PGSZ1_SHIFT (19)
-/*
- * Note that the US-IV+ documentation appears to have TLB_PCXR_P_PGSZ_I_SHIFT
- * and TLB_PCXR_P_PGSZ0_SHIFT erroneously inverted.
- */
-#define TLB_PCXR_P_PGSZ_I_SHIFT (22) /* US-IV+ */
-#define TLB_SCXR_S_PGSZ1_SHIFT (19)
-#define TLB_SCXR_S_PGSZ0_SHIFT (16)
-
-#define TLB_TAE_PGSZ_BITS (3)
-#define TLB_TAE_PGSZ0_MASK \
- (((1UL << TLB_TAE_PGSZ_BITS) - 1) << TLB_TAE_PGSZ0_SHIFT)
-#define TLB_TAE_PGSZ1_MASK \
- (((1UL << TLB_TAE_PGSZ_BITS) - 1) << TLB_TAE_PGSZ1_SHIFT)
-#define TLB_TAE_PGSZ0_SHIFT (16)
-#define TLB_TAE_PGSZ1_SHIFT (19)
-
-#define TLB_DEMAP_ID_SHIFT (4)
-#define TLB_DEMAP_ID_PRIMARY (0)
-#define TLB_DEMAP_ID_SECONDARY (1)
-#define TLB_DEMAP_ID_NUCLEUS (2)
-
-#define TLB_DEMAP_TYPE_SHIFT (6)
-#define TLB_DEMAP_TYPE_PAGE (0)
-#define TLB_DEMAP_TYPE_CONTEXT (1)
-#define TLB_DEMAP_TYPE_ALL (2) /* US-III and beyond only */
-
-#define TLB_DEMAP_VA(va) ((va) & ~PAGE_MASK)
-#define TLB_DEMAP_ID(id) ((id) << TLB_DEMAP_ID_SHIFT)
-#define TLB_DEMAP_TYPE(type) ((type) << TLB_DEMAP_TYPE_SHIFT)
-
-#define TLB_DEMAP_PAGE (TLB_DEMAP_TYPE(TLB_DEMAP_TYPE_PAGE))
-#define TLB_DEMAP_CONTEXT (TLB_DEMAP_TYPE(TLB_DEMAP_TYPE_CONTEXT))
-#define TLB_DEMAP_ALL (TLB_DEMAP_TYPE(TLB_DEMAP_TYPE_ALL))
-
-#define TLB_DEMAP_PRIMARY (TLB_DEMAP_ID(TLB_DEMAP_ID_PRIMARY))
-#define TLB_DEMAP_SECONDARY (TLB_DEMAP_ID(TLB_DEMAP_ID_SECONDARY))
-#define TLB_DEMAP_NUCLEUS (TLB_DEMAP_ID(TLB_DEMAP_ID_NUCLEUS))
-
-#define TLB_CTX_KERNEL (0)
-#define TLB_CTX_USER_MIN (1)
-#define TLB_CTX_USER_MAX (8192)
-
-#define MMU_SFSR_ASI_SHIFT (16)
-#define MMU_SFSR_FT_SHIFT (7)
-#define MMU_SFSR_E_SHIFT (6)
-#define MMU_SFSR_CT_SHIFT (4)
-#define MMU_SFSR_PR_SHIFT (3)
-#define MMU_SFSR_W_SHIFT (2)
-#define MMU_SFSR_OW_SHIFT (1)
-#define MMU_SFSR_FV_SHIFT (0)
-
-#define MMU_SFSR_ASI_SIZE (8)
-#define MMU_SFSR_FT_SIZE (6)
-#define MMU_SFSR_CT_SIZE (2)
-
-#define MMU_SFSR_GET_ASI(sfsr) \
- (((sfsr) >> MMU_SFSR_ASI_SHIFT) & ((1UL << MMU_SFSR_ASI_SIZE) - 1))
-#define MMU_SFSR_GET_FT(sfsr) \
- (((sfsr) >> MMU_SFSR_FT_SHIFT) & ((1UL << MMU_SFSR_FT_SIZE) - 1))
-#define MMU_SFSR_GET_CT(sfsr) \
- (((sfsr) >> MMU_SFSR_CT_SHIFT) & ((1UL << MMU_SFSR_CT_SIZE) - 1))
-
-#define MMU_SFSR_E (1UL << MMU_SFSR_E_SHIFT)
-#define MMU_SFSR_PR (1UL << MMU_SFSR_PR_SHIFT)
-#define MMU_SFSR_W (1UL << MMU_SFSR_W_SHIFT)
-#define MMU_SFSR_OW (1UL << MMU_SFSR_OW_SHIFT)
-#define MMU_SFSR_FV (1UL << MMU_SFSR_FV_SHIFT)
-
-typedef void tlb_flush_nonlocked_t(void);
-typedef void tlb_flush_user_t(void);
-
-struct pmap;
-struct tlb_entry;
-
-extern int dtlb_slots;
-extern int itlb_slots;
-extern int kernel_tlb_slots;
-extern struct tlb_entry *kernel_tlbs;
-
-void tlb_context_demap(struct pmap *pm);
-void tlb_page_demap(struct pmap *pm, vm_offset_t va);
-void tlb_range_demap(struct pmap *pm, vm_offset_t start, vm_offset_t end);
-
-tlb_flush_nonlocked_t cheetah_tlb_flush_nonlocked;
-tlb_flush_user_t cheetah_tlb_flush_user;
-
-tlb_flush_nonlocked_t spitfire_tlb_flush_nonlocked;
-tlb_flush_user_t spitfire_tlb_flush_user;
-
-tlb_flush_nonlocked_t zeus_tlb_flush_nonlocked;
-tlb_flush_user_t zeus_tlb_flush_user;
-
-extern tlb_flush_nonlocked_t *tlb_flush_nonlocked;
-extern tlb_flush_user_t *tlb_flush_user;
-
-#endif /* !_MACHINE_TLB_H_ */
diff --git a/sys/sparc64/include/trap.h b/sys/sparc64/include/trap.h
deleted file mode 100644
index 84d01f0750df..000000000000
--- a/sys/sparc64/include/trap.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TRAP_H_
-#define _MACHINE_TRAP_H_
-
-#ifdef _KERNEL
-
-#define T_RESERVED 0
-#define T_INSTRUCTION_EXCEPTION 1
-#define T_INSTRUCTION_ERROR 2
-#define T_INSTRUCTION_PROTECTION 3
-#define T_ILLTRAP_INSTRUCTION 4
-#define T_ILLEGAL_INSTRUCTION 5
-#define T_PRIVILEGED_OPCODE 6
-#define T_FP_DISABLED 7
-#define T_FP_EXCEPTION_IEEE_754 8
-#define T_FP_EXCEPTION_OTHER 9
-#define T_TAG_OVERFLOW 10
-#define T_DIVISION_BY_ZERO 11
-#define T_DATA_EXCEPTION 12
-#define T_DATA_ERROR 13
-#define T_DATA_PROTECTION 14
-#define T_MEM_ADDRESS_NOT_ALIGNED 15
-#define T_PRIVILEGED_ACTION 16
-#define T_ASYNC_DATA_ERROR 17
-#define T_TRAP_INSTRUCTION_16 18
-#define T_TRAP_INSTRUCTION_17 19
-#define T_TRAP_INSTRUCTION_18 20
-#define T_TRAP_INSTRUCTION_19 21
-#define T_TRAP_INSTRUCTION_20 22
-#define T_TRAP_INSTRUCTION_21 23
-#define T_TRAP_INSTRUCTION_22 24
-#define T_TRAP_INSTRUCTION_23 25
-#define T_TRAP_INSTRUCTION_24 26
-#define T_TRAP_INSTRUCTION_25 27
-#define T_TRAP_INSTRUCTION_26 28
-#define T_TRAP_INSTRUCTION_27 29
-#define T_TRAP_INSTRUCTION_28 30
-#define T_TRAP_INSTRUCTION_29 31
-#define T_TRAP_INSTRUCTION_30 32
-#define T_TRAP_INSTRUCTION_31 33
-#define T_INSTRUCTION_MISS 34
-#define T_DATA_MISS 35
-
-#define T_INTERRUPT 36
-#define T_PA_WATCHPOINT 37
-#define T_VA_WATCHPOINT 38
-#define T_CORRECTED_ECC_ERROR 39
-#define T_SPILL 40
-#define T_FILL 41
-#define T_FILL_RET 42
-#define T_BREAKPOINT 43
-#define T_CLEAN_WINDOW 44
-#define T_RANGE_CHECK 45
-#define T_FIX_ALIGNMENT 46
-#define T_INTEGER_OVERFLOW 47
-#define T_SYSCALL 48
-#define T_RSTRWP_PHYS 49
-#define T_RSTRWP_VIRT 50
-#define T_KSTACK_FAULT 51
-
-#define T_MAX (T_KSTACK_FAULT + 1)
-
-#define T_KERNEL 64
-
-#ifndef LOCORE
-void sun4u_set_traptable(void *tba_addr);
-extern const char *const trap_msg[];
-#endif
-
-#endif
-
-#endif /* !_MACHINE_TRAP_H_ */
diff --git a/sys/sparc64/include/tsb.h b/sys/sparc64/include/tsb.h
deleted file mode 100644
index a13b331a1db4..000000000000
--- a/sys/sparc64/include/tsb.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
- *
- * 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.
- * 3. Berkeley Software Design Inc's name may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
- *
- * from: BSDI: pmap.v9.h,v 1.10.2.6 1999/08/23 22:18:44 cp Exp
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TSB_H_
-#define _MACHINE_TSB_H_
-
-#define TSB_PAGES_SHIFT (4)
-#define TSB_PAGES (1 << TSB_PAGES_SHIFT)
-#define TSB_BSHIFT (TSB_PAGES_SHIFT + PAGE_SHIFT)
-#define TSB_BSIZE (1 << TSB_BSHIFT)
-#define TSB_BUCKET_SHIFT (2)
-#define TSB_BUCKET_SIZE (1 << TSB_BUCKET_SHIFT)
-#define TSB_BUCKET_ADDRESS_BITS \
- (TSB_BSHIFT - TSB_BUCKET_SHIFT - TTE_SHIFT)
-#define TSB_BUCKET_MASK ((1 << TSB_BUCKET_ADDRESS_BITS) - 1)
-
-#ifndef LOCORE
-
-#define TSB_SIZE (TSB_BSIZE / sizeof(struct tte))
-
-extern struct tte *tsb_kernel;
-extern vm_size_t tsb_kernel_mask;
-extern vm_size_t tsb_kernel_size;
-extern vm_paddr_t tsb_kernel_phys;
-
-static __inline struct tte *
-tsb_vpntobucket(pmap_t pm, vm_offset_t vpn)
-{
-
- return (&pm->pm_tsb[(vpn & TSB_BUCKET_MASK) << TSB_BUCKET_SHIFT]);
-}
-
-static __inline struct tte *
-tsb_vtobucket(pmap_t pm, u_long sz, vm_offset_t va)
-{
-
- return (tsb_vpntobucket(pm, va >> TTE_PAGE_SHIFT(sz)));
-}
-
-static __inline struct tte *
-tsb_kvpntotte(vm_offset_t vpn)
-{
-
- return (&tsb_kernel[vpn & tsb_kernel_mask]);
-}
-
-static __inline struct tte *
-tsb_kvtotte(vm_offset_t va)
-{
-
- return (tsb_kvpntotte(va >> PAGE_SHIFT));
-}
-
-typedef int (tsb_callback_t)(struct pmap *, struct pmap *, struct tte *,
- vm_offset_t);
-
-struct tte *tsb_tte_lookup(pmap_t pm, vm_offset_t va);
-void tsb_tte_remove(struct tte *stp);
-struct tte *tsb_tte_enter(pmap_t pm, vm_page_t m, vm_offset_t va, u_long sz,
- u_long data);
-void tsb_tte_local_remove(struct tte *tp);
-void tsb_foreach(pmap_t pm1, pmap_t pm2, vm_offset_t start, vm_offset_t end,
- tsb_callback_t *callback);
-
-#endif /* !LOCORE */
-
-#endif /* !_MACHINE_TSB_H_ */
diff --git a/sys/sparc64/include/tstate.h b/sys/sparc64/include/tstate.h
deleted file mode 100644
index 5e8cf0e9294b..000000000000
--- a/sys/sparc64/include/tstate.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TSTATE_H_
-#define _MACHINE_TSTATE_H_
-
-#include <machine/pstate.h>
-#include <machine/ccr.h>
-
-#define TSTATE_CWP_SHIFT 0
-#define TSTATE_CWP_BITS 5
-#define TSTATE_CWP_MASK \
- (((1 << TSTATE_CWP_BITS) - 1) << TSTATE_CWP_SHIFT)
-#define TSTATE_CWP(x) ((x & TSTATE_CWP_MASK) >> TSTATE_CWP_SHIFT)
-
-#define TSTATE_PSTATE_SHIFT 8
-#define TSTATE_PSTATE_BITS 12
-#define TSTATE_PSTATE_MASK \
- (((1 << TSTATE_PSTATE_BITS) - 1) << TSTATE_PSTATE_SHIFT)
-#define TSTATE_PSTATE(x) ((x) << TSTATE_PSTATE_SHIFT)
-#define TSTATE_AG TSTATE_PSTATE(PSTATE_AG)
-#define TSTATE_IE TSTATE_PSTATE(PSTATE_IE)
-#define TSTATE_PRIV TSTATE_PSTATE(PSTATE_PRIV)
-#define TSTATE_AM TSTATE_PSTATE(PSTATE_AM)
-#define TSTATE_PEF TSTATE_PSTATE(PSTATE_PEF)
-#define TSTATE_RED TSTATE_PSTATE(PSTATE_RED)
-#define TSTATE_MM_TSO TSTATE_PSTATE(PSTATE_MM_TSO)
-#define TSTATE_MM_PSO TSTATE_PSTATE(PSTATE_MM_PSO)
-#define TSTATE_MM_RMO TSTATE_PSTATE(PSTATE_MM_RMO)
-#define TSTATE_TLE TSTATE_PSTATE(PSTATE_TLE)
-#define TSTATE_CLE TSTATE_PSTATE(PSTATE_CLE)
-#define TSTATE_MG TSTATE_PSTATE(PSTATE_MG)
-#define TSTATE_IG TSTATE_PSTATE(PSTATE_IG)
-
-#define TSTATE_ASI_SHIFT 24
-#define TSTATE_ASI_BITS 8
-#define TSTATE_ASI_MASK \
- (((1 << TSTATE_ASI_BITS) - 1) << TSTATE_ASI_SHIFT)
-#define TSTATE_ASI(x) ((x & TSTATE_ASI_MASK) >> TSTATE_ASI_SHIFT)
-
-#define TSTATE_CCR_SHIFT 32
-#define TSTATE_ICC_SHIFT (TSTATE_CCR_SHIFT + ICC_SHIFT)
-#define TSTATE_ICC_MASK (ICC_MASK << TSTATE_CCR_SHIFT)
-#define TSTATE_XCC_SHIFT (TSTATE_CCR_SHIFT + XCC_SHIFT)
-#define TSTATE_XCC_MASK (XCC_MASK << TSTATE_CCR_SHIFT)
-#define TSTATE_CCR(x) ((x) << TSTATE_CCR_SHIFT)
-#define TSTATE_ICC_C TSTATE_CCR(ICC_C)
-#define TSTATE_ICC_V TSTATE_CCR(ICC_V)
-#define TSTATE_ICC_Z TSTATE_CCR(ICC_Z)
-#define TSTATE_ICC_N TSTATE_CCR(ICC_N)
-#define TSTATE_XCC_C TSTATE_CCR(XCC_C)
-#define TSTATE_XCC_V TSTATE_CCR(XCC_V)
-#define TSTATE_XCC_Z TSTATE_CCR(XCC_Z)
-#define TSTATE_XCC_N TSTATE_CCR(XCC_N)
-
-#define TSTATE_SECURE(tstate) \
- PSTATE_SECURE(((tstate) >> TSTATE_PSTATE_SHIFT) & ((1 << TSTATE_PSTATE_BITS) - 1))
-
-#endif /* !_MACHINE_TSTATE_H_ */
diff --git a/sys/sparc64/include/tte.h b/sys/sparc64/include/tte.h
deleted file mode 100644
index 527f1bad882c..000000000000
--- a/sys/sparc64/include/tte.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
- *
- * 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.
- * 3. Berkeley Software Design Inc's name may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
- *
- * from: BSDI: pmap.v9.h,v 1.10.2.6 1999/08/23 22:18:44 cp Exp
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_TTE_H_
-#define _MACHINE_TTE_H_
-
-#define TTE_SHIFT (5)
-
-#define TD_SIZE_SHIFT (61)
-#define TD_SOFT2_SHIFT (50)
-#define TD_RSVD2_SHIFT (49)
-#define TD_SIZE2_SHIFT (48)
-#define TD_DIAG_SF_SHIFT (41)
-#define TD_RSVD_CH_SHIFT (43)
-#define TD_RSVD_OC_SHIFT (47)
-#define TD_RSVD_PT_SHIFT TD_RSVD_CH_SHIFT
-#define TD_RSVD_VE_SHIFT (41)
-#define TD_PA_SHIFT (13)
-#define TD_SOFT_SHIFT (7)
-
-#define TD_SIZE_BITS (2)
-#define TD_SOFT2_BITS (9)
-#define TD_RSVD2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */
-#define TD_SIZE2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */
-#define TD_DIAG_SF_BITS (9) /* US-I, II{,e,i} */
-#define TD_RSVD_CH_BITS (7) /* US-III{,i,+}, US-IV, SPARC64 V */
-#define TD_RSVD_OC_BITS (1) /* SPARC64 VI, VII */
-#define TD_RSVD_PT_BITS (5) /* US-IV+, SPARC64 VI, VII */
-#define TD_RSVD_VE_BITS (7) /* SPARC64 VIIIfx */
-#define TD_PA_CH_BITS (30) /* US-III{,i,+}, US-IV{,+}, SPARC64 V */
-#define TD_PA_OC_BITS (34) /* SPARC64 VI, VII */
-#define TD_PA_SF_BITS (28) /* US-I, II{,e,i}, SPARC64 VIIIfx */
-#define TD_PA_BITS TD_PA_CH_BITS
-#define TD_SOFT_BITS (6)
-
-#define TD_SIZE_MASK ((1UL << TD_SIZE_BITS) - 1)
-#define TD_SOFT2_MASK ((1UL << TD_SOFT2_BITS) - 1)
-#define TD_RSVD2_MASK ((1UL << TD_RSVD2_BITS) - 1)
-#define TD_SIZE2_MASK ((1UL << TD_SIZE2_BITS) - 1)
-#define TD_DIAG_SF_MASK ((1UL << TD_DIAG_SF_BITS) - 1)
-#define TD_RSVD_CH_MASK ((1UL << TD_RSVD_CH_BITS) - 1)
-#define TD_RSVD_OC_MASK ((1UL << TD_RSVD_OC_BITS) - 1)
-#define TD_RSVD_PT_MASK ((1UL << TD_RSVD_PT_BITS) - 1)
-#define TD_RSVD_VE_MASK ((1UL << TD_RSVD_VE_BITS) - 1)
-#define TD_PA_CH_MASK ((1UL << TD_PA_CH_BITS) - 1)
-#define TD_PA_OC_MASK ((1UL << TD_PA_OC_BITS) - 1)
-#define TD_PA_SF_MASK ((1UL << TD_PA_SF_BITS) - 1)
-#define TD_PA_MASK ((1UL << TD_PA_BITS) - 1)
-#define TD_SOFT_MASK ((1UL << TD_SOFT_BITS) - 1)
-
-#define TS_8K (0UL)
-#define TS_64K (1UL)
-#define TS_512K (2UL)
-#define TS_4M (3UL)
-#define TS_32M (4UL) /* US-IV+, SPARC64 VI, VII only */
-#define TS_256M (5UL) /* US-IV+, SPARC64 VI, VII only */
-#define TS_2G (6UL) /* SPARC64 VIIIfx only */
-
-#define TS_MIN TS_8K
-#define TS_MAX TS_4M
-
-#define TD_V (1UL << 63)
-#define TD_8K (TS_8K << TD_SIZE_SHIFT)
-#define TD_64K (TS_64K << TD_SIZE_SHIFT)
-#define TD_512K (TS_512K << TD_SIZE_SHIFT)
-#define TD_4M (TS_4M << TD_SIZE_SHIFT)
-#define TD_32M \
- (((TS_32M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \
- (TD_SIZE2_MASK << TD_SIZE2_SHIFT))
-#define TD_256M \
- (((TS_256M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \
- (TD_SIZE2_MASK << TD_SIZE2_SHIFT))
-#define TD_2G \
- (((TS_2G & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \
- (TD_SIZE2_MASK << TD_SIZE2_SHIFT))
-#define TD_NFO (1UL << 60)
-#define TD_IE (1UL << 59)
-#define TD_PA(pa) ((pa) & (TD_PA_MASK << TD_PA_SHIFT))
-/* NOTE: bit 6 of TD_SOFT will be sign-extended if used as an immediate. */
-#define TD_FAKE ((1UL << 5) << TD_SOFT_SHIFT)
-#define TD_EXEC ((1UL << 4) << TD_SOFT_SHIFT)
-#define TD_REF ((1UL << 3) << TD_SOFT_SHIFT)
-#define TD_PV ((1UL << 2) << TD_SOFT_SHIFT)
-#define TD_SW ((1UL << 1) << TD_SOFT_SHIFT)
-#define TD_WIRED ((1UL << 0) << TD_SOFT_SHIFT)
-#define TD_L (1UL << 6)
-#define TD_CP (1UL << 5)
-#define TD_CV (1UL << 4)
-#define TD_E (1UL << 3)
-#define TD_P (1UL << 2)
-#define TD_W (1UL << 1)
-#define TD_G (1UL << 0)
-
-#define TV_SIZE_BITS (TD_SIZE_BITS)
-#define TV_VPN(va, sz) ((((va) >> TTE_PAGE_SHIFT(sz)) << TV_SIZE_BITS) | sz)
-
-#define TTE_SIZE_SPREAD (3)
-#define TTE_PAGE_SHIFT(sz) \
- (PAGE_SHIFT + ((sz) * TTE_SIZE_SPREAD))
-
-#define TTE_GET_SIZE(tp) \
- (((tp)->tte_data >> TD_SIZE_SHIFT) & TD_SIZE_MASK)
-#define TTE_GET_PAGE_SHIFT(tp) \
- TTE_PAGE_SHIFT(TTE_GET_SIZE(tp))
-#define TTE_GET_PAGE_SIZE(tp) \
- (1 << TTE_GET_PAGE_SHIFT(tp))
-#define TTE_GET_PAGE_MASK(tp) \
- (TTE_GET_PAGE_SIZE(tp) - 1)
-
-#define TTE_GET_PA(tp) \
- ((tp)->tte_data & (TD_PA_MASK << TD_PA_SHIFT))
-#define TTE_GET_VPN(tp) \
- ((tp)->tte_vpn >> TV_SIZE_BITS)
-#define TTE_GET_VA(tp) \
- (TTE_GET_VPN(tp) << TTE_GET_PAGE_SHIFT(tp))
-#define TTE_GET_PMAP(tp) \
- (((tp)->tte_data & TD_P) != 0 ? (kernel_pmap) : \
- (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap))
-#define TTE_ZERO(tp) \
- memset(tp, 0, sizeof(*tp))
-
-struct pmap;
-
-struct tte {
- u_long tte_vpn;
- u_long tte_data;
- TAILQ_ENTRY(tte) tte_link;
-};
-
-static __inline int
-tte_match(struct tte *tp, vm_offset_t va)
-{
-
- return (((tp->tte_data & TD_V) != 0) &&
- (tp->tte_vpn == TV_VPN(va, TTE_GET_SIZE(tp))));
-}
-
-#endif /* !_MACHINE_TTE_H_ */
diff --git a/sys/sparc64/include/ucontext.h b/sys/sparc64/include/ucontext.h
deleted file mode 100644
index 6303b3f85636..000000000000
--- a/sys/sparc64/include/ucontext.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1999 Marcel Moolenaar
- * All rights reserved.
- *
- * 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
- * in this position and unchanged.
- * 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.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * from: FreeBSD: src/sys/alpha/include/ucontext.h,v 1.3 1999/10/08
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_UCONTEXT_H_
-#define _MACHINE_UCONTEXT_H_
-
-struct __mcontext {
- __uint64_t mc_global[8];
- __uint64_t mc_out[8];
- __uint64_t mc_local[8];
- __uint64_t mc_in[8];
- __uint32_t mc_fp[64];
-} __aligned(64);
-
-typedef struct __mcontext mcontext_t;
-
-#define _mc_flags mc_global[0]
-#define _mc_sp mc_out[6]
-#define _mc_fprs mc_local[0]
-#define _mc_fsr mc_local[1]
-#define _mc_gsr mc_local[2]
-#define _mc_tnpc mc_in[0]
-#define _mc_tpc mc_in[1]
-#define _mc_tstate mc_in[2]
-#define _mc_y mc_in[4]
-#define _mc_wstate mc_in[5]
-
-#define _MC_VERSION_SHIFT 0
-#define _MC_VERSION_BITS 32
-#define _MC_VERSION 1L
-
-#define _MC_FLAGS_SHIFT 32
-#define _MC_FLAGS_BITS 32
-#define _MC_VOLUNTARY ((1L << 0) << _MC_FLAGS_SHIFT)
-
-#endif /* !_MACHINE_UCONTEXT_H_ */
diff --git a/sys/sparc64/include/upa.h b/sys/sparc64/include/upa.h
deleted file mode 100644
index 90aec7d647be..000000000000
--- a/sys/sparc64/include/upa.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_UPA_H_
-#define _MACHINE_UPA_H_
-
-#define UPA_MEMSTART 0x1c000000000UL
-#define UPA_MEMEND 0x1ffffffffffUL
-
-#define UPA_CR_MID_SHIFT (17)
-#define UPA_CR_MID_SIZE (5)
-#define UPA_CR_MID_MASK \
- (((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT)
-
-#define UPA_CR_GET_MID(cr) ((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT)
-
-#endif /* _MACHINE_UPA_H_ */
diff --git a/sys/sparc64/include/utrap.h b/sys/sparc64/include/utrap.h
deleted file mode 100644
index ef2d02f08294..000000000000
--- a/sys/sparc64/include/utrap.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_UTRAP_H_
-#define _MACHINE_UTRAP_H_
-
-#define UT_INSTRUCTION_EXCEPTION 1
-#define UT_INSTRUCTION_ERROR 2
-#define UT_INSTRUCTION_PROTECTION 3
-#define UT_ILLTRAP_INSTRUCTION 4
-#define UT_ILLEGAL_INSTRUCTION 5
-#define UT_PRIVILEGED_OPCODE 6
-#define UT_FP_DISABLED 7
-#define UT_FP_EXCEPTION_IEEE_754 8
-#define UT_FP_EXCEPTION_OTHER 9
-#define UT_TAG_OVERFLOW 10
-#define UT_DIVISION_BY_ZERO 11
-#define UT_DATA_EXCEPTION 12
-#define UT_DATA_ERROR 13
-#define UT_DATA_PROTECTION 14
-#define UT_MEM_ADDRESS_NOT_ALIGNED 15
-#define UT_PRIVILEGED_ACTION 16
-#define UT_ASYNC_DATA_ERROR 17
-#define UT_TRAP_INSTRUCTION_16 18
-#define UT_TRAP_INSTRUCTION_17 19
-#define UT_TRAP_INSTRUCTION_18 20
-#define UT_TRAP_INSTRUCTION_19 21
-#define UT_TRAP_INSTRUCTION_20 22
-#define UT_TRAP_INSTRUCTION_21 23
-#define UT_TRAP_INSTRUCTION_22 24
-#define UT_TRAP_INSTRUCTION_23 25
-#define UT_TRAP_INSTRUCTION_24 26
-#define UT_TRAP_INSTRUCTION_25 27
-#define UT_TRAP_INSTRUCTION_26 28
-#define UT_TRAP_INSTRUCTION_27 29
-#define UT_TRAP_INSTRUCTION_28 30
-#define UT_TRAP_INSTRUCTION_29 31
-#define UT_TRAP_INSTRUCTION_30 32
-#define UT_TRAP_INSTRUCTION_31 33
-#define UT_INSTRUCTION_MISS 34
-#define UT_DATA_MISS 35
-#define UT_MAX 36
-
-#define ST_SUNOS_SYSCALL 0
-#define ST_BREAKPOINT 1
-#define ST_DIVISION_BY_ZERO 2
-#define ST_FLUSH_WINDOWS 3 /* XXX implement! */
-#define ST_CLEAN_WINDOW 4
-#define ST_RANGE_CHECK 5
-#define ST_FIX_ALIGNMENT 6
-#define ST_INTEGER_OVERFLOW 7
-/* 8 is 32-bit ABI syscall (old solaris syscall?) */
-#define ST_BSD_SYSCALL 9
-#define ST_FP_RESTORE 10
-/* 11-15 are available */
-/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */
-/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */
-/* 16-31 are reserved for user applications (utraps) */
-#define ST_GETCC 32 /* XXX implement! */
-#define ST_SETCC 33 /* XXX implement! */
-#define ST_GETPSR 34 /* XXX implement! */
-#define ST_SETPSR 35 /* XXX implement! */
-/* 36-63 are available */
-#define ST_SOLARIS_SYSCALL 64
-#define ST_SYSCALL 65
-#define ST_SYSCALL32 66
-/* 67 is reserved to OS source licensee */
-/* 68 is return from deferred trap (not supported) */
-/* 69-95 are reserved to SPARC international */
-/* 96-108 are available */
-/* 109 is linux 64 bit syscall */
-/* 110 is linux 64 bit getcontext (?) */
-/* 111 is linux 64 bit setcontext (?) */
-/* 112-255 are available */
-
-#define UTH_NOCHANGE (-1)
-
-#ifndef __ASM__
-
-typedef int utrap_entry_t;
-typedef void *utrap_handler_t;
-
-#endif
-
-#endif
diff --git a/sys/sparc64/include/vdso.h b/sys/sparc64/include/vdso.h
deleted file mode 100644
index 903fe1f4c6da..000000000000
--- a/sys/sparc64/include/vdso.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2012 Konstantin Belousov <kib@FreeBSD.ORG>.
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _SPARC64_VDSO_H
-#define _SPARC64_VDSO_H
-
-#define VDSO_TIMEHANDS_MD \
- uint32_t th_res[8];
-
-#endif
diff --git a/sys/sparc64/include/ver.h b/sys/sparc64/include/ver.h
deleted file mode 100644
index 2bab327c7150..000000000000
--- a/sys/sparc64/include/ver.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_VER_H_
-#define _MACHINE_VER_H_
-
-#define VER_MANUF_SHIFT (48)
-#define VER_IMPL_SHIFT (32)
-#define VER_MASK_SHIFT (24)
-#define VER_MAXTL_SHIFT (8)
-#define VER_MAXWIN_SHIFT (0)
-
-#define VER_MANUF_SIZE (16)
-#define VER_IMPL_SIZE (16)
-#define VER_MASK_SIZE (8)
-#define VER_MAXTL_SIZE (8)
-#define VER_MAXWIN_SIZE (5)
-
-#ifndef LOCORE
-
-#define VER_MANUF_MASK \
- (((1UL << VER_MANUF_SIZE) - 1) << VER_MANUF_SHIFT)
-#define VER_IMPL_MASK \
- (((1UL << VER_IMPL_SIZE) - 1) << VER_IMPL_SHIFT)
-#define VER_MASK_MASK \
- (((1UL << VER_MASK_SIZE) - 1) << VER_MASK_SHIFT)
-#define VER_MAXTL_MASK \
- (((1UL << VER_MAXTL_SIZE) - 1) << VER_MAXTL_SHIFT)
-#define VER_MAXWIN_MASK \
- (((1UL << VER_MAXWIN_SIZE) - 1) << VER_MAXWIN_SHIFT)
-
-#define VER_MANUF(ver) \
- (((ver) & VER_MANUF_MASK) >> VER_MANUF_SHIFT)
-#define VER_IMPL(ver) \
- (((ver) & VER_IMPL_MASK) >> VER_IMPL_SHIFT)
-#define VER_MASK(ver) \
- (((ver) & VER_MASK_MASK) >> VER_MASK_SHIFT)
-#define VER_MAXTL(ver) \
- (((ver) & VER_MAXTL_MASK) >> VER_MAXTL_SHIFT)
-#define VER_MAXWIN(ver) \
- (((ver) & VER_MAXWIN_MASK) >> VER_MAXWIN_SHIFT)
-
-extern char sparc64_model[];
-
-#endif /* !LOCORE */
-
-/* Known implementations */
-#define CPU_IMPL_SPARC64 0x01
-#define CPU_IMPL_SPARC64II 0x02
-#define CPU_IMPL_SPARC64III 0x03
-#define CPU_IMPL_SPARC64IV 0x04
-#define CPU_IMPL_SPARC64V 0x05
-#define CPU_IMPL_SPARC64VI 0x06
-#define CPU_IMPL_SPARC64VII 0x07
-#define CPU_IMPL_SPARC64VIIIfx 0x08
-#define CPU_IMPL_ULTRASPARCI 0x10
-#define CPU_IMPL_ULTRASPARCII 0x11
-#define CPU_IMPL_ULTRASPARCIIi 0x12
-#define CPU_IMPL_ULTRASPARCIIe 0x13
-#define CPU_IMPL_ULTRASPARCIII 0x14
-#define CPU_IMPL_ULTRASPARCIIIp 0x15
-#define CPU_IMPL_ULTRASPARCIIIi 0x16
-#define CPU_IMPL_ULTRASPARCIV 0x18
-#define CPU_IMPL_ULTRASPARCIVp 0x19
-#define CPU_IMPL_ULTRASPARCIIIip 0x22
-
-#endif /* !_MACHINE_VER_H_ */
diff --git a/sys/sparc64/include/vm.h b/sys/sparc64/include/vm.h
deleted file mode 100644
index 348cdf012c9b..000000000000
--- a/sys/sparc64/include/vm.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2009 Alan L. Cox <alc@cs.rice.edu>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_VM_H_
-#define _MACHINE_VM_H_
-
-/* Memory attribute configuration is not (yet) implemented. */
-#define VM_MEMATTR_DEFAULT 0
-#define VM_MEMATTR_UNCACHEABLE 0
-
-#endif /* !_MACHINE_VM_H_ */
diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h
deleted file mode 100644
index f23ebb06d65a..000000000000
--- a/sys/sparc64/include/vmparam.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- * Copyright (c) 1994 John S. Dyson
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
- * from: FreeBSD: src/sys/i386/include/vmparam.h,v 1.33 2000/03/30
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_VMPARAM_H_
-#define _MACHINE_VMPARAM_H_
-
-/*
- * Virtual memory related constants, all in bytes
- */
-#ifndef MAXTSIZ
-#define MAXTSIZ (1*1024*1024*1024) /* max text size */
-#endif
-#ifndef DFLDSIZ
-#define DFLDSIZ (128*1024*1024) /* initial data size limit */
-#endif
-#ifndef MAXDSIZ
-#define MAXDSIZ (1*1024*1024*1024) /* max data size */
-#endif
-#ifndef DFLSSIZ
-#define DFLSSIZ (128*1024*1024) /* initial stack size limit */
-#endif
-#ifndef MAXSSIZ
-#define MAXSSIZ (1*1024*1024*1024) /* max stack size */
-#endif
-#ifndef SGROWSIZ
-#define SGROWSIZ (128*1024) /* amount to grow stack */
-#endif
-
-/*
- * The physical address space is sparsely populated.
- */
-#define VM_PHYSSEG_SPARSE
-
-/*
- * The number of PHYSSEG entries must be one greater than the number
- * of phys_avail entries because the phys_avail entry that spans the
- * largest physical address that is accessible by ISA DMA is split
- * into two PHYSSEG entries.
- */
-#define VM_PHYSSEG_MAX 64
-
-/*
- * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool
- * from which physical pages are allocated and VM_FREEPOOL_DIRECT is
- * the pool from which physical pages for small UMA objects are
- * allocated.
- */
-#define VM_NFREEPOOL 2
-#define VM_FREEPOOL_DEFAULT 0
-#define VM_FREEPOOL_DIRECT 1
-
-/*
- * Create one free page list: VM_FREELIST_DEFAULT is for all physical
- * pages.
- */
-#define VM_NFREELIST 1
-#define VM_FREELIST_DEFAULT 0
-
-/*
- * An allocation size of 16MB is supported in order to optimize the
- * use of the direct map by UMA. Specifically, a cache line contains
- * at most four TTEs, collectively mapping 16MB of physical memory.
- * By reducing the number of distinct 16MB "pages" that are used by UMA,
- * the physical memory allocator reduces the likelihood of both 4MB
- * page TLB misses and cache misses caused by 4MB page TLB misses.
- */
-#define VM_NFREEORDER 12
-
-/*
- * Enable superpage reservations: 1 level.
- */
-#ifndef VM_NRESERVLEVEL
-#define VM_NRESERVLEVEL 1
-#endif
-
-/*
- * Level 0 reservations consist of 512 pages.
- */
-#ifndef VM_LEVEL_0_ORDER
-#define VM_LEVEL_0_ORDER 9
-#endif
-
-/**
- * Address space layout.
- *
- * UltraSPARC I and II implement a 44 bit virtual address space. The address
- * space is split into 2 regions at each end of the 64 bit address space, with
- * an out of range "hole" in the middle. UltraSPARC III implements the full
- * 64 bit virtual address space, but we don't really have any use for it and
- * 43 bits of user address space is considered to be "enough", so we ignore it.
- *
- * Upper region: 0xffffffffffffffff
- * 0xfffff80000000000
- *
- * Hole: 0xfffff7ffffffffff
- * 0x0000080000000000
- *
- * Lower region: 0x000007ffffffffff
- * 0x0000000000000000
- *
- * In general we ignore the upper region, and use the lower region as mappable
- * space.
- *
- * We define some interesting address constants:
- *
- * VM_MIN_ADDRESS and VM_MAX_ADDRESS define the start and end of the entire
- * 64 bit address space, mostly just for convenience.
- *
- * VM_MIN_DIRECT_ADDRESS and VM_MAX_DIRECT_ADDRESS define the start and end
- * of the direct mapped region. This maps virtual addresses to physical
- * addresses directly using 4mb tlb entries, with the physical address encoded
- * in the lower 43 bits of virtual address. These mappings are convenient
- * because they do not require page tables, and because they never change they
- * do not require tlb flushes. However, since these mappings are cacheable,
- * we must ensure that all pages accessed this way are either not double
- * mapped, or that all other mappings have virtual color equal to physical
- * color, in order to avoid creating illegal aliases in the data cache.
- *
- * VM_MIN_KERNEL_ADDRESS and VM_MAX_KERNEL_ADDRESS define the start and end of
- * mappable kernel virtual address space. VM_MIN_KERNEL_ADDRESS is basically
- * arbitrary, a convenient address is chosen which allows both the kernel text
- * and data and the prom's address space to be mapped with 1 4mb tsb page.
- * VM_MAX_KERNEL_ADDRESS is variable, computed at startup time based on the
- * amount of physical memory available. Each 4mb tsb page provides 1g of
- * virtual address space, with the only practical limit being available
- * phsyical memory.
- *
- * VM_MIN_PROM_ADDRESS and VM_MAX_PROM_ADDRESS define the start and end of the
- * prom address space. On startup the prom's mappings are duplicated in the
- * kernel tsb, to allow prom memory to be accessed normally by the kernel.
- *
- * VM_MIN_USER_ADDRESS and VM_MAX_USER_ADDRESS define the start and end of the
- * user address space. There are some hardware errata about using addresses
- * at the boundary of the va hole, so we allow just under 43 bits of user
- * address space. Note that the kernel and user address spaces overlap, but
- * this doesn't matter because they use different tlb contexts, and because
- * the kernel address space is not mapped into each process' address space.
- */
-#define VM_MIN_ADDRESS (0x0000000000000000UL)
-#define VM_MAX_ADDRESS (0xffffffffffffffffUL)
-
-#define VM_MIN_DIRECT_ADDRESS (0xfffff80000000000UL)
-#define VM_MAX_DIRECT_ADDRESS (VM_MAX_ADDRESS)
-
-#define VM_MIN_KERNEL_ADDRESS (0x00000000c0000000UL)
-#define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address)
-
-#define VM_MIN_PROM_ADDRESS (0x00000000f0000000UL)
-#define VM_MAX_PROM_ADDRESS (0x00000000ffffffffUL)
-
-#define VM_MIN_USER_ADDRESS (0x0000000000000000UL)
-#define VM_MAX_USER_ADDRESS (0x000007fe00000000UL)
-
-#define VM_MINUSER_ADDRESS (VM_MIN_USER_ADDRESS)
-#define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS)
-
-#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
-#define PROMBASE (VM_MIN_PROM_ADDRESS)
-#define USRSTACK (VM_MAX_USER_ADDRESS)
-
-/*
- * How many physical pages per kmem arena virtual page.
- */
-#ifndef VM_KMEM_SIZE_SCALE
-#define VM_KMEM_SIZE_SCALE (tsb_kernel_ldd_phys == 0 ? 3 : 2)
-#endif
-
-/*
- * Optional floor (in bytes) on the size of the kmem arena.
- */
-#ifndef VM_KMEM_SIZE_MIN
-#define VM_KMEM_SIZE_MIN (16 * 1024 * 1024)
-#endif
-
-/*
- * Optional ceiling (in bytes) on the size of the kmem arena: 60% of the
- * kernel map.
- */
-#ifndef VM_KMEM_SIZE_MAX
-#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \
- VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5)
-#endif
-
-/*
- * Initial pagein size of beginning of executable file.
- */
-#ifndef VM_INITIAL_PAGEIN
-#define VM_INITIAL_PAGEIN 16
-#endif
-
-#define UMA_MD_SMALL_ALLOC
-
-extern u_int tsb_kernel_ldd_phys;
-extern vm_offset_t vm_max_kernel_address;
-
-/*
- * Older sparc64 machines have a virtually indexed L1 data cache of 16KB.
- * Consequently, mapping the same physical page multiple times may have
- * caching disabled.
- */
-#define ZERO_REGION_SIZE PAGE_SIZE
-
-#include <machine/tlb.h>
-
-#define SFBUF
-#define SFBUF_MAP
-
-#define PMAP_HAS_DMAP dcache_color_ignore
-#define PHYS_TO_DMAP(x) (TLB_PHYS_TO_DIRECT(x))
-
-#endif /* !_MACHINE_VMPARAM_H_ */
diff --git a/sys/sparc64/include/watch.h b/sys/sparc64/include/watch.h
deleted file mode 100644
index 1adb2e1c6670..000000000000
--- a/sys/sparc64/include/watch.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_WATCH_H_
-#define _MACHINE_WATCH_H_
-
-int watch_phys_set_mask(vm_paddr_t pa, u_long mask);
-int watch_phys_set(vm_paddr_t pa, int sz);
-vm_paddr_t watch_phys_get(int *bm);
-void watch_phys_clear(void);
-int watch_phys_active(void);
-int watch_virt_set_mask(vm_offset_t va, u_long mask);
-int watch_virt_set(vm_offset_t va, int sz);
-vm_offset_t watch_virt_get(int *bm);
-void watch_virt_clear(void);
-int watch_virt_active(void);
-
-#endif /* _MACHINE_WATCH_H_ */
diff --git a/sys/sparc64/include/wstate.h b/sys/sparc64/include/wstate.h
deleted file mode 100644
index e55916b7dcf9..000000000000
--- a/sys/sparc64/include/wstate.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
- *
- * 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.
- * 3. Berkeley Software Design Inc's name may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
- *
- * from: BSDI: wstate.h,v 1.4 1997/09/18 13:05:51 torek Exp
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_WSTATE_H_
-#define _MACHINE_WSTATE_H_
-
-/*
- * Window state register bits
- *
- * There really are no bits per se, just the two fields WSTATE.NORMAL
- * and WSTATE.OTHER. The rest is up to software.
- *
- * We use WSTATE_NORMAL to represent user mode or kernel mode saves
- * (whichever is currently in effect) and WSTATE_OTHER to represent
- * user mode saves (only).
- *
- * Note that locore.s assumes this same bit layout (since the translation
- * from "bits" to "{spill,fill}_N_{normal,other}" is done in hardware).
- */
-
-#define WSTATE_NORMAL_MASK 1 /* wstate normal minus transition */
-#define WSTATE_OTHER_SHIFT 3 /* for wstate other / user */
-#define WSTATE_OTHER_MASK /* wstate other minus nested */ \
- (WSTATE_NORMAL_MASK << WSTATE_OTHER_SHIFT)
-
-#define WSTATE_KERNEL 0 /* normal kernel wstate */
-#define WSTATE_USER_64 0 /* normal 64bit user wstate */
-#define WSTATE_USER_32 1 /* normal 32bit user wstate */
-
-#define WSTATE_TRANSITION 2 /* if set, force user window */
-#define WSTATE_NESTED /* if set, spill must not fault */ \
- (WSTATE_TRANSITION << WSTATE_OTHER_SHIFT)
-
-/* Values used by the PROM and (Open)Solaris */
-#define WSTATE_PROM_KMIX 7
-#define WSTATE_PROM_MASK 7
-
-#endif /* !_MACHINE_WSTATE_H_ */