buildworld fixes for sun4v
not sure why pmap.c is included as it is unchanged Approved by: rwatson (mentor) Reviewed by: jmg
This commit is contained in:
parent
8bcce69475
commit
a37c943bc5
@ -107,7 +107,7 @@ TARGET= ${TARGET_ARCH}
|
||||
TARGET?= ${MACHINE}
|
||||
TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
|
||||
KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 powerpc sparc64
|
||||
KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 powerpc sparc64 sparc64/sun4v
|
||||
.if ${TARGET} == ${TARGET_ARCH}
|
||||
_t= ${TARGET}
|
||||
.else
|
||||
|
@ -9,7 +9,13 @@ _open_disk= open_disk.c
|
||||
|
||||
LIB= disk
|
||||
SRCS= blocks.c ${_change} chunk.c create_chunk.c disk.c ${_open_disk} \
|
||||
rules.c write_disk.c write_${MACHINE}_disk.c
|
||||
rules.c write_disk.c
|
||||
.if ${TARGET} == "sun4v"
|
||||
SRCS+= write_sparc64_disk.c
|
||||
.else
|
||||
SRCS+= write_${MACHINE}_disk.c
|
||||
.endif
|
||||
|
||||
INCS= libdisk.h
|
||||
|
||||
WARNS?= 2
|
||||
|
@ -4,6 +4,10 @@
|
||||
LIB= kvm
|
||||
SHLIBDIR?= /lib
|
||||
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
|
||||
.if ${TARGET} == "sun4v"
|
||||
CFLAGS+=-DSUN4V
|
||||
.endif
|
||||
|
||||
SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c \
|
||||
kvm_getswapinfo.c kvm_proc.c
|
||||
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
||||
|
@ -194,7 +194,9 @@ int
|
||||
_kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
struct vmstate *vm;
|
||||
#if !defined(SUN4V)
|
||||
struct tte tte;
|
||||
#endif
|
||||
off_t tte_off, pa_off;
|
||||
u_long pg_off, vpn;
|
||||
int rest;
|
||||
@ -202,6 +204,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
pg_off = va & PAGE_MASK;
|
||||
if (va >= VM_MIN_DIRECT_ADDRESS)
|
||||
pa_off = TLB_DIRECT_TO_PHYS(va) & ~PAGE_MASK;
|
||||
#if !defined(SUN4V)
|
||||
else {
|
||||
vpn = btop(va);
|
||||
tte_off = kd->vmst->vm_tsb_off +
|
||||
@ -212,6 +215,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
goto invalid;
|
||||
pa_off = TTE_GET_PA(&tte);
|
||||
}
|
||||
#endif
|
||||
rest = PAGE_SIZE - pg_off;
|
||||
pa_off = _kvm_find_off(kd->vmst, pa_off, rest);
|
||||
if (pa_off == KVM_OFF_NOTFOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user