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
14 #include <linux/bug.h>
15 #include <linux/init.h>
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/string.h>
20 #include <asm/sgialib.h>
21 #include <asm/bootinfo.h>
29 static struct smatch mach_table[] = {
31 .arcname = "SGI-IP22",
33 .flags = PROM_FLAG_ARCS,
35 .arcname = "SGI-IP27",
36 .liname = "SGI Origin",
37 .flags = PROM_FLAG_ARCS,
39 .arcname = "SGI-IP28",
41 .flags = PROM_FLAG_ARCS,
43 .arcname = "SGI-IP30",
44 .liname = "SGI Octane",
45 .flags = PROM_FLAG_ARCS,
47 .arcname = "SGI-IP32",
49 .flags = PROM_FLAG_ARCS,
51 .arcname = "Microsoft-Jazz",
52 .liname = "Jazz MIPS_Magnum_4000",
56 .liname = "Jazz Acer_PICA_61",
59 .arcname = "RM200PCI",
60 .liname = "SNI RM200_PCI",
61 .flags = PROM_FLAG_DONT_FREE_TEMP,
63 .arcname = "RM200PCI-R5K",
64 .liname = "SNI RM200_PCI-R5K",
65 .flags = PROM_FLAG_DONT_FREE_TEMP,
71 static struct smatch * __init string_to_mach(const char *s)
75 for (i = 0; i < ARRAY_SIZE(mach_table); i++) {
76 if (!strcmp(s, mach_table[i].arcname))
77 return &mach_table[i];
80 panic("Yeee, could not determine architecture type <%s>", s);
85 const char *get_system_type(void)
90 void __init prom_identify_arch(void)
97 * The root component tells us what machine architecture we have here.
99 p = ArcGetChild(PROM_NULL_COMPONENT);
101 #ifdef CONFIG_SGI_IP27
102 /* IP27 PROM misbehaves, seems to not implement ARC
103 GetChild(). So we just assume it's an IP27. */
109 iname = (char *) (long) p->iname;
111 printk("ARCH: %s\n", iname);
112 mach = string_to_mach(iname);
113 system_type = mach->liname;
115 prom_flags = mach->flags;