Get rid of 'cpu040' variable. Use 'mmutype' or 'cputype' for testing
instead.
This commit is contained in:
parent
372fe2ff92
commit
da93afbd05
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: Locore.c,v 1.7 1996/11/06 20:19:26 cgd Exp $ */
|
||||
/* $NetBSD: Locore.c,v 1.8 1997/01/03 22:54:22 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
|
@ -124,6 +124,7 @@ lowinit()
|
|||
lowinit();
|
||||
machineid = machineid;
|
||||
mmutype = mmutype;
|
||||
cputype = cputype;
|
||||
ectype = ectype;
|
||||
lowram = lowram;
|
||||
ssir = ssir;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atari_init.c,v 1.22 1996/12/26 23:25:01 leo Exp $ */
|
||||
/* $NetBSD: atari_init.c,v 1.23 1997/01/03 22:54:24 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
|
@ -90,7 +90,7 @@ extern u_int Sysptsize, Sysseg_pa, proc0paddr;
|
|||
extern pt_entry_t *Sysptmap;
|
||||
extern st_entry_t *Sysseg;
|
||||
u_int *Sysmap;
|
||||
int machineid, mmutype, cpu040, astpending;
|
||||
int machineid, mmutype, astpending;
|
||||
char *vmmap;
|
||||
pv_entry_t pv_table;
|
||||
#if defined(M68040) || defined(M68060)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genassym.c,v 1.11 1996/10/16 12:42:45 leo Exp $ */
|
||||
/* $NetBSD: genassym.c,v 1.12 1997/01/03 22:54:25 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
|
@ -168,6 +168,10 @@ main(void)
|
|||
printf("#define\tMMU_68851 %d\n", MMU_68851);
|
||||
printf("#define\tMMU_68040 %d\n", MMU_68040);
|
||||
|
||||
printf("#define\tCPU_68020 %d\n", CPU_68020);
|
||||
printf("#define\tCPU_68030 %d\n", CPU_68030);
|
||||
printf("#define\tCPU_68040 %d\n", CPU_68040);
|
||||
|
||||
stio_addr = 0;
|
||||
printf("#define\tSCU_SOFTINT %p\n", (void *)&SCU->sys_int);
|
||||
printf("#define\tSCU_SYSMASK %p\n", (void *)&SCU->sys_mask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.s,v 1.29 1996/12/26 23:25:05 leo Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.30 1997/01/03 22:54:26 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -857,19 +857,22 @@ Lstart3:
|
|||
andl d2,d1
|
||||
jeq Ltestfor020 | Not an 68030, try 68020
|
||||
movl #MMU_68030,_mmutype | Use 68030 MMU
|
||||
jra Lsetcpu040 | skip to init.
|
||||
movl #CPU_68030,_cputype | and a 68030 CPU
|
||||
jra Ltestfor040 | skip to init.
|
||||
Ltestfor020:
|
||||
movl #ATARI_68020,d1 | 68020 type from loader
|
||||
andl d2,d1
|
||||
jeq Lsetcpu040
|
||||
jeq Ltestfor040
|
||||
movl #MMU_68851,_mmutype | Assume 68851 with 68020
|
||||
Lsetcpu040:
|
||||
movl #CPU_68020,_cputype | and a 68020 CPU
|
||||
Ltestfor040:
|
||||
movl #CACHE_OFF,d0 | 68020/030 cache
|
||||
movl #ATARI_68040,d1
|
||||
andl d1,d2
|
||||
movl d2,_cpu040 | set 68040 CPU flag
|
||||
| movl d2,_cpu040 | set 68040 CPU flag
|
||||
jeq Lstartnot040 | it's not 68040
|
||||
movl #MMU_68040,_mmutype | same as hp300 for compat
|
||||
movl #MMU_68040,_mmutype | Use a 68040 MMU
|
||||
movl #CPU_68040,_cputype | and a 68040 CPU
|
||||
.word 0xf4f8 | cpusha bc - push and inval caches
|
||||
movl #CACHE40_OFF,d0 | 68040 cache disable
|
||||
Lstartnot040:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sys_machdep.c,v 1.6 1996/08/23 11:12:51 leo Exp $ */
|
||||
/* $NetBSD: sys_machdep.c,v 1.7 1997/01/03 22:54:27 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986 Regents of the University of California.
|
||||
|
@ -127,7 +127,7 @@ cachectl(req, addr, len)
|
|||
{
|
||||
int error = 0;
|
||||
#ifdef M68040
|
||||
if (cpu040) {
|
||||
if (mmutype == MMU_68040) {
|
||||
register int inc = 0;
|
||||
int pa = 0, doall = 0;
|
||||
caddr_t end = 0;
|
||||
|
@ -237,7 +237,7 @@ dma_cachectl(addr, len)
|
|||
int len;
|
||||
{
|
||||
#ifdef M68040
|
||||
if (cpu040) {
|
||||
if (mmutype == MMU_68040) {
|
||||
register int inc = 0;
|
||||
int pa = 0;
|
||||
caddr_t end;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_machdep.c,v 1.9 1996/06/29 20:24:28 leo Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.10 1997/01/03 22:54:28 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -189,7 +189,7 @@ physaccess(vaddr, paddr, size, prot)
|
|||
u_int *pte;
|
||||
register u_int page;
|
||||
|
||||
if (cpu040 && (prot & PG_CI) == 0) /* if cache not inhibited */
|
||||
if (mmutype == MMU_68040 && (prot & PG_CI) == 0)
|
||||
prot |= PG_CCB; /* set cacheable, copyback */
|
||||
pte = kvtopte(vaddr);
|
||||
page = (u_int)paddr & PG_FRAME;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.17 1996/12/18 12:35:45 leo Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.18 1997/01/03 22:54:35 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -141,7 +141,7 @@ extern int want_resched; /* resched() was called */
|
|||
#define ATARI_ANYMACH (ATARI_TT|ATARI_FALCON|ATARI_HADES)
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int machineid, cpu040;
|
||||
extern int machineid;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.15 1996/10/13 04:11:16 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.16 1997/01/03 22:54:36 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -67,8 +67,10 @@
|
|||
#define PGSHIFT 13 /* LOG2(NBPG) */
|
||||
#define NPTEPG (NBPG/(sizeof(u_int)))
|
||||
|
||||
#define NBSEG (cpu040 ? 32*NBPG : 2048*NBPG) /* bytes/segment */
|
||||
#define SEGOFSET (NBSEG-1) /* byte offset into segment */
|
||||
/* bytes/segment */
|
||||
#define NBSEG ((mmutype == MMU_68040) ? 32*NBPG : 2048*NBPG)
|
||||
/* byte offset into segment */
|
||||
#define SEGOFSET (NBSEG-1)
|
||||
#define SEGSHIFT 24 /* LOG2(NBSEG) [68030 value] */
|
||||
|
||||
#define KERNBASE 0x0 /* start of kernel virtual */
|
||||
|
|
Loading…
Reference in New Issue