[OpenBIOS] r200 - openbios-devel/arch/sparc64

svn at openbios.org svn at openbios.org
Tue Jul 15 16:59:53 CEST 2008


Author: blueswirl
Date: 2008-07-15 16:59:53 +0200 (Tue, 15 Jul 2008)
New Revision: 200

Modified:
   openbios-devel/arch/sparc64/openbios.c
Log:
Add idprom node

Modified: openbios-devel/arch/sparc64/openbios.c
===================================================================
--- openbios-devel/arch/sparc64/openbios.c	2008-07-15 14:57:07 UTC (rev 199)
+++ openbios-devel/arch/sparc64/openbios.c	2008-07-15 14:59:53 UTC (rev 200)
@@ -35,6 +35,8 @@
 #define OBIO_CMDLINE_MAX 256
 static char obio_cmdline[OBIO_CMDLINE_MAX];
 
+static uint8_t idprom[32];
+
 struct cpudef {
     unsigned long iu_version;
     const char *name;
@@ -211,6 +213,22 @@
     cpu_generic_init(cpu);
     printk(" x %s\n", cpu->name);
 
+    // Add /idprom
+    push_str("/");
+    fword("find-device");
+
+    for (i = 0; i < 32; i++) {
+        outb((i + 0x1fd8) & 0xff, 0x74);
+        outb((i + 0x1fd8) >> 8, 0x75);
+        idprom[i] = inb(0x77);
+    }
+
+    PUSH((long)&idprom);
+    PUSH(32);
+    fword("encode-bytes");
+    push_str("idprom");
+    fword("property");
+
     push_str("/memory");
     fword("find-device");
 




More information about the OpenBIOS mailing list