Push out some 060 support. It's all untested and mostly copied in from the

amiga-port.
This commit is contained in:
leo 1997-03-10 14:44:26 +00:00
parent 7e288e08c3
commit f99aabbca1
4 changed files with 89 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atari_init.c,v 1.27 1997/03/07 21:45:41 leo Exp $ */
/* $NetBSD: atari_init.c,v 1.28 1997/03/10 14:44:26 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -469,11 +469,17 @@ char *esym_addr; /* Address of kernel '_esym' symbol */
* movel #$0xc000,d0;
* movec d0,TC
*/
asm volatile ("movel %0,a0;.word 0x4e7b,0x8807" : :
"a" (Sysseg_pa) : "a0");
if (cputype == CPU_68060) {
/* XXX: Need the branch cache be cleared? */
asm volatile (".word 0x4e7a,0x0002;"
"orl #0x400000,d0;"
".word 0x4e7b,0x0002" : : : "d0");
}
asm volatile ("movel %0,a0;"
".word 0x4e7b,0x8807" : : "a" (Sysseg_pa) : "a0");
asm volatile (".word 0xf518" : : );
asm volatile ("movel #0xc000,d0; .word 0x4e7b,0x0003" : : :
"d0" );
asm volatile ("movel #0xc000,d0;"
".word 0x4e7b,0x0003" : : : "d0" );
} else
#endif
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.37 1997/01/27 07:53:29 leo Exp $ */
/* $NetBSD: machdep.c,v 1.38 1997/03/10 14:44:27 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -436,17 +436,33 @@ identifycpu()
fputype = fpu_probe();
fpu = fpu_describe(fputype);
if (machineid & ATARI_68040) {
switch (cputype) {
case CPU_68060:
{
u_int32_t pcr;
char cputxt[30];
asm(".word 0x4e7a,0x0808;"
"movl d0,%0" : "=d"(pcr) : : "d0");
sprintf(cputxt, "68%s060 rev.%d",
pcr & 0x10000 ? "LC/EC" : "", (pcr>>8)&0xff);
cpu = cputxt;
mmu = "/MMU";
}
break;
case CPU_68040:
cpu = "m68040";
mmu = "/MMU";
} else if (machineid & ATARI_68030) {
break;
case CPU_68030:
cpu = "m68030";
mmu = "/MMU";
} else {
default: /* XXX */
cpu = "m68020";
mmu = " m68851 MMU";
}
sprintf(cpu_model, "%s (%s CPU%s%s FPU)", mach, cpu, mmu, fpu);
sprintf(cpu_model, "%s (%s CPU%s%sFPU)", mach, cpu, mmu, fpu);
printf("%s\n", cpu_model);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.17 1996/11/06 13:55:38 leo Exp $ */
/* $NetBSD: pmap.c,v 1.18 1997/03/10 14:44:28 leo Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -475,6 +475,18 @@ pmap_init(phys_start, phys_end)
Segtabzero = (u_int *) addr;
Segtabzeropa = (u_int *) pmap_extract(pmap_kernel(), addr);
#ifdef M68060
if (cputype == CPU_68060) {
addr2 = addr;
while (addr2 < addr + ATARI_STSIZE) {
pmap_changebit(addr2, PG_CCB, 0);
pmap_changebit(addr2, PG_CI, 1);
addr2 += NBPG;
}
DCIS();
}
#endif
addr += ATARI_STSIZE;
pv_table = (pv_entry_t) addr;
addr += sizeof(struct pv_entry) * npg;
@ -519,6 +531,14 @@ pmap_init(phys_start, phys_end)
kpt_free_list = kpt_pages;
kpt_pages->kpt_va = addr2;
kpt_pages->kpt_pa = pmap_extract(pmap_kernel(), addr2);
#ifdef M68060
if (cputype == CPU_68060) {
pmap_changebit(kpt_pages->kpt_pa, PG_CCB, 0);
pmap_changebit(kpt_pages->kpt_pa, PG_CI, 1);
DCIS();
}
#endif
} while (addr != addr2);
#ifdef DEBUG
kpt_stats.kpttotal = atop(s);
@ -1624,6 +1644,10 @@ void pmap_update()
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_update()\n");
#endif
#if defined(M68060)
if (cputype == CPU_68060)
DCIA();
#endif
TBIA();
}
@ -2102,6 +2126,9 @@ pmap_enter_ptpage(pmap, va)
{
register vm_offset_t ptpa;
register pv_entry_t pv;
#ifdef M68060
u_int stpa;
#endif /* M68060 */
u_int *ste;
int s;
@ -2124,6 +2151,18 @@ pmap_enter_ptpage(pmap, va)
pmap_kernel(), (vm_offset_t)pmap->pm_stab);
#if defined(M68040) || defined(M68060)
if (mmutype == MMU_68040) {
#if defined(M68060)
stpa = (u_int)pmap->pm_stpa;
if (cputype == CPU_68060) {
while (stpa < (u_int)pmap->pm_stpa +
ATARI_STSIZE) {
pmap_changebit(stpa, PG_CCB, 0);
pmap_changebit(stpa, PG_CI, 1);
stpa += NBPG;
}
DCIS(); /* XXX */
}
#endif
pmap->pm_stfree = protostfree;
}
#endif
@ -2217,6 +2256,13 @@ pmap_enter_ptpage(pmap, va)
ptpa = kpt->kpt_pa;
bzero((char *)kpt->kpt_va, NBPG);
pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT, TRUE);
#if defined(M68060)
if (cputype == CPU_68060) {
pmap_changebit(ptpa, PG_CCB, 0);
pmap_changebit(ptpa, PG_CI, 1);
DCIS();
}
#endif
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
printf("enter_pt: add &Sysptmap[%d]: %x (KPT page %lx)\n",
@ -2249,6 +2295,13 @@ pmap_enter_ptpage(pmap, va)
#endif
}
#ifdef M68060
if (cputype == CPU_68060) {
pmap_changebit(ptpa, PG_CCB, 0);
pmap_changebit(ptpa, PG_CI, 1);
DCIS();
}
#endif
/*
* Locate the PV entry in the kernel for this PT page and
* record the STE address. This is so that we can invalidate

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.7 1997/01/03 22:54:27 leo Exp $ */
/* $NetBSD: sys_machdep.c,v 1.8 1997/03/10 14:44:29 leo Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -126,7 +126,7 @@ cachectl(req, addr, len)
int len;
{
int error = 0;
#ifdef M68040
#if defined(M68040) || defined(M68060)
if (mmutype == MMU_68040) {
register int inc = 0;
int pa = 0, doall = 0;
@ -236,7 +236,7 @@ dma_cachectl(addr, len)
caddr_t addr;
int len;
{
#ifdef M68040
#if defined(M68040) || defined(M68060)
if (mmutype == MMU_68040) {
register int inc = 0;
int pa = 0;