Hi all,
Attached patch adds support for CMOS options which can alter DDR Memory, HT GPU, and Sideport Voltages. Also as a quick hack it can change CPU base frequency from 200MHz to something else.
I think this would be nice to show on FOSDEM.It could be extended so not only CPU PLL is programmed but also PCIe etc, also one could adjust the DDR divisors so the memory runs still like on 200MHz (same for HT). Also FID could be changed, but this is not implemented yet. The CPU voltage changes are possible too. It is just a question of writing to SIO...
boot_option = Fallback last_boot = Fallback ECC_memory = Disable baud_rate = 115200 debug_level = Info power_on_after_fail = Disable hw_scrubber = Disable nmi = Disable iommu = Enable interleave_chip_selects = Enable multi_core = Enable slow_cpu = off max_mem_clock = DDR400 cmos_defaults_loaded = Disable ht_voltage = 1.30V sideport_voltage = 1.82V gpu_voltage = 1.10V memory_voltage = 2.60V cpu_freq = 210MHz
Although it is bit hackish I do
Signed-off-by: Rudolf Marek r.marek@assembler.cz
If someone has similar/same board and has more time to work on this it would be very nice!
Not sure If I will be able to prepare it to comittable state before FOSDEM.
Thanks, Rudolf
Nice work, Rudolf!
Index: src/mainboard/asrock/939a785gmh/romstage.c
--- src/mainboard/asrock/939a785gmh/romstage.c (revision 6298) +++ src/mainboard/asrock/939a785gmh/romstage.c (working copy) @@ -48,6 +48,9 @@ #include "southbridge/amd/sb700/early_setup.c" #include "northbridge/amd/amdk8/debug.c" /* After sb700/early_setup.c! */
+#include "option_table.h"
#define SERIAL_DEV PNP_DEV(0x2e, W83627DHG_SP1) #define GPIO2345_DEV PNP_DEV(0x2e, W83627DHG_GPIO2345_V)
@@ -74,7 +77,20 @@ static void sio_init(void) { u8 reg;
- u8 mem_volt = read_option(CMOS_VSTART_memory_voltage, CMOS_VLEN_memory_voltage, 0);
- u8 ht_volt = read_option(CMOS_VSTART_ht_voltage, CMOS_VLEN_ht_voltage, 0);
- u8 gpu_volt = read_option(CMOS_VSTART_gpu_voltage, CMOS_VLEN_gpu_voltage, 0);
- u8 sideport_volt = read_option(CMOS_VSTART_sideport_voltage, CMOS_VLEN_sideport_voltage, 0);
Should these defaults really be all 0? The old defaults seem to be 1 for gpu_volt, and 6 for sideport_volt, 1 for ht_volt
Stefan
Hi,
I think now it matches the old values (minus the MEM voltage which seems to be higher when set to "auto" in Asrock BIOS)
+ /* remap to match the bit meanings */ + mem_volt = 7 - mem_volt; + ht_volt = !ht_volt; + sideport_volt = !sideport_volt; + gpu_volt = 7 - gpu_volt;
Those bit remap it back to reg values. Please tell what you meant if this comment was not helpful.
Thanks, Rudolf
Hello
Attached patch adds support for CMOS options which can alter DDR Memory, HT GPU, and Sideport Voltages. Also it can change CPU base frequency from 200MHz to something else.
It is basically what the patch was, except some minor cleanup.
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Thanks, Rudolf