Adds RS740 HT and internal graphics PCI ids. Adds support for RS740 in RS690 code (some of the fam10 code from RS780). Adds support for ECS A740GM-M.
This definitely needs more patches and fine-tuning. Only tested on RS740.
Signed-off-by: Ivaylo Valkov ivaylo@e-valkov.org --- Hello all,
And thank you for all the work you have done so far.
This is kind of long e-mail, so for the impatient - with these patches I am able to initialize the RS740 chipset on the ECS A740GM-M motherboard and boot GNU/Linux (with Xorg), but the code definitely needs more fine-tuning and patching.
All my hardware died recently, so I bought two identical ECS A740GM-M [1] replacement boards with AMD RS740/740G chipset as an opportunity to help the coreboot project gather some information. The requested information for flashrom and the RS740 chipset is attached. One thing led to another and I've gone a lot further - the board seems usable.
Flashrom works on the board. The flash chip is recognised as MX25L8005, but it is actually [2] MX25L8006. [3] In spite of that I was able to flash it and boot the proprietary BIOS and coreboot. I've experienced some CMOS checksum errors with the proprietary BIOS after flashing, but everything worked fine after setting the date. This does not happen always and I can't see a pattern when it does. Should I post the flashrom related information on the flashrom mailing list?
With flashrom working and the information on this list (and few other places) that the RS740 is RS690 with new graphics I decided to test the RS690 code on the board. So, after nearly a month of cut-and-paste from mahogany_fam10 and dmb690t, new code in RS690, borrowed from RS780, ACPI from mahogany_fam10 for the board and some modifications I ended up with something usable. The CPU is Sempron 140 (AM3/AM2+ socket).
I have some basic and blurry understanding of the boot process. I do not know why exactly all that I've done worked. It is fair to say that I have read almost zero documentation. All was achieved only by reading the available code and observing the logic. Maybe it wasn't the smartest and safest thing to do, but worth it.
So carefully review the code. Some of it is there so I could build. It might be irrelevant. Patches are attached.
I used a cmos.layout from mahogany_fam10 to build, but images with enabled CONFIG_USE_OPTION_TABLE (use CMOS/NVRAM values instead of hard coded ones) in menuconfig do not boot at all - not even single serial line of output. With recent changes and the move of CMOS to CBFS I can't build with that option.
I am able to boot GNU/Linux. USB, network, sound, ATA and SATA are working. PCI worked with external graphic and network card. PCIe is not tested.
The master and stable releases of SeaBIOS hang when there is a USB mouse connected after printing "USB mouse initialized". USB works fine under GNU/Linux.
HT is initialized to 200MHz. The lspci output (also attached) after coreboot loads, shows that 1.6GHz link frequency is possible. The documented limit for RS690 is 1GHz. The RS780 code is implemented differently, so it has k8 and fam10 support. Do you think it will be possible to use something from RS780 code? I am not confident and competent to make the changes myself, but I am willing to test patches (any).
The lspci output for the board with coreboot running differs(in places). I think it is ACPI and devicetree.cb related. Don't know how to fix it right now.
After coreboot initializes the board, the CPU has two states - 1.9 GHz and 2.7GHz. With proprietary BIOS the CPU can do two more - 1.5GHz and 800MHz. That is ACPI issue, righ? Before adding ACPI the only possible frequency was 2.7GHz.
The code that prints the CPU revision (in get_cpu_revision) is taken from RS780. I think it prints (only that!) wrong revision - "K8_10" instead of "Fam 10". It seems it should be "eax <= 0x100fff" instead of "eax <= 0x100f00", but as I've said I didn't read enough documentation.
I've extracted a VGA BIOS image from the proprietary BIOS and the internal graphics card worked. Both DVI and VGA connectors work. Xorg loads, but if the resolution is higher than or equal to 1024x768 the screen flickers and I see horizontal lines. [4] When the display is refreshed (key press, mouse move, by programs) it is awful. [5] For lower resolutions it is not noticeable or even missing. This is tested on deblobed Linux-libre kernel only, and the drivers do not load the binary-blob firmware for 3D acceleration.
Is it possible to initialize the internal graphics on RS690/RS740 from coreboot code and use VGA BIOS image from SeaBIOS? Like it is done for the M2V-MX SE board? Yes I know it uses VIA chipset and it has documentation. I guess what I am asking is, is it there enough documentation released by AMD to make it work. I've hacked a PCI header for the VGA BIOS image from SeaBIOS, so it can be loaded by coreboot (vendor/device ID complains). The ROM is loaded, but SeaBIOS hangs. Not that I was expecting to just work.
There are microcode patches for some CPUs that are non-free binary-blobs (examine their license headers). Is it possible to make loading such microcode configurable? I am unable to build the fam10 code without a microcode filename. I understand that AMD (and other companies) might not want to release such information for various reasons, but I prefer to use "crippled" CPU instead of non-free microcode, when I am running free software BIOS. Do I really need them for Sempron anyway? It works without them. Didn't notice any difference in performance with them. Not that the current state of the board can be used for measuring performance. The work-around I am using right now is zero-filled microcode patch file in the board directory, that does nothing.
Images of the board and the chips can be found on my "web site" [6].
I've copied the copyright notices from files that had such and I've used code from. For the rest I've put a comment pointing to the file I've borrowed from. Hope that is the right way to do it. Unfortunately the code I used restricts me to GPLv2 only, I prefer GPLv2(or later). What is the policy on GPLv3 (or later) code for that matter? Just thinking for possible future contributions.
P.S. This is a lot of information (and issues). If anything has to go in the issue tracker I will do it.
[1] http://www.ecs.com.tw/ECSWebSite/Product/Product_Detail.aspx?CategoryID=1&am... [2] http://e-valkov.org/coreboot/ecs-a740gm-m-bios-chip.jpg [3] http://www.mxic.com.tw/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index... [4] http://e-valkov.org/coreboot/video-card-1.ogv [5] http://e-valkov.org/coreboot/video-card-2.ogv [6] http://e-valkov.org/coreboot/
]HT is initialized to 200MHz. The lspci output (also attached) after ]coreboot loads, shows that 1.6GHz link frequency is possible. The ]documented limit for RS690 is 1GHz. The RS780 code is implemented ]differently, so it has k8 and fam10 support. Do you think it will be ]possible to use something from RS780 code? I am not confident and ]competent to make the changes myself, but I am willing to test patches ](any).
At the moment, HT frequency stays at 200 MHz for AMD family 10h processors when coreboot initializes it. Here is an HT3 enable patch for family 10h that may be useful:
http://www.mail-archive.com/coreboot@coreboot.org/msg27356.html
Thanks, Scott
Scott Duplichan writes:
]HT is initialized to 200MHz.
At the moment, HT frequency stays at 200 MHz for AMD family 10h processors when coreboot initializes it. Here is an HT3 enable patch for family 10h that may be useful:
Reading the information about the patch, it seem it will also fix my problem with higher resolutions (>= 1024x768). Great! Thanks! I will have to try it.
Ivaylo Valkov wrote:
Adds RS740 HT and internal graphics PCI ids. Adds support for RS740 in RS690 code (some of the fam10 code from RS780). Adds support for ECS A740GM-M.
This definitely needs more patches and fine-tuning. Only tested on RS740.
Please keep working on this and keep sending patches! I think in particular splitting this up into individual patches will be neccessary to get anyone to really take a look at it.
//Peter
Peter Stuge writes:
Ivaylo Valkov wrote:
Adds RS740 HT and internal graphics PCI ids. Adds support for RS740 in RS690 code (some of the fam10 code from RS780). Adds support for ECS A740GM-M.
This definitely needs more patches and fine-tuning. Only tested on RS740.
Please keep working on this and keep sending patches! I think in particular splitting this up into individual patches will be neccessary to get anyone to really take a look at it.
In that case I will split it like this: * patch for PCI IDs * patch for RS690 code (gfx, ht, early_setup) * patch for ECS A740GM-M with files from multiple boards sources and modifications * patch for ECS A740GM-M with directly copied files from other boards
The patches will have to be applied in that order. Some of them can be split even further. I'll keep sending my patches in this thread.
Thanks.
Ivaylo Valkov writes:
Peter Stuge writes:
Ivaylo Valkov wrote:
Adds RS740 HT and internal graphics PCI ids. Adds support for RS740 in RS690 code (some of the fam10 code from RS780). Adds support for ECS A740GM-M.
This definitely needs more patches and fine-tuning. Only tested on RS740.
Please keep working on this and keep sending patches! I think in particular splitting this up into individual patches will be neccessary to get anyone to really take a look at it.
In that case I will split it like this:
- patch for PCI IDs
- patch for RS690 code (gfx, ht, early_setup)
- patch for ECS A740GM-M with files from multiple boards sources and modifications
- patch for ECS A740GM-M with directly copied files from other boards
Hello, all
I am trying to test my patches against trunk. Unfortunately I am unable to build on my main system using the development release of Trisquel. I've tested with r6275 where everything used to work. The build process breaks there as well:
CC cpu/amd/mtrr/amd_mtrr.ramstage.o CC cpu/amd/microcode/microcode.ramstage.o CC cpu/x86/lapic/lapic.ramstage.o CC cpu/x86/lapic/lapic_cpu_init.ramstage.o CC cpu/x86/lapic/secondary.ramstage.o CC cpu/x86/cache/cache.ramstage.o CC cpu/x86/pae/pgtbl.ramstage.o CC cpu/x86/mtrr/mtrr.ramstage.o AR coreboot.a CC coreboot_ram.o CC coreboot_ram src/arch/x86/coreboot_ram.ld:129 cannot move location counter backwards (from 0000000000140000 to 0000000000004000) collect2: ld returned 1 exit status make: *** [build/coreboot_ram] Error 1
The specified line is the last in the file. Recently I've upgraded to the development release of Trisquel. This probably changed the ldd version. There are no changes to coreboot_ram.ld in trunk since December 2010, so it must be ldd. I am able to build in gNewSense both trunk and r6275.
Version of ldd in Trisquel 4.5 Slaine (develpomnet release), based on Ubuntu 10.10: $ ldd --version ldd (Ubuntu EGLIBC 2.12.1-0ubuntu10.2) 2.12.1
Version of ldd in gNewSense 3.0 MetaD, based on Debian lenny: $ ldd --version ldd (GNU libc) 2.7
Any suggestions?
At 24.01.2011 Ivaylo Valkov wrote:
Peter Stuge writes:
Ivaylo Valkov wrote:
Adds RS740 HT and internal graphics PCI ids. Adds support for RS740 in RS690 code (some of the fam10 code from RS780). Adds support for ECS A740GM-M.
This definitely needs more patches and fine-tuning. Only tested on RS740.
Please keep working on this and keep sending patches! I think in particular splitting this up into individual patches will be neccessary to get anyone to really take a look at it.
In that case I will split it like this:
- patch for PCI IDs
- patch for RS690 code (gfx, ht, early_setup)
- patch for ECS A740GM-M with files from multiple boards sources and modifications
- patch for ECS A740GM-M with directly copied files from other boards
The patches will have to be applied in that order. Some of them can be split even further. I'll keep sending my patches in this thread.
Hello, list.
I finally had some time to split these patches and test them against the latest code in svn. My two boards are in use and it is harder to test.
Updates:
PCI network cards crash my kernel after few packets are sent. I've tested at least two or three cards few months ago. I am able to reproduce this even with the first patches I've sent.
The extracted VGA ROM does not work with the internal graphics anymore. There is no video output. The output from dmesg is:
pci 0000:01:05.0: Invalid ROM contents
The kernel loads and the system seems to be working. I was able to log via ssh over the internal network card. The patches are sent as separate messages in this thread.
Regards, Ivaylo Valkov
Adds RS740 HT and internal graphics PCI ids.
Signed-off-by: Ivaylo Valkov <ivaylo at e-valkov.org> ---
On Mon, May 9, 2011 at 8:54 AM, Ivaylo Valkov ivaylo@e-valkov.org wrote:
Adds RS740 HT and internal graphics PCI ids.
Signed-off-by: Ivaylo Valkov <ivaylo at e-valkov.org>
Acked-by: Marc Jones marcj303@gmail.com
r6562
Thanks, Marc
Adds support for RS740 (HT, internal graphics and early setup) in RS690 code.
Signed-off-by: Ivaylo Valkov <ivaylo at e-valkov.org> ---
Adds support for the ECS A740GM-M board based on the RS740 chipset.
Signed-off-by: Ivaylo Valkov <ivaylo at e-valkov.org> ---
The ecs-a740gm-m-files-copied-from-amd-mahogany-fam10.patch could be skipped, if the following files are copied (svn copy):
src/mainboard/amd/mahogany_fam10/acpi_tables.c src/mainboard/amd/mahogany_fam10/cmos.layout src/mainboard/amd/mahogany_fam10/mb_sysconf.h src/mainboard/amd/mahogany_fam10/resourcemap.c src/mainboard/amd/mahogany_fam10/acpi/ide.asl src/mainboard/amd/mahogany_fam10/acpi/cpstate.asl src/mainboard/amd/mahogany_fam10/acpi/routing.asl src/mainboard/amd/mahogany_fam10/acpi/sata.asl src/mainboard/amd/mahogany_fam10/acpi/usb.asl
as:
src/mainboard/ecs/a740gm-m/acpi_tables.c src/mainboard/ecs/a740gm-m/cmos.layout src/mainboard/ecs/a740gm-m/mb_sysconf.h src/mainboard/ecs/a740gm-m/resourcemap.c src/mainboard/ecs/a740gm-m/acpi/ide.asl src/mainboard/ecs/a740gm-m/acpi/cpstate.asl src/mainboard/ecs/a740gm-m/acpi/routing.asl src/mainboard/ecs/a740gm-m/acpi/sata.asl src/mainboard/ecs/a740gm-m/acpi/usb.asl