Date: Sat, 26 Sep 2020 13:03:41 -0700 From: Mark Millard <marklmi@yahoo.com> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: hw.cpufreq.sdram_freq displays as -1094000000 for RPi4B booted (via u-boot) with sdram_freq_min=3200 Message-ID: <AB748169-5469-40D7-AA0C-9BA3E59FA4E0@yahoo.com> References: <AB748169-5469-40D7-AA0C-9BA3E59FA4E0.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
h= ttps://www.raspberrypi.org/documentation/configuration/config-txt/overcloc= king.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=3D3200 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=3D3200 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/overclo= cking.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=3D0 instead of over_voltage_sdram=3D-4 in config.txt terms)? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AB748169-5469-40D7-AA0C-9BA3E59FA4E0>