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>
30 static struct smatch mach_table[] = {
32 .arcname = "SGI-IP22",
34 .group = MACH_GROUP_SGI,
35 .type = MACH_SGI_IP22,
36 .flags = PROM_FLAG_ARCS,
38 .arcname = "SGI-IP27",
39 .liname = "SGI Origin",
40 .group = MACH_GROUP_SGI,
41 .type = MACH_SGI_IP27,
42 .flags = PROM_FLAG_ARCS,
44 .arcname = "SGI-IP28",
46 .group = MACH_GROUP_SGI,
47 .type = MACH_SGI_IP28,
48 .flags = PROM_FLAG_ARCS,
50 .arcname = "SGI-IP30",
51 .liname = "SGI Octane",
52 .group = MACH_GROUP_SGI,
53 .type = MACH_SGI_IP30,
54 .flags = PROM_FLAG_ARCS,
56 .arcname = "SGI-IP32",
58 .group = MACH_GROUP_SGI,
59 .type = MACH_SGI_IP32,
60 .flags = PROM_FLAG_ARCS,
62 .arcname = "Microsoft-Jazz",
63 .liname = "Jazz MIPS_Magnum_4000",
64 .group = MACH_GROUP_JAZZ,
65 .type = MACH_MIPS_MAGNUM_4000,
69 .liname = "Jazz Acer_PICA_61",
70 .group = MACH_GROUP_JAZZ,
71 .type = MACH_ACER_PICA_61,
74 .arcname = "RM200PCI",
75 .liname = "SNI RM200_PCI",
76 .group = MACH_GROUP_SNI_RM,
77 .type = MACH_SNI_RM200_PCI,
78 .flags = PROM_FLAG_DONT_FREE_TEMP,
84 static struct smatch * __init string_to_mach(const char *s)
88 for (i = 0; i < ARRAY_SIZE(mach_table); i++) {
89 if (!strcmp(s, mach_table[i].arcname))
90 return &mach_table[i];
93 panic("Yeee, could not determine architecture type <%s>", s);
98 const char *get_system_type(void)
103 void __init prom_identify_arch(void)
110 * The root component tells us what machine architecture we have here.
112 p = ArcGetChild(PROM_NULL_COMPONENT);
114 #ifdef CONFIG_SGI_IP27
115 /* IP27 PROM misbehaves, seems to not implement ARC
116 GetChild(). So we just assume it's an IP27. */
122 iname = (char *) (long) p->iname;
124 printk("ARCH: %s\n", iname);
125 mach = string_to_mach(iname);
126 system_type = mach->liname;
128 mips_machgroup = mach->group;
129 mips_machtype = mach->type;
130 prom_flags = mach->flags;