Dear coreboot folks,
currently the ASRock E350M1 has the following code copied from AMD Inagua for setting voltages.
$ nl -ba src/mainboard/amd/inagua/BiosCallOuts.c […] 487 /* Call the host environment interface to provide a user hook opportunity. */ 488 AGESA_STATUS BiosHookBeforeDramInit(UINT32 Func, UINT32 Data, VOID * ConfigPtr) 489 { 490 AGESA_STATUS Status; 491 UINTN FcnData; 492 MEM_DATA_STRUCT *MemData; 493 UINT32 AcpiMmioAddr; 494 UINT32 GpioMmioAddr; 495 UINT8 Data8; 496 UINT16 Data16; 497 UINT8 TempData8; 498 499 FcnData = Data; 500 MemData = ConfigPtr; 501 502 Status = AGESA_SUCCESS; 503 /* Get SB MMIO Base (AcpiMmioAddr) */ 504 WriteIo8(0xCD6, 0x27); 505 Data8 = ReadIo8(0xCD7); 506 Data16 = Data8 << 8; 507 WriteIo8(0xCD6, 0x26); 508 Data8 = ReadIo8(0xCD7); 509 Data16 |= Data8; 510 AcpiMmioAddr = (UINT32) Data16 << 16; 511 GpioMmioAddr = AcpiMmioAddr + GPIO_BASE; 512 513 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 514 Data8 &= ~BIT5; 515 TempData8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 516 TempData8 &= 0x03; 517 TempData8 |= Data8; 518 Write64Mem8(GpioMmioAddr + SB_GPIO_REG178, TempData8); 519 520 Data8 |= BIT2 + BIT3; 521 Data8 &= ~BIT4; 522 TempData8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 523 TempData8 &= 0x23; 524 TempData8 |= Data8; 525 Write64Mem8(GpioMmioAddr + SB_GPIO_REG178, TempData8); 526 527 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 528 Data8 &= ~BIT5; 529 TempData8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 530 TempData8 &= 0x03; 531 TempData8 |= Data8; 532 Write64Mem8(GpioMmioAddr + SB_GPIO_REG179, TempData8); 533 534 Data8 |= BIT2 + BIT3; 535 Data8 &= ~BIT4; 536 TempData8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 537 TempData8 &= 0x23; 538 TempData8 |= Data8; 539 Write64Mem8(GpioMmioAddr + SB_GPIO_REG179, TempData8); 540 541 switch (MemData->ParameterListPtr->DDR3Voltage) { 542 case VOLT1_35: 543 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 544 Data8 &= ~(UINT8) BIT6; 545 Write64Mem8(GpioMmioAddr + SB_GPIO_REG178, Data8); 546 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 547 Data8 |= (UINT8) BIT6; 548 Write64Mem8(GpioMmioAddr + SB_GPIO_REG179, Data8); 549 break; 550 case VOLT1_25: 551 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 552 Data8 &= ~(UINT8) BIT6; 553 Write64Mem8(GpioMmioAddr + SB_GPIO_REG178, Data8); 554 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 555 Data8 &= ~(UINT8) BIT6; 556 Write64Mem8(GpioMmioAddr + SB_GPIO_REG179, Data8); 557 break; 558 case VOLT1_5: 559 default: 560 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG178); 561 Data8 |= (UINT8) BIT6; 562 Write64Mem8(GpioMmioAddr + SB_GPIO_REG178, Data8); 563 Data8 = Read64Mem8(GpioMmioAddr + SB_GPIO_REG179); 564 Data8 &= ~(UINT8) BIT6; 565 Write64Mem8(GpioMmioAddr + SB_GPIO_REG179, Data8); 566 } 567 return Status; 568 } […]
The attached screenshot from Alvaro shows, that the vendor BIOS of the ASRock E350M1 [1] offers even more options for the voltages. Especially the AUTO options sounds nice.
First I have to say, that I have not tried yet to change the voltage on my ASRock E350M1, so I have no idea if the code from AMD Inagua works or not.
Secondly I have no idea how to check under the operating system, what the voltage is.
So how would I find out what to do on the ASRock E350M1 without having any schematics?
a) Disassemble the vendor BIOS binary? b) Use SerialICE and look at the differences when changing the option in the vendor BIOS menu?
Thanks,
Paul
[1] http://www.asrock.com/mb/overview.asp?cat=Download&os=BIOS&Model=E35...