2010/4/14 Keith Hui <span dir="ltr"><<a href="mailto:buurin@gmail.com">buurin@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
<br>
Based on Idwer's RFC I tried adding ACPI to P2B-LS plus completing the<br>
rest of the PIIX4 function 3 initialization.<br>
<br>
This is a summary of what I did:<br>
<br>
* I used the DSDT table from the final vendor BIOS. Not provided here<br>
for obvious reasons, but I can tell you how to extract it.<br>
* I also replicated the content of the PIIX4 function 3 config space<br>
after booting with vendor BIOS, as below:<br>
<br>
00:04.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)<br>
00: 86 80 13 71 03 00 80 02 02 00 80 06 00 00 00 00<br>
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
40: 01 e4 00 00 00 00 00 20 1e 30 00 01 00 00 00 00<br>
50: 00 58 19 00 c0 c8 3b 02 37 40 40 03 00 00 00 00<br>
60: 90 02 e7 00 00 00 00 10 04 e4 11 00 00 00 00 00<br>
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
80: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
90: 01 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
d0: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
f0: 00 00 00 00 00 00 00 00 30 0f 00 00 00 00 00 00<br>
<br>
One exception is 0x90-0x91 which has the SMBus host base address. I<br>
kept it as 0x0f00.<br>
<br>
* Idwer is trying to build ACPI 4.0 (!) tables. Since P2B-LS is<br>
shipped when ACPI was still at 1.0, that's what I did. For booting XP,<br>
even ACPI 2.0 compliance is sufficient.<br></blockquote><div> </div><div>Fixed the ACPI version, althought I'm not booting Windows.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
This is a summary of what happens:<br>
<br>
* I can no longer get POST codes on the PCI bus. POST codes still<br>
appear on the ISA bus. Glad I picked a POST card that works on both<br>
buses.<br></blockquote><div><br>What about POST codes on the serial port ? See <a href="http://www.coreboot.org/Coreboot_Options">http://www.coreboot.org/Coreboot_Options</a><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

* Power off does not work. The last POST code to show before complete<br>
kernel shutdown and hard drive spinning down is 0xF5.<br>
* I don't how how to enter soft suspend in Linux (silly me -_-! ), so<br>
I have not tested it.<br></blockquote><div><br><a href="http://acpi.sourceforge.net/documentation/sleep.html">http://acpi.sourceforge.net/documentation/sleep.html</a><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

* the sensor appears on ISA bus port 0x290, just like vendor BIOS.<br>
* My SB AWE64 ISA card still got initialized and driver loaded, but no<br>
sound. In fact ALSA can't even do I/O to the card. That apparently is<br>
because PIIX4 needs to be configured to forward certain I/O port<br>
ranges to ISA, and some of those port ranges can be further<br>
configured. This would require detecting in runtime what ISA cards are<br>
installed, what are they, and what I/O port ranges they would use.<br>
Where in the source tree should I place such code? Southbridge?<br>
<br>
The changes I made are described in two attached patches, one to<br>
southbridge/intel/i82371eb, one to mainboard/asus/p2bls. My coreboot<br>
and linux boot log is also attached.<br></blockquote><div><br>Attached patch: coreboot_r5439_asus_p2b_ram+keithhui-pm+acpi-wip.patch<br>coreboot's serial port log + dmesg  and an incomplete bootlog from linux: <a href="http://coreboot.pastebin.com/x0QTfji7">http://coreboot.pastebin.com/x0QTfji7</a><br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
This is also RFC and is not signed off at this point, but comments are welcome.<br></blockquote><div><br>When is it okay to sign off :) probably when the major functions like standby and soft poweroff/reset work like they should and the ACPI tables are created. Oh, and irq routing..<br>
<br>Self quote:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">Todo:<br>- create PRT objects<br>- finish/fix FADT<br>- finish all other
 ACPI tables (RSDT, RSDP, DSDT etcetera)<br></blockquote><div><br>[    0.000000] ACPI: RSDP 000f7b20 00014 (v00 CORE  )<br>[    0.000000] ACPI: RSDT 0fff1424 00034 (v01 CORE   COREBOOT 00000000 CORE 00000000)<br>[    0.000000] ACPI: FACP 0fff1aa2 000F4 (v01 COREBO COREBOOT 00000000 CORE 0000002A)<br>
[    0.000000] ACPI: DSDT 0fff1508 0059A (v01 LXBIOS LXB-DSDT 00000001 INTL 20090521)<br>[    0.000000] ACPI: FACS 0fff14c8 00040<br>[    0.000000] ACPI: APIC 0fff1b96 0003E (v01 CORE   COREBOOT 00000000 CORE 00000000)<br>
[    0.000000] ACPI: MCFG 0fff1bd4 0002C (v01 CORE   COREBOOT 00000000 CORE 00000000)<br>[    0.000000] ACPI: SRAT 0fff1c00 00030 (v01 CORE   COREBOOT 00000000 CORE 00000000)<br> </div><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
- PIRQ routing<br></blockquote><div> </div><div>[    1.378731] irq 9: nobody cared (try booting with the "irqpoll" option)<br>[    1.380003] Pid: 1, comm: swapper Not tainted 2.6.32-21-generic #31-Ubuntu<br>[    1.380003] Call Trace:<br>
<snip><br>[    1.380003] Disabling IRQ #9<br><br>[    1.435077] ACPI: PCI Interrupt Link [LNKA] (IRQs) *15, disabled.<br>[    1.441889] ACPI: PCI Interrupt Link [LNKB] (IRQs 11) *15, disabled.<br>[    1.448908] ACPI: PCI Interrupt Link [LNKC] (IRQs 10) *15, disabled.<br>
[    1.456644] ACPI: PCI Interrupt Link [LNKD] (IRQs 11) *15, disabled.<br>[    2.477092] ACPI: PCI Interrupt Link [LNKD] disabled and referenced, BIOS bug<br><br>[    3.173723] irq 11: nobody cared (try booting with the "irqpoll" option)<br>
[    3.176017] Pid: 1, comm: swapper Not tainted 2.6.32-21-generic #31-Ubuntu<br>[    3.176017] Call Trace:<br><snip><br>[    3.176017] Disabling IRQ #11<br> <br></div><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

standby/suspend<br></blockquote><div><br>[    2.010407] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0<br>[    2.025108] ACPI: Power Button [PWRF]<br> </div><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

- ?<br></blockquote><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Regards<br>
<font color="#888888">Keith<br></font></blockquote><div><br>Idwer<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888">
</font><br>--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
<a href="http://www.coreboot.org/mailman/listinfo/coreboot" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br></blockquote></div><br>