2 * identify.c: machine identification code.
4 * Copyright (C) 1998 Harald Koerfgen and Paul M. Antoine
8 #include <linux/init.h>
9 #include <linux/kernel.h>
10 #include <linux/string.h>
12 #include <asm/bootinfo.h>
17 extern char *(*prom_getenv
)(char *);
18 extern int (*prom_printf
)(char *, ...);
19 extern int (*rex_getsysid
)(void);
21 extern unsigned long mips_machgroup
;
22 extern unsigned long mips_machtype
;
24 void __init
prom_identify_arch (unsigned int magic
)
26 unsigned char dec_cpunum
, dec_firmrev
, dec_etc
;
28 unsigned long dec_sysid
;
30 if (magic
!= REX_PROM_MAGIC
) {
31 dec_sysid
= simple_strtoul(prom_getenv("systype"), (char **)0, 0);
33 dec_sysid
= rex_getsysid();
35 prom_printf("Zero sysid returned from PROMs! Assuming PMAX-like machine.\n");
40 dec_cpunum
= (dec_sysid
& 0xff000000) >> 24;
41 dec_systype
= (dec_sysid
& 0xff0000) >> 16;
42 dec_firmrev
= (dec_sysid
& 0xff00) >> 8;
43 dec_etc
= dec_sysid
& 0xff;
45 /* We're obviously one of the DEC machines */
46 mips_machgroup
= MACH_GROUP_DEC
;
49 * FIXME: This may not be an exhaustive list of DECStations/Servers!
50 * Put all model-specific initialisation calls here.
52 prom_printf("This DECstation is a ");
54 switch (dec_systype
) {
56 prom_printf("DS2100/3100\n");
57 mips_machtype
= MACH_DS23100
;
59 case DS5100
: /* DS5100 MIPSMATE */
60 prom_printf("DS5100\n");
61 mips_machtype
= MACH_DS5100
;
63 case DS5000_200
: /* DS5000 3max */
64 prom_printf("DS5000/200\n");
65 mips_machtype
= MACH_DS5000_200
;
67 case DS5000_1XX
: /* DS5000/100 3min */
68 prom_printf("DS5000/1xx\n");
69 mips_machtype
= MACH_DS5000_1XX
;
71 case DS5000_2X0
: /* DS5000/240 3max+ */
72 prom_printf("DS5000/2x0\n");
73 mips_machtype
= MACH_DS5000_2X0
;
75 case DS5000_XX
: /* Personal DS5000/2x */
76 prom_printf("Personal DS5000/xx\n");
77 mips_machtype
= MACH_DS5000_XX
;
79 case DS5800
: /* DS5800 Isis */
80 prom_printf("DS5800\n");
81 mips_machtype
= MACH_DS5800
;
83 case DS5400
: /* DS5400 MIPSfair */
84 prom_printf("DS5400\n");
85 mips_machtype
= MACH_DS5400
;
87 case DS5500
: /* DS5500 MIPSfair-2 */
88 prom_printf("DS5500\n");
89 mips_machtype
= MACH_DS5500
;
92 prom_printf("unknown, id is %x", dec_systype
);
93 mips_machtype
= MACH_DSUNKNOWN
;