PERFORCE change 116834 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Thu Mar 29 14:42:24 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=116834
Change 116834 by gonzo at gonzo_jeeves on 2007/03/29 14:41:43
o Fill new cpuinfo fields with values based on config0 and
config1.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/cpu.c#17 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/cpu.c#17 (text+ko) ====
@@ -138,6 +138,7 @@
cfg0 = mips_rd_config();
cpuinfo->tlb_type = ((cfg0 & MIPS_CONFIG0_MT_MASK) >> MIPS_CONFIG0_MT_SHIFT);
+ cpuinfo->icache_virtual = cfg0 & MIPS_CONFIG0_VI;
/* If config register selection 1 does not exist, exit. */
if (!(cfg0 & MIPS3_CONFIG_CM))
@@ -153,6 +154,8 @@
cpuinfo->l1.ic_linesize = tmp;
cpuinfo->l1.ic_nways = (((cfg1 & MIPS_CONFIG1_IA_MASK) >> MIPS_CONFIG1_IA_SHIFT)) + 1;
cpuinfo->l1.ic_nsets = 1 << (((cfg1 & MIPS_CONFIG1_IS_MASK) >> MIPS_CONFIG1_IS_SHIFT) + 6);
+ cpuinfo->l1.ic_size = cpuinfo->l1.ic_linesize * cpuinfo->l1.ic_nsets
+ * cpuinfo->l1.ic_nways;
}
/* L1 data cache. */
@@ -161,6 +164,8 @@
cpuinfo->l1.dc_linesize = tmp;
cpuinfo->l1.dc_nways = (((cfg1 & MIPS_CONFIG1_DA_MASK) >> MIPS_CONFIG1_DA_SHIFT)) + 1;
cpuinfo->l1.dc_nsets = 1 << (((cfg1 & MIPS_CONFIG1_DS_MASK) >> MIPS_CONFIG1_DS_SHIFT) + 6);
+ cpuinfo->l1.dc_size = cpuinfo->l1.dc_linesize * cpuinfo->l1.dc_nsets
+ * cpuinfo->l1.dc_nways;
}
}
@@ -171,7 +176,7 @@
mips_get_identity(&cpuinfo);
mips_num_tlb_entries = cpuinfo.tlb_nentries;
- mips_config_cache();
+ mips_config_cache(&cpuinfo);
mips_vector_init();
mips_icache_sync_all();
More information about the p4-projects
mailing list