(<miff@spam.frisbee.net.au>).
-# $OpenBSD: genassym.cf,v 1.2 1997/03/29 05:18:10 downsj Exp $
+# $OpenBSD: genassym.cf,v 1.3 1997/04/17 10:28:35 downsj Exp $
# $NetBSD: genassym.cf,v 1.5 1997/03/16 09:40:01 thorpej Exp $
#
define HP_340 HP_340
define HP_375 HP_375
define HP_380 HP_380
+define HP_425 HP_425
define HP_433 HP_433
# values for ectype
-/* $OpenBSD: hpux_machdep.c,v 1.5 1997/04/16 11:56:23 downsj Exp $ */
+/* $OpenBSD: hpux_machdep.c,v 1.6 1997/04/17 10:28:36 downsj Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.12 1997/04/02 22:41:34 scottr Exp $ */
/*
{ HP_360, "360" },
{ HP_370, "370" },
{ HP_375, "375" }, /* includes 345 and 400 */
- { HP_380, "380" }, /* includes 425 */
+ { HP_380, "380" },
+ { HP_425, "425" },
{ HP_433, "433" },
{ -1, "3?0" }, /* unknown system (???) */
};
return (HPUX_SYSCONF_CPUM030);
case HP_380:
+ case HP_425:
case HP_433:
return (HPUX_SYSCONF_CPUM040);
-/* $OpenBSD: locore.s,v 1.14 1997/04/16 11:56:27 downsj Exp $ */
+/* $OpenBSD: locore.s,v 1.15 1997/04/17 10:28:38 downsj Exp $ */
/* $NetBSD: locore.s,v 1.67 1997/03/16 10:49:43 thorpej Exp $ */
/*
btst #16,d0 | still on?
jeq Lstart1 | no, must be a 360
movl #HP_375,a0@ | yes, must be a 345/375
+ RELOC(_mmuid, a0)
+ lsrl #8,d0 | get apparent ID
+ movl d0,a0@ | save MMU ID
jra Lhaspac
Lisa370:
movl #HP_370,a0@ | set to 370
movl #FPU_68040,a0@ | ...and FPU
RELOC(_ectype, a0)
movl #EC_NONE,a0@ | and no cache (for now XXX)
- RELOC(_machineid, a0)
+ RELOC(_mmuid, a0)
movl a1@(MMUCMD),d0 | read MMU register
lsrl #8,d0 | get apparent ID
+ movl d0,a0@ | save MMU ID
+ RELOC(_machineid, a0)
+ cmpb #7,d0 | id == 7?
+ jeq Lis433 | XXX 433 underclocked?
cmpb #6,d0 | id == 6?
- jeq Lis33mhz | yes, we have a 433s
- movl #HP_380,a0@ | no, we have a 380/425t
+ jeq Lis433 | yes, we have a 433s
+ cmpb #5,d0 | id == 5?
+ jeq Lis425 | yes, we have a 425t
+ cmpb #4,d0 | id == 4?
+ jeq Lis425 | Heh, 425t overclocked
+ movl #HP_380,a0@ | no, we have a 380
+ jra Lstart1
+Lis425:
+ movl #HP_425,a0@ | 425t
jra Lstart1
-Lis33mhz:
+Lis433:
movl #HP_433,a0@ | 433s (XXX 425s returns same ID, ugh!)
jra Lstart1
Lis68020:
#undef DOREBOOT
.data
- .globl _machineid,_mmutype,_cputype,_ectype,_fputype
+ .globl _machineid,_mmuid,_mmutype,_cputype,_ectype,_fputype
.globl _protorp,_prototc
_machineid:
.long HP_320 | default to 320
+_mmuid:
+ .long 0 | default to nothing
_mmutype:
.long MMU_HP | default to HP MMU
_cputype:
-/* $OpenBSD: machdep.c,v 1.22 1997/04/16 11:56:28 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.23 1997/04/17 10:28:39 downsj Exp $ */
/* $NetBSD: machdep.c,v 1.89 1997/04/09 20:05:20 thorpej Exp $ */
/*
t = "345/375 (50MHz";
break;
case HP_380:
- t = "380/425 (25MHz";
+ t = "380 (25MHz";
+ break;
+ case HP_425:
+ if (mmuid == 5) {
+ t = "425 (25MHz";
+ } else { /* == 4 */
+ t = "425 (33MHz";
+ }
break;
case HP_433:
- t = "433 (33MHz";
+ if (mmuid == 6) {
+ t = "433 (33MHz";
+ } else { /* == 7 ??? what is this? */
+ t = "433 (25MHz";
+ }
break;
default:
printf("\nunknown machine type %d\n", machineid);
}
strcat(cpu_model, ")");
printf("%s\n", cpu_model);
- printf("delay constant for this cpu: %d\n", delay_divisor);
+ printf("delay constant for this cpu: %d MMU ID: %d\n",
+ delay_divisor, mmuid & 0xff);
/*
* Now that we have told the user what they have,
* let them know if that machine type isn't configured.
#endif
#if !defined(HP380)
case HP_380:
+ case HP_425:
case HP_433:
#endif
panic("CPU type not configured");
-/* $OpenBSD: cpu.h,v 1.6 1997/04/16 11:56:34 downsj Exp $ */
+/* $OpenBSD: cpu.h,v 1.7 1997/04/17 10:28:40 downsj Exp $ */
/* $NetBSD: cpu.h,v 1.24 1997/04/14 02:28:50 thorpej Exp $ */
/*
#define HP_340 5 /* 16Mhz 68030 */
#define HP_375 6 /* 50Mhz 68030+32K external cache */
#define HP_380 7 /* 25Mhz 68040 */
-#define HP_433 8 /* 33Mhz 68040 */
+#define HP_425 8 /* 25/33Mhz 68040 */
+#define HP_433 9 /* 33Mhz 68040 (maybe also 25MHz?) */
#ifdef _KERNEL
extern int machineid; /* CPU model */
+extern int mmuid; /* MMU model */
extern int cpuspeed; /* CPU speed, in MHz */
extern char *intiobase, *intiolimit;