Board:asus/m4a785t-m: Difference between revisions

From coreboot
Jump to navigation Jump to search
m (Correct link to M4A785T-M version)
 
(76 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This HOWTO explains how to use coreboot on the M4A785T-M board. The main difference between the '''[https://www.asus.com/Motherboards/M4A785M/ ASUS M4A785-M]''' and the '''[https://www.asus.com/Motherboards/M4A785TM/ M4A785T-M]''' is the support of DDR3 on the latter.
== Status ==
== Status ==
=== RAM issue ===
* 32bit untested.
* 64bit was tested and works with 2G of RAM.
** When using more than 4G of RAM, I can't boot GNU/Linux anymore:
***USB devices not seen, some errors -71), with mem=4000M, that works ok again.
***SATA devices are also not seen, and with mem=4000M, it also works ok again.
=== Status ===
{{Status|
{{Status|


|CPU_status = OK
|CPU_status = OK
|CPU_comments = Tested: AMD Athlon64 X2 250.
|CPU_comments = Tested: AMD Athlon64 X2 240e.
|CPU_L1_status = Untested
|CPU_L1_status = Unknown
|CPU_L1_comments = Not tested yet
|CPU_L1_comments = How to test?
|CPU_L2_status = Untested
|CPU_L2_status = Unknown
|CPU_L2_comments = Not tested yet
|CPU_L2_comments = How to test?
|CPU_L3_status = N/A
|CPU_L3_status = N/A
|CPU_multiple_status = N/A
|CPU_multiple_status = N/A
|CPU_multicore_status = OK
|CPU_multicore_status = Unknown
|CPU_virt_status = OK
|CPU_virt_status = Unknown
|CPU_virt_comments = KVM seem to work
 
|RAM_EDO_status = N/A
|RAM_EDO_status = N/A
|RAM_SDRAM_status = N/A
|RAM_SDRAM_status = N/A
|RAM_SODIMM_status = N/A
|RAM_SODIMM_status = N/A
|RAM_DDR_status = N/A
|RAM_DDR_status = N/A
|RAM_DDR_comments = N/A
|RAM_DDR2_status = Unknown
|RAM_DDR2_status = Untested
|RAM_DDR3_status = No
|RAM_DDR3_status = OK
|RAM_DDR3_comments = 2G works, 4G or more have issues.
|RAM_DDR3_comments = 2G works, 4G(2 * 2G) works with lastest coreboot
|RAM_dualchannel_status = Untested
|RAM_dualchannel_status = Untested
|RAM_ecc_status = Untested
|RAM_ecc_status = Untested
|RAM_ecc_comments =  
|RAM_ecc_comments = I'm not sure if hardware supports it.
 
|IDE_status = Untested
|IDE_status = OK
|IDE_comments = Tested: 500GB HDD
|IDE_25_status = N/A
|IDE_25_status = N/A
|IDE_CF_status = untested
|IDE_CF_status = N/A
|IDE_CF_comments =
|CDROM_DVD_status = Untested
|CDROM_DVD_status = -
|SATA_status = Untested
|CDROM_DVD_comments =
|SATA_comments = At least 2 of the 6 SATA port works. The rest is untested.
|SATA_status = OK
|SATA_comments = Tested some ports, works fine
|Onboard_SCSI_status = N/A
|USB_status = OK
|USB_status = OK
|USB_comments = USB keyboard works
|USB_comments = tested in SeaBIOS and with the linux-libre kernel.
|Onboard_VGA_status = OK
|Onboard_VGA_status = Untested
|Onboard_VGA_comments = Tested:analog VGA and HDMI,dual screen.
|Onboard_VGA_comments = I only tested the external GPU, see below for more informations.
|Onboard_ethernet_status = OK
|Onboard_ethernet_status = OK
|Onboard_audio_status = No
|Onboard_ethernet_comments = Tested in linux-libre and ipxe, works flawlessly.
|Onboard_audio_comments = Linux driver crashes.
|Onboard_audio_status = Untested
|Onboard_audio_comments = Not tested but it boots fine with it and the sound card appears.
|Onboard_modem_status = N/A
|Onboard_modem_status = N/A
|Onboard_firewire_status = N/A
|Onboard_firewire_status = N/A
Line 48: Line 51:
|Onboard_CF_status = N/A
|Onboard_CF_status = N/A
|Onboard_PCMCIA_status = N/A
|Onboard_PCMCIA_status = N/A
|ISA_cards_status = N/A
|ISA_cards_status = N/A
|AMR_cards_status = N/A
|AMR_cards_status = N/A
|PCI_cards_status = OK
|PCI_cards_status = OK
|PCI_cards_comments = I've an ath9k wifi PCI card and it works.
|PCI_cards_comments = Tested booting on an ATA sil card: booting on it works when adding its PCI ID to coreboot.
|Mini_PCI_cards_status = N/A
|Mini_PCI_cards_status = N/A
|PCIX_cards_status = N/A
|PCIX_cards_status = N/A
|AGP_cards_status = N/A
|AGP_cards_status = N/A
|PCIE_x1_status = Untested
|PCIE_x1_status = Untested
|PCIE_x1_comments =
|PCIE_x2_status = Untested
|PCIE_x2_status = N/A
|PCIE_x4_status = Untested
|PCIE_x4_status = N/A
|PCIE_x8_status = Untested
|PCIE_x8_status = N/A
|PCIE_x16_status = OK
|PCIE_x16_status = WIP
|PCIE_x16_comments = Works with "02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 210] [10de:0a65] (rev a2)"
|PCIE_x16_comments = a clean way to merge the patch must be found.
|PCIE_x32_status = N/A
|HTX_status = N/A
|HTX_status = N/A
|Floppy_status = N/A
|Floppy_status = N/A
|Floppy_comments = There is no floppy connector at all.
|Floppy_comments = There is no floppy connector. There seem to be an unpopulated header for it.
|COM1_status = OK
|COM1_status = OK
|COM1_comments = COM1 is only pin header on board. DB-9 serial connector is available, but not included with board.
|COM1_comments = [[Serial_console#Non-standard_.22intel_configuration.22_10_pins_header|10 pins intel header]]
|COM2_status = N/A
|COM2_status = N/A
|PP_status = Untested
|PP_status = Untested
|PP_comments = No connector, pins on board only
|PP_comments = Headers on board only.
|PS2_keyboard_status = OK
|PS2_keyboard_status = Untested
|PS2_keyboard_comments =
|PS2_mouse_status = Untested
|PS2_mouse_status = Untested
|PS2_mouse_comments =
|Game_port_status = N/A
|Game_port_status = N/A
|IR_status = N/A
|IR_status = Untested
|IR_status_comments = I'm not sure if that mainboard has a connector for it.
|Speaker_status = Untested
|Speaker_status = Untested
|DiskOnChip_status = N/A
|DiskOnChip_status = N/A
|Sensors_status = Untested
|Sensors_status = Untested
|Sensors_comments =
|Watchdog_status = Untested
|Watchdog_status = N/A
|CAN_bus_status = N/A
|CAN_bus_status = N/A
|CPUfreq_status = OK
|CPUfreq_status = Untested
|CPUfreq_comments = works in GNU/Linux
|Powersave_status = Untested
|Powersave_status = Untested
|ACPI_status = Untested
|ACPI_status = Untested
|Reboot_status = OK
|Reboot_status = OK
|Poweroff_status = OK
|Poweroff_status = OK
|LEDs_status =  
|LEDs_status = Untested
|LEDs_comments =
|HPET_status = Untested
|HPET_status =  
|HPET_comments =
|RNG_status = Untested
|RNG_status = Untested
|WakeOnModem_status = Untested
|WakeOnModem_status = Untested
|WakeOnLAN_status =  
|WakeOnLAN_status = Untested
|WakeOnKeyboard_status = Untested
|WakeOnKeyboard_status = Untested
|WakeOnMouse_status = Untested
|WakeOnMouse_status = Untested
|Flashrom_status = OK
|Flashrom_status = OK
|Flashrom_comments = The chip is SPI
|Flashrom_comments = Works fine from coreboot to coreboot, and from BIOS to coreboot. From coreboot to BIOS works but you may have to do some tricks like clearing CMOS to make it start again.
 
}}
}}


== Introduction ==
== proprietary components status ==
This pages is about the port to the M4A785T-M, this mainboard is very similar to the M4A785-M, but:
* Optional CPU Microcode
* it has DDR3 instead of DDR2
* Optional VGA option rom: wihtout it you will get no graphics, Note that if you use an external graphic card, SeaBIOS load the option rom with its default configuration from the graphic card.
 
** You can also patch SeaBIOS to put the option rom in memory without running it. That way the linux driver will then find the option rom bytecodes and tables to initialize that GPU.
== Building the serial port adapter ==
  From 83bbd30b3ef76fc346c417fa08ba716b4e2fb179 Mon Sep 17 00:00:00 2001
You'll need to build a serial port adapter to get the coreboot logs during.
Here's a picture of the serial port connector on the mainboard:<br />
[[Image:ASUS_M4A785T-M_serial_connector_witout_serial_adapter.jpeg]]<br />
And here's the kind of cable you will need:<br />
[[Image:ASUS_M4A785T-M_serial_connector_with_serial_adapter.jpeg]]<br />
And you'll need to build a cable similar to this one(on the picture the DB9 is connector is a male connector):<br />
[[Image:ASUS_M4A785T-M_serial_cable.jpeg]]<br />
Here's how it looks like on the mainboard:
_____________________
|
|NC|09|
|08|07|
|06|05|
|04|03|
|02|01|
|
|
Here's a table of corresponding pins:
 
{| class="wikitable"  border="1"
!Mainboard connector pin
!Mainboard pin Function
!Standard DE9 pin connector
!Standard DE9 pin Function
!Mandatory for coreboot
|-
|1
|?
|?
|?
|No
|-
|2
|RX
|3
|TX
|Yes (you could do without but it's advised to get it, to be able to use certain functions of coreboot)
|-
|3
|TX
|2
|RX
|Yes
|-
|4
|
|4
|DTR
|No
|-
|5
|Ground
|5
|Ground
|Yes
|-
|6
|?
|?
|?
|No
|-
|7
|
|7
|RTS
|No
|-
|8
|
|8
|CTS
|No
|-
|9
|?
|?
|?
|No
|-
|}
 
== Adapting GNU/Linux ==
Before booting with coreboot, do the following:
* blacklist the snd-hda* modules (refer to the usual way to get help for the GNU/Linux distribution you want to run for doing that)
* 32bit GNU/Linux trisquel distribution tested
* 64bit GNU/Linux trisquel distribution failed to initialize the USB.
 
== Building Coreboot ==
To build coreboot for this mainboard:
* checkout coreboot revision 1b1309f289d6fc9f6ec348686665d25218535030
* Configure and Build it as usual(for having graphics you need to extract your VGA BIOS ROM from your BIOS)
 
== PCIe ==
=== Patch 1 ===
==== Patch1 Requirements/Issues ====
* the -pae kernel didn't boot my LUKS hdd(failed at cryptsetup password entering)... => using a -generic kernel worked(however that sees only 2772M in htop(I've 4GB))
* if you remove the PCIe card, the integrated ATI card won't come up...
* you only see the external graphic card in lspci, like with the BIOS, which seem to be the way to go...
 
==== Patch1 ====
  From ab15ce791543cb0c1a09317962fe6bdc79e4e1b3 Mon Sep 17 00:00:00 2001
  From: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
  From: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
  Date: Tue, 18 Sep 2012 19:35:44 +0200
  Date: Sat, 7 Mar 2015 15:39:52 +0100
  Subject: [PATCH] IRQ tables for getting the PCIe graphic card working
  Subject: [PATCH] Kconfig: Add option not to run option roms
   
   
Thanks a lot for the help trough IRC in the #coreboot channel
  on the Freenode servers.
Change-Id: Ie99ee5adaf997cb94c96eb1942d1089ab2528f85
  Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
  Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
  ---
  ---
   src/mainboard/asus/m4a785t-m/devicetree.cb |   6 +++---
   src/Kconfig      | 8 ++++++++
   1 files changed, 3 insertions(+), 3 deletions(-)
  src/optionroms.c | 2 ++
   2 files changed, 10 insertions(+)
   
   
  diff --git a/src/mainboard/asus/m4a785t-m/devicetree.cb b/src/mainboard/asus/m4a785t-m/devicetree.cb
  diff --git a/src/Kconfig b/src/Kconfig
  index e8764b1..7095afd 100644
  index b873cd3..2438ab7 100644
  --- a/src/mainboard/asus/m4a785t-m/devicetree.cb
  --- a/src/Kconfig
  +++ b/src/mainboard/asus/m4a785t-m/devicetree.cb
  +++ b/src/Kconfig
  @@ -10,8 +10,8 @@ chip northbridge/amd/amdfam10/root_complex
  @@ -403,6 +403,14 @@ menu "BIOS interfaces"
  device pci 18.0 on # northbridge
          default y
  chip southbridge/amd/rs780
          help
  device pci 0.0 on end # HT  0x9600
              Support Post Memory Manager (PMM) entry point.
  - device pci 1.0 on end # Internal Graphics P2P bridge 0x9602
+    config OPTIONROMS_NORUN
  - device pci 2.0 off end # PCIE P2P bridge (external graphics) 0x9603
+        depends on OPTIONROMS
  + device pci 1.0 off end # Internal Graphics P2P bridge 0x9602
  +        bool "Put the option roms in memory, but don't run them"
  + device pci 2.0 on end # PCIE P2P bridge (external graphics) 0x9603
+        default n
  device pci 3.0 off end # PCIE P2P bridge 0x960b
+        help
  device pci 4.0 off end # PCIE P2P bridge 0x9604
  +            Some GPU drivers are capable of initializing the display alone,
  device pci 5.0 off end # PCIE P2P bridge 0x9605
  +            but they still require some data from the option rom.
  @@ -24,7 +24,7 @@ chip northbridge/amd/amdfam10/root_complex
  +
  register "gpp_configuration" = "3"   # Configuration D default
      config BOOT
  register "port_enable" = "0x6fc"
          bool "Boot interface"
  register "gfx_dev2_dev3" = "1"
          default y
  - register "gfx_dual_slot" = "2"
diff --git a/src/optionroms.c b/src/optionroms.c
  + register "gfx_dual_slot" = "0"
  index c81eff2..c7c89da 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
  @@ -53,7 +53,9 @@ __callrom(struct rom_header *rom, u16 offset, u16 bdf)
   void
  callrom(struct rom_header *rom, u16 bdf)
  {
  +#if (!CONFIG_OPTIONROMS_NORUN)
      __callrom(rom, OPTION_ROM_INITVECTOR, bdf);
  +#endif
  }
    
    
  register "gfx_lane_reversal" = "0"
  // Execute a BCV option rom registered via add_bcv().
  register "gfx_tmds" = "0"
  --  
  --  
  1.7.5.4
  2.6.2
 
== Building the serial port adapter ==
The serial port is available on the [[Serial_console#Non-standard_.22intel_configuration.22_10_pins_header|10 pin "intel" header]].


=== Patch 2 ===
== Adapting GNU/Linux ==
==== Patch2 Requirements/Issues  ====
Add mem=4000M to the kennel cmdline, that can be done by adding the following to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and regenerating grub.cfg:
* see both cards and memory regions have some issues because of that.
  mem=4096M
* VESA works
* -pae works
* nouveau fails like that:
[drm] nouveau 0000:02:00.0: Detected an NV50 generation card (0x0a8280b1)
[drm] nouveau 0000:02:00.0: Failed to PRAMIN BAR
nouveau 0000:02:00.0: PCI INT A disabled
  nouveau: probe of 0000:02:00.0 failed with error -12
Which is caused by:
pci 0000:02:00.0: BAR 1: trying firmware assignment [mem 0xa0000000-0xafffffff 64bit pref]
pci 0000:02:00.0: BAR 1: [mem 0xa0000000-0xafffffff 64bit pref] conflicts with reserved [mem 0xaffe0000-0xbfffffff]
pci 0000:02:00.0: BAR 1: can't assign mem pref (size 0x10000000)
pci 0000:02:00.0: BAR 3: trying firmware assignment [mem 0xb0000000-0xb1ffffff 64bit pref]
pci 0000:02:00.0: BAR 3: [mem 0xb0000000-0xb1ffffff 64bit pref] conflicts with reserved [mem 0xaffe0000-0xbfffffff]
pci 0000:02:00.0: BAR 3: can't assign mem pref (size 0x2000000)


==== Patch2 ====
== TODO ==
diff --git a/src/mainboard/asus/m4a785t-m/devicetree.cb b/src/mainboard/asus/m4a785t-m/devicetree.cb
* <s>Add defaults for the nvram settings.</s>
index e8764b1..905e5d3 100644
* <s>find a clean way to merge the patch for the PCIe graphic card.</s>
--- a/src/mainboard/asus/m4a785t-m/devicetree.cb
* <s>fix the Audio CODEC(it's the same than the x60 and it works on the x60)</s>Test audio
+++ b/src/mainboard/asus/m4a785t-m/devicetree.cb
* Fix RAM layout to prevent issues with more than 4G of RAM
@@ -11,7 +11,7 @@ chip northbridge/amd/amdfam10/root_complex
* lock SMM/SMI if it's not already
                                chip southbridge/amd/rs780
* make it possible to run the BIOS under serialICE
                                        device pci 0.0 on end # HT      0x9600
* Native GPU init for ATI and Nvidia GPUs
                                        device pci 1.0 on end # Internal Graphics P2P bridge 0x9602
-                                      device pci 2.0 off end # PCIE P2P bridge (external graphics) 0x9603
+                                      device pci 2.0 on end # PCIE P2P bridge (external graphics) 0x9603
                                        device pci 3.0 off end # PCIE P2P bridge        0x960b
                                        device pci 4.0 off end # PCIE P2P bridge 0x9604
                                        device pci 5.0 off end # PCIE P2P bridge 0x9605
@@ -24,7 +24,7 @@ chip northbridge/amd/amdfam10/root_complex
                                        register "gpp_configuration" = "3"  # Configuration D default
                                        register "port_enable" = "0x6fc"
                                        register "gfx_dev2_dev3" = "1"
-                                      register "gfx_dual_slot" = "2"
+                                      register "gfx_dual_slot" = "0"
 
                                        register "gfx_lane_reversal" = "0"
                                        register "gfx_tmds" = "0"


== SerialICE ==
== SerialICE ==
Line 303: Line 175:
  make
  make


=== Failing ===
  cd ../
It fails like that:
  cd qemu-0.15.x
  [f000:8943] 3e52.3e54  NVram: [0e] => 00
  sh build.sh
[f000:8941] 3e52.3e57  NVram: [4d] => 01
  ln -s ../SerialICE/simba/*.lua ./
[f000:bbe5] 3e64.3e65  IO,PCI: outl 0cf8 <= 8000a040
 
  [f000:bc01] 3e64.3e66  PCI: 0:14.0 [41] => 13
Add the following to asus_m4a77td_pro.lua:
[f000:bc01] 3e64.3e66  IO,PCI:  inb 0cfd => 13
  microcode_patchlevel_eax = 0x010000b7
  [f000:bc2f] 3e67.3e68  IO,PCI: outl 0cf8 <= 8000a040
  [f000:bc4d] 3e67.3e69  PCI: 0:14.0 [41] <= 13
[f000:bc4d] 3e67.3e69  IO,PCI: outb 0cfd <= 13
[f000:bdc2] 3e6a.3e6b  IO,PCI: outl 0cf8 <= 8000a348
[f000:bc03] 3e6a.3e6c  PCI: 0:14.3 [48] => 13
[f000:bc03] 3e6a.3e6c  IO,PCI:  inb 0cfc => 13
[f000:bda0] 3e6d.3e6e  IO,PCI: outl 0cf8 <= 8000a348
[f000:bc4b] 3e6d.3e6f  PCI: 0:14.3 [48] <= 13
[f000:bc4b] 3e6d.3e6f  IO,PCI: outb 0cfc <= 13
[f000:bbe5] 3e70.3e71  IO,PCI: outl 0cf8 <= 8000a36c
[f000:bc01] 3e70.3e72  PCI: 0:14.3 [6c] => b0
[f000:bc01] 3e70.3e72  IO,PCI:  inb 0cfc => b0
[f000:bc2f] 3e73.3e74  IO,PCI: outl 0cf8 <= 8000a36c
[f000:bc4d] 3e73.3e75  PCI: 0:14.3 [6c] <= b0
[f000:bc4d] 3e73.3e75  IO,PCI: outb 0cfc <= b0
[f000:3d80] 3e7e.3e7f  CPU MSR: [00000201] => 00000000.00000000
[f000:3d89] 3e7e.3e80  CPU MSR: [00000201] <= 00000000.00000000
[f000:3d80] 3e7e.3e81  CPU MSR: [00000203] => 00000000.00000000
  [f000:3d89] 3e7e.3e82  CPU MSR: [00000203] <= 00000000.00000000
[f000:3d80] 3e7e.3e83  CPU MSR: [00000205] => 00000000.00000000
[f000:3d89] 3e7e.3e84  CPU MSR: [00000205] <= 00000000.00000000
[f000:3d80] 3e7e.3e85  CPU MSR: [00000207] => 00000000.00000000
[f000:3d89] 3e7e.3e86  CPU MSR: [00000207] <= 00000000.00000000
[f000:3d80] 3e7e.3e87  CPU MSR: [00000209] => 00000000.00000000
[f000:3d89] 3e7e.3e88  CPU MSR: [00000209] <= 00000000.00000000
[f000:3d80] 3e7e.3e89  CPU MSR: [0000020b] => 00000000.00000000
[f000:3d89] 3e7e.3e8a  CPU MSR: [0000020b] <= 00000000.00000000
[f000:3d80] 3e7e.3e8b  CPU MSR: [0000020d] => 00000000.00000000
[f000:3d89] 3e7e.3e8c  CPU MSR: [0000020d] <= 00000000.00000000
[f000:3d80] 3e7e.3e8d  CPU MSR: [0000020f] => 00000000.00000000
[f000:3d89] 3e7e.3e8e  CPU MSR: [0000020f] <= 00000000.00000000
[f000:3deb] 3e7e.3eb0  CPU MSR: [0000020f] => 00000000.00000000
[f000:3def] 3e7e.3eb1  CPU MSR: [0000020f] <= 00000000.00000000
[f000:3deb] 3e7e.3eb2  CPU MSR: [0000020d] => 00000000.00000000
[f000:3def] 3e7e.3eb3  CPU MSR: [0000020d] <= 00000000.00000000
[f000:3deb] 3e7e.3eb4  CPU MSR: [0000020b] => 00000000.00000000
[f000:3def] 3e7e.3eb5  CPU MSR: [0000020b] <= 00000000.00000000
[f000:3deb] 3e7e.3eb6  CPU MSR: [00000209] => 00000000.00000000
[f000:3def] 3e7e.3eb7  CPU MSR: [00000209] <= 00000000.00000000
[f000:3deb] 3e7e.3eb8  CPU MSR: [00000207] => 00000000.00000000
[f000:3def] 3e7e.3eb9  CPU MSR: [00000207] <= 00000000.00000000
[f000:3deb] 3e7e.3eba  CPU MSR: [00000205] => 00000000.00000000
[f000:3def] 3e7e.3ebb  CPU MSR: [00000205] <= 00000000.00000000
[f000:3deb] 3e7e.3ebc  CPU MSR: [00000203] => 00000000.00000000
[f000:3def] 3e7e.3ebd  CPU MSR: [00000203] <= 00000000.00000000
[f000:3deb] 3e7e.3ebe  CPU MSR: [00000201] => 00000000.00000000
[f000:3def] 3e7e.3ebf  CPU MSR: [00000201] <= 00000000.00000000
[f000:22d7] 3eda.3edb  CPUID: eax: 00000001; ecx: 00004000 => 00100f62.00020800.00802009.178bfbff
[f000:8943] 3edc.3ede  NVram: [4d] => 01
[f000:2207] 3ef4.3ef5  CPU MSR: [c0010020] <= 00000000.fffad3a0
With:
$ cat asus_m4a77td_pro.lua
dofile("i82801.lua")
   
   
  function do_mainboard_setup()
  function do_mainboard_setup()
do_minimal_setup()
  do_default_setup()
  do_default_setup()
  enable_hook(cpumsr_hooks, filter_amd_microcode)
  enable_hook_i82801dx()
-- Apply mainboard hooks last, so they are the first ones to check
--enable_hook(io_hooks, filter_mainboard)
  end
  end


== TODO ==
=== Failing ===
* Add defaults for the nvram settings.
It fails like that(it inits the 2 cores and we have 1 core(qemu)):
* find a clean way to merge the patch for the PCIe graphic card.
[fffc06a:0c0f] e25f.e260  LAPIC: [00000380] <= 00000000
* fix the Audio CODEC(it's the same than the x60 and it works on the x60).
[fffc06a:1321] e26b.e26d  PCI: 0:18.0 [60] => 00010000
* handle suspend to ram
[fffc06a:12e3] e273.e275  PCI: 0:18.3 [e8] => 00075f79
* lock SMM/SMI
[fffc06a:1397] e27e.e27f  CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
* make it possible to run the BIOS under serialICE
[fffc06a:1321] e290.e292  PCI: 0:18.3 [e8] => 00075f79
* 64bit support
[fffc06a:1397] e297.e298  CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
[fffc06a:121e] e2a5.e2a6  CPUID: eax: 80000001; ecx: 0000001b => 00100f62.10001b26.000037ff.efd3fbff
[fffc06a:12ff] e2bb.e2bc  CPUID: eax: 80000008; ecx: 0000001b => 00003030.00000000.00002001.00000000
[fffc06a:130c] e2bf.e2c0  CPU MSR: [c001001f] => 00584000.00000008
[fffc06a:131d] e2c4.e2c5  CPU MSR: [c001001f] <= 00584000.00000008
[fffc06a:131d] e2cf.e2d1  PCI: 0:18.3 [90] => 00000000
[fffc06a:1348] e2dc.e2dd  CPUID: eax: 80000008; ecx: 0000001b => 00003030.00000000.00002001.00000000
[fffc06a:135d] e2e2.e2e3  CPU MSR: [c001001f] <= 00584000.00000008
[fffc06a:0b7d] e2f2.e2f3  CPU MSR: [0000001b] => 00000000.fee00900
[fffc06a:0b7d] e2f4.e2f5  LAPIC: [00000020] => 00000000
[fffc06a:127a] e2f9.e2fa  CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
[fffc06a:1289] e2f9.e2fb  CPUID: eax: 80000008; ecx: 00802009 => 00003030.00000000.00002001.00000000
[fffc06a:1057] e302.e304  PCI: 0:18.0 [68] => 004fac0f
[fffc06a:1071] e30d.e30f  PCI: 0:18.0 [68] <= 004fac2f
Readback error! 30/72
Readback error! a/63
Readback error! 72/30
Readback error! 3e/30
Readback error! 20/30
Readback error! 63/30
Readback error! 66/30
Readback error! 45/30
Readback error! a/31
Readback error! 52/62
Readback error! 3e/2e
Readback error! 52/66
Readback error! 20/66
Readback error! 4f/66
Readback error! 30/65
Readback error! 52/62
Readback error! a/30
Readback error! a/30
Readback error! 3e/30
[fffc06a:0c50] e31d.e31e  CPU MSR: [0000001b] => 00000000.00000000

Latest revision as of 18:59, 13 October 2016

This HOWTO explains how to use coreboot on the M4A785T-M board. The main difference between the ASUS M4A785-M and the M4A785T-M is the support of DDR3 on the latter.

Status

RAM issue

  • 32bit untested.
  • 64bit was tested and works with 2G of RAM.
    • When using more than 4G of RAM, I can't boot GNU/Linux anymore:
      • USB devices not seen, some errors -71), with mem=4000M, that works ok again.
      • SATA devices are also not seen, and with mem=4000M, it also works ok again.

Status

Device/functionality Status Comments
CPU
CPU works OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK Tested: AMD Athlon64 X2 240e.
L1 cache enabled OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown How to test?
L2 cache enabled OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown How to test?
L3 cache enabled OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Multiple CPU support OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Multi-core support OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
Hardware virtualization OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
RAM
EDO OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
SDRAM OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
SO-DIMM OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
DDR OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
DDR2 OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
DDR3 OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | No 2G works, 4G or more have issues.
Dual channel support OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
ECC support OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested I'm not sure if hardware supports it.
On-board Hardware
On-board IDE 3.5" OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
On-board IDE 2.5" OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board SATA OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested At least 2 of the 6 SATA port works. The rest is untested.
On-board SCSI OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
On-board USB OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK tested in SeaBIOS and with the linux-libre kernel.
On-board VGA OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested I only tested the external GPU, see below for more informations.
On-board Ethernet OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK Tested in linux-libre and ipxe, works flawlessly.
On-board Audio OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested Not tested but it boots fine with it and the sound card appears.
On-board Modem OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board FireWire OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board Smartcard reader OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board CompactFlash OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board PCMCIA OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board Wifi OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board Bluetooth OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
On-board SD card reader OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Add-on slots/cards
ISA add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Audio/Modem-Riser (AMR/CNR) cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
PCI add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK Tested booting on an ATA sil card: booting on it works when adding its PCI ID to coreboot.
Mini-PCI add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Mini-PCI-Express add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
PCI-X add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
AGP graphics cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
PCI Express x1 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PCI Express x2 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PCI Express x4 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PCI Express x8 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PCI Express x16 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK Works with "02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 210] [10de:0a65] (rev a2)"
PCI Express x32 add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
HTX add-on cards OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Legacy / Super I/O
Floppy OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A There is no floppy connector. There seem to be an unpopulated header for it.
Serial port 1 (COM1) OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK 10 pins intel header
Serial port 2 (COM2) OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Parallel port OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested Headers on board only.
PS/2 keyboard OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PS/2 mouse OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Game port OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Infrared OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
PC speaker OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
DiskOnChip OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Input
Trackpoint OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Touchpad OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Fn Hotkeys OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Fingerprint Reader OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Laptop
Docking VGA OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Docking LAN OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Docking USB OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Docking Audio OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Docking Displayport OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Thinklight OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Webcam OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
Miscellaneous
Sensors / fan control OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Hardware watchdog OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
SMBus OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
CAN bus OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | N/A
CPU frequency scaling OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Other powersaving features OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
ACPI OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Reboot OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK
Poweroff OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK
Suspend OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
Nonstandard LEDs OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
High precision event timers (HPET) OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Random number generator (RNG) OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Wake on modem ring OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Wake on LAN OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Wake on keyboard OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
Wake on mouse OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Untested
TPM OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | Unknown
Flashrom OK=lime | TODO=red | No=red | WIP=orange | Untested=yellow | N/A=lightgray | yellow }}" | OK Works fine from coreboot to coreboot, and from BIOS to coreboot. From coreboot to BIOS works but you may have to do some tricks like clearing CMOS to make it start again.

proprietary components status

  • Optional CPU Microcode
  • Optional VGA option rom: wihtout it you will get no graphics, Note that if you use an external graphic card, SeaBIOS load the option rom with its default configuration from the graphic card.
    • You can also patch SeaBIOS to put the option rom in memory without running it. That way the linux driver will then find the option rom bytecodes and tables to initialize that GPU.
From 83bbd30b3ef76fc346c417fa08ba716b4e2fb179 Mon Sep 17 00:00:00 2001
From: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Date: Sat, 7 Mar 2015 15:39:52 +0100
Subject: [PATCH] Kconfig: Add option not to run option roms

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 src/Kconfig      | 8 ++++++++
 src/optionroms.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/src/Kconfig b/src/Kconfig
index b873cd3..2438ab7 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -403,6 +403,14 @@ menu "BIOS interfaces"
         default y
         help
             Support Post Memory Manager (PMM) entry point.
+    config OPTIONROMS_NORUN
+        depends on OPTIONROMS
+        bool "Put the option roms in memory, but don't run them"
+        default n
+        help
+            Some GPU drivers are capable of initializing the display alone,
+            but they still require some data from the option rom.
+
     config BOOT
         bool "Boot interface"
         default y
diff --git a/src/optionroms.c b/src/optionroms.c
index c81eff2..c7c89da 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -53,7 +53,9 @@ __callrom(struct rom_header *rom, u16 offset, u16 bdf)
 void
 callrom(struct rom_header *rom, u16 bdf)
 {
+#if (!CONFIG_OPTIONROMS_NORUN)
     __callrom(rom, OPTION_ROM_INITVECTOR, bdf);
+#endif
 }
 
 // Execute a BCV option rom registered via add_bcv().
-- 
2.6.2

Building the serial port adapter

The serial port is available on the 10 pin "intel" header.

Adapting GNU/Linux

Add mem=4000M to the kennel cmdline, that can be done by adding the following to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and regenerating grub.cfg:

mem=4096M

TODO

  • Add defaults for the nvram settings.
  • find a clean way to merge the patch for the PCIe graphic card.
  • fix the Audio CODEC(it's the same than the x60 and it works on the x60)Test audio
  • Fix RAM layout to prevent issues with more than 4G of RAM
  • lock SMM/SMI if it's not already
  • make it possible to run the BIOS under serialICE
  • Native GPU init for ATI and Nvidia GPUs

SerialICE

  • Selecting the ASUS M4A77TD-PRO mainboard makes the serialICE shell appear once flashed(however running the BIOS under SerialICE fails at some point).

Howto

WARNING, This Howto is for SerialICE and not for coreboot, don't flash the resulting image unless you really know what you're doing...
git clone http://review.coreboot.org/p/serialice.git
cd serialice
make menuconfig
make
cd ../
cd qemu-0.15.x
sh build.sh
ln -s ../SerialICE/simba/*.lua ./

Add the following to asus_m4a77td_pro.lua:

microcode_patchlevel_eax = 0x010000b7

function do_mainboard_setup()
	do_minimal_setup()
	do_default_setup()
	enable_hook(cpumsr_hooks, filter_amd_microcode)
end

Failing

It fails like that(it inits the 2 cores and we have 1 core(qemu)):

[fffc06a:0c0f] e25f.e260   LAPIC: [00000380] <= 00000000
[fffc06a:1321] e26b.e26d   PCI: 0:18.0 [60] => 00010000
[fffc06a:12e3] e273.e275   PCI: 0:18.3 [e8] => 00075f79
[fffc06a:1397] e27e.e27f   CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
[fffc06a:1321] e290.e292   PCI: 0:18.3 [e8] => 00075f79
[fffc06a:1397] e297.e298   CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
[fffc06a:121e] e2a5.e2a6   CPUID: eax: 80000001; ecx: 0000001b => 00100f62.10001b26.000037ff.efd3fbff
[fffc06a:12ff] e2bb.e2bc   CPUID: eax: 80000008; ecx: 0000001b => 00003030.00000000.00002001.00000000
[fffc06a:130c] e2bf.e2c0   CPU MSR: [c001001f] => 00584000.00000008
[fffc06a:131d] e2c4.e2c5   CPU MSR: [c001001f] <= 00584000.00000008
[fffc06a:131d] e2cf.e2d1   PCI: 0:18.3 [90] => 00000000
[fffc06a:1348] e2dc.e2dd   CPUID: eax: 80000008; ecx: 0000001b => 00003030.00000000.00002001.00000000
[fffc06a:135d] e2e2.e2e3   CPU MSR: [c001001f] <= 00584000.00000008
[fffc06a:0b7d] e2f2.e2f3   CPU MSR: [0000001b] => 00000000.fee00900
[fffc06a:0b7d] e2f4.e2f5   LAPIC: [00000020] => 00000000
[fffc06a:127a] e2f9.e2fa   CPUID: eax: 00000001; ecx: 0000001b => 00100f62.00020800.00802009.178bfbff
[fffc06a:1289] e2f9.e2fb   CPUID: eax: 80000008; ecx: 00802009 => 00003030.00000000.00002001.00000000
[fffc06a:1057] e302.e304   PCI: 0:18.0 [68] => 004fac0f
[fffc06a:1071] e30d.e30f   PCI: 0:18.0 [68] <= 004fac2f
Readback error! 30/72
Readback error! a/63
Readback error! 72/30
Readback error! 3e/30
Readback error! 20/30
Readback error! 63/30
Readback error! 66/30
Readback error! 45/30
Readback error! a/31
Readback error! 52/62
Readback error! 3e/2e
Readback error! 52/66
Readback error! 20/66
Readback error! 4f/66
Readback error! 30/65
Readback error! 52/62
Readback error! a/30
Readback error! a/30
Readback error! 3e/30
[fffc06a:0c50] e31d.e31e   CPU MSR: [0000001b] => 00000000.00000000