2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * identify.c: identify machine by looking up system identifier
8 * Copyright (C) 1998 Thomas Bogendoerfer
10 * This code is based on arch/mips/sgi/kernel/system.c, which is
12 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
14 #include <linux/init.h>
15 #include <linux/kernel.h>
16 #include <linux/types.h>
17 #include <linux/string.h>
19 #include <asm/sgialib.h>
20 #include <asm/bootinfo.h>
28 static struct smatch mach_table
[] = {
30 .arcname
= "SGI-IP22",
32 .flags
= PROM_FLAG_ARCS
,
34 .arcname
= "SGI-IP27",
35 .liname
= "SGI Origin",
36 .flags
= PROM_FLAG_ARCS
,
38 .arcname
= "SGI-IP28",
40 .flags
= PROM_FLAG_ARCS
,
42 .arcname
= "SGI-IP30",
43 .liname
= "SGI Octane",
44 .flags
= PROM_FLAG_ARCS
,
46 .arcname
= "SGI-IP32",
48 .flags
= PROM_FLAG_ARCS
,
50 .arcname
= "Microsoft-Jazz",
51 .liname
= "Jazz MIPS_Magnum_4000",
55 .liname
= "Jazz Acer_PICA_61",
58 .arcname
= "RM200PCI",
59 .liname
= "SNI RM200_PCI",
60 .flags
= PROM_FLAG_DONT_FREE_TEMP
,
62 .arcname
= "RM200PCI-R5K",
63 .liname
= "SNI RM200_PCI-R5K",
64 .flags
= PROM_FLAG_DONT_FREE_TEMP
,
70 static struct smatch
* __init
string_to_mach(const char *s
)
74 for (i
= 0; i
< ARRAY_SIZE(mach_table
); i
++) {
75 if (!strcmp(s
, mach_table
[i
].arcname
))
76 return &mach_table
[i
];
79 panic("Yeee, could not determine architecture type <%s>", s
);
84 const char *get_system_type(void)
89 void __init
prom_identify_arch(void)
96 * The root component tells us what machine architecture we have here.
98 p
= ArcGetChild(PROM_NULL_COMPONENT
);
100 #ifdef CONFIG_SGI_IP27
101 /* IP27 PROM misbehaves, seems to not implement ARC
102 GetChild(). So we just assume it's an IP27. */
108 iname
= (char *) (long) p
->iname
;
110 printk("ARCH: %s\n", iname
);
111 mach
= string_to_mach(iname
);
112 system_type
= mach
->liname
;
114 prom_flags
= mach
->flags
;