[OpenBIOS] r308 - openbios-devel/arch/sparc64
svn at openbios.org
svn at openbios.org
Tue Dec 23 09:11:53 CET 2008
Author: blueswirl
Date: 2008-12-23 09:11:53 +0100 (Tue, 23 Dec 2008)
New Revision: 308
Modified:
openbios-devel/arch/sparc64/openbios.c
Log:
Add clock-frequency property (original patch by Igor Kovalenko)
Modified: openbios-devel/arch/sparc64/openbios.c
===================================================================
--- openbios-devel/arch/sparc64/openbios.c 2008-12-22 16:01:44 UTC (rev 307)
+++ openbios-devel/arch/sparc64/openbios.c 2008-12-23 08:11:53 UTC (rev 308)
@@ -385,7 +385,7 @@
: : "r" (addr));
}
-static void cpu_generic_init(const struct cpudef *cpu)
+static void cpu_generic_init(const struct cpudef *cpu, uint32_t clock_frequency)
{
unsigned long iu_version;
char nodebuff[256];
@@ -429,6 +429,11 @@
push_str("cpuid");
fword("property");
+ PUSH(clock_frequency);
+ fword("encode-int");
+ push_str("clock-frequency");
+ fword("property");
+
fword("finish-device");
// MMU node
@@ -563,6 +568,7 @@
char buf[256];
uint32_t temp;
uint64_t ram_size;
+ uint32_t clock_frequency;
for (i = 0; i < sizeof(ohwcfg_v3_t); i++) {
outb(i & 0xff, 0x74);
@@ -614,9 +620,11 @@
printk("CPUs: %x", temp);
+ clock_frequency = 100000000;
+
cpu = id_cpu();
//cpu->initfn();
- cpu_generic_init(cpu);
+ cpu_generic_init(cpu, clock_frequency);
printk(" x %s\n", cpu->name);
// Add /uuid
More information about the OpenBIOS
mailing list