[coreboot] Can not add bug report via website.

Greg.Chandler at wellsfargo.com Greg.Chandler at wellsfargo.com
Thu Jun 17 11:17:59 CEST 2010

I've tried to add this several times to via the bug report tool on the website, but get stuck in a loop on the captcha page.
Can I post this here to get it looked at?

Filo does not boot from the CF or PCMCIA controllers.  I did find a work around, some 70 prom flashes later..

I've limited the scope of my work to ide.c, for the legacy boot, not the grub-compatible.

This is one will need the help of a real developer to fix properly.

Here is what I've found:
Problem 1:
There are 2 types of detections for IDE interfaces:
if ((sata && class == 0x180) || (pata && class == 0x101)) {

The 2nd does not work...  The first excludes the CF/PC-CARD because it doesn't include the correct class.  I have no idea how to fix the CARDBUS check.  It's got stuff that reaches into the libpayload code..
So I've made this modification:
if ((sata && class == 0x180) || (pata && class == 0x101) || (pata && class == 0x607)) {
This explicitly directs the driver to treat the CF as an IDE device.
That part works, and it does to a proper detection once it's in the "if" statement. The problem is, as far as I can tell detects this card before all others, and stops.  I can see no other IDE channels once I set this.

Problem 2:
We enter this in "native PCI mode", which is ok.
      if ((prog_if & mask) || (devclass != 0x0101)) {
                debug("native PCI mode\n");
                if ((ctrl_index & 1) == 0) {
                        /* Primary channel */
                        ctrl->cmd_base = pci_read_resource(dev, 0);
                        ctrl->ctrl_base = pci_read_resource(dev, 1);
                } else {
                        /* Secondary channel */
                        ctrl->cmd_base = pci_read_resource(dev, 2);
                        ctrl->ctrl_base = pci_read_resource(dev, 3);
                ctrl->cmd_base &= ~3;
                ctrl->ctrl_base &= ~3;

What is not ok, is that we are now using pci_read_resource to set the ctrl->* stuff when we _explicitly_ listed those elsewhere..  Obviously that doesn't work...  I have no idea why we do the "&= ~3" either, so I'm not inclined to mess with it.
What does work, is adding these two lines after those:
                ctrl->cmd_base = 0x1e0;
                ctrl->ctrl_base = 0x1ec;
Obviously we just overwrite all the crap we just set with the pci_read call and the additional lines.

Once these are done, the machine can boot of the CF slot, but ONLY the CF slot.

A real fix would probably be cool.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100617/bcb578bd/attachment.html>

More information about the coreboot mailing list