aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
AgeCommit message (Collapse)Author
2018-02-27x86: free urefBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-02-27x86: fix for kernels that don't provide cache idBurt P
Use shared_cpu_list as a unique cache id, but only in the case that kernel-supplied cache id is not available. Signed-off-by: Burt P <pburt0@gmail.com>
2018-02-27x86,arm: cpu clocks list in package informationBurt P
Show actual clocks where cores or threads share a clock. Ex: x86 SMT each core has one clock shared by both threads. Ex: BCM2837 has one clock for all four cores. Signed-off-by: Burt P <pburt0@gmail.com>
2018-02-09x86: metldown and spectre bug flagsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-02-09x86: increase the cpuinfo read buffer sizeBurt P
The flags list is often more than 512 bytes long these days. It was being truncated. Signed-off-by: Burt P <pburt0@gmail.com>
2018-02-09Add Intel cpu_insecure bug workaround flagBurt P
cpu_insecure = page table isolation is being used to work around a security vulnerability in Intel x86 CPUs. Signed-off-by: Burt P <pburt0@gmail.com>
2017-12-09x86: add summary of caches to package informationBurt P
Show actual physical caches by counting only unique references from each "cpu" (hardware thread). Signed-off-by: Burt P <pburt0@gmail.com>
2017-11-29x86 CPU flags fix; show socket:core and thread in proc listBurt P
* Bug fix: Some flags are just an index, for example power management might have "[13] [14]" as flags. This looks like a new section to hardinfo shell and it truncates the CPU information there. * Show the Socket:Core and thread in the processor list, for x86 only right now. In the future, the idea is to show only one line for each core, and list the threads on that core, where currently, there is one line for each thread. Signed-off-by: Burt P <pburt0@gmail.com>
2017-10-29Fixed possible memory leak (#201)Roman Kalashnikov
Warnings, found using PVS-Studio: hardinfo/modules/devices/usb.c 397 err V773 The function was exited without releasing the 'temp' pointer. A memory leak is possible. hardinfo/modules/computer/uptime.c 33 err V773 The function was exited without releasing the 'ui' pointer. A memory leak is possible.
2017-09-04Build fix after 8913af3eLeandro Pereira
Fixes #188.
2017-09-03Conditionally compile PowerPC and ARM code while summarizing DTLeandro Pereira
Also, use properly-named variables and plug a memory leak.
2017-09-03Clean up device tree codeLeandro Pereira
- No need for a global dtr variable: just pass it around as parameters - Internal functions marked static
2017-08-28ARM: Add some mediatek SOCsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27devices/dmi: keys only need to be unique in the same groupBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: allow specifying type for dmi_chassis_type_str()Burt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27Create dmi_util.c and move *_util.c to hardinfo/Burt P
These stand alone interfaces and are used across modules, so just make them available to any module by default. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: Add more string names, display more informationBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: dmi_chassis_type_str() maps chassis-type to stringBurt P
dmi_chassis_type_str() is moved from code in computer.c:detect_machine_type(). It makes sense to keep it with dmi, as it maps a dmi-defined value to a string. This way it can be used in both dmi.c and computer.c. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: add dmi_sysfs_root() to find path for dmi in sysfsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: empty result return NULL; don't suggest root if rootBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: dmi_get_str() add "system-manufacturer"Burt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: make labels translatableBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: dmi_get_str() cleanup string before returningBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-27DMI: create single dmi_get_str() that uses sysfs with dmidecode fallbackBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-21Translate unit labels in Devices/MemoryBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14dmi: fail if only never succeeded in dmi_get_info_sys()Burt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14usb.c: tweaks and make strings translatableBurt P
Only tested __scan_usb_lsusb(). I can't test __scan_usb_procfs() or __scan_usb_sysfs() because those do not work on any machine I have access to. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14More "Making PCI devices information translatable"Burt P
Continuation of TotalCaesar659's work, but with the labels broken out of the c-format string. Several more strings made translatable. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14More "Making input devices information translatable"Burt P
Continuation of TotalCaesar659's work, but with the labels broken out of the c-format string. Some tweaks to the handling of vendor information and other cleanup. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14Move hardinfo_clean_label() and hardinfo_clean_value() to util.cBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14Making input devices information translatableTotalCaesar659
2017-08-14Making PCI devices information translatableTotalCaesar659
2017-08-14device tree: memory leakBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14Add more DMI information (product, etc)Leandro Pereira
2017-08-12x86: add microcode version to reported informationBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11fix: core_ids are not uniqueBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11Make MHz translatable in CPU listBurt P
It was kindof translatable before, but as part of a messy use-once c-format string. In this form it is re-usable elsewhere. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11CPU Frequency Desc and benchmark result re-formatBurt P
Current CPU configurations aren't properly represented in Hardinfo. For SMT, each hardware thread is still reported as a CPU. Clusters with different CPU clock rates are not reported. It is common for ARM to pair a cluster of fast cores with a cluster of slower, but more power-efficient cores. These changes attempt to address this. The getProcessorFrequency method now returns the processor's max frequency for all its cores. While the new getProcessorFrequencyDesc lists each unique frequency with a prefix Nx with the count of cores at that freqency. Benchmark results have been reformated to use the de-prefixed getProcessorName and getProcessorFrequencyDesc. As an example from benchmark.conf: 4x AMD Phenom(tm) II X4 940 Processor | 800 MHz becomes: AMD Phenom(tm) II X4 940 Processor | 4x 800 MHz Which, I think, makes much more sense, as it works well with this kind of thing: Qualcomm Snapdragon 691 | 4x 1400 MHz + 4x 800 MHz Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-11Separate processor name and description + count cores and threadsBurt P
* add cpu_procs_cores_threads() function to get counts from sysfs/topology * each platform must now provide processor_name() and processor_describe() * processor_name_default(): returns a list of unique processor->model_name * processor_describe_default(): returns "N physical; M cores; L threads" * processor_describe_by_counting_names(): returns a list of unique processor->model_name with Nx prefix (ex: "4x ARM Cortex A53 + 4x ARM Cortex A33") * x86: _name and _describe use defaults * arm: _name returns name of SOC, if available, _describe returns processor_describe_by_counting_names() * all other platforms: _name and _describe use defaults * Computer module summary now shows both name and description for CPU Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-09arm: Try to lookup the SOC name from dt/compatibleBurt P
Just ARM for now, but maybe this will become more generic and it will be possible to have the processor package name and description seperate, even for x86 and whatnot. Also perhaps work in Sockets/Threads/Cores information. Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-09arm: use decoded name instead of generic linux name for model_nameBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-30spd-decode.c: break column headers out of format stringsBurt P
* More easily translated. * The strings are more likely to be re-usable. * A small change to one, or to a shell param, does not lose all of them. spd-decode.c still has many labels that are untranslatable, or stuck in c-format strings. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-25device tree: silence some warningsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-25device tree: fix crash when device tree is not foundBurt P
* check if device tree was found before add_keys() * UNKIFNULL(model) before strcmp * make UNKIFNULL() STRIFNULL() EMPIFNULL() macros more generic Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: printf without format stringBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: remove testing bitBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24Check for NULL before g_strstrip() to assertion failure warningsBurt P
GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: add power mac dataBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-22device tree: interrupts-extended and dmas supportBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-22device tree: group interrupt specifiers' values using #interrupt-cellsBurt P
Also, add a message log to the dtr object. Signed-off-by: Burt P <pburt0@gmail.com>