diff options
author | Burt P <pburt0@gmail.com> | 2017-07-09 21:59:27 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-12 19:38:41 -0700 |
commit | ac9072baaa41c5bb0879da73bb2603dbb018b3fc (patch) | |
tree | ebd956ad18a452c92891914bd43ab3933cf789a8 | |
parent | 3260e09b2ae4ee9eb80ff83f800d9b3bcff209e4 (diff) |
parisc: fixes, add test
It really didn't work at all before.
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | includes/parisc/processor-platform.h | 4 | ||||
-rw-r--r-- | modules/devices/parisc/processor.c | 14 | ||||
-rw-r--r-- | test/data/parisc_hppa_fortex4_cpuinfo | 59 | ||||
-rw-r--r-- | test/test.sh | 4 |
4 files changed, 71 insertions, 10 deletions
diff --git a/includes/parisc/processor-platform.h b/includes/parisc/processor-platform.h index bfe8c45c..5b18e80f 100644 --- a/includes/parisc/processor-platform.h +++ b/includes/parisc/processor-platform.h @@ -26,8 +26,10 @@ struct _Processor { gfloat bogomips, cpu_mhz; gchar *has_fpu; - + gchar *strmodel; + + gchar *icache_str, *dcache_str; }; #endif /* __PROCESSOR_PLATFORM_H__ */ diff --git a/modules/devices/parisc/processor.c b/modules/devices/parisc/processor.c index b08baff5..23cc9ba0 100644 --- a/modules/devices/parisc/processor.c +++ b/modules/devices/parisc/processor.c @@ -32,7 +32,7 @@ gchar *byte_order_str() { #endif GSList * -processors_scan(void) +processor_scan(void) { Processor *processor; FILE *cpuinfo; @@ -51,14 +51,12 @@ processors_scan(void) tmp[1] = g_strstrip(tmp[1]); get_str("cpu family", processor->model_name); - get_str("cpu", processor->vendor_id); get_float("cpu MHz", processor->cpu_mhz); + get_str("cpu", processor->vendor_id); get_float("bogomips", processor->bogomips); - get_str("model name", processor->strmodel); - - get_int("I-cache", processor->has_fpu); - get_int("D-cache", processor->flags); + get_str("I-cache", processor->icache_str); + get_str("D-cache", processor->dcache_str); } g_strfreev(tmp); @@ -92,6 +90,6 @@ processor_get_info(GSList *processors) _("BogoMips"), processor->bogomips, _("Byte Order"), byte_order_str(), _("Cache"), - processor->has_fpu, - processor->flags); + processor->icache_str, + processor->dcache_str); } diff --git a/test/data/parisc_hppa_fortex4_cpuinfo b/test/data/parisc_hppa_fortex4_cpuinfo new file mode 100644 index 00000000..79efffc2 --- /dev/null +++ b/test/data/parisc_hppa_fortex4_cpuinfo @@ -0,0 +1,59 @@ +processor : 0 +cpu family : PA-RISC 2.0 +cpu : PA8500 (PCX-W) +cpu MHz : 440.000000 +model : 9000/785/J7000 +model name : Forte W 4-way +hversion : 0x00005bf0 +sversion : 0x00000491 +I-cache : 512 KB +D-cache : 1024 KB (WB) +ITLB entries : 160 +DTLB entries : 160 - shared with ITLB +bogomips : 878.18 +software id : 2002742099 + +processor : 1 +cpu family : PA-RISC 2.0 +cpu : PA8500 (PCX-W) +cpu MHz : 440.000000 +model : 9000/785/J7000 +model name : Forte W 4-way +hversion : 0x00005bf0 +sversion : 0x00000491 +I-cache : 512 KB +D-cache : 1024 KB (WB) +ITLB entries : 160 +DTLB entries : 160 - shared with ITLB +bogomips : 878.18 +software id : 2002742099 + +processor : 2 +cpu family : PA-RISC 2.0 +cpu : PA8500 (PCX-W) +cpu MHz : 440.000000 +model : 9000/785/J7000 +model name : Forte W 4-way +hversion : 0x00005bf0 +sversion : 0x00000491 +I-cache : 512 KB +D-cache : 1024 KB (WB) +ITLB entries : 160 +DTLB entries : 160 - shared with ITLB +bogomips : 878.18 +software id : 2002742099 + +processor : 3 +cpu family : PA-RISC 2.0 +cpu : PA8500 (PCX-W) +cpu MHz : 440.000000 +model : 9000/785/J7000 +model name : Forte W 4-way +hversion : 0x00005bf0 +sversion : 0x00000491 +I-cache : 512 KB +D-cache : 1024 KB (WB) +ITLB entries : 160 +DTLB entries : 160 - shared with ITLB +bogomips : 878.18 +software id : 2002742099 diff --git a/test/test.sh b/test/test.sh index bc748320..9c1f0692 100644 --- a/test/test.sh +++ b/test/test.sh @@ -16,5 +16,7 @@ do_test() { #do_test arm data/arm_jetsontx2_cpuinfo #do_test sparc data/sparc_m7_cpuinfo #do_test mips data/mips_loongson_cpuinfo -do_test alpha data/alpha_as_cpuinfo +#do_test alpha data/alpha_as_cpuinfo +do_test parisc data/parisc_hppa_fortex4_cpuinfo + |