> Note that the Linux kernel (like the IRIX kernel) has a way of
> detecting the difference, since it needs to know which box it is
> running on, so you could just get the kernel to export the data via
> /proc somewhere. The kernel variable "sgi_guiness" is 1 if the system
> is an Indy ("Guinness") and 0 if the system is an Indigo2
> ("FullHouse"). Look at the file indy_hpc.c to see how this is detected.
thanks, this is what I needed! It works (at least for me!)
Here is the patch, I'd like someone with and Indy to try and be sure it
works all around....
bash# cat /proc/cpuinfo
cpu : MIPS
cpu model : R4000SC V3.0
system type : SGI Indigo2
BogoMIPS : 49.87
byteorder : big endian
unaligned accesses : 0
wait instruction : no
microsecond timers : no
extra interrupt vector : no
hardware watchpoint : yes
VCED exceptions : 38
VCEI exceptions : 56
[---------------]
patch against CVS as of yesterday....
--- ./linux/include/asm-mips/bootinfo.old.h Thu Jan 13 12:29:17 2000
+++ ./linux/include/asm-mips/bootinfo.h Thu Jan 13 12:29:42 2000
@@ -91,8 +91,8 @@
* Valid machtype for group SGI
*/
#define MACH_SGI_INDY 0 /* R4?K and R5K Indy workstaions */
-
-#define GROUP_SGI_NAMES { "Indy" }
+#define MACH_SGI_INDIGO2 1
+#define GROUP_SGI_NAMES { "Indy", "Indigo2" }
/*
* Valid machtype for group COBALT
--- ./linux/arch/mips/arc/identify.old.c Thu Jan 13 12:45:18 2000
+++ ./linux/arch/mips/arc/identify.c Thu Jan 13 16:26:27 2000
@@ -17,6 +17,7 @@
#include <asm/sgi/sgi.h>
#include <asm/sgialib.h>
#include <asm/bootinfo.h>
+#include <asm/sgi/sgihpc.h>
struct smatch {
char *name;
@@ -60,9 +61,9 @@
p = prom_getchild(PROM_NULL_COMPONENT);
printk("ARCH: %s\n", p->iname);
mach = string_to_mach(p->iname);
-
+
mips_machgroup = mach->group;
- mips_machtype = mach->type;
+ mips_machtype = !sgi_guiness;
prom_flags = mach->flags;
}
mips_cpuinfo_vmw_patch
Description: Text document
|