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
This commit is contained in:
parent
882abde07a
commit
96139278ce
5
Makefile
5
Makefile
@ -131,7 +131,7 @@ _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${
|
|||||||
|
|
||||||
# Guess machine architecture from machine type, and vice versa.
|
# Guess machine architecture from machine type, and vice versa.
|
||||||
.if !defined(TARGET_ARCH) && defined(TARGET)
|
.if !defined(TARGET_ARCH) && defined(TARGET)
|
||||||
_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
|
_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/mips/mipsel/}
|
||||||
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
|
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
|
||||||
${TARGET_ARCH} != ${MACHINE_ARCH}
|
${TARGET_ARCH} != ${MACHINE_ARCH}
|
||||||
_TARGET= ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
|
_TARGET= ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
|
||||||
@ -323,12 +323,11 @@ toolchains:
|
|||||||
# existing system is.
|
# existing system is.
|
||||||
#
|
#
|
||||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
||||||
TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
|
TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64
|
||||||
TARGET_ARCHES_arm?= arm armeb
|
TARGET_ARCHES_arm?= arm armeb
|
||||||
TARGET_ARCHES_mips?= mipsel mipseb mips64el mips64eb mipsn32eb
|
TARGET_ARCHES_mips?= mipsel mipseb mips64el mips64eb mipsn32eb
|
||||||
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
||||||
TARGET_ARCHES_pc98?= i386
|
TARGET_ARCHES_pc98?= i386
|
||||||
TARGET_ARCHES_sun4v?= sparc64
|
|
||||||
.for target in ${TARGETS}
|
.for target in ${TARGETS}
|
||||||
TARGET_ARCHES_${target}?= ${target}
|
TARGET_ARCHES_${target}?= ${target}
|
||||||
.endfor
|
.endfor
|
||||||
|
@ -130,7 +130,7 @@ VERSION!= uname -srp
|
|||||||
VERSION+= ${OSRELDATE}
|
VERSION+= ${OSRELDATE}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
|
KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64
|
||||||
.if ${TARGET} == ${TARGET_ARCH}
|
.if ${TARGET} == ${TARGET_ARCH}
|
||||||
_t= ${TARGET}
|
_t= ${TARGET}
|
||||||
.else
|
.else
|
||||||
|
3
UPDATING
3
UPDATING
@ -22,6 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
|
|||||||
machines to maximize performance. (To disable malloc debugging, run
|
machines to maximize performance. (To disable malloc debugging, run
|
||||||
ln -s aj /etc/malloc.conf.)
|
ln -s aj /etc/malloc.conf.)
|
||||||
|
|
||||||
|
20110513:
|
||||||
|
Support for sun4v architecture is officially dropped
|
||||||
|
|
||||||
20110430:
|
20110430:
|
||||||
Users of the Atheros AR71xx SoC code now need to add 'device ar71xx_pci'
|
Users of the Atheros AR71xx SoC code now need to add 'device ar71xx_pci'
|
||||||
into their kernel configurations along with 'device pci'.
|
into their kernel configurations along with 'device pci'.
|
||||||
|
@ -16,7 +16,6 @@ ports
|
|||||||
powerpc
|
powerpc
|
||||||
sparc64
|
sparc64
|
||||||
standards
|
standards
|
||||||
sun4v
|
|
||||||
threads
|
threads
|
||||||
usb
|
usb
|
||||||
www
|
www
|
||||||
|
@ -233,9 +233,6 @@ SPARC processor specific problems.
|
|||||||
.B standards
|
.B standards
|
||||||
Standards conformance issues.
|
Standards conformance issues.
|
||||||
.TP
|
.TP
|
||||||
.B sun4v
|
|
||||||
Problems specific to the SPARC sun4v architecture and processors.
|
|
||||||
.TP
|
|
||||||
.B threads
|
.B threads
|
||||||
Problems related to threading on FreeBSD.
|
Problems related to threading on FreeBSD.
|
||||||
.TP
|
.TP
|
||||||
|
@ -11,9 +11,6 @@ SRCS+= __sparc_sigtramp_setup.c \
|
|||||||
sigcode.S
|
sigcode.S
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR}/sparc64/fpu
|
CFLAGS+= -I${.CURDIR}/sparc64/fpu
|
||||||
.if ${MACHINE} == "sun4v"
|
|
||||||
CFLAGS+= -DSUN4V
|
|
||||||
.endif
|
|
||||||
|
|
||||||
MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S
|
MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S
|
||||||
|
|
||||||
|
@ -38,10 +38,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include "assym.s"
|
#include "assym.s"
|
||||||
|
|
||||||
ENTRY(__sparc_utrap_gen)
|
ENTRY(__sparc_utrap_gen)
|
||||||
#ifdef SUN4V
|
|
||||||
save
|
|
||||||
ta %xcc, ST_FPEMU_CONTEXT
|
|
||||||
#endif
|
|
||||||
sub %sp, UF_SIZEOF, %sp
|
sub %sp, UF_SIZEOF, %sp
|
||||||
|
|
||||||
stx %o0, [%sp + SPOFF + CCFSZ + UF_TYPE]
|
stx %o0, [%sp + SPOFF + CCFSZ + UF_TYPE]
|
||||||
|
@ -10,11 +10,7 @@ _open_disk= open_disk.c
|
|||||||
LIB= disk
|
LIB= disk
|
||||||
SRCS= blocks.c ${_change} chunk.c create_chunk.c disk.c ${_open_disk} \
|
SRCS= blocks.c ${_change} chunk.c create_chunk.c disk.c ${_open_disk} \
|
||||||
rules.c write_disk.c
|
rules.c write_disk.c
|
||||||
.if ${MACHINE} == "sun4v"
|
|
||||||
SRCS+= write_sparc64_disk.c
|
|
||||||
.else
|
|
||||||
SRCS+= write_${MACHINE}_disk.c
|
SRCS+= write_${MACHINE}_disk.c
|
||||||
.endif
|
|
||||||
|
|
||||||
INCS= libdisk.h
|
INCS= libdisk.h
|
||||||
|
|
||||||
|
@ -5,10 +5,6 @@ LIB= kvm
|
|||||||
SHLIBDIR?= /lib
|
SHLIBDIR?= /lib
|
||||||
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
|
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
|
||||||
|
|
||||||
.if ${MACHINE} == "sun4v"
|
|
||||||
CFLAGS+=-DSUN4V
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c)
|
.if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c)
|
||||||
KVM_ARCH=${MACHINE_ARCH}
|
KVM_ARCH=${MACHINE_ARCH}
|
||||||
.else
|
.else
|
||||||
|
@ -188,11 +188,9 @@ fail_vm:
|
|||||||
int
|
int
|
||||||
_kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
_kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||||
{
|
{
|
||||||
#if !defined(SUN4V)
|
|
||||||
struct tte tte;
|
struct tte tte;
|
||||||
off_t tte_off;
|
off_t tte_off;
|
||||||
u_long vpn;
|
u_long vpn;
|
||||||
#endif
|
|
||||||
off_t pa_off;
|
off_t pa_off;
|
||||||
u_long pg_off;
|
u_long pg_off;
|
||||||
int rest;
|
int rest;
|
||||||
@ -200,7 +198,6 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
|||||||
pg_off = va & PAGE_MASK;
|
pg_off = va & PAGE_MASK;
|
||||||
if (va >= VM_MIN_DIRECT_ADDRESS)
|
if (va >= VM_MIN_DIRECT_ADDRESS)
|
||||||
pa_off = TLB_DIRECT_TO_PHYS(va) & ~PAGE_MASK;
|
pa_off = TLB_DIRECT_TO_PHYS(va) & ~PAGE_MASK;
|
||||||
#if !defined(SUN4V)
|
|
||||||
else {
|
else {
|
||||||
vpn = btop(va);
|
vpn = btop(va);
|
||||||
tte_off = kd->vmst->vm_tsb_off +
|
tte_off = kd->vmst->vm_tsb_off +
|
||||||
@ -211,7 +208,6 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
|||||||
goto invalid;
|
goto invalid;
|
||||||
pa_off = TTE_GET_PA(&tte);
|
pa_off = TTE_GET_PA(&tte);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
rest = PAGE_SIZE - pg_off;
|
rest = PAGE_SIZE - pg_off;
|
||||||
pa_off = _kvm_find_off(kd->vmst, pa_off, rest);
|
pa_off = _kvm_find_off(kd->vmst, pa_off, rest);
|
||||||
if (pa_off == KVM_OFF_NOTFOUND)
|
if (pa_off == KVM_OFF_NOTFOUND)
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
<!ENTITY arch.pc98 "pc98">
|
<!ENTITY arch.pc98 "pc98">
|
||||||
<!ENTITY arch.powerpc "powerpc">
|
<!ENTITY arch.powerpc "powerpc">
|
||||||
<!ENTITY arch.sparc64 "sparc64">
|
<!ENTITY arch.sparc64 "sparc64">
|
||||||
<!ENTITY arch.sun4v "sun4v">
|
|
||||||
|
|
||||||
<!-- The marker for MFCs. -->
|
<!-- The marker for MFCs. -->
|
||||||
<!ENTITY merged "MERGED">
|
<!ENTITY merged "MERGED">
|
||||||
|
@ -1373,7 +1373,7 @@ The kernel debugger was entered as a result of the
|
|||||||
sysctl being set.
|
sysctl being set.
|
||||||
.It Dv kdb.enter.trapsig
|
.It Dv kdb.enter.trapsig
|
||||||
The kernel debugger was entered as a result of a trapsig event on the sparc64
|
The kernel debugger was entered as a result of a trapsig event on the sparc64
|
||||||
or sun4v platform.
|
platform.
|
||||||
.It Dv kdb.enter.unionfs
|
.It Dv kdb.enter.unionfs
|
||||||
The kernel debugger was entered as a result of an assertion failure in the
|
The kernel debugger was entered as a result of an assertion failure in the
|
||||||
union file system.
|
union file system.
|
||||||
|
@ -257,7 +257,7 @@ When set, it also enforces the following options:
|
|||||||
Set to not build the Clang C/C++ compiler.
|
Set to not build the Clang C/C++ compiler.
|
||||||
.Pp
|
.Pp
|
||||||
It is a default setting on
|
It is a default setting on
|
||||||
arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64, sparc64/sparc64 and sun4v/sparc64.
|
arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64 and sparc64/sparc64.
|
||||||
.It Va WITH_CLANG
|
.It Va WITH_CLANG
|
||||||
.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru
|
.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru
|
||||||
Set to build the Clang C/C++ compiler.
|
Set to build the Clang C/C++ compiler.
|
||||||
@ -337,7 +337,7 @@ Set to not build Flattened Device Tree support as part of the base system.
|
|||||||
This includes the device tree compiler (dtc) and libfdt support library.
|
This includes the device tree compiler (dtc) and libfdt support library.
|
||||||
.Pp
|
.Pp
|
||||||
It is a default setting on
|
It is a default setting on
|
||||||
amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64, sparc64/sparc64 and sun4v/sparc64.
|
amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64 and sparc64/sparc64.
|
||||||
.It Va WITH_FDT
|
.It Va WITH_FDT
|
||||||
.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru
|
.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru
|
||||||
Set to build Flattened Device Tree support as part of the base system.
|
Set to build Flattened Device Tree support as part of the base system.
|
||||||
|
@ -14,7 +14,7 @@ CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
|
|||||||
netsmb nfs nfsclient nfsserver nlm opencrypto \
|
netsmb nfs nfsclient nfsserver nlm opencrypto \
|
||||||
pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
|
pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
|
||||||
.if defined(ALL_ARCH)
|
.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
|
.else
|
||||||
CSCOPE_ARCHDIR ?= ${MACHINE}
|
CSCOPE_ARCHDIR ?= ${MACHINE}
|
||||||
.endif
|
.endif
|
||||||
|
@ -13,7 +13,7 @@ SUBDIR+= fdt
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Pick the machine-dependent subdir based on the target architecture.
|
# 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}/.)
|
.if exists(${.CURDIR}/${ADIR}/.)
|
||||||
SUBDIR+= ${ADIR}
|
SUBDIR+= ${ADIR}
|
||||||
.endif
|
.endif
|
||||||
|
@ -597,7 +597,7 @@ Modifies kernel option
|
|||||||
Limits the amount of KVM reserved for use by the
|
Limits the amount of KVM reserved for use by the
|
||||||
buffer cache, specified in bytes.
|
buffer cache, specified in bytes.
|
||||||
The default maximum is 200MB on i386,
|
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
|
This parameter is used to
|
||||||
prevent the buffer cache from eating too much
|
prevent the buffer cache from eating too much
|
||||||
KVM in large-memory machine configurations.
|
KVM in large-memory machine configurations.
|
||||||
|
@ -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 void release_phys(vm_offset_t, u_int);
|
||||||
static int __elfN(exec)(struct preloaded_file *);
|
static int __elfN(exec)(struct preloaded_file *);
|
||||||
static int mmu_mapin_sun4u(vm_offset_t, vm_size_t);
|
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 vm_offset_t init_heap(void);
|
||||||
static phandle_t find_bsp_sun4u(phandle_t, uint32_t);
|
static phandle_t find_bsp_sun4u(phandle_t, uint32_t);
|
||||||
const char *cpu_cpuid_prop_sun4u(void);
|
const char *cpu_cpuid_prop_sun4u(void);
|
||||||
uint32_t cpu_get_mid_sun4u(void);
|
uint32_t cpu_get_mid_sun4u(void);
|
||||||
static void tlb_init_sun4u(void);
|
static void tlb_init_sun4u(void);
|
||||||
static void tlb_init_sun4v(void);
|
|
||||||
|
|
||||||
#ifdef LOADER_DEBUG
|
#ifdef LOADER_DEBUG
|
||||||
typedef u_int64_t tte_t;
|
typedef u_int64_t tte_t;
|
||||||
@ -129,7 +127,6 @@ static void pmap_print_tte_sun4u(tte_t, tte_t);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct mmu_ops mmu_ops_sun4u = { tlb_init_sun4u, mmu_mapin_sun4u };
|
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 */
|
/* sun4u */
|
||||||
struct tlb_entry *dtlb_store;
|
struct tlb_entry *dtlb_store;
|
||||||
@ -140,16 +137,6 @@ static int cpu_impl;
|
|||||||
static u_int dtlb_slot_max;
|
static u_int dtlb_slot_max;
|
||||||
static u_int itlb_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 curkva = 0;
|
||||||
static vm_offset_t heapva;
|
static vm_offset_t heapva;
|
||||||
|
|
||||||
@ -568,47 +555,6 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_t len)
|
|||||||
return (0);
|
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
|
static vm_offset_t
|
||||||
init_heap(void)
|
init_heap(void)
|
||||||
{
|
{
|
||||||
@ -739,14 +685,6 @@ tlb_init_sun4u(void)
|
|||||||
panic("%s: can't allocate TLB store", __func__);
|
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
|
int
|
||||||
main(int (*openfirm)(void *))
|
main(int (*openfirm)(void *))
|
||||||
{
|
{
|
||||||
@ -777,14 +715,7 @@ main(int (*openfirm)(void *))
|
|||||||
if ((root = OF_peer(0)) == -1)
|
if ((root = OF_peer(0)) == -1)
|
||||||
panic("%s: can't get root phandle", __func__);
|
panic("%s: can't get root phandle", __func__);
|
||||||
OF_getprop(root, "compatible", compatible, sizeof(compatible));
|
OF_getprop(root, "compatible", compatible, sizeof(compatible));
|
||||||
if (!strcmp(compatible, "sun4v")) {
|
mmu_ops = &mmu_ops_sun4u;
|
||||||
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->tlb_init();
|
mmu_ops->tlb_init();
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ static const struct txschedule series_half[] = {
|
|||||||
#undef H
|
#undef H
|
||||||
|
|
||||||
#ifdef Q
|
#ifdef Q
|
||||||
#undef Q /* sun4v bogosity */
|
#undef Q
|
||||||
#endif
|
#endif
|
||||||
#define Q(_r) \
|
#define Q(_r) \
|
||||||
(((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \
|
(((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \
|
||||||
|
@ -14,18 +14,4 @@ SRCS+= amd64_mem.c
|
|||||||
.endif
|
.endif
|
||||||
SRCS+= bus_if.h device_if.h
|
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>
|
.include <bsd.kmod.mk>
|
||||||
|
@ -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_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \
|
||||||
uart_dev_z8530.c \
|
uart_dev_z8530.c \
|
||||||
uart_if.c uart_if.h uart_subr.c uart_tty.c
|
uart_if.c uart_if.h uart_subr.c uart_tty.c
|
||||||
.if ${MACHINE} == "sun4v"
|
.if exists(${.CURDIR}/../../dev/uart/uart_cpu_${MACHINE}.c)
|
||||||
SRCS+= uart_cpu_sparc64.c
|
|
||||||
.elif exists(${.CURDIR}/../../dev/uart/uart_cpu_${MACHINE}.c)
|
|
||||||
SRCS+= uart_cpu_${MACHINE}.c
|
SRCS+= uart_cpu_${MACHINE}.c
|
||||||
.endif
|
.endif
|
||||||
SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
|
SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
|
||||||
|
@ -66,9 +66,6 @@ static void
|
|||||||
configure(void *dummy)
|
configure(void *dummy)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef SUN4V
|
|
||||||
intr_restore_all(0x16);
|
|
||||||
#endif
|
|
||||||
root_bus_configure();
|
root_bus_configure();
|
||||||
#ifdef DEV_ISA
|
#ifdef DEV_ISA
|
||||||
/*
|
/*
|
||||||
|
@ -45,18 +45,11 @@ __FBSDID("$FreeBSD$");
|
|||||||
#ifdef SUN4U
|
#ifdef SUN4U
|
||||||
#include <machine/cache.h>
|
#include <machine/cache.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUN4V
|
|
||||||
#include <machine/mmu.h>
|
|
||||||
#endif
|
|
||||||
#include <machine/pcb.h>
|
#include <machine/pcb.h>
|
||||||
#include <machine/setjmp.h>
|
#include <machine/setjmp.h>
|
||||||
#include <machine/smp.h>
|
#include <machine/smp.h>
|
||||||
#include <machine/tlb.h>
|
#include <machine/tlb.h>
|
||||||
#include <machine/tte.h>
|
#include <machine/tte.h>
|
||||||
#ifdef SUN4V
|
|
||||||
#include <machine/trap.h>
|
|
||||||
#include <machine/tte_hash.h>
|
|
||||||
#endif
|
|
||||||
#include <machine/vmparam.h>
|
#include <machine/vmparam.h>
|
||||||
|
|
||||||
ASSYM(KERNBASE, KERNBASE);
|
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_TTES, offsetof(struct cpu_start_args, csa_ttes));
|
||||||
ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
|
ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUN4V
|
|
||||||
ASSYM(CSA_CPUID, offsetof(struct cpu_start_args, csa_cpuid));
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SUN4U
|
#ifdef SUN4U
|
||||||
@ -141,20 +131,6 @@ ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK);
|
|||||||
ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
|
ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
|
||||||
#endif
|
#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(V_INTR, offsetof(struct vmmeter, v_intr));
|
||||||
|
|
||||||
ASSYM(MAXCOMLEN, MAXCOMLEN);
|
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_CNT, offsetof(struct pcpu, pc_cnt));
|
||||||
ASSYM(PC_SIZEOF, sizeof(struct pcpu));
|
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
|
#ifdef SUN4U
|
||||||
ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
|
ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
|
||||||
ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
|
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_TYPE, offsetof(struct trapframe, tf_type));
|
||||||
ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
|
ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUN4V
|
|
||||||
ASSYM(TF_ASI, offsetof(struct trapframe, tf_asi));
|
|
||||||
#endif
|
|
||||||
ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
|
ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
|
||||||
ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
|
ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
|
||||||
ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
|
ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
|
||||||
|
@ -69,9 +69,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <vm/pmap.h>
|
#include <vm/pmap.h>
|
||||||
#include <vm/vm_extern.h>
|
#include <vm/vm_extern.h>
|
||||||
|
|
||||||
#ifndef SUN4V
|
|
||||||
#include <machine/cache.h>
|
#include <machine/cache.h>
|
||||||
#endif
|
|
||||||
#include <machine/md_var.h>
|
#include <machine/md_var.h>
|
||||||
#include <machine/pmap.h>
|
#include <machine/pmap.h>
|
||||||
#include <machine/tlb.h>
|
#include <machine/tlb.h>
|
||||||
@ -137,18 +135,14 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
|||||||
|
|
||||||
if (m != NULL) {
|
if (m != NULL) {
|
||||||
if (ova == 0) {
|
if (ova == 0) {
|
||||||
#ifndef SUN4V
|
|
||||||
if (dcache_color_ignore == 0)
|
if (dcache_color_ignore == 0)
|
||||||
colors = DCACHE_COLORS;
|
colors = DCACHE_COLORS;
|
||||||
#endif
|
|
||||||
ova = kmem_alloc_wait(kernel_map,
|
ova = kmem_alloc_wait(kernel_map,
|
||||||
PAGE_SIZE * colors);
|
PAGE_SIZE * colors);
|
||||||
}
|
}
|
||||||
#ifndef SUN4V
|
|
||||||
if (colors != 1 && m->md.color != -1)
|
if (colors != 1 && m->md.color != -1)
|
||||||
va = ova + m->md.color * PAGE_SIZE;
|
va = ova + m->md.color * PAGE_SIZE;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
va = ova;
|
va = ova;
|
||||||
pmap_qenter(va, &m, 1);
|
pmap_qenter(va, &m, 1);
|
||||||
error = uiomove((void *)(va + off), cnt,
|
error = uiomove((void *)(va + off), cnt,
|
||||||
|
@ -101,7 +101,7 @@ extern const char * volatile kdb_why;
|
|||||||
#define KDB_WHY_CAM "cam" /* CAM has entered debugger. */
|
#define KDB_WHY_CAM "cam" /* CAM has entered debugger. */
|
||||||
#define KDB_WHY_NDIS "ndis" /* NDIS entered debugger. */
|
#define KDB_WHY_NDIS "ndis" /* NDIS entered debugger. */
|
||||||
#define KDB_WHY_ACPI "acpi" /* ACPI 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_POWERFAIL "powerfail" /* Powerfail NMI. */
|
||||||
#define KDB_WHY_MAC "mac" /* MAC Framework. */
|
#define KDB_WHY_MAC "mac" /* MAC Framework. */
|
||||||
#define KDB_WHY_POWERPC "powerpc" /* Unhandled powerpc intr. */
|
#define KDB_WHY_POWERPC "powerpc" /* Unhandled powerpc intr. */
|
||||||
|
@ -9,9 +9,6 @@ PARTEDIT_ARCH= ${MACHINE}
|
|||||||
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
|
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
|
||||||
PARTEDIT_ARCH= x86
|
PARTEDIT_ARCH= x86
|
||||||
.endif
|
.endif
|
||||||
.if ${MACHINE} == "sun4v"
|
|
||||||
PARTEDIT_ARCH= sparc64
|
|
||||||
.endif
|
|
||||||
.if !exists(partedit_${PARTEDIT_ARCH}.c)
|
.if !exists(partedit_${PARTEDIT_ARCH}.c)
|
||||||
PARTEDIT_ARCH= generic
|
PARTEDIT_ARCH= generic
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user