[coreboot] Porting to Asus M4A785-M

Juhana Helovuo juhe at iki.fi
Thu Aug 5 14:25:07 CEST 2010

On Tue, 2010-08-03 at 08:30 -0600, Myles Watson wrote:

> Since you have 2G of RAM available according to your boot log, I
> suspect that you're having a conflict with UMA again.  I would start
> there.

Yes, that seemed to be it.

I added excplicit specification for high tables in mainboard.c as

        high_tables_base = uma_memory_base - 0x4000000;
        high_tables_size = HIGH_TABLES_SIZE * 1024;

I also tried setting uma_memory_base to 

uma_memory_base = msr.lo / 2;

instead of

uma_memory_base = msr.lo - uma_memory_size;

With 2048 MB RAM this sets UMA to 0x40000000.

This fixed the seemingly corrupted ACPI DSDT headers, as the vendor and
revision strings printed out in Linux boot log looked like random binary

I also made a custom DSDT source file by disassembling the Asus original
DSDT binary, and then hand-picking some parts from there, which seemed
to be most essential, such as parts defining processors, links(?),
interrupts, and built-in PCI devices. Some parts I could not take, since
they contained code that wouldn't compile with current IASL compiler,
most notably all of ISA and Super I/O stuff.

By this process I could fix some errors, such as identifier use before
definition, simply by reodering code blocks so that definition is always
before use.

Some parts of the original DSDT contained executable code, such as
if-statements at the module level, i.e. outside method definitions. In
some cases I fixed this by executing all the definitions
unconditionally, and in some cases just by leaving out that code block.
It looks like that executable code outside methods was legal in ACPI 1.0
but no longer in 2.0 and afterwards.

A lot of the original DSDT seemed to describe namespace "ASOC", which
seems to contain definitions of how to tweak voltages and frequencies of
various mainbaord parts, i.e. overclocking or similar tuning. Those I
left out completely.

For some reason, booting after reflashing does not work at the first
attempt, but freezes at "Welcome to Grub!" -screen. Cycling power off
and on again results in a successful boot to Grub menu.

With the stripped-down DSDT, I can get Grub2 to boot Linux up to login
prompt and many devices also work, at least VGA console, IDE disk, and
Ethernet. Remote ssh login works also.

However, there are lots of complaints about missing IRQ mapping
definitions during boot, and Linux ACPI interpreter cannot load all the
definitions, although IASL compiles them without complaint. So far I
have not been able to figure out what is wrong there. 

Please see the attached Linux boot log for details.

Also, Linux does not seem to know where the UMA is located. I believe it
should get this from ACPI tables, but those are not working. Since it
does not know where UMA is, Linux is bound to sooner or later corrupt
UMA, or vice versa.

By looking at boot logs with original Asus BIOS, it looks like ACPI
tables tell Linux that memory 0x70000000 - 0x7fffffff is reserved as
"iomem" to device "pnp 00:01".

Now the next step would be to get Linux to accept the ACPI tables, but I
do not really know where to begin debugging them.

Best Regards,
Juhana Helovuo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: corebooted-2-dmesg.log
Type: text/x-log
Size: 19392 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100805/01514d36/attachment.log>

More information about the coreboot mailing list