diff options
author | Burt P <pburt0@gmail.com> | 2017-07-17 23:56:02 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-19 07:20:40 -0700 |
commit | 30d7f09dceff1614aeca03e9d8a6c0c9d7018c4e (patch) | |
tree | 9ce6d9b512f87d50974bfb3775fb5739fdfaad88 | |
parent | f5afa30e418cc4136a21df312af767c04d290cc3 (diff) |
x86: fix old bug in old bug detection
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | modules/devices/x86/processor.c | 7 | ||||
-rw-r--r-- | test/data/x86_cyrix6x86coma_cpuinfo | 17 | ||||
-rw-r--r-- | test/data/x86_pentf00f_cpuinfo | 18 |
3 files changed, 42 insertions, 0 deletions
diff --git a/modules/devices/x86/processor.c b/modules/devices/x86/processor.c index 40e3d7fc..707983ed 100644 --- a/modules/devices/x86/processor.c +++ b/modules/devices/x86/processor.c @@ -275,6 +275,7 @@ GSList *processor_scan(void) get_str("hlt_bug", processor->bug_hlt); get_str("f00f_bug", processor->bug_f00f); get_str("coma_bug", processor->bug_coma); + /* sep_bug? */ get_int("model", processor->model); get_int("cpu family", processor->family); @@ -295,6 +296,12 @@ GSList *processor_scan(void) get_processor_strfamily(processor); __cache_obtain_info(processor); +#define NULLIFNOTYES(f) if (processor->f) if (strcmp(processor->f, "yes") != 0) { g_free(processor->f); processor->f = NULL; } + NULLIFNOTYES(bug_fdiv); + NULLIFNOTYES(bug_hlt); + NULLIFNOTYES(bug_f00f); + NULLIFNOTYES(bug_coma); + if (processor->bugs == NULL || g_strcmp0(processor->bugs, "") == 0) { g_free(processor->bugs); /* make bugs list on old kernels that don't offer one */ diff --git a/test/data/x86_cyrix6x86coma_cpuinfo b/test/data/x86_cyrix6x86coma_cpuinfo new file mode 100644 index 00000000..9080825f --- /dev/null +++ b/test/data/x86_cyrix6x86coma_cpuinfo @@ -0,0 +1,17 @@ +processor : 0 +vendor_id : CyrixInstead +cpu family : 5 +model : 4 +model name : 6x86L 2x Core/Bus Clock +stepping : 2 +fdiv_bug : no +hlt_bug : no +sep_bug : no +f00f_bug : no +coma_bug : yes +fpu : yes +fpu_exception : yes +cpuid level : 1 +wp : yes +flags : fpu de cx8 mtrr +bogomips : 149.50 diff --git a/test/data/x86_pentf00f_cpuinfo b/test/data/x86_pentf00f_cpuinfo new file mode 100644 index 00000000..7a511dd3 --- /dev/null +++ b/test/data/x86_pentf00f_cpuinfo @@ -0,0 +1,18 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 5 +model : 2 +model name : Pentium 75 - 200 +stepping : 12 +cpu MHz : 133.335273 +fdiv_bug : no +hlt_bug : no +sep_bug : no +f00f_bug : yes +fpu : yes +fpu_exception : yes +cpuid level : 1 +wp : yes +flags : fpu vme de pse tsc msr mce cx8 +bogomips : 53.04 + |