8 #include <linux/kernel.h>
9 #include <linux/types.h>
11 #include <linux/export.h>
13 #include <asm/oplib.h>
14 #include <asm/idprom.h>
19 static struct idprom idprom_buffer;
22 #include <asm/machines.h>
36 { .name =
"Sun4M OBP based system", .id_machtype = (
SM_SUN4M_OBP | 0x0) } };
38 static void __init display_system_type(
unsigned char machtype)
43 for (i = 0; i <
ARRAY_SIZE(Sun_Machines); i++) {
47 sysname,
sizeof(sysname)) <= 0)
49 Sun_Machines[i].
name);
56 prom_printf(
"IDPROM: Warning, bogus id_machtype value, 0x%x\n", machtype);
59 static void __init display_system_type(
unsigned char machtype)
64 static unsigned char __init calc_idprom_cksum(
struct idprom *idprom)
66 unsigned char cksum,
i, *
ptr = (
unsigned char *)idprom;
68 for (i = cksum = 0; i <= 0x0E; i++)
79 idprom = &idprom_buffer;
82 prom_printf(
"IDPROM: Warning, unknown format type!\n");
84 if (idprom->
id_cksum != calc_idprom_cksum(idprom))
85 prom_printf(
"IDPROM: Warning, checksum failure (nvram=%x, calc=%x)!\n",
86 idprom->
id_cksum, calc_idprom_cksum(idprom));