ofwboot.elf is now ofwboot.

This commit is contained in:
eeh 1998-11-22 17:22:50 +00:00
parent 9854172140
commit 3bb71e68c6
3 changed files with 55 additions and 27 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.16 1998/09/22 02:48:44 eeh Exp $ */
/* $NetBSD: pmap.c,v 1.17 1998/11/22 17:22:50 eeh Exp $ */
/* #define NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
/* #define BOOT_DEBUG */
@ -2544,6 +2544,12 @@ pv_syncflags(pv)
int s = splimp();
int flags = pv->pv_va&PV_MASK;
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pv_syncflags: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL)
for (npv = pv; npv; npv = npv->pv_next) {
int64_t data;
@ -2563,7 +2569,7 @@ pv_syncflags(pv)
data &= ~(TLB_MODIFY|TLB_ACCESS);
ASSERT((data & TLB_NFO) == 0);
if (pseg_set(npv->pv_pmap, npv->pv_va&PV_VAMASK, data, 0)) {
printf("pmap_clear_modify: gotten pseg empty!\n");
printf("pv_syncflags: gotten pseg empty!\n");
Debugger();
/* panic? */
}
@ -2619,6 +2625,12 @@ pmap_clear_modify(pa)
changed |= 1;
#endif
pv->pv_va &= ~(PV_MOD);
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_clear_modify: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL)
for (; pv; pv = pv->pv_next) {
int64_t data;
@ -2707,6 +2719,12 @@ pmap_clear_reference(pa)
changed |= 1;
#endif
pv->pv_va &= ~(PV_REF);
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_clear_reference: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL)
for (; pv; pv = pv->pv_next) {
int64_t data;
@ -2785,6 +2803,12 @@ pmap_is_modified(pa)
pv = pa_to_pvh(pa);
#ifdef HWREF
i = (pv->pv_va&PV_MOD);
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_is_modified: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL)
for (npv = pv; i == 0 && npv && npv->pv_pmap; npv = npv->pv_next) {
int64_t data;
@ -2836,6 +2860,12 @@ pmap_is_referenced(pa)
pv = pa_to_pvh(pa);
#ifdef HWREF
i = (pv->pv_va&PV_REF);
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_is_referenced: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL)
for (npv = pv; npv; npv = npv->pv_next) {
int64_t data;
@ -2965,6 +2995,12 @@ pmap_page_protect(pa, prot)
pv = pa_to_pvh(pa);
s = splimp();
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_page_protect: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL) {
for (; pv; pv = pv->pv_next) {
#ifdef DEBUG
@ -3059,6 +3095,12 @@ pmap_page_protect(pa, prot)
pv = firstpv;
/* Then remove the primary pv */
#ifdef DEBUG
if (pv->pv_next && !pv->pv_pmap) {
printf("pmap_page_protect: npv but no pmap for pv %p\n", pv);
Debugger();
}
#endif
if (pv->pv_pmap != NULL) {
#ifdef DEBUG
if (pmapdebug & (PDB_CHANGEPROT|PDB_REF)) {

View File

@ -571,6 +571,6 @@ h# 5000 constant loader-base
\ true to boot-debug?
" /ofwboot.elf" do-boot
" /ofwboot" do-boot

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 1998/08/27 06:23:33 eeh Exp $
# $NetBSD: Makefile,v 1.6 1998/11/22 17:22:50 eeh Exp $
CURDIR= ${.CURDIR}
S= ${CURDIR}/../../../..
@ -6,23 +6,17 @@ S= ${CURDIR}/../../../..
#
# Override normal settings
#
#MACHINE=sparc64
#MACHINE_ARCH=sparc64
LD?= /usr/ccs/bin/ld
LORDER=lorder
TSORT=tsort
NM=nm
PROG= ofwboot
SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c #net.c netif_of.c
.PATH: ${S}/arch/sparc64/sparc64
#SRCS+= ofwmagic.S
.if CROSS
CFLAGS+= -DNETIF_DEBUG -D__ELF__ -nostdinc
CEXTRAFLAG= -nostdinc
.else
CFLAGS+= -DNETIF_DEBUG -D__ELF__ -D_LP64 -dp # -Wa,-Av9a #-nostdinc
CEXTRAFLAG= -D_LP64
.endif
CFLAGS+= ${COPTS} -DNETIF_DEBUG -D__ELF__ -D_STANDALONE
NOMAN=
STRIPFLAG=
@ -31,12 +25,10 @@ OBJCOPY?= objcopy
NEWVERSWHAT= "OpenFirmware Boot"
# For now...
.if CROSS
RELOC= 20000
.else
#
# Elf64 defaults to 1MB
#
RELOC= 100000
.endif
ENTRY= _start
@ -69,27 +61,21 @@ SAMISCMAKEFLAGS= SA_USE_CREAD=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
.if CROSS
${OBJS}:: machine
${OBJS}: machine
ln -s ../../include machine
.if CROSS
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
sh ${CURDIR}/../newvers.sh ${CURDIR}/version ${NEWVERSWHAT}
${COMPILE.c} vers.c
${LD} -N -p -Ttext ${RELOC} -e ${ENTRY} >lderr -o ${PROG} \
${OBJS} vers.o -L${SADST} -lsa -L${ZDST} -lz -L${KERNDST} -lkern # solaris linker
mv ${PROG} ${PROG}.elf
# ${OBJCOPY} --input-target=elf32-sparc \
# --output-target=a.out-sunos-big ${PROG}.elf ${PROG}.aout
.else
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
sh ${CURDIR}/../newvers.sh ${CURDIR}/version ${NEWVERSWHAT}
${COMPILE.c} vers.c
${LD} -X -N -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \
${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} # native linker
mv ${PROG} ${PROG}.elf
# ${OBJCOPY} --input-target=elf32-sparc \
# --output-target=a.out-sunos-big ${PROG}.elf ${PROG}.aout
.endif
.include <bsd.prog.mk>