Yet more prototyping and -Wall fixes.
This commit is contained in:
parent
7a8c8f8a5c
commit
b3fadef7e0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atari_init.c,v 1.12 1996/04/12 09:05:14 leo Exp $ */
|
||||
/* $NetBSD: atari_init.c,v 1.13 1996/04/18 08:51:11 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -133,7 +133,7 @@ u_int stphysize; /* Size of ST-ram */
|
||||
char *esym_addr; /* Address of kernel '_esym' symbol */
|
||||
{
|
||||
extern char end[];
|
||||
extern void etext();
|
||||
extern void etext __P((void));
|
||||
extern u_long protorp[2];
|
||||
u_int pstart; /* Next available physical address*/
|
||||
u_int vstart; /* Next available virtual address */
|
||||
@ -495,7 +495,7 @@ char *esym_addr; /* Address of kernel '_esym' symbol */
|
||||
MFP->mf_imra = MFP->mf_imrb = 0;
|
||||
MFP->mf_aer = MFP->mf_ddr = 0;
|
||||
MFP->mf_vr = 0x40;
|
||||
if(!badbaddr(&MFP2->mf_gpip)) {
|
||||
if(!badbaddr((caddr_t)&MFP2->mf_gpip)) {
|
||||
machineid |= ATARI_TT;
|
||||
MFP2->mf_iera = MFP2->mf_ierb = 0;
|
||||
MFP2->mf_imra = MFP2->mf_imrb = 0;
|
||||
@ -542,9 +542,9 @@ cpu_dumpsize()
|
||||
* XXX: Assumes that it will all fit in one diskblock.
|
||||
*/
|
||||
int
|
||||
cpu_dump(dump, blkno)
|
||||
cpu_dump(dump, p_blkno)
|
||||
int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));
|
||||
daddr_t *blkno;
|
||||
daddr_t *p_blkno;
|
||||
{
|
||||
int buf[dbtob(1)/sizeof(int)];
|
||||
int error;
|
||||
@ -564,8 +564,8 @@ daddr_t *blkno;
|
||||
* Add the md header
|
||||
*/
|
||||
*chdr_p = cpu_kcore_hdr;
|
||||
error = dump(dumpdev, *blkno, (caddr_t)buf, dbtob(1));
|
||||
*blkno += 1;
|
||||
error = dump(dumpdev, *p_blkno, (caddr_t)buf, dbtob(1));
|
||||
*p_blkno += 1;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: autoconf.c,v 1.8 1996/04/04 06:25:15 cgd Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.9 1996/04/18 08:51:13 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -40,7 +40,6 @@
|
||||
#include <machine/cpu.h>
|
||||
#include <atari/atari/device.h>
|
||||
|
||||
void configure __P((void));
|
||||
static void setroot __P((void));
|
||||
void swapconf __P((void));
|
||||
void mbattach __P((struct device *, struct device *, void *));
|
||||
@ -168,11 +167,11 @@ swapconf()
|
||||
dev_t bootdev = 0;
|
||||
|
||||
static char devname[][2] = {
|
||||
0,0,
|
||||
0,0,
|
||||
'f','d', /* 2 = fd */
|
||||
0,0,
|
||||
's','d', /* 4 = sd -- SCSI system */
|
||||
{ '\0', '\0' },
|
||||
{ '\0', '\0' },
|
||||
{ 'f' , 'd' }, /* 2 = fd */
|
||||
{ '\0', '\0' },
|
||||
{ 's' , 'd' }, /* 4 = sd -- SCSI system */
|
||||
};
|
||||
|
||||
static void
|
||||
@ -219,7 +218,7 @@ setroot()
|
||||
* If dumpdev was the same as the old primary swap
|
||||
* device, move it to the new primary swap device.
|
||||
*/
|
||||
if (temp == dumpdev)
|
||||
if (swp->sw_dev == dumpdev)
|
||||
dumpdev = swdevt[0].sw_dev;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.21 1996/03/27 10:16:04 leo Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.22 1996/04/18 08:51:15 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -81,6 +81,7 @@
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <kern/kern_extern.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/reg.h>
|
||||
#include <machine/psl.h>
|
||||
@ -88,12 +89,14 @@
|
||||
#include <machine/iomap.h>
|
||||
#include <dev/cons.h>
|
||||
|
||||
#include "ether.h"
|
||||
#include "ppp.h"
|
||||
|
||||
static void bootsync __P((void));
|
||||
static void call_sicallbacks __P((void));
|
||||
static void dumpmem __P((int *, int, int));
|
||||
static char *hexstr __P((int, int));
|
||||
static void identifycpu __P((void));
|
||||
static void netintr __P((void));
|
||||
void straymfpint __P((int, u_short));
|
||||
void straytrap __P((int, u_short));
|
||||
|
||||
extern vm_offset_t avail_end;
|
||||
|
||||
@ -331,7 +334,7 @@ again:
|
||||
#ifdef DEBUG
|
||||
pmapdebug = opmapdebug;
|
||||
#endif
|
||||
printf("avail mem = %d (%d pages)\n", ptoa(cnt.v_free_count),
|
||||
printf("avail mem = %ld (%ld pages)\n", ptoa(cnt.v_free_count),
|
||||
ptoa(cnt.v_free_count)/NBPG);
|
||||
printf("using %d buffers containing %d bytes of memory\n",
|
||||
nbuf, bufpages * CLBYTES);
|
||||
@ -381,9 +384,7 @@ extern char version[];
|
||||
static void
|
||||
identifycpu()
|
||||
{
|
||||
extern char *fpu_describe();
|
||||
extern int fpu_probe();
|
||||
char *mach, *mmu, *fpu, *cpu;
|
||||
char *mach, *mmu, *fpu, *cpu;
|
||||
|
||||
if (machineid & ATARI_TT)
|
||||
mach = "Atari TT";
|
||||
@ -755,7 +756,7 @@ sys_sigreturn(p, v, retval)
|
||||
|
||||
static int waittime = -1;
|
||||
|
||||
void
|
||||
static void
|
||||
bootsync(void)
|
||||
{
|
||||
if (waittime < 0) {
|
||||
@ -777,7 +778,7 @@ boot(howto)
|
||||
{
|
||||
/* take a snap shot before clobbering any registers */
|
||||
if (curproc)
|
||||
savectx(curproc->p_addr);
|
||||
savectx(&curproc->p_addr->u_pcb);
|
||||
|
||||
boothowto = howto;
|
||||
if((howto & RB_NOSYNC) == 0)
|
||||
@ -852,6 +853,7 @@ dumpconf()
|
||||
* getting on the dump stack, either when called above, or by
|
||||
* the auto-restart code.
|
||||
*/
|
||||
void
|
||||
dumpsys()
|
||||
{
|
||||
extern u_long boot_ttphysize, boot_ttphystart, boot_stphysize;
|
||||
@ -875,7 +877,7 @@ dumpsys()
|
||||
dumpconf();
|
||||
if (dumplo < 0)
|
||||
return;
|
||||
printf("\ndumping to dev %x, offset %d\n", dumpdev, dumplo);
|
||||
printf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo);
|
||||
|
||||
#if defined(DDB) || defined(PANICWAIT)
|
||||
printf("Do you want to dump memory? [y]");
|
||||
@ -883,7 +885,7 @@ dumpsys()
|
||||
switch (i) {
|
||||
case 'n':
|
||||
case 'N':
|
||||
return(0);
|
||||
return;
|
||||
case '\n':
|
||||
break;
|
||||
default :
|
||||
@ -1064,6 +1066,28 @@ badbaddr(addr)
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Network interrupt handling
|
||||
*/
|
||||
#include "ether.h"
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef NPPP
|
||||
void pppintr __P((void));
|
||||
#endif
|
||||
#ifdef INET
|
||||
void ipintr __P((void));
|
||||
#endif
|
||||
#if NETHER > 0
|
||||
void arpintr __P((void));
|
||||
#endif
|
||||
#ifdef NS
|
||||
void nsintr __P((void));
|
||||
#endif
|
||||
#ifdef ISO
|
||||
void clnlintr __P((void));
|
||||
#endif
|
||||
|
||||
static void
|
||||
netintr()
|
||||
{
|
||||
@ -1118,7 +1142,6 @@ struct si_callback {
|
||||
static struct si_callback *si_callbacks;
|
||||
static struct si_callback *si_free;
|
||||
#ifdef DIAGNOSTIC
|
||||
static int ncb; /* number of callback blocks allocated */
|
||||
static int ncbd; /* number of callback blocks dynamically allocated */
|
||||
#endif
|
||||
|
||||
@ -1199,7 +1222,7 @@ static void call_sicallbacks()
|
||||
|
||||
do {
|
||||
s = splhigh ();
|
||||
if (si = si_callbacks)
|
||||
if ((si = si_callbacks) != NULL)
|
||||
si_callbacks = si->next;
|
||||
splx(s);
|
||||
|
||||
@ -1219,8 +1242,7 @@ static void call_sicallbacks()
|
||||
#ifdef DIAGNOSTIC
|
||||
if (ncbd) {
|
||||
#ifdef DEBUG
|
||||
printf("call_sicallback: %d more dynamic structures %d total\n",
|
||||
ncbd, ncb);
|
||||
printf("call_sicallback: %d more dynamic structures\n", ncbd);
|
||||
#endif
|
||||
ncbd = 0;
|
||||
}
|
||||
@ -1250,7 +1272,6 @@ regdump(fp, sbytes)
|
||||
static int doingdump = 0;
|
||||
register int i;
|
||||
int s;
|
||||
extern char *hexstr();
|
||||
|
||||
if (doingdump)
|
||||
return;
|
||||
@ -1285,12 +1306,12 @@ regdump(fp, sbytes)
|
||||
|
||||
#define KSADDR ((int *)((u_int)curproc->p_addr + USPACE - NBPG))
|
||||
|
||||
static void
|
||||
dumpmem(ptr, sz, ustack)
|
||||
register int *ptr;
|
||||
int sz, ustack;
|
||||
{
|
||||
register int i, val;
|
||||
extern char *hexstr();
|
||||
|
||||
for (i = 0; i < sz; i++) {
|
||||
if ((i & 7) == 0)
|
||||
@ -1311,7 +1332,7 @@ dumpmem(ptr, sz, ustack)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
char *
|
||||
static char *
|
||||
hexstr(val, len)
|
||||
register int val, len;
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.9 1996/02/22 10:10:56 leo Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.10 1996/04/18 08:51:17 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991 Regents of the University of California.
|
||||
@ -226,11 +226,12 @@ static vm_offset_t avail_next;
|
||||
static vm_size_t avail_remaining;
|
||||
#endif
|
||||
|
||||
boolean_t pmap_testbit __P((vm_offset_t, int));
|
||||
void pmap_enter_ptpage __P((pmap_t, vm_offset_t));
|
||||
extern vm_offset_t reserve_dumppages __P((vm_offset_t));
|
||||
void pmap_activate __P((pmap_t, struct pcb *));
|
||||
static boolean_t pmap_testbit __P((vm_offset_t, int));
|
||||
static void pmap_enter_ptpage __P((pmap_t, vm_offset_t));
|
||||
static void pmap_changebit __P((vm_offset_t, int, boolean_t));
|
||||
static void atari_protection_init __P((void));
|
||||
static int pmap_isvalidphys __P((vm_offset_t));
|
||||
|
||||
#ifdef MACHINE_NONCONTIG
|
||||
#define pmap_valid_page(pa) (pmap_initialized && pmap_isvalidphys(pa))
|
||||
@ -320,10 +321,10 @@ vm_offset_t kernel_size;
|
||||
va = virtual_avail;
|
||||
pte = pmap_pte(pmap_kernel(), va);
|
||||
|
||||
SYSMAP(caddr_t ,CMAP1 ,CADDR1 ,1 )
|
||||
SYSMAP(caddr_t ,CMAP2 ,CADDR2 ,1 )
|
||||
SYSMAP(caddr_t ,vmpte ,vmmap ,1 )
|
||||
SYSMAP(struct msgbuf * ,msgbufmap ,msgbufp ,1 )
|
||||
SYSMAP(caddr_t ,CMAP1 ,CADDR1 ,1 )
|
||||
SYSMAP(caddr_t ,CMAP2 ,CADDR2 ,1 )
|
||||
SYSMAP(caddr_t ,vmpte ,vmmap ,1 )
|
||||
SYSMAP(struct msgbuf * ,msgbufmap ,msgbufp ,1 )
|
||||
|
||||
virtual_avail = reserve_dumppages(va);
|
||||
}
|
||||
@ -537,7 +538,7 @@ pmap_init(phys_start, phys_end)
|
||||
}
|
||||
|
||||
#ifdef MACHINE_NONCONTIG
|
||||
unsigned int
|
||||
u_int
|
||||
pmap_free_pages()
|
||||
{
|
||||
|
||||
@ -671,7 +672,7 @@ pmap_create(size)
|
||||
*/
|
||||
void
|
||||
pmap_pinit(pmap)
|
||||
register struct pmap *pmap;
|
||||
register pmap_t pmap;
|
||||
{
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -728,7 +729,7 @@ pmap_destroy(pmap)
|
||||
*/
|
||||
void
|
||||
pmap_release(pmap)
|
||||
register struct pmap *pmap;
|
||||
register pmap_t pmap;
|
||||
{
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -806,125 +807,125 @@ pmap_remove(pmap, sva, eva)
|
||||
remove_stats.calls++;
|
||||
#endif
|
||||
for (va = sva; va < eva; va += PAGE_SIZE) {
|
||||
/*
|
||||
* Weed out invalid mappings.
|
||||
* Note: we assume that the segment table is always allocated.
|
||||
*/
|
||||
if (!pmap_ste_v(pmap_ste(pmap, va))) {
|
||||
/* XXX: avoid address wrap around */
|
||||
if (va >= atari_trunc_seg((vm_offset_t)-1))
|
||||
break;
|
||||
va = atari_round_seg(va + PAGE_SIZE) - PAGE_SIZE;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
* Weed out invalid mappings.
|
||||
* Note: we assume that the segment table is always allocated.
|
||||
*/
|
||||
if (!pmap_ste_v(pmap_ste(pmap, va))) {
|
||||
/* XXX: avoid address wrap around */
|
||||
if (va >= atari_trunc_seg((vm_offset_t)-1))
|
||||
break;
|
||||
va = atari_round_seg(va + PAGE_SIZE) - PAGE_SIZE;
|
||||
continue;
|
||||
}
|
||||
pte = pmap_pte(pmap, va);
|
||||
pa = pmap_pte_pa(pte);
|
||||
if (pa == 0)
|
||||
continue;
|
||||
#ifdef DEBUG
|
||||
opte = *pte;
|
||||
remove_stats.removes++;
|
||||
#endif
|
||||
/*
|
||||
* Update statistics
|
||||
*/
|
||||
if (pmap_pte_w(pte))
|
||||
pmap->pm_stats.wired_count--;
|
||||
pmap->pm_stats.resident_count--;
|
||||
|
||||
/*
|
||||
* Invalidate the PTEs.
|
||||
* XXX: should cluster them up and invalidate as many
|
||||
* as possible at once.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_REMOVE)
|
||||
printf("remove: invalidating %x\n", pte);
|
||||
#endif
|
||||
bits = *(int *)pte & (PG_U|PG_M);
|
||||
*(int *)pte = PG_NV;
|
||||
if (active_pmap(pmap))
|
||||
TBIS(va);
|
||||
|
||||
/*
|
||||
* For user mappings decrement the wiring count on
|
||||
* the PT page. We do this after the PTE has been
|
||||
* invalidated because vm_map_pageable winds up in
|
||||
* pmap_pageable which clears the modify bit for the
|
||||
* PT page.
|
||||
*/
|
||||
if (pmap != pmap_kernel()) {
|
||||
pte = pmap_pte(pmap, va);
|
||||
pa = pmap_pte_pa(pte);
|
||||
if (pa == 0)
|
||||
continue;
|
||||
#ifdef DEBUG
|
||||
opte = *pte;
|
||||
remove_stats.removes++;
|
||||
#endif
|
||||
/*
|
||||
* Update statistics
|
||||
*/
|
||||
if (pmap_pte_w(pte))
|
||||
pmap->pm_stats.wired_count--;
|
||||
pmap->pm_stats.resident_count--;
|
||||
|
||||
/*
|
||||
* Invalidate the PTEs.
|
||||
* XXX: should cluster them up and invalidate as many
|
||||
* as possible at once.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_REMOVE)
|
||||
printf("remove: invalidating %x\n", pte);
|
||||
#endif
|
||||
bits = *(int *)pte & (PG_U|PG_M);
|
||||
*(int *)pte = PG_NV;
|
||||
if (active_pmap(pmap))
|
||||
TBIS(va);
|
||||
|
||||
/*
|
||||
* For user mappings decrement the wiring count on
|
||||
* the PT page. We do this after the PTE has been
|
||||
* invalidated because vm_map_pageable winds up in
|
||||
* pmap_pageable which clears the modify bit for the
|
||||
* PT page.
|
||||
*/
|
||||
if (pmap != pmap_kernel()) {
|
||||
pte = pmap_pte(pmap, va);
|
||||
vm_map_pageable(pt_map, trunc_page(pte),
|
||||
vm_map_pageable(pt_map, trunc_page(pte),
|
||||
round_page(pte+1), TRUE);
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_WIRING)
|
||||
pmap_check_wiring("remove", trunc_page(pte));
|
||||
if (pmapdebug & PDB_WIRING)
|
||||
pmap_check_wiring("remove", trunc_page(pte));
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
* Remove from the PV table (raise IPL since we
|
||||
* may be called at interrupt time).
|
||||
*/
|
||||
if (!pmap_valid_page(pa))
|
||||
continue;
|
||||
pv = pa_to_pvh(pa);
|
||||
ste = (int *)0;
|
||||
s = splimp();
|
||||
/*
|
||||
* If it is the first entry on the list, it is actually
|
||||
* in the header and we must copy the following entry up
|
||||
* to the header. Otherwise we must search the list for
|
||||
* the entry. In either case we free the now unused entry.
|
||||
*/
|
||||
if (pmap == pv->pv_pmap && va == pv->pv_va) {
|
||||
ste = (int *)pv->pv_ptste;
|
||||
ptpmap = pv->pv_ptpmap;
|
||||
npv = pv->pv_next;
|
||||
if (npv) {
|
||||
*pv = *npv;
|
||||
free((caddr_t)npv, M_VMPVENT);
|
||||
} else
|
||||
pv->pv_pmap = NULL;
|
||||
#ifdef DEBUG
|
||||
remove_stats.pvfirst++;
|
||||
#endif
|
||||
} else {
|
||||
for (npv = pv->pv_next; npv; npv = npv->pv_next) {
|
||||
#ifdef DEBUG
|
||||
remove_stats.pvsearch++;
|
||||
#endif
|
||||
if (pmap == npv->pv_pmap && va == npv->pv_va)
|
||||
break;
|
||||
pv = npv;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (npv == NULL) {
|
||||
printf ("pmap_remove: PA %08x index %d\n", pa, pa_index(pa));
|
||||
panic("pmap_remove: PA not in pv_tab");
|
||||
}
|
||||
#endif
|
||||
ste = (int *)npv->pv_ptste;
|
||||
ptpmap = npv->pv_ptpmap;
|
||||
pv->pv_next = npv->pv_next;
|
||||
}
|
||||
/*
|
||||
* Remove from the PV table (raise IPL since we
|
||||
* may be called at interrupt time).
|
||||
*/
|
||||
if (!pmap_valid_page(pa))
|
||||
continue;
|
||||
pv = pa_to_pvh(pa);
|
||||
ste = (int *)0;
|
||||
s = splimp();
|
||||
/*
|
||||
* If it is the first entry on the list, it is actually
|
||||
* in the header and we must copy the following entry up
|
||||
* to the header. Otherwise we must search the list for
|
||||
* the entry. In either case we free the now unused entry.
|
||||
*/
|
||||
if (pmap == pv->pv_pmap && va == pv->pv_va) {
|
||||
ste = (int *)pv->pv_ptste;
|
||||
ptpmap = pv->pv_ptpmap;
|
||||
npv = pv->pv_next;
|
||||
if (npv) {
|
||||
*pv = *npv;
|
||||
free((caddr_t)npv, M_VMPVENT);
|
||||
pv = pa_to_pvh(pa);
|
||||
}
|
||||
/*
|
||||
* If this was a PT page we must also remove the
|
||||
* mapping from the associated segment table.
|
||||
*/
|
||||
if (ste) {
|
||||
} else
|
||||
pv->pv_pmap = NULL;
|
||||
#ifdef DEBUG
|
||||
remove_stats.ptinvalid++;
|
||||
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE)) {
|
||||
printf("remove: ste was %x@%x pte was %x@%x\n",
|
||||
remove_stats.pvfirst++;
|
||||
#endif
|
||||
} else {
|
||||
for (npv = pv->pv_next; npv; npv = npv->pv_next) {
|
||||
#ifdef DEBUG
|
||||
remove_stats.pvsearch++;
|
||||
#endif
|
||||
if (pmap == npv->pv_pmap && va == npv->pv_va)
|
||||
break;
|
||||
pv = npv;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (npv == NULL) {
|
||||
printf ("pmap_remove: PA %08x index %d\n", pa, pa_index(pa));
|
||||
panic("pmap_remove: PA not in pv_tab");
|
||||
}
|
||||
#endif
|
||||
ste = (int *)npv->pv_ptste;
|
||||
ptpmap = npv->pv_ptpmap;
|
||||
pv->pv_next = npv->pv_next;
|
||||
free((caddr_t)npv, M_VMPVENT);
|
||||
pv = pa_to_pvh(pa);
|
||||
}
|
||||
/*
|
||||
* If this was a PT page we must also remove the
|
||||
* mapping from the associated segment table.
|
||||
*/
|
||||
if (ste) {
|
||||
#ifdef DEBUG
|
||||
remove_stats.ptinvalid++;
|
||||
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE)) {
|
||||
printf("remove: ste was %x@%x pte was %x@%x\n",
|
||||
*ste, ste,
|
||||
*(int *)&opte, pmap_pte(pmap, va));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef M68040
|
||||
if (cpu040) {
|
||||
if (cpu040) {
|
||||
/*
|
||||
* On the 68040, the PT page contains 64 page tables,
|
||||
* so we need to remove all the associated segment
|
||||
@ -933,24 +934,23 @@ printf ("pmap_remove: PA %08x index %d\n", pa, pa_index(pa));
|
||||
* being removed, the whole page should not be
|
||||
* removed.)
|
||||
*/
|
||||
for (i = 0; i < 64; ++i)
|
||||
*ste++ = SG_NV;
|
||||
ste -= 64;
|
||||
for (i = 0; i < 64; ++i)
|
||||
*ste++ = SG_NV;
|
||||
ste -= 64;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug &(PDB_REMOVE|PDB_SEGTAB|0x10000))
|
||||
printf("pmap_remove:PT at %x remved\n",
|
||||
va);
|
||||
if (pmapdebug &(PDB_REMOVE|PDB_SEGTAB|0x10000))
|
||||
printf("pmap_remove:PT at %x remved\n", va);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
#endif /* M68040 */
|
||||
*ste = SG_NV;
|
||||
/*
|
||||
* If it was a user PT page, we decrement the
|
||||
* reference count on the segment table as well,
|
||||
* freeing it if it is now empty.
|
||||
*/
|
||||
if (ptpmap != pmap_kernel()) {
|
||||
*ste = SG_NV;
|
||||
/*
|
||||
* If it was a user PT page, we decrement the
|
||||
* reference count on the segment table as well,
|
||||
* freeing it if it is now empty.
|
||||
*/
|
||||
if (ptpmap != pmap_kernel()) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_REMOVE|PDB_SEGTAB))
|
||||
printf("remove: stab %x, refcnt %d\n",
|
||||
@ -960,51 +960,52 @@ printf ("pmap_remove: PA %08x index %d\n", pa, pa_index(pa));
|
||||
ptpmap->pm_stab != (u_int *)trunc_page(ste))
|
||||
panic("remove: bogus ste");
|
||||
#endif
|
||||
if (--(ptpmap->pm_sref) == 0) {
|
||||
if (--(ptpmap->pm_sref) == 0) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
|
||||
printf("remove: free stab %x\n",
|
||||
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
|
||||
printf("remove: free stab %x\n",
|
||||
ptpmap->pm_stab);
|
||||
#endif
|
||||
#ifdef M68040
|
||||
if (cpu040) {
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_rtab,
|
||||
ATARI_040RTSIZE);
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_stab,
|
||||
ATARI_040STSIZE*128);
|
||||
ptpmap->pm_rtab = Segtabzero;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_stab,
|
||||
ATARI_STSIZE);
|
||||
ptpmap->pm_stab = Segtabzero;
|
||||
ptpmap->pm_stchanged = TRUE;
|
||||
/*
|
||||
* XXX may have changed segment table
|
||||
* pointer for current process so
|
||||
* update now to reload hardware.
|
||||
*/
|
||||
if (ptpmap == curproc->p_vmspace->vm_map.pmap)
|
||||
PMAP_ACTIVATE(ptpmap,
|
||||
(struct pcb *)curproc->p_addr, 1);
|
||||
if (cpu040) {
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_rtab,
|
||||
ATARI_040RTSIZE);
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_stab,
|
||||
ATARI_040STSIZE*128);
|
||||
ptpmap->pm_rtab = Segtabzero;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
kmem_free(kernel_map,
|
||||
(vm_offset_t)ptpmap->pm_stab,
|
||||
ATARI_STSIZE);
|
||||
ptpmap->pm_stab = Segtabzero;
|
||||
ptpmap->pm_stchanged = TRUE;
|
||||
/*
|
||||
* XXX may have changed segment table
|
||||
* pointer for current process so
|
||||
* update now to reload hardware.
|
||||
*/
|
||||
if ((ptpmap == curproc->p_vmspace->vm_map.pmap))
|
||||
PMAP_ACTIVATE(ptpmap,
|
||||
(struct pcb *)curproc->p_addr,
|
||||
1);
|
||||
}
|
||||
if (ptpmap == pmap_kernel())
|
||||
}
|
||||
if (ptpmap == pmap_kernel())
|
||||
TBIAS();
|
||||
else
|
||||
else
|
||||
TBIAU();
|
||||
pv->pv_flags &= ~PV_PTPAGE;
|
||||
ptpmap->pm_ptpages--;
|
||||
}
|
||||
/*
|
||||
* Update saved attributes for managed page
|
||||
*/
|
||||
pmap_attributes[pa_index(pa)] |= bits;
|
||||
splx(s);
|
||||
pv->pv_flags &= ~PV_PTPAGE;
|
||||
ptpmap->pm_ptpages--;
|
||||
}
|
||||
/*
|
||||
* Update saved attributes for managed page
|
||||
*/
|
||||
pmap_attributes[pa_index(pa)] |= bits;
|
||||
splx(s);
|
||||
}
|
||||
if (flushcache) {
|
||||
if (pmap == pmap_kernel()) {
|
||||
@ -1560,7 +1561,7 @@ pmap_collect(pmap)
|
||||
do {
|
||||
if (pv->pv_ptste && pv->pv_ptpmap == pmap_kernel())
|
||||
break;
|
||||
} while (pv = pv->pv_next);
|
||||
} while ((pv = pv->pv_next) != NULL);
|
||||
if (pv == NULL)
|
||||
continue;
|
||||
#ifdef DEBUG
|
||||
@ -1865,8 +1866,7 @@ atari_protection_init()
|
||||
}
|
||||
}
|
||||
|
||||
/* static */
|
||||
boolean_t
|
||||
static boolean_t
|
||||
pmap_testbit(pa, bit)
|
||||
register vm_offset_t pa;
|
||||
int bit;
|
||||
@ -1981,8 +1981,7 @@ pmap_changebit(pa, bit, setem)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
/* static */
|
||||
void
|
||||
static void
|
||||
pmap_enter_ptpage(pmap, va)
|
||||
register pmap_t pmap;
|
||||
register vm_offset_t va;
|
||||
@ -2136,7 +2135,7 @@ pmap_enter_ptpage(pmap, va)
|
||||
do {
|
||||
if (pv->pv_pmap == pmap_kernel() && pv->pv_va == va)
|
||||
break;
|
||||
} while (pv = pv->pv_next);
|
||||
} while ((pv = pv->pv_next) != NULL);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (pv == NULL)
|
||||
@ -2188,7 +2187,7 @@ pmap_enter_ptpage(pmap, va)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pmap_isvalidphys(pa)
|
||||
vm_offset_t pa;
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.12 1996/02/22 10:11:00 leo Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.13 1996/04/18 08:51:20 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -71,6 +71,17 @@
|
||||
extern struct emul emul_sunos;
|
||||
#endif
|
||||
|
||||
void syscall __P((register_t, struct frame));
|
||||
void trap __P((int, u_int, u_int, struct frame));
|
||||
|
||||
static void panictrap __P((int, u_int, u_int, struct frame *));
|
||||
static void trapmmufault __P((int, u_int, u_int, struct frame *,
|
||||
struct proc *, u_quad_t));
|
||||
static void trapcpfault __P((struct proc *, struct frame *));
|
||||
static void userret __P((struct proc *, int, u_quad_t));
|
||||
static void _wb_fault __P((void));
|
||||
static int _write_back __P((u_int, u_int, u_int, u_int, vm_map_t));
|
||||
|
||||
/*
|
||||
* XXX Hack until I can figure out what to do about this code's removal
|
||||
* from m68k/include/frame.h
|
||||
@ -212,7 +223,7 @@ userret(p, pc, oticks)
|
||||
curpriority = p->p_priority;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
panictrap(type, code, v, fp)
|
||||
int type;
|
||||
u_int code, v;
|
||||
@ -234,7 +245,7 @@ panictrap(type, code, v, fp)
|
||||
/*
|
||||
* return to fault handler
|
||||
*/
|
||||
void
|
||||
static void
|
||||
trapcpfault(p, fp)
|
||||
struct proc *p;
|
||||
struct frame *fp;
|
||||
@ -250,7 +261,7 @@ trapcpfault(p, fp)
|
||||
fp->f_pc = (int) p->p_addr->u_pcb.pcb_onfault;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
trapmmufault(type, code, v, fp, p, sticks)
|
||||
int type;
|
||||
u_int code, v;
|
||||
@ -434,7 +445,7 @@ nogo:
|
||||
trapcpfault(p, fp);
|
||||
return;
|
||||
}
|
||||
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
|
||||
printf("vm_fault(%p, %lx, %x, 0) -> %x\n",
|
||||
map, va, ftype, rv);
|
||||
printf(" type %x, code [mmu,,ssw]: %x\n",
|
||||
type, code);
|
||||
@ -865,7 +876,7 @@ child_return(p, frame)
|
||||
/*
|
||||
* Process a pending write back
|
||||
*/
|
||||
int
|
||||
static int
|
||||
_write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
|
||||
u_int wb; /* writeback type: 1, 2, or 3 */
|
||||
u_int wb_sts; /* writeback status information */
|
||||
@ -876,7 +887,6 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
|
||||
u_int wb_extra_page = 0;
|
||||
u_int mmusr;
|
||||
int wb_rc;
|
||||
void _wb_fault (); /* fault handler for write back */
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mmudebug)
|
||||
@ -998,7 +1008,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
|
||||
/*
|
||||
* fault handler for write back
|
||||
*/
|
||||
void
|
||||
static void
|
||||
_wb_fault()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.6 1996/02/22 10:11:01 leo Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.7 1996/04/18 08:51:23 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -49,15 +49,17 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/core.h>
|
||||
#include <sys/cpu.h>
|
||||
#include <sys/exec_aout.h>
|
||||
#include <m68k/reg.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <kern/kern_extern.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <sys/user.h>
|
||||
#include <vm/vm_kern.h>
|
||||
#include <machine/pte.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
/*
|
||||
* Finish a fork operation, with process p2 nearly set up.
|
||||
@ -75,11 +77,12 @@ cpu_fork(p1, p2)
|
||||
register struct pcb *pcb = &p2->p_addr->u_pcb;
|
||||
register struct trapframe *tf;
|
||||
register struct switchframe *sf;
|
||||
extern void proc_trampoline(), child_return();
|
||||
extern struct pcb *curpcb;
|
||||
|
||||
p2->p_md.md_flags = p1->p_md.md_flags;
|
||||
|
||||
/* Copy pcb from proc p1 to p2. */
|
||||
/* Sync curpcb (which is presumably p1's PCB) and copy it to p2. */
|
||||
savectx(curpcb);
|
||||
*pcb = p1->p_addr->u_pcb;
|
||||
|
||||
PMAP_ACTIVATE(&p2->p_vmspace->vm_pmap, pcb, 0);
|
||||
@ -110,17 +113,16 @@ cpu_fork(p1, p2)
|
||||
*/
|
||||
void
|
||||
cpu_set_kpc(p, pc)
|
||||
struct proc *p;
|
||||
u_int32_t pc;
|
||||
struct proc *p;
|
||||
void (*pc)(struct proc *);
|
||||
{
|
||||
struct pcb *pcbp;
|
||||
struct switchframe *sf;
|
||||
extern void proc_trampoline(), child_return();
|
||||
|
||||
pcbp = &p->p_addr->u_pcb;
|
||||
sf = (struct switchframe *)pcbp->pcb_regs[11];
|
||||
sf->sf_pc = (u_int)proc_trampoline;
|
||||
pcbp->pcb_regs[6] = pc; /* A2 */
|
||||
pcbp->pcb_regs[6] = (int)pc; /* A2 */
|
||||
pcbp->pcb_regs[7] = (int)p; /* A3 */
|
||||
}
|
||||
|
||||
@ -150,8 +152,8 @@ cpu_exit(p)
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
register caddr_t from, to;
|
||||
int size;
|
||||
register caddr_t from, to;
|
||||
size_t size;
|
||||
{
|
||||
register vm_offset_t pa;
|
||||
|
||||
@ -182,6 +184,7 @@ pagemove(from, to, size)
|
||||
* kernel VA space at `vaddr'. Read/write and cache-inhibit status
|
||||
* are specified by `prot'.
|
||||
*/
|
||||
void
|
||||
physaccess(vaddr, paddr, size, prot)
|
||||
caddr_t vaddr, paddr;
|
||||
register int size, prot;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atari5380.c,v 1.11 1996/04/12 09:05:31 leo Exp $ */
|
||||
/* $NetBSD: atari5380.c,v 1.12 1996/04/18 08:51:50 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -880,7 +880,7 @@ machine_match(struct device *pdp, void *match, void *auxp,
|
||||
static u_char *
|
||||
alloc_bounceb(u_long len)
|
||||
{
|
||||
u_long tmp;
|
||||
void *tmp;
|
||||
|
||||
return((u_char *)alloc_stmem(len, &tmp));
|
||||
}
|
||||
@ -900,7 +900,8 @@ scsi_ctrl(int sr)
|
||||
if (GET_5380_REG(NCR5380_DMSTAT) & SC_IRQ_SET) {
|
||||
scsi_idisable();
|
||||
if (!BASEPRI(sr))
|
||||
add_sicallback(ncr_ctrl_intr, cur_softc, 0);
|
||||
add_sicallback((si_farg)ncr_ctrl_intr,
|
||||
(void *)cur_softc, 0);
|
||||
else {
|
||||
spl1();
|
||||
ncr_ctrl_intr(cur_softc);
|
||||
@ -919,7 +920,8 @@ scsi_dma(int sr)
|
||||
if ((reqp = connected) && (reqp->dr_flag & DRIVER_IN_DMA)) {
|
||||
scsi_idisable();
|
||||
if (!BASEPRI(sr))
|
||||
add_sicallback(ncr_dma_intr, cur_softc, 0);
|
||||
add_sicallback((si_farg)ncr_dma_intr,
|
||||
(void *)cur_softc, 0);
|
||||
else {
|
||||
spl1();
|
||||
ncr_dma_intr(cur_softc);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.19 1996/04/12 09:05:35 leo Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.20 1996/04/18 08:51:52 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -68,6 +68,7 @@
|
||||
#include <machine/mfp.h>
|
||||
#include <machine/dma.h>
|
||||
#include <machine/video.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <atari/dev/ym2149reg.h>
|
||||
#include <atari/dev/fdreg.h>
|
||||
|
||||
@ -740,7 +741,7 @@ int drive, head, dense;
|
||||
}
|
||||
if(i != selected) {
|
||||
selected = i;
|
||||
ym2149_fd_select(i ^ PA_FDSEL);
|
||||
ym2149_fd_select((i ^ PA_FDSEL));
|
||||
}
|
||||
return(spinning);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf.c,v 1.9 1996/03/20 08:17:48 leo Exp $ */
|
||||
/* $NetBSD: grf.c,v 1.10 1996/04/18 08:51:54 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -82,11 +82,11 @@
|
||||
#define ite_reinit(d)
|
||||
#endif
|
||||
|
||||
int grfopen __P((dev_t, int, int, struct proc *));
|
||||
int grfclose __P((dev_t, int));
|
||||
int grfioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
|
||||
int grfselect __P((dev_t, int));
|
||||
int grfmmap __P((dev_t, int, int));
|
||||
dev_type_open(grfopen);
|
||||
dev_type_close(grfclose);
|
||||
dev_type_ioctl(grfioctl);
|
||||
dev_type_select(grfselect);
|
||||
dev_type_mmap(grfmmap);
|
||||
|
||||
int grfon __P((dev_t));
|
||||
int grfoff __P((dev_t));
|
||||
@ -155,7 +155,7 @@ void *match, *auxp;
|
||||
/*
|
||||
* XXX: console init opens view 0
|
||||
*/
|
||||
if(viewopen(0, 0))
|
||||
if(viewopen(0, 0, 0, NULL))
|
||||
return(0);
|
||||
cfdata_gbus = cfp;
|
||||
}
|
||||
@ -183,7 +183,7 @@ void *auxp;
|
||||
* Skip opening view[0] when we this is the console.
|
||||
*/
|
||||
if(!did_cons || (i > 0))
|
||||
if(viewopen(i, 0))
|
||||
if(viewopen(i, 0, 0, NULL))
|
||||
break;
|
||||
config_found(dp, (void*)&i, grfbusprint);
|
||||
}
|
||||
@ -327,9 +327,11 @@ grfopen(dev, flags, devtype, p)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
grfclose(dev, flags)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
grfclose(dev, flags, mode, p)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
struct grf_softc *gp;
|
||||
|
||||
@ -406,9 +408,10 @@ struct proc *p;
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
grfselect(dev, rw)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
grfselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
if (rw == FREAD)
|
||||
return(0);
|
||||
@ -514,14 +517,14 @@ struct grf_softc *gp;
|
||||
|
||||
gi = &gp->g_display;
|
||||
|
||||
viewioctl(gp->g_viewdev, VIOCGBMAP, &bm, 0, -1);
|
||||
viewioctl(gp->g_viewdev, VIOCGBMAP, (caddr_t)&bm, 0, NOPROC);
|
||||
|
||||
gp->g_data = (caddr_t) 0xDeadBeaf; /* not particularly clean.. */
|
||||
|
||||
gi->gd_fbaddr = bm.hw_address;
|
||||
gi->gd_fbsize = bm.depth*bm.bytes_per_row*bm.rows;
|
||||
|
||||
if(viewioctl(gp->g_viewdev, VIOCGSIZE, &vs, 0, -1)) {
|
||||
if(viewioctl(gp->g_viewdev, VIOCGSIZE, (caddr_t)&vs, 0, NOPROC)) {
|
||||
/*
|
||||
* fill in some default values...
|
||||
* XXX: Should _never_ happen
|
||||
@ -561,10 +564,10 @@ void *arg;
|
||||
* Get in sync with view, ite might have changed it.
|
||||
*/
|
||||
grf_viewsync(gp);
|
||||
viewioctl(gp->g_viewdev, VIOCDISPLAY, NULL, 0, -1);
|
||||
viewioctl(gp->g_viewdev, VIOCDISPLAY, NULL, 0, NOPROC);
|
||||
return(0);
|
||||
case GM_GRFOFF:
|
||||
viewioctl(gp->g_viewdev, VIOCREMOVE, NULL, 0, -1);
|
||||
viewioctl(gp->g_viewdev, VIOCREMOVE, NULL, 0, NOPROC);
|
||||
return(0);
|
||||
case GM_GRFCONFIG:
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grfabs_tt.c,v 1.3 1996/04/12 09:05:40 leo Exp $ */
|
||||
/* $NetBSD: grfabs_tt.c,v 1.4 1996/04/18 08:51:57 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -72,13 +72,13 @@ struct grfabs_sw tt_vid_sw = {
|
||||
};
|
||||
|
||||
static dmode_t vid_modes[] = {
|
||||
{ { NULL, NULL }, "sthigh", { 640, 400 }, 1, RES_STHIGH, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "tthigh", { 1280, 960 }, 1, RES_TTHIGH, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "stmid", { 640, 200 }, 2, RES_STMID , &tt_vid_sw },
|
||||
{ { NULL, NULL }, "stlow", { 320, 200 }, 4, RES_STLOW , &tt_vid_sw },
|
||||
{ { NULL, NULL }, "ttmid", { 640, 480 }, 4, RES_TTMID , &tt_vid_sw },
|
||||
{ { NULL, NULL }, "ttlow", { 320, 480 }, 8, RES_TTLOW , &tt_vid_sw },
|
||||
{ { NULL, NULL }, NULL, }
|
||||
{ { NULL, NULL }, "sthigh", { 640, 400 }, 1, {RES_STHIGH}, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "tthigh", { 1280, 960 }, 1, {RES_TTHIGH}, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "stmid", { 640, 200 }, 2, {RES_STMID }, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "stlow", { 320, 200 }, 4, {RES_STLOW }, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "ttmid", { 640, 480 }, 4, {RES_TTMID }, &tt_vid_sw },
|
||||
{ { NULL, NULL }, "ttlow", { 320, 480 }, 8, {RES_TTLOW }, &tt_vid_sw },
|
||||
{ { NULL, NULL }, NULL, }
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.11 1996/03/20 12:41:50 leo Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.12 1996/04/18 08:51:59 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -59,8 +59,12 @@
|
||||
#include <sys/proc.h>
|
||||
#include <dev/cons.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include <atari/atari/kdassert.h>
|
||||
#include <atari/dev/event_var.h>
|
||||
#include <atari/dev/kbdmap.h>
|
||||
#include <atari/dev/kbdvar.h>
|
||||
#include <atari/dev/iteioctl.h>
|
||||
#include <atari/dev/itevar.h>
|
||||
#include <atari/dev/grfioctl.h>
|
||||
@ -125,17 +129,6 @@ void ite_putstr __P((const u_char * s, int len, dev_t dev));
|
||||
void iteattach __P((struct device *, struct device *, void *));
|
||||
int itematch __P((struct device *, void *, void *));
|
||||
|
||||
/*
|
||||
* Standard character device functions.
|
||||
*/
|
||||
dev_type_open(iteopen);
|
||||
dev_type_close(iteclose);
|
||||
dev_type_read(iteread);
|
||||
dev_type_write(itewrite);
|
||||
dev_type_ioctl(iteioctl);
|
||||
dev_type_tty(itetty);
|
||||
dev_type_stop(itestop);
|
||||
|
||||
/*
|
||||
* Console specific types.
|
||||
*/
|
||||
@ -679,7 +672,7 @@ int unit;
|
||||
/*
|
||||
* Now make it visible
|
||||
*/
|
||||
viewioctl(ip->grf->g_viewdev, VIOCDISPLAY, NULL, 0, -1);
|
||||
viewioctl(ip->grf->g_viewdev, VIOCDISPLAY, NULL, 0, NOPROC);
|
||||
}
|
||||
|
||||
/* XXX called after changes made in underlying grf layer. */
|
||||
@ -861,7 +854,7 @@ enum caller caller;
|
||||
/* And now the old stuff. */
|
||||
|
||||
/* these are used to implement repeating keys.. */
|
||||
static u_char last_char;
|
||||
static u_int last_char;
|
||||
static u_char tout_pending;
|
||||
|
||||
/*ARGSUSED*/
|
||||
@ -871,7 +864,8 @@ void *arg;
|
||||
{
|
||||
tout_pending = 0;
|
||||
if(last_char)
|
||||
add_sicallback(ite_filter, last_char, ITEFILT_REPEATER);
|
||||
add_sicallback((si_farg)ite_filter, (void *)last_char,
|
||||
(void *)ITEFILT_REPEATER);
|
||||
}
|
||||
|
||||
void
|
||||
@ -905,7 +899,7 @@ enum caller caller;
|
||||
* to not allow a key-up event to get thru before a repeat for
|
||||
* the key-down, we remove any outstanding callout requests..
|
||||
*/
|
||||
rem_sicallback(ite_filter);
|
||||
rem_sicallback((si_farg)ite_filter);
|
||||
|
||||
|
||||
/*
|
||||
@ -1037,7 +1031,7 @@ enum caller caller;
|
||||
/* handle dead keys */
|
||||
if (key.mode & KBD_MODE_DEAD) {
|
||||
/* if entered twice, send accent itself */
|
||||
if (last_dead == key.mode & KBD_MODE_ACCMASK)
|
||||
if (last_dead == (key.mode & KBD_MODE_ACCMASK))
|
||||
last_dead = 0;
|
||||
else {
|
||||
last_dead = key.mode & KBD_MODE_ACCMASK;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite_cc.c,v 1.5 1996/02/22 10:11:29 leo Exp $ */
|
||||
/* $NetBSD: ite_cc.c,v 1.6 1996/04/18 08:52:02 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -146,7 +146,7 @@ register struct ite_softc *ip;
|
||||
struct itewinsize wsz;
|
||||
ipriv_t *cci;
|
||||
|
||||
if(cci = ip->priv)
|
||||
if((cci = ip->priv) != NULL)
|
||||
return;
|
||||
|
||||
#if defined(KFONT_8X8)
|
||||
@ -202,7 +202,8 @@ struct itewinsize *winsz;
|
||||
vs.height = winsz->height;
|
||||
vs.depth = winsz->depth;
|
||||
|
||||
error = viewioctl(ip->grf->g_viewdev, VIOCSSIZE, &vs, 0, -1);
|
||||
error = viewioctl(ip->grf->g_viewdev, VIOCSSIZE, (caddr_t)&vs, 0,
|
||||
NOPROC);
|
||||
view = viewview(ip->grf->g_viewdev);
|
||||
|
||||
/*
|
||||
@ -347,10 +348,11 @@ struct proc *p;
|
||||
case VIOCSCMAP:
|
||||
case VIOCGCMAP:
|
||||
/*
|
||||
* XXX watchout for that -1 its not really the kernel talking
|
||||
* XXX these two commands don't use the proc pointer though
|
||||
* XXX watchout for that NOPROC. its not really the kernel
|
||||
* XXX talking these two commands don't use the proc pointer
|
||||
* XXX though.
|
||||
*/
|
||||
error = viewioctl(ip->grf->g_viewdev, cmd, addr, flag, -1);
|
||||
error = viewioctl(ip->grf->g_viewdev, cmd, addr, flag, NOPROC);
|
||||
break;
|
||||
default:
|
||||
error = -1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: itevar.h,v 1.4 1996/03/20 13:11:56 leo Exp $ */
|
||||
/* $NetBSD: itevar.h,v 1.5 1996/04/18 08:52:04 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman (Atari modifications)
|
||||
@ -168,6 +168,8 @@ enum tab_size { TABSIZE = 8 };
|
||||
#define attrtest(ip, attr) 0
|
||||
#define attrset(ip, attr)
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct proc;
|
||||
struct consdev;
|
||||
struct termios;
|
||||
@ -182,6 +184,17 @@ void ite_cnfinish __P((struct ite_softc *));
|
||||
/* standard ite device entry points. */
|
||||
void iteinit __P((dev_t));
|
||||
|
||||
/*
|
||||
* Standard character device functions.
|
||||
*/
|
||||
dev_type_open(iteopen);
|
||||
dev_type_close(iteclose);
|
||||
dev_type_read(iteread);
|
||||
dev_type_write(itewrite);
|
||||
dev_type_ioctl(iteioctl);
|
||||
dev_type_tty(itetty);
|
||||
dev_type_stop(itestop);
|
||||
|
||||
/* ite functions */
|
||||
int ite_on __P((dev_t, int));
|
||||
void ite_off __P((dev_t, int));
|
||||
@ -191,4 +204,11 @@ void ite_reset __P((struct ite_softc *));
|
||||
int ite_cnfilter __P((u_int, enum caller));
|
||||
void ite_filter __P((u_int ,enum caller));
|
||||
|
||||
/* ite_cc functions */
|
||||
int grfcc_cnprobe __P((void));
|
||||
void grfcc_iteinit __P((struct grf_softc *));
|
||||
int ite_grf_ioctl __P((struct ite_softc *, u_long, caddr_t, int,
|
||||
struct proc *));
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _ITEVAR_H */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kbd.c,v 1.9 1996/04/12 08:37:03 leo Exp $ */
|
||||
/* $NetBSD: kbd.c,v 1.10 1996/04/18 08:52:06 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -77,7 +77,7 @@ dev_type_select(kbdselect);
|
||||
/* Interrupt handler */
|
||||
void kbdintr __P((int));
|
||||
|
||||
static void kbdsoft __P((void));
|
||||
static void kbdsoft __P((void *, void *));
|
||||
static void kbdattach __P((struct device *, struct device *, void *));
|
||||
static int kbdmatch __P((struct device *, void *, void *));
|
||||
static int kbd_write_poll __P((u_char *, int));
|
||||
@ -307,7 +307,7 @@ int sr; /* sr at time of interrupt */
|
||||
add_sicallback(kbdsoft, 0, 0);
|
||||
} else {
|
||||
spl1();
|
||||
kbdsoft();
|
||||
kbdsoft(NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -316,7 +316,8 @@ int sr; /* sr at time of interrupt */
|
||||
* Keyboard soft interrupt handler
|
||||
*/
|
||||
void
|
||||
kbdsoft()
|
||||
kbdsoft(junk1, junk2)
|
||||
void *junk1, *junk2;
|
||||
{
|
||||
int s;
|
||||
u_char code;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt.c,v 1.1 1996/03/27 10:21:05 leo Exp $ */
|
||||
/* $NetBSD: lpt.c,v 1.2 1996/04/18 08:52:07 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Leo Weppelman
|
||||
@ -201,8 +201,8 @@ lptopen(dev, flag, mode, p)
|
||||
}
|
||||
|
||||
/* wait 1/4 second, give up if we get a signal */
|
||||
if (error = tsleep((caddr_t)sc, LPTPRI | PCATCH, "lptopen",
|
||||
STEP) != EWOULDBLOCK) {
|
||||
if ((error = tsleep((caddr_t)sc, LPTPRI | PCATCH, "lptopen",
|
||||
STEP)) != EWOULDBLOCK) {
|
||||
sc->sc_state = 0;
|
||||
return error;
|
||||
}
|
||||
@ -325,8 +325,8 @@ pushbytes(sc)
|
||||
(void) lptintr();
|
||||
splx(s);
|
||||
}
|
||||
if (error = tsleep((caddr_t)sc, LPTPRI | PCATCH,
|
||||
"lptwrite2", 0))
|
||||
if ((error = tsleep((caddr_t)sc, LPTPRI | PCATCH,
|
||||
"lptwrite2", 0)) != 0)
|
||||
return error;
|
||||
}
|
||||
}
|
||||
@ -347,7 +347,7 @@ lptwrite(dev, uio, flags)
|
||||
size_t n;
|
||||
int error = 0;
|
||||
|
||||
while (n = min(LPT_BSIZE, uio->uio_resid)) {
|
||||
while ((n = min(LPT_BSIZE, uio->uio_resid)) > 0) {
|
||||
uiomove(sc->sc_cp = sc->sc_inbuf->b_data, n, uio);
|
||||
sc->sc_count = n;
|
||||
error = pushbytes(sc);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md_root.c,v 1.2 1996/03/27 10:13:09 leo Exp $ */
|
||||
/* $NetBSD: md_root.c,v 1.3 1996/04/18 08:52:09 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Leo Weppelman.
|
||||
@ -91,8 +91,11 @@ struct read_info {
|
||||
|
||||
static int loaddisk __P((struct rd_conf *, dev_t ld_dev, struct proc *));
|
||||
static int ramd_norm_read __P((struct read_info *));
|
||||
|
||||
#ifdef support_compression
|
||||
static int cpy_uncompressed __P((caddr_t, int, struct read_info *));
|
||||
static int rd_compressed __P((caddr_t, int, struct read_info *));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is called during autoconfig.
|
||||
@ -177,7 +180,7 @@ struct proc *proc;
|
||||
/*
|
||||
* Open device and try to get some statistics.
|
||||
*/
|
||||
if(error = bdp->d_open(ld_dev, FREAD | FNONBLOCK, 0, proc))
|
||||
if((error = bdp->d_open(ld_dev, FREAD | FNONBLOCK, 0, proc)) != 0)
|
||||
return(error);
|
||||
if(bdp->d_ioctl(ld_dev, DIOCGDINFO, (caddr_t)&dl, FREAD, proc) == 0) {
|
||||
/* Read on a cylinder basis */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nvram.c,v 1.2 1996/03/17 01:26:54 thorpej Exp $ */
|
||||
/* $NetBSD: nvram.c,v 1.3 1996/04/18 08:52:08 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -44,6 +44,7 @@
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <machine/iomap.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include <atari/dev/clockreg.h>
|
||||
#include <atari/dev/nvramvar.h>
|
||||
@ -130,6 +131,7 @@ int byteno;
|
||||
|
||||
#if NNVR > 0
|
||||
|
||||
int
|
||||
nvram_uio(uio)
|
||||
struct uio *uio;
|
||||
{
|
||||
@ -167,7 +169,7 @@ struct uio *uio;
|
||||
for (i = 0, p = buf; i < nleft; i++, p++)
|
||||
*p = mc146818_read(RTC, offset + i);
|
||||
}
|
||||
if (i = uiomove(buf, nleft, uio))
|
||||
if ((i = uiomove(buf, nleft, uio)) != 0)
|
||||
return (i);
|
||||
if (uio->uio_rw == UIO_WRITE) {
|
||||
for (i = 0, p = buf; i < nleft; i++, p++)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rd_root.c,v 1.2 1996/03/27 10:13:09 leo Exp $ */
|
||||
/* $NetBSD: rd_root.c,v 1.3 1996/04/18 08:52:09 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Leo Weppelman.
|
||||
@ -91,8 +91,11 @@ struct read_info {
|
||||
|
||||
static int loaddisk __P((struct rd_conf *, dev_t ld_dev, struct proc *));
|
||||
static int ramd_norm_read __P((struct read_info *));
|
||||
|
||||
#ifdef support_compression
|
||||
static int cpy_uncompressed __P((caddr_t, int, struct read_info *));
|
||||
static int rd_compressed __P((caddr_t, int, struct read_info *));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is called during autoconfig.
|
||||
@ -177,7 +180,7 @@ struct proc *proc;
|
||||
/*
|
||||
* Open device and try to get some statistics.
|
||||
*/
|
||||
if(error = bdp->d_open(ld_dev, FREAD | FNONBLOCK, 0, proc))
|
||||
if((error = bdp->d_open(ld_dev, FREAD | FNONBLOCK, 0, proc)) != 0)
|
||||
return(error);
|
||||
if(bdp->d_ioctl(ld_dev, DIOCGDINFO, (caddr_t)&dl, FREAD, proc) == 0) {
|
||||
/* Read on a cylinder basis */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: view.c,v 1.7 1996/02/22 10:11:34 leo Exp $ */
|
||||
/* $NetBSD: view.c,v 1.8 1996/04/18 08:52:11 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -45,6 +45,7 @@
|
||||
#include <sys/device.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/conf.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <atari/dev/grfabs_reg.h>
|
||||
#include <atari/dev/viewioctl.h>
|
||||
@ -57,13 +58,6 @@ static int view_setsize __P((struct view_softc *, struct view_size *));
|
||||
static int view_get_colormap __P((struct view_softc *, colormap_t *));
|
||||
static int view_set_colormap __P((struct view_softc *, colormap_t *));
|
||||
|
||||
void viewclose __P((dev_t, int));
|
||||
int viewioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
|
||||
int viewopen __P((dev_t, int));
|
||||
int viewmmap __P((dev_t, int, int));
|
||||
|
||||
int viewprobe __P((void));
|
||||
|
||||
struct view_softc views[NVIEW];
|
||||
static int view_inited;
|
||||
|
||||
@ -76,6 +70,8 @@ int view_default_depth = 1;
|
||||
/*
|
||||
* functions for probeing.
|
||||
*/
|
||||
void viewattach __P((int));
|
||||
|
||||
void
|
||||
viewattach(cnt)
|
||||
int cnt;
|
||||
@ -281,9 +277,12 @@ colormap_t *ucm;
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int viewopen(dev, flags)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int
|
||||
viewopen(dev, flags, mode, p)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
dimen_t size;
|
||||
struct view_softc *vu;
|
||||
@ -314,21 +313,24 @@ int flags;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
viewclose (dev, flags)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int
|
||||
viewclose (dev, flags, mode, p)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
struct view_softc *vu;
|
||||
|
||||
vu = &views[minor(dev)];
|
||||
|
||||
if ((vu->flags & VUF_OPEN) == 0)
|
||||
return;
|
||||
return (0); /* XXX not open? */
|
||||
view_remove (vu);
|
||||
grf_free_view (vu->view);
|
||||
vu->flags = 0;
|
||||
vu->view = NULL;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
@ -364,7 +366,7 @@ struct proc *p;
|
||||
case VIOCGBMAP:
|
||||
bm = (bmap_t *)data;
|
||||
bcopy(vu->view->bitmap, bm, sizeof(bmap_t));
|
||||
if ((int)p != -1) {
|
||||
if (p != NOPROC) {
|
||||
bm->plane = NULL;
|
||||
bm->hw_address = NULL;
|
||||
}
|
||||
@ -406,9 +408,10 @@ int off, prot;
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
viewselect(dev, rw)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
viewselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
if(rw == FREAD)
|
||||
return(0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: viewvar.h,v 1.2 1995/05/28 19:45:43 leo Exp $ */
|
||||
/* $NetBSD: viewvar.h,v 1.3 1996/04/18 08:52:12 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -37,6 +37,8 @@
|
||||
* refered to by open/close/ioctl. This device serves as
|
||||
* a interface to graphics. */
|
||||
|
||||
#define NOPROC ((struct proc *)-1) /* XXX */
|
||||
|
||||
struct view_softc {
|
||||
struct view_size size;
|
||||
view_t *view;
|
||||
@ -60,4 +62,12 @@ enum view_unit_flags {
|
||||
|
||||
#ifdef _KERNEL
|
||||
view_t *viewview __P((dev_t));
|
||||
int viewprobe __P((void));
|
||||
|
||||
dev_type_close(viewclose);
|
||||
dev_type_ioctl(viewioctl);
|
||||
dev_type_open(viewopen);
|
||||
dev_type_mmap(viewmmap);
|
||||
dev_type_select(viewselect);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zs.c,v 1.18 1996/03/27 10:08:35 leo Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.19 1996/04/18 08:52:14 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 L. Weppelman (Atari modifications)
|
||||
@ -564,7 +564,7 @@ long sr;
|
||||
}
|
||||
else if(!cb_scheduled) {
|
||||
cb_scheduled++;
|
||||
add_sicallback(zssoft, 0, 0);
|
||||
add_sicallback((si_farg)zssoft, 0, 0);
|
||||
}
|
||||
}
|
||||
return(intflags & 2);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.10 1996/01/19 13:46:56 leo Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.11 1996/04/18 08:52:17 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -200,4 +200,123 @@ extern int machineid, mmutype, cpu040, fputype;
|
||||
{ "console_device", CTLTYPE_STRUCT }, \
|
||||
}
|
||||
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* Prototypes from atari_init.c
|
||||
*/
|
||||
int cpu_dump __P((int (*)(dev_t, daddr_t, caddr_t, size_t), daddr_t *));
|
||||
int cpu_dumpsize __P((void));
|
||||
|
||||
/*
|
||||
* Prototypes from autoconf.c
|
||||
*/
|
||||
void configure __P((void));
|
||||
void config_console __P((void));
|
||||
|
||||
/*
|
||||
* Prototypes from clock.c
|
||||
*/
|
||||
long clkread __P((void));
|
||||
|
||||
/*
|
||||
* Prototypes from disksubr.c
|
||||
*/
|
||||
struct buf;
|
||||
struct disklabel;
|
||||
int bounds_check_with_label __P((struct buf *, struct disklabel *, int));
|
||||
|
||||
/*
|
||||
* Prototypes from fpu.c
|
||||
*/
|
||||
char *fpu_describe __P((int));
|
||||
int fpu_probe __P((void));
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes from grfabs.c
|
||||
*/
|
||||
int grfabs_probe __P((void));
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes from vm_machdep.c
|
||||
*/
|
||||
int badbaddr __P((caddr_t));
|
||||
void consinit __P((void));
|
||||
void cpu_set_kpc __P((struct proc *, void (*)(struct proc *)));
|
||||
void dumpconf __P((void));
|
||||
vm_offset_t kvtop __P((caddr_t));
|
||||
void physaccess __P((caddr_t, caddr_t, int, int));
|
||||
void physunaccess __P((caddr_t, int));
|
||||
void setredzone __P((u_int *, caddr_t));
|
||||
|
||||
/*
|
||||
* Prototypes from locore.s
|
||||
*/
|
||||
struct fpframe;
|
||||
struct user;
|
||||
struct pcb;
|
||||
|
||||
void clearseg __P((vm_offset_t));
|
||||
void doboot __P((void));
|
||||
u_long getdfc __P((void));
|
||||
u_long getsfc __P((void));
|
||||
void loadustp __P((int));
|
||||
void m68881_save __P((struct fpframe *));
|
||||
void m68881_restore __P((struct fpframe *));
|
||||
void physcopyseg __P((vm_offset_t, vm_offset_t));
|
||||
u_int probeva __P((u_int, u_int));
|
||||
void proc_trampoline __P((void));
|
||||
void savectx __P((struct pcb *));
|
||||
void switch_exit __P((struct proc *));
|
||||
void DCIS __P((void));
|
||||
void DCIU __P((void));
|
||||
void ICIA __P((void));
|
||||
void ICPA __P((void));
|
||||
void PCIA __P((void));
|
||||
void TBIA __P((void));
|
||||
void TBIS __P((vm_offset_t));
|
||||
void TBIAS __P((void));
|
||||
void TBIAU __P((void));
|
||||
|
||||
/*
|
||||
* Prototypes from machdep.c:
|
||||
*/
|
||||
typedef void (*si_farg)(void *, void *); /* XXX */
|
||||
void add_sicallback __P((si_farg, void *, void *));
|
||||
void rem_sicallback __P((si_farg));
|
||||
struct frame;
|
||||
void regdump __P((struct frame *, int));
|
||||
void boot __P((int));
|
||||
void cpu_startup __P((void));
|
||||
void dumpsys __P((void));
|
||||
vm_offset_t reserve_dumppages __P((vm_offset_t));
|
||||
void softint __P((void));
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes from nvram.c:
|
||||
*/
|
||||
struct uio;
|
||||
int nvram_uio __P((struct uio *));
|
||||
|
||||
/*
|
||||
* Prototypes from sys_machdep.c:
|
||||
*/
|
||||
int cachectl __P((int, caddr_t, int));
|
||||
int dma_cachectl __P((caddr_t, int));
|
||||
|
||||
/*
|
||||
* Prototypes from swapgeneric.c:
|
||||
*/
|
||||
void setconf __P((void));
|
||||
|
||||
/*
|
||||
* Prototypes from trap.c:
|
||||
*/
|
||||
#ifdef _MACHINE_FRAME_H_ /* XXX: We don't want to include this everywhere */
|
||||
void child_return __P((struct proc *, struct frame));
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_MACHINE_CPU_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.6 1995/06/09 19:43:41 leo Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.7 1996/04/18 08:52:19 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987 Carnegie-Mellon University
|
||||
@ -115,9 +115,12 @@ struct pmap kernel_pmap_store;
|
||||
#else
|
||||
#define pa_index(pa) atop(pa - vm_first_phys)
|
||||
#endif /* MACHINE_NONCONTIG */
|
||||
|
||||
#define pa_to_pvh(pa) (&pv_table[pa_index(pa)])
|
||||
#define pmap_kernel() (&kernel_pmap_store)
|
||||
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
|
||||
|
||||
void pmap_bootstrap __P((vm_offset_t));
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_PMAP_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user