aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/arm/processor.c
AgeCommit message (Collapse)Author
2024-05-24FIX GCC warnings arch/GCC version relatedhwspeedy
2024-02-08LICENSE Changed to GPL2+ for project and source code According to approval ↵bigbear
from copyright holders - see: https://github.com/lpereira/hardinfo/issues/530 https://github.com/lpereira/hardinfo/issues/707
2021-11-07Update copyright informationL Pereira
2019-12-22arm: fix broadcom dtree prefixBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2019-08-10arm: use arm.ids for implementer/part lookupBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2019-08-10arm/processor: add BCM2838Burt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-11-04arm/x86: include package info details in reportsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-10-22arm: try device tree opp for cpu freqBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-10-02arm: soc vendors amlogic and allwinnerBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-09-26arm/x86: clocks list empty when cpufreq is not availableBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-09-08arm: some rockchip cpu namesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-09-08arm: code fix, forgotten comma(s)Burt P
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>
2017-08-28ARM: Add some mediatek SOCsBurt 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-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-12minor changesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12Move common processor stuff into cpu_util.{h,c}Burt P
* PROC_CPUINFO define used in testing * STRIFNULL(), UNKIFNULL() EMPIFNULL() macros used in reading cpuinfo * byte order, topology, and cpufreq data structures and functions that are platform independent * processor_has_flag() helper Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12Add CMake options to allow testing various platform's processor.cBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12Cleanup all platform's proccessor.c, use translatable labels.Burt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12arm: re-re-order ARM detailsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12x86,arm,ppc: more processor label strings translatableBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12x86,arm,ppc: code commentsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12x86,arm,ppc: more processor info strings translatableBurt P
Additional labels made translatable and some cleanup. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-12x86,arm,ppc: make processor info strings more easily translatedBurt P
Make some recently added info labels easy to translate. Includes the topology and frequency scaling strings. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-26arm,x86: Don't show frequency scaling information if it isn't availableBurt P
Hide Frequency Scaling section instead of showing zeroes. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-22ARM: add socket/core and more cpufreq informationBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-21Use arm_flag_meaning() directly instead of creating a GHashTableBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-21After testing on aarch64 a problem is discoveredBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-21ARM arch tweaksBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-05Fallback g_strv_contains() imp when using glib<2.44Burt P
Also, some stray whitespace removed. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-05arm: label changes to match requested changes to x86 versionBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02arm: use processor id from cpuinfo instead of counterBurt P
Also fixes a memleak. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02Decode ARM processor implementer and part numbersBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02Handle more cpuinfo format variantsBurt P
There are a few variants of /proc/cpuinfo format for ARM. Examples: 1. https://github.com/bp0/rpiz/blob/master/test/rpi3_cpuinfo 2. https://github.com/bp0/rpiz/blob/master/test/az100_cpuinfo 3. https://github.com/bp0/rpiz/blob/master/test/odroidx_cpuinfo 4. https://github.com/bp0/rpiz/blob/master/test/unk_marv0_cpuinfo Previously, only 1 and 4 worked. Now all should be working. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02arm: bug fix in mode detectionBurt P
Changed code arrangement to fix a problem where only the last processor's mode was correct. This also separates the /proc/cpuinfo data from the other data in a logical way. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02arm: more processor detailsBurt P
* Report the ARM CPUID information from /proc/cpuinfo. * Attempt to detect if running 32-bit on a 64-bit processor. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02arm: a few more cpu flagsBurt P
A few more flags for ARM. No new defitions. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02arm: more flag definitionsBurt P
A few more flag definitions for ARM. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02ARM processor information improvementsBurt P
* Multiple processors/cores reported * CPU min/max/cur frequency information reported * Flag definitions Tested only on Raspberry Pi models 1 and 3. Signed-off-by: Burt P <pburt0@gmail.com>
2017-06-02Cosmetic changes in /modules/devices/arm/processor.cBurt P
Mixed tab/space indentation to all space for indentation. Signed-off-by: Burt P <pburt0@gmail.com>
2015-10-25ARM CPU: detect name from either "Processor" or "model name"jamesbond
2015-10-25ARM fixes.jamesbond
2010-05-05Add processor.c implementation for other supported architecturesLeandro A. F. Pereira