Global Variables:
BUSNUM=$((0x3))
VRMADDRW=$((0x20))
VRMADDRR=$(($VRMADDRW<<1 | 1))
ipmitool i2c bus=$BUSNUM $VRMADDRR 0x01 0x01 # Read OPERATION, 1byte
ipmitool i2c bus=$BUSNUM $VRMADDRR 0x02 0xe4 # Read MFR_VR_CONFIG, 2byte
Note: the 2bytes responsed of MFR_VR_CONFIG is lower byte first
Setting this regisiter to 0xffff will overvolt and destory the CPU, we set it 0x0000 here for testing and crash the system
ipmitool i2c bus=$BUSNUM $VRMADDRW 0x00 0x21 0x00 0x00 # Write 0x0000 to VOUT_CMD and read 0 bytes,
<OPERATION REG value> = <the OPERATION REG read from Step 1> | 0x20
echo "Configuring OPERATION"
ipmitool i2c bus=$BUSNUM $VRMADDRW 0x00 0x01 <OPERATION REG value>
<lower byte> = <lower byte from step 1> | 0x8
IMPORTANT: Also make sure bit 0 of the higher byte is 1, otherwith it is using 10mV SVID table which can DESTORY the CPU!!!!!
echo "Configuring MFR_VR_CONFIG"
ipmitool i2c bus=$BUSNUM $VRMADDRW 0x00 0xe4 <lower byte> <higher byte>