Add idprom node

git-svn-id: svn://coreboot.org/openbios/openbios-devel@200 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-07-15 14:59:53 +00:00
parent 8a200fbeac
commit 0a9cb3f57f

View File

@@ -35,6 +35,8 @@ ohwcfg_v3_t nv_info;
#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 @@ void arch_nvram_get(char *data)
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");