fix mmutype recocgnition cleanup cpu identify and other boot diags.

This commit is contained in:
chopps 1994-05-11 19:02:53 +00:00
parent da8f390454
commit 020b93a9ed
5 changed files with 52 additions and 32 deletions

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: autoconf.c,v 1.17 1994/05/08 05:52:13 chopps Exp $
* $Id: autoconf.c,v 1.18 1994/05/11 19:02:53 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -190,6 +190,7 @@ mbattach(pdp, dp, auxp)
struct device *pdp, *dp;
void *auxp;
{
printf("\n");
config_found(dp, "clock", simple_devprint);
config_found(dp, "ser", simple_devprint);
config_found(dp, "par", simple_devprint);

View File

@ -1,5 +1,5 @@
/*
* $Id: disksubr.c,v 1.7 1994/05/08 05:52:17 chopps Exp $
* $Id: disksubr.c,v 1.8 1994/05/11 19:02:54 chopps Exp $
*/
#include <sys/param.h>
@ -312,6 +312,26 @@ readdisklabel(dev, strat, lp, clp)
clp->pblist[clp->pbindex[i] = cindex++];
}
/*
* bring them together. (starting at first user part)
*/
for (i = 3; i < lp->d_npartitions; i++) {
int j;
if (lp->d_partitions[i].p_size != 0)
continue;
for (j = i + 1; j < lp->d_npartitions; j++) {
if (lp->d_partitions[j].p_size == 0)
continue;
bcopy(&lp->d_partitions[j], &lp->d_partitions[i],
sizeof(struct partition));
bzero(&lp->d_partitions[j], sizeof(struct partition));
break;
}
}
for (i = 3; i < lp->d_npartitions; i++)
if (lp->d_partitions[i].p_size == 0)
break;
lp->d_npartitions = i;
/*
* calulate new checksum.

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)genassym.c 7.8 (Berkeley) 5/7/91
* $Id: genassym.c,v 1.10 1994/05/08 05:52:19 chopps Exp $
* $Id: genassym.c,v 1.11 1994/05/11 19:02:55 chopps Exp $
*/
#define KERNEL
@ -149,6 +149,8 @@ main()
printf("#define\tSYS_execve %d\n", SYS_execve);
printf("#define\tSYS_sigreturn %d\n", SYS_sigreturn);
printf("#define\tCIAICR %d\n", &cia->icr);
printf("#define\tAMIGA_68020 %d\n", AMIGA_68020);
printf("#define\tAMIGA_68030 %d\n", AMIGA_68030);
printf("#define\tAMIGA_68040 %d\n", AMIGA_68040);
exit(0);
}

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: locore.s 1.58 91/04/22$
*
* @(#)locore.s 7.11 (Berkeley) 5/9/91
* $Id: locore.s,v 1.15 1994/05/08 05:52:21 chopps Exp $
* $Id: locore.s,v 1.16 1994/05/11 19:02:57 chopps Exp $
*
* Original (hp300) Author: unknown, maybe Mike Hibler?
* Amiga author: Markus Wild
@ -834,6 +834,17 @@ start:
movel a0,sp@- | pass fastmem_start
movel d5,sp@- | pass machine id
movl #AMIGA_68030,d1 | 68030 Attn flag from exec
andl d5,d1
jeq Ltestfor020
movl #-1,_mmutype | assume 020 means 851
jra Lsetcpu040 | skip to init.
Ltestfor020:
movl #AMIGA_68020,d1 | 68020 Attn flag from exec
andl d5,d1
jeq Lsetcpu040
movl #1,_mmutype
Lsetcpu040:
movl #CACHE_OFF,d0 | 68020/030 cache
movl #AMIGA_68040,d1
andl d1,d5
@ -856,29 +867,6 @@ Lstartnot040:
moveq #0,d0
movc d0,vbr
#if 1
| WHY THE @#$@#$@ DOESN'T THIS WORK????????
| add code to determine MMU. This should be passed from
| AmigaOS really...
movl #0x200,d0 | data freeze bit
movc d0,cacr | only exists on 68030
movc cacr,d0 | read it back
tstl d0 | zero?
jeq Lis68020 | yes, we have 68020
| movl #-1,_mmutype | no, we have 68030
jra Lskip
Lis68020:
| movl #1,_mmutype | hope we have 68851...
Lskip:
movl #CACHE_OFF,d0
tstl d5 | running on 68040?
jeq Lcacheoff | no
movl #CACHE40_OFF,d0 | 68040 cache enable
Lcacheoff:
movc d0,cacr
#endif
/* initialize source/destination control registers for movs */
moveq #FC_USERD,d0 | user space
movc d0,sfc | as source

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: machdep.c 1.63 91/04/24$
*
* @(#)machdep.c 7.16 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.23 1994/05/09 06:37:56 chopps Exp $
* $Id: machdep.c,v 1.24 1994/05/11 19:02:59 chopps Exp $
*/
#include <sys/param.h>
@ -427,7 +427,7 @@ extern char version[];
identifycpu()
{
/* there's alot of XXX in here... */
char *mach, *mmu;
char *mach, *mmu, *fpu;
if (is_a4000())
mach = "Amiga 4000";
@ -436,17 +436,26 @@ identifycpu()
else
mach = "Amiga 500/2000";
if (cpu040) {
if (machineid & AMIGA_68040) {
cpu_type = "m68040";
mmu = "/MMU";
} else if (mmutype == MMU_68030) {
fpu = "/FPU";
} else if (machineid & AMIGA_68030) {
cpu_type = "m68030"; /* XXX */
mmu = "/MMU";
} else {
cpu_type = "m68020";
mmu = " m68851 MMU";
}
sprintf(cpu_model, "%s (%s CPU%s)", mach, cpu_type, mmu);
if (machineid & (AMIGA_68030 | AMIGA_68020)) {
if (machineid & AMIGA_68882)
fpu = " m68882 FPU";
else if (machineid & AMIGA_68881)
fpu = " m68881 FPU";
else
fpu = " no FPU";
}
sprintf(cpu_model, "%s (%s CPU%s%s)", mach, cpu_type, mmu, fpu);
printf("%s\n", cpu_model);
}