hw.cpufreq.sdram_freq displays as -1094000000 for RPi4B booted (via u-boot) with sdram_freq_min=3200
Mark Millard
marklmi at yahoo.com
Sat Sep 26 20:03:48 UTC 2020
https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md
documents default values for the RPi4B as:
sdram_freq: 3200
sdram_freq_min: 400
(in MHz). (It documents not being able to increase (overclock)
sdram_freq as well.)
So I tried sdram_freq_min=3200 in config.txt and
it seemed to work nicely based on some benchmark
results.
But . . .
FreeBSD mishandles the display of the value that results
when it is this large:
hw.cpufreq.sdram_freq: -1094000000
which for 32-bits 2s complement looks to be: 0xBECAE280
and that, as unsigned, turns back into decimal as: 3,200,967,296
Prior to the sdram_freq_min=3200 use I saw only:
hw.cpufreq.sdram_freq: 400000000
So it seems to be a signed-interpretation problem for
sufficiently large values and otherwise seems okay
for value display.
(It is unclear why I never saw larger values other
than by adjusting sdram_freq_min in config.txt or
by direct sysctl hw.cpufreq.sdram_freq assignments.)
Somewhat related note:
One point that I'm unsure of is:
hw.cpufreq.voltage_sdram_p: 1100000
hw.cpufreq.voltage_sdram_i: 1100000
hw.cpufreq.voltage_sdram_c: 1100000
The config.txt versions of those are documented on:
https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md
as having a default of 1.2v on all models, not 1.1v.
It is possible that these would need adjustment, not
that I've seen evidence of such yet. (Which is good:
I prefer to leave as much automatic as is reasonable
for my experiments.)
In the config.txt file these are over_voltage_sdram_c,
over_voltage_sdram_i, over_voltage_sdram_p and have the
-16..8 range specifying teh nubmer an ddirection of
0.025v steps from the default. 0 is listed as having
1.2v as its matching voltage. There is a
over_voltage_sdram that sets all 3 at once. But
hopefully I'll not have to fiddle with these.
Should FreeBSD have defaults of:
hw.cpufreq.voltage_sdram_p: 1200000
hw.cpufreq.voltage_sdram_i: 1200000
hw.cpufreq.voltage_sdram_c: 1200000
(so over_voltage_sdram=0 instead of over_voltage_sdram=-4
in config.txt terms)?
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-arm
mailing list