[OpenBIOS] [commit] r1304 - in trunk/openbios-devel: arch/ppc/qemu include/arch/common
repository service
svn at openbios.org
Sun May 25 11:50:05 CEST 2014
Author: agraf
Date: Sun May 25 11:50:05 2014
New Revision: 1304
URL: http://tracker.coreboot.org/trac/openbios/changeset/1304
Log:
arch/ppc/qemu: Clean up and add more cpu infos
Removed unused clock_frequency member from struct cpudef which is get
from FW_CFG and added bus-frequency property to complete the frequency
properties. Also added tlb infos to CPU properties.
Signed-off-by: BALATON Zoltan <balaton at eik.bme.hu>
Signed-off-by: Alexander Graf <agraf at suse.de>
Modified:
trunk/openbios-devel/arch/ppc/qemu/init.c
trunk/openbios-devel/include/arch/common/fw_cfg.h
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/init.c Fri May 23 14:24:32 2014 (r1303)
+++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun May 25 11:50:05 2014 (r1304)
@@ -44,7 +44,7 @@
int icache_size, dcache_size;
int icache_sets, dcache_sets;
int icache_block_size, dcache_block_size;
- int clock_frequency;
+ int tlb_sets, tlb_size;
void (*initfn)(const struct cpudef *cpu);
};
@@ -269,6 +269,16 @@
push_str("i-cache-block-size");
fword("property");
+ PUSH(cpu->tlb_sets);
+ fword("encode-int");
+ push_str("tlb-sets");
+ fword("property");
+
+ PUSH(cpu->tlb_size);
+ fword("encode-int");
+ push_str("tlb-size");
+ fword("property");
+
PUSH(fw_cfg_read_i32(FW_CFG_PPC_TBFREQ));
fword("encode-int");
push_str("timebase-frequency");
@@ -279,6 +289,11 @@
push_str("clock-frequency");
fword("property");
+ PUSH(fw_cfg_read_i32(FW_CFG_PPC_BUSFREQ));
+ fword("encode-int");
+ push_str("bus-frequency");
+ fword("property");
+
push_str("running");
fword("encode-string");
push_str("state");
@@ -391,7 +406,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x07de2900,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_604_init,
},
{ // XXX find out real values
@@ -403,7 +419,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x07de2900,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_604_init,
},
{ // XXX find out real values
@@ -415,7 +432,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x07de2900,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_604_init,
},
{ // XXX find out real values
@@ -427,7 +445,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{
@@ -439,7 +458,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{ // XXX find out real values
@@ -451,7 +471,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{ // XXX find out real values
@@ -463,7 +484,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{ // XXX find out real values
@@ -475,7 +497,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{ // XXX find out real values
@@ -487,7 +510,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x14dc9380,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_750_init,
},
{
@@ -499,7 +523,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x20,
.dcache_block_size = 0x20,
- .clock_frequency = 0x1dcd6500,
+ .tlb_sets = 0x40,
+ .tlb_size = 0x80,
.initfn = cpu_g4_init,
},
{
@@ -511,7 +536,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x80,
.dcache_block_size = 0x80,
- .clock_frequency = 0x5f5e1000,
+ .tlb_sets = 0x100,
+ .tlb_size = 0x1000,
.initfn = cpu_970_init,
},
{ // XXX find out real values
@@ -523,7 +549,8 @@
.dcache_sets = 0x80,
.icache_block_size = 0x80,
.dcache_block_size = 0x80,
- .clock_frequency = 0x1dcd6500,
+ .tlb_sets = 0x100,
+ .tlb_size = 0x1000,
.initfn = cpu_970_init,
},
{
@@ -535,7 +562,8 @@
.dcache_sets = 0x40,
.icache_block_size = 0x80,
.dcache_block_size = 0x80,
- .clock_frequency = 0x629b4940,
+ .tlb_sets = 0x100,
+ .tlb_size = 0x1000,
.initfn = cpu_970_init,
},
};
Modified: trunk/openbios-devel/include/arch/common/fw_cfg.h
==============================================================================
--- trunk/openbios-devel/include/arch/common/fw_cfg.h Fri May 23 14:24:32 2014 (r1303)
+++ trunk/openbios-devel/include/arch/common/fw_cfg.h Sun May 25 11:50:05 2014 (r1304)
@@ -45,6 +45,7 @@
#define FW_CFG_PPC_KVM_HC (FW_CFG_ARCH_LOCAL + 0x06)
#define FW_CFG_PPC_KVM_PID (FW_CFG_ARCH_LOCAL + 0x07)
#define FW_CFG_PPC_NVRAM_ADDR (FW_CFG_ARCH_LOCAL + 0x08)
+#define FW_CFG_PPC_BUSFREQ (FW_CFG_ARCH_LOCAL + 0x09)
#define FW_CFG_INVALID 0xffff
More information about the OpenBIOS
mailing list