<div dir="ltr"><div><div><div><div><div>Hi,</div><div><br></div><div>thanks for all the advice, so far!<br></div><div><br></div>I've made a lot of progress here: after configuring all the low-level registers (drive strength control, oscillator clock control, SIO GPIO/EC registers) as per the vendor BIOS, coreboot finally started to boot up!<br></div><div><br></div><div>Here's what's working so far:</div><div><br></div><div>* Serial console</div><div>* GPIO & EC configuration<br></div><div>* Loading the VGA BIOS blob through SeaBIOS - I have text mode console output through the D-SUB interface (other outputs need to be tested)</div></div><div><div>* Low level CPU and RAM initialization works perfectly. I have run one pass of memtest for an hour, it could read the SPD chip and the test completed without errors<br></div><div>* Coreboot boots up somewhat fine. It shows some resource allocation issues but 
still, the boot process reaches to payload execution phase. SeaBIOS, 
nvramcui & memtest payloads can be booted without any issues.</div><div>* Starting a bootloader through SeaBIOS works - tested with ISOLINUX & Windows bootloader, so far<br></div><div><br></div><div>Some problems I'm facing:<br></div><div><br></div><div>* USB keyboard support is quite unstable with SeaBIOS, most of the time the keyboard is not detected (it works about once every five-six boots), regardless of what other USB devices are connected to the board<br></div><div></div><div>* The PCIe Bridge interface of the northbridge (@00:02.1) cannot be 
configured for some reason. I can see Coreboot correctly identifies and 
configures the device as a bridge but sending cmd 07 (not sure what that
 means) to the device completely halts the system. Disabling the 
device in devicetree makes it possible to avoid the lockup but I think I should not let the device 
unconfigured.</div><div>* Booting up an OS does not work, yet, both Linux and Windows halts while loading. This is most likely due to some resource allocation or IRQ routing issue (I'll need to take a look at boot logs to see what's happening)</div><div>* TianoCore does not boot, it halts the system with a "division by zero" exception displayed on the serial console. I guess it won't be easy to debug this one so it is kind of low priority as of now.<br></div><div><br></div>The questions I have:<br></div><div><br></div><div>* How could I fix the USB keyboard issues with SeaBIOS? Is there some timeout value I could raise to have more stable support for the keyboard? I have tried disabling OHCI & XHCI support in SeaBIOS but that did not help.<br></div>* I can see a few resources allocation errors on the console output. For some of these errors, the missing resources are actually unused by the board (eg. the secondary & tertiary base address for the environment controller). Shall I allocate the I/O address 0x0 to such devices or simply ignore the errors?<br></div>* For the SATA controller, coreboot reports that there are 4 memory address spaces that are not being allocated. Checking the devicetree of other similar boards, I can see these resources are not allocated there, either. Is it safe to ignore this error?<br></div>* Any ideas how to debug the lockup caused by the PCIe Bridge device configuration? What does "cmd 07" mean?<br><div><div class="gmail_extra">* I'd like to read some settings from the CMOS memory both in romstage & ramstage. What's the correct way to do so? Using get_option() seems not to work at all while using read_option_lowlevel() returns a warning that I should use get_option() in non-ROMCC stages. Is there some better way to store user-configurable HW settings? nvramcui looks to be a "user-friendly" tool to configure NVRAM settings, is there a similar user interface available for CBFS, too?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"></div><div class="gmail_extra">Thanks & Regards,</div><div class="gmail_extra">Gergely<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 December 2017 at 18:49, ron minnich <span dir="ltr"><<a href="mailto:rminnich@gmail.com" target="_blank">rminnich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">don't forget, you can write code that runs in user mode and drives the superio.<div><br></div><div>This is a handy way to test superio chips you're not sure about.</div><div><br></div><div>use iopl(3) to enable arbitrary Io port access, then inb/outb to try to get some idea what's going on.</div><div><br></div><div>This is obviously a little limited, since the firmware has already done lots of setup, but I've been able to learn things using this technique.</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>ron</div></font></span></div><div class="gmail-HOEnZb"><div class="gmail-h5"><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 4, 2017 at 9:43 AM Kyösti Mälkki <<a href="mailto:kyosti.malkki@gmail.com" target="_blank">kyosti.malkki@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Dec 4, 2017 at 2:44 PM, Gergely Kiss <<a href="mailto:mail.gery@gmail.com" target="_blank">mail.gery@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm working on porting Coreboot to the ASUS AM1I-A motherboard and I'm a bit<br>
> stuck.<br>
><br>
> I could successfully build Coreboot but after flashing the ROM, my board<br>
> looks to be bricked...<br>
><br>
> Once powering on the board, the CPU fan spins up but then nothing happens, I<br>
> can't see any output on the serial console (the connection was tested prior<br>
> to flashing by running a getty on the COM port and it was working fine).<br>
><br>
<br>
Common errors: Forgetting to use correct super-IO config base address<br>
(0x2e vs 0x4e) and not providing 48MHz reference clock for the uart<br>
baudrate divisor. AMD hardware often uses configurable GPIO pins for<br>
this purpose, the code copied from biostar/am1ml may not be right for<br>
asus/am1l-a.<br>
<br>
You can dump those GPIO configurations eg. with iotools or even dd<br>
from /dev/mem. Related datasheets for the Kabini family should be<br>
available without NDAs.<br>
<br>
> The board is not fried as I can load back the vendor firmware and it boots<br>
> up absolutely fine.<br>
><br>
> I'd like to find out why Coreboot would not start but don't know what tool<br>
> would be the most suitable for debugging.<br>
><br>
> The chipset and the CPU is already supported by Coreboot but the SuperIO<br>
> chip is not. It looks to me the serial interfaces of ITE chips work the same<br>
> for all models so I believe using the common code for ITE SIO chips should<br>
> work but I'm unsure (no datasheet available).<br>
<br>
AM1 socket support is a hack anyways, grep for<br>
FORCE_AM1_SOCKET_SUPPORT. Your mileage may vary.<br>
<br>
It's not uncommon that PNP LDNs for the UARTs change within one vendor.<br>
Did you run util/superiotool and dump SIO settings from vendor boot?<br>
<br>
><br>
> Shall I use a PCIe serial interface card or rather try EHCI debugging? I'm<br>
> afraid in case the boot process halts at some early stage (like before<br>
> romstage) then I won't see any useful output using any of those.<br>
><br>
<br>
EHCI debug should be fine nowadays with AGESA, still not my first<br>
choice here for you.<br>
PCIe serial cards are untested, probably do not work early enough to<br>
be useful for you.<br>
Traditional serial port debug will also be silent before romstage...<br>
<br>
> Using a POST card would be a better approach I think but my board has a<br>
> single PCIe 4x slot which seems to be unsupported by POST cards I could find<br>
> on the web (except one from a Chinese vendor but it costs about $1k which is<br>
> way too expensive).<br>
<br>
Those mini-PCI-e POST cards with 7-seg displays are about 4 USD and<br>
your mainboard TPM connector seems to carry the required LPC signals.<br>
Remember to enable and route POSTs to LPC (kconfig POST_DEVICE_LPC).<br>
<br>
><br>
> Here's my WIP code for reference:<br>
><br>
> <a href="https://github.com/kissg1988/coreboot/tree/master/src/mainboard/asus/am1i-a" rel="noreferrer" target="_blank">https://github.com/kissg1988/<wbr>coreboot/tree/master/src/<wbr>mainboard/asus/am1i-a</a><br>
><br>
> Any idea how to proceed?<br>
><br>
<br>
Get one of those POST cards, try to show vendor/device ID registers<br>
from superio on the 7-seg display.<br>
<br>
> Thanks,<br>
> Gergely<br>
><br>
><br>
<br>
HTH,<br>
Kyösti<br>
<br>
> --<br>
> coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
> <a href="https://mail.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://mail.coreboot.org/<wbr>mailman/listinfo/coreboot</a><br>
<br>
--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
<a href="https://mail.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://mail.coreboot.org/<wbr>mailman/listinfo/coreboot</a></blockquote></div>
</div></div></blockquote></div><br></div></div></div>