aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2011-05-14 01:53:38 +0000
committerAttilio Rao <attilio@FreeBSD.org>2011-05-14 01:53:38 +0000
commit4b547324c0a839a0ecd067638686112f6f7cc11e (patch)
tree7673b284ad690bef683dca3bdfe5aeb355305893 /sys
parent307abf289deb5a0c0c0fa0b69df95964759ba31b (diff)
downloadsrc-4b547324c0a839a0ecd067638686112f6f7cc11e.tar.gz
src-4b547324c0a839a0ecd067638686112f6f7cc11e.zip
Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future, if any rewamped sun4v support wants to be added again. Reviewed by: marius Tested by: sbruno Approved by: re
Notes
Notes: svn path=/head/; revision=221869
Diffstat (limited to 'sys')
-rw-r--r--sys/Makefile2
-rw-r--r--sys/boot/Makefile2
-rw-r--r--sys/boot/common/loader.82
-rw-r--r--sys/boot/sparc64/loader/main.c71
-rw-r--r--sys/dev/ath/ath_rate/sample/tx_schedules.h2
-rw-r--r--sys/modules/mem/Makefile14
-rw-r--r--sys/modules/uart/Makefile4
-rw-r--r--sys/sparc64/sparc64/autoconf.c3
-rw-r--r--sys/sparc64/sparc64/genassym.c56
-rw-r--r--sys/sparc64/sparc64/mem.c6
-rw-r--r--sys/sys/kdb.h2
11 files changed, 7 insertions, 157 deletions
diff --git a/sys/Makefile b/sys/Makefile
index ce604f7fd9f2..3b24ed95ca54 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -14,7 +14,7 @@ CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
netsmb nfs nfsclient nfsserver nlm opencrypto \
pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
.if defined(ALL_ARCH)
-CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v x86
+CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
.else
CSCOPE_ARCHDIR ?= ${MACHINE}
.endif
diff --git a/sys/boot/Makefile b/sys/boot/Makefile
index 6c879972f928..cfc82b98201f 100644
--- a/sys/boot/Makefile
+++ b/sys/boot/Makefile
@@ -13,7 +13,7 @@ SUBDIR+= fdt
.endif
# Pick the machine-dependent subdir based on the target architecture.
-ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/:S/powerpc64/powerpc/}
+ADIR= ${MACHINE:S/amd64/i386/:S/powerpc64/powerpc/}
.if exists(${.CURDIR}/${ADIR}/.)
SUBDIR+= ${ADIR}
.endif
diff --git a/sys/boot/common/loader.8 b/sys/boot/common/loader.8
index 94b4e6a38150..51c0ab903819 100644
--- a/sys/boot/common/loader.8
+++ b/sys/boot/common/loader.8
@@ -597,7 +597,7 @@ Modifies kernel option
Limits the amount of KVM reserved for use by the
buffer cache, specified in bytes.
The default maximum is 200MB on i386,
-and 400MB on amd64, sparc64, and sun4v.
+and 400MB on amd64 and sparc64.
This parameter is used to
prevent the buffer cache from eating too much
KVM in large-memory machine configurations.
diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c
index dc5369847608..9a3ae58b2ddf 100644
--- a/sys/boot/sparc64/loader/main.c
+++ b/sys/boot/sparc64/loader/main.c
@@ -113,13 +113,11 @@ static int map_phys(int, size_t, vm_offset_t, vm_offset_t);
static void release_phys(vm_offset_t, u_int);
static int __elfN(exec)(struct preloaded_file *);
static int mmu_mapin_sun4u(vm_offset_t, vm_size_t);
-static int mmu_mapin_sun4v(vm_offset_t, vm_size_t);
static vm_offset_t init_heap(void);
static phandle_t find_bsp_sun4u(phandle_t, uint32_t);
const char *cpu_cpuid_prop_sun4u(void);
uint32_t cpu_get_mid_sun4u(void);
static void tlb_init_sun4u(void);
-static void tlb_init_sun4v(void);
#ifdef LOADER_DEBUG
typedef u_int64_t tte_t;
@@ -129,7 +127,6 @@ static void pmap_print_tte_sun4u(tte_t, tte_t);
#endif
static struct mmu_ops mmu_ops_sun4u = { tlb_init_sun4u, mmu_mapin_sun4u };
-static struct mmu_ops mmu_ops_sun4v = { tlb_init_sun4v, mmu_mapin_sun4v };
/* sun4u */
struct tlb_entry *dtlb_store;
@@ -140,16 +137,6 @@ static int cpu_impl;
static u_int dtlb_slot_max;
static u_int itlb_slot_max;
-/* sun4v */
-static struct tlb_entry *tlb_store;
-static int is_sun4v = 0;
-/*
- * no direct TLB access on sun4v
- * we somewhat arbitrarily declare enough
- * slots to cover a 4GB AS with 4MB pages
- */
-#define SUN4V_TLB_SLOT_MAX (1 << 10)
-
static vm_offset_t curkva = 0;
static vm_offset_t heapva;
@@ -568,47 +555,6 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_t len)
return (0);
}
-static int
-mmu_mapin_sun4v(vm_offset_t va, vm_size_t len)
-{
- vm_offset_t pa, mva;
-
- if (va + len > curkva)
- curkva = va + len;
-
- pa = (vm_offset_t)-1;
- len += va & PAGE_MASK_4M;
- va &= ~PAGE_MASK_4M;
- while (len) {
- if ((va >> 22) > SUN4V_TLB_SLOT_MAX)
- panic("%s: trying to map more than 4GB", __func__);
- if (tlb_store[va >> 22].te_pa == -1) {
- /* Allocate a physical page, claim the virtual area */
- if (pa == (vm_offset_t)-1) {
- pa = alloc_phys(PAGE_SIZE_4M, PAGE_SIZE_4M);
- if (pa == (vm_offset_t)-1)
- panic("%s: out of memory", __func__);
- mva = claim_virt(va, PAGE_SIZE_4M, 0);
- if (mva != va)
- panic("%s: can't claim virtual page "
- "(wanted %#lx, got %#lx)",
- __func__, va, mva);
- }
-
- tlb_store[va >> 22].te_pa = pa;
- if (map_phys(-1, PAGE_SIZE_4M, va, pa) == -1)
- printf("%s: can't map physical page\n",
- __func__);
- pa = (vm_offset_t)-1;
- }
- len -= len > PAGE_SIZE_4M ? PAGE_SIZE_4M : len;
- va += PAGE_SIZE_4M;
- }
- if (pa != (vm_offset_t)-1)
- release_phys(pa, PAGE_SIZE_4M);
- return (0);
-}
-
static vm_offset_t
init_heap(void)
{
@@ -739,14 +685,6 @@ tlb_init_sun4u(void)
panic("%s: can't allocate TLB store", __func__);
}
-static void
-tlb_init_sun4v(void)
-{
-
- tlb_store = malloc(SUN4V_TLB_SLOT_MAX * sizeof(*tlb_store));
- memset(tlb_store, 0xFF, SUN4V_TLB_SLOT_MAX * sizeof(*tlb_store));
-}
-
int
main(int (*openfirm)(void *))
{
@@ -777,14 +715,7 @@ main(int (*openfirm)(void *))
if ((root = OF_peer(0)) == -1)
panic("%s: can't get root phandle", __func__);
OF_getprop(root, "compatible", compatible, sizeof(compatible));
- if (!strcmp(compatible, "sun4v")) {
- printf("\nBooting with sun4v support.\n");
- mmu_ops = &mmu_ops_sun4v;
- is_sun4v = 1;
- } else {
- printf("\nBooting with sun4u support.\n");
- mmu_ops = &mmu_ops_sun4u;
- }
+ mmu_ops = &mmu_ops_sun4u;
mmu_ops->tlb_init();
diff --git a/sys/dev/ath/ath_rate/sample/tx_schedules.h b/sys/dev/ath/ath_rate/sample/tx_schedules.h
index b0fd4e02ea38..d8e9f325dfee 100644
--- a/sys/dev/ath/ath_rate/sample/tx_schedules.h
+++ b/sys/dev/ath/ath_rate/sample/tx_schedules.h
@@ -172,7 +172,7 @@ static const struct txschedule series_half[] = {
#undef H
#ifdef Q
-#undef Q /* sun4v bogosity */
+#undef Q
#endif
#define Q(_r) \
(((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \
diff --git a/sys/modules/mem/Makefile b/sys/modules/mem/Makefile
index 952f50f1ca26..3710c5dca630 100644
--- a/sys/modules/mem/Makefile
+++ b/sys/modules/mem/Makefile
@@ -14,18 +14,4 @@ SRCS+= amd64_mem.c
.endif
SRCS+= bus_if.h device_if.h
-.if ${MACHINE} == "sun4v"
-SRCS+= opt_global.h
-
-.if defined(KERNBUILDDIR)
-MKDEP= -include ${KERNBUILDDIR}/opt_global.h
-.else
-CFLAGS+= -include opt_global.h
-MKDEP= -include opt_global.h
-
-opt_global.h:
- echo "#define SUN4V 1" > ${.TARGET}
-.endif
-.endif
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/uart/Makefile b/sys/modules/uart/Makefile
index 1a5ce4436da5..9afb86cf80b8 100644
--- a/sys/modules/uart/Makefile
+++ b/sys/modules/uart/Makefile
@@ -14,9 +14,7 @@ SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \
uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \
uart_dev_z8530.c \
uart_if.c uart_if.h uart_subr.c uart_tty.c
-.if ${MACHINE} == "sun4v"
-SRCS+= uart_cpu_sparc64.c
-.elif exists(${.CURDIR}/../../dev/uart/uart_cpu_${MACHINE}.c)
+.if exists(${.CURDIR}/../../dev/uart/uart_cpu_${MACHINE}.c)
SRCS+= uart_cpu_${MACHINE}.c
.endif
SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
diff --git a/sys/sparc64/sparc64/autoconf.c b/sys/sparc64/sparc64/autoconf.c
index 68161566d896..394fa320f7d2 100644
--- a/sys/sparc64/sparc64/autoconf.c
+++ b/sys/sparc64/sparc64/autoconf.c
@@ -66,9 +66,6 @@ static void
configure(void *dummy)
{
-#ifdef SUN4V
- intr_restore_all(0x16);
-#endif
root_bus_configure();
#ifdef DEV_ISA
/*
diff --git a/sys/sparc64/sparc64/genassym.c b/sys/sparc64/sparc64/genassym.c
index c0d268b05727..e33e581bb91a 100644
--- a/sys/sparc64/sparc64/genassym.c
+++ b/sys/sparc64/sparc64/genassym.c
@@ -45,18 +45,11 @@ __FBSDID("$FreeBSD$");
#ifdef SUN4U
#include <machine/cache.h>
#endif
-#ifdef SUN4V
-#include <machine/mmu.h>
-#endif
#include <machine/pcb.h>
#include <machine/setjmp.h>
#include <machine/smp.h>
#include <machine/tlb.h>
#include <machine/tte.h>
-#ifdef SUN4V
-#include <machine/trap.h>
-#include <machine/tte_hash.h>
-#endif
#include <machine/vmparam.h>
ASSYM(KERNBASE, KERNBASE);
@@ -93,9 +86,6 @@ ASSYM(CSA_TICK, offsetof(struct cpu_start_args, csa_tick));
ASSYM(CSA_TTES, offsetof(struct cpu_start_args, csa_ttes));
ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
#endif
-#ifdef SUN4V
-ASSYM(CSA_CPUID, offsetof(struct cpu_start_args, csa_cpuid));
-#endif
#endif
#ifdef SUN4U
@@ -141,20 +131,6 @@ ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK);
ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
#endif
-#ifdef SUN4V
-ASSYM(VTD_REF, VTD_REF);
-ASSYM(VTD_W, VTD_W);
-ASSYM(VTD_SW_W, VTD_SW_W);
-ASSYM(VTD_LOCK, VTD_LOCK);
-
-ASSYM(THE_SHIFT, THE_SHIFT);
-ASSYM(PM_HASHSCRATCH, offsetof(struct pmap, pm_hashscratch));
-ASSYM(PM_TSBSCRATCH, offsetof(struct pmap, pm_tsbscratch));
-ASSYM(PM_TSB_RA, offsetof(struct pmap, pm_tsb_ra));
-ASSYM(PM_TLBACTIVE, offsetof(struct pmap, pm_tlbactive));
-ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT);
-#endif
-
ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
ASSYM(MAXCOMLEN, MAXCOMLEN);
@@ -168,35 +144,6 @@ ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
ASSYM(PC_SIZEOF, sizeof(struct pcpu));
-#ifdef SUN4V
-ASSYM(PC_CPU_Q_RA, offsetof(struct pcpu, pc_cpu_q_ra));
-ASSYM(PC_CPU_Q_SIZE, offsetof(struct pcpu, pc_cpu_q_size));
-ASSYM(PC_DEV_Q_RA, offsetof(struct pcpu, pc_dev_q_ra));
-ASSYM(PC_DEV_Q_SIZE, offsetof(struct pcpu, pc_dev_q_size));
-
-ASSYM(PC_RQ_BASE, offsetof(struct pcpu, pc_rq_ra));
-ASSYM(PC_RQ_SIZE, offsetof(struct pcpu, pc_rq_size));
-ASSYM(PC_NRQ_BASE, offsetof(struct pcpu, pc_nrq_ra));
-ASSYM(PC_NRQ_SIZE, offsetof(struct pcpu, pc_nrq_size));
-ASSYM(PC_MONDO_DATA, offsetof(struct pcpu, pc_mondo_data));
-ASSYM(PC_MONDO_DATA_RA, offsetof(struct pcpu, pc_mondo_data_ra));
-
-ASSYM(PC_KWBUF_FULL, offsetof(struct pcpu, pc_kwbuf_full));
-ASSYM(PC_KWBUF_SP, offsetof(struct pcpu, pc_kwbuf_sp));
-ASSYM(PC_KWBUF, offsetof(struct pcpu, pc_kwbuf));
-ASSYM(PC_PAD, offsetof(struct pcpu, pad));
-ASSYM(PC_PMAP, offsetof(struct pcpu, pc_curpmap));
-ASSYM(PC_TSBWBUF, offsetof(struct pcpu, pc_tsbwbuf));
-
-ASSYM(PCB_KSTACK, offsetof(struct pcb, pcb_kstack));
-ASSYM(PCB_TSTATE, offsetof(struct pcb, pcb_tstate));
-ASSYM(PCB_TPC, offsetof(struct pcb, pcb_tpc));
-ASSYM(PCB_TNPC, offsetof(struct pcb, pcb_tnpc));
-ASSYM(PCB_TT, offsetof(struct pcb, pcb_tt));
-ASSYM(PCB_SFAR, offsetof(struct pcb, pcb_sfar));
-ASSYM(PM_TSB_MISS_COUNT, offsetof(struct pmap, pm_tsb_miss_count));
-ASSYM(PM_TSB_CAP_MISS_COUNT, offsetof(struct pmap, pm_tsb_cap_miss_count));
-#endif
#ifdef SUN4U
ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
@@ -298,9 +245,6 @@ ASSYM(TF_TAR, offsetof(struct trapframe, tf_tar));
ASSYM(TF_TYPE, offsetof(struct trapframe, tf_type));
ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
#endif
-#ifdef SUN4V
-ASSYM(TF_ASI, offsetof(struct trapframe, tf_asi));
-#endif
ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c
index e7ab8e40451b..68c397e2f3f8 100644
--- a/sys/sparc64/sparc64/mem.c
+++ b/sys/sparc64/sparc64/mem.c
@@ -69,9 +69,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_extern.h>
-#ifndef SUN4V
#include <machine/cache.h>
-#endif
#include <machine/md_var.h>
#include <machine/pmap.h>
#include <machine/tlb.h>
@@ -137,18 +135,14 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
if (m != NULL) {
if (ova == 0) {
-#ifndef SUN4V
if (dcache_color_ignore == 0)
colors = DCACHE_COLORS;
-#endif
ova = kmem_alloc_wait(kernel_map,
PAGE_SIZE * colors);
}
-#ifndef SUN4V
if (colors != 1 && m->md.color != -1)
va = ova + m->md.color * PAGE_SIZE;
else
-#endif
va = ova;
pmap_qenter(va, &m, 1);
error = uiomove((void *)(va + off), cnt,
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index 9685d77c042f..2982e03c75f1 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -101,7 +101,7 @@ extern const char * volatile kdb_why;
#define KDB_WHY_CAM "cam" /* CAM has entered debugger. */
#define KDB_WHY_NDIS "ndis" /* NDIS entered debugger. */
#define KDB_WHY_ACPI "acpi" /* ACPI entered debugger. */
-#define KDB_WHY_TRAPSIG "trapsig" /* Sun4v/Sparc fault. */
+#define KDB_WHY_TRAPSIG "trapsig" /* Sparc fault. */
#define KDB_WHY_POWERFAIL "powerfail" /* Powerfail NMI. */
#define KDB_WHY_MAC "mac" /* MAC Framework. */
#define KDB_WHY_POWERPC "powerpc" /* Unhandled powerpc intr. */