<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Kevin,<BR>
<BR>
I put in the code the following addition, its not a clean way of doing I think, but it works :-)<BR>
Below the boot log (partially) that shows that piece of code. Maybe you can figure out <BR>
how to do it the clean way.<BR>
<BR>
Marc<BR>
<BR>
<BR>
<TT>diff --git a/src/boot.c b/src/boot.c</TT><BR>
<TT>index 05fb3dd..b57c8c0 100644</TT><BR>
<TT>--- a/src/boot.c</TT><BR>
<TT>+++ b/src/boot.c</TT><BR>
<TT>@@ -97,13 +97,17 @@ find_prio(const char *glob)</TT><BR>
<TT> static char *</TT><BR>
<TT> build_pci_path(char *buf, int max, const char *devname, int bdf)</TT><BR>
<TT> {</TT><BR>
<TT><B>+static int last_bdf = 0;</B></TT><BR>
<TT>     // Build the string path of a bdf - for example: /<A HREF="mailto:pci@i0cf8">pci@i0cf8</A>/isa@1,2</TT><BR>
<TT>     char *p = buf;</TT><BR>
<TT>     int parent = pci_bdf_to_bus(bdf);</TT><BR>
<TT><B>+    dprintf(1, "buf=%p max=%d name=%s bdf=%d parent=%d PCIpaths=%p\n"</B></TT><BR>
<TT><B>+              , buf, max, devname, bdf, parent, PCIpaths);</B></TT><BR>
<TT>     if (PCIpaths)</TT><BR>
<TT>         parent = PCIpaths[parent];</TT><BR>
<TT>     int parentdev = parent & 0xffff;</TT><BR>
<TT>-    if (parent & PP_PCIBRIDGE) {</TT><BR>
<TT><B>+    if (parent & PP_PCIBRIDGE && last_bdf != bdf ) {</B></TT><BR>
<TT><B>+    last_bdf = bdf;</B></TT><BR>
<TT>         p = build_pci_path(p, max, "pci-bridge", parentdev);</TT><BR>
<TT>     } else {</TT><BR>
<TT>         if (parentdev)</TT><BR>
<BR>
<BR>
<TT>Searching CBFS for prefix floppyimg/</TT><BR>
<TT>Found CBFS file fallback/romstage</TT><BR>
<TT>Found CBFS file fallback/coreboot_ram</TT><BR>
<TT>Found CBFS file fallback/payload</TT><BR>
<TT>Found CBFS file </TT><BR>
<TT>handle_08</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffd3000 (detail=0x1ffd5760)</TT><BR>
<TT>\1ffd3000/ End thread</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffefee0 (detail=0x1ffd5820)</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffee000 (detail=0x1ffd57f0)</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffefed0 (detail=0x1ffd57c0)</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffefec0 (detail=0x1ffd5790)</TT><BR>
<TT>|1ffd4000| pmm_free 0x1ffd5880 (detail=0x1ffd58a0)</TT><BR>
<TT>|1ffd2000| pmm_free 0x1ffd4000 (detail=0x1ffd5850)</TT><BR>
<TT>\1ffd4000/ End thread</TT><BR>
<TT>|1ffd2000| ata_reset exit status=50</TT><BR>
<TT>handle_08</TT><BR>
<TT>|1ffd2000| send_cmd : read error (status=51 err=04)</TT><BR>
<TT>|1ffd2000| pmm_malloc zone=0x000f5284 handle=ffffffff size=40 align=10 ret=0x000fd5e0 (detail=0x1ffd58a0)</TT><BR>
<TT>|1ffd2000| pmm_malloc zone=0x000f528c handle=ffffffff size=80 align=10 ret=0x1ffd5820 (detail=0x1ffd5870)</TT><BR>
<TT>|1ffd2000| ata1-0: WDC WD800JB-22JJC0 ATA-6 Hard-Disk (74 GiBytes)</TT><BR>
<TT><B>|1ffd2000| buf=0x1ffd2c5c max=256 name=* bdf=57 parent=0 PCIpaths=0x1ffd5900</B></TT><BR>
<TT><B>|1ffd2000| buf=0x1ffd2c5c max=256 name=pci-bridge bdf=121 parent=0 PCIpaths=0x1ffd5900</B></TT><BR>
<TT><B>|1ffd2000| buf=0x1ffd2c5c max=256 name=pci-bridge bdf=121 parent=0 PCIpaths=0x1ffd5900</B></TT><BR>
<TT><B>|1ffd2000| Searching bootorder for: /<A HREF="mailto:pci-root@79">pci-root@79</A>/pci@i0cf8/pci-bridge@f,1/pci-bridge@f,1/*@7,1/drive@1/disk@0</B></TT><BR>
<TT>|1ffd2000| pmm_malloc zone=0x000f528c handle=ffffffff size=20 align=10 ret=0x1ffd57d0 (detail=0x1ffd57f0)</TT><BR>
<TT>|1ffd2000| Registering bootable: ata1-0: WDC WD800JB-22JJC0 ATA-6 Hard-Disk (74 GiBytes) (type:2 prio:103 data:fd5e0)</TT><BR>
<TT>|1ffd2000| ata_detect resetresult=600d</TT><BR>
<TT>|1ffd2000| powerup iobase=170 st=50</TT><BR>
<TT>|1ffd2000| powerup iobase=170 st=0</TT><BR>
<TT>|1ffd2000| ata_detect ata1-1: sc=55 sn=aa dh=b0</TT><BR>
<TT>|1ffd2000| send_cmd : DRQ not set (status 00)</TT><BR>
<TT>pmm_free 0x1ffd2000 (detail=0x1ffd56d0)</TT><BR>
<TT>\1ffd2000/ End thread</TT><BR>
<TT>All threads complete.</TT><BR>
<BR>
-------- Forwarded Message --------<BR>
<B>From</B>: Marc Bertens <<A HREF="mailto:Marc%20Bertens%20%3cmbertens@xs4all.nl%3e">mbertens@xs4all.nl</A>><BR>
<B>To</B>: Kevin O'Connor <<A HREF="mailto:Kevin%20O'Connor%20%3ckevin@koconnor.net%3e">kevin@koconnor.net</A>><BR>
<B>Cc</B>: <A HREF="mailto:seabios@seabios.org">seabios@seabios.org</A><BR>
<B>Subject</B>: Re: [SeaBIOS] Question about linker building seabios<BR>
<B>Date</B>: Wed, 19 Jan 2011 20:17:34 +0100<BR>
<BR>
Kevin,<BR>
<BR>
I put in that extra debug line in you put on pastebin, and it seems that it deadloops there, see my boot log <A HREF="http://pastebin.com/B3fXSXAZ">http://pastebin.com/B3fXSXAZ</A><BR>
<BR>
Marc<BR>
<BR>
<BR>
<BR>
<BR>
On Mon, 2011-01-17 at 15:09 -0500, Kevin O'Connor wrote: 
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Mon, Jan 17, 2011 at 08:58:41PM +0100, Marc Bertens wrote:
> It stops at 1989 


Does the following fix it for you?

--- a/src/pci.c
+++ b/src/pci.c
@@ -194,7 +194,7 @@ pci_path_setup(void)
     PCIpaths = malloc_tmp(sizeof(*PCIpaths) * 256);
     if (!PCIpaths)
         return;
-    memset(PCIpaths, 0, sizeof(PCIpaths));
+    memset(PCIpaths, 0, sizeof(*PCIpaths) * 256);
 
     int roots = 0;
     int bdf, max;


> Marc

> On Mon, 2011-01-17 at 14:47 -0500, Kevin O'Connor wrote:

> > On Mon, Jan 17, 2011 at 07:35:25PM +0100, Marc Bertens wrote:
> > > Hmmm, not completely true i'm afraid. When booting a cold systen it will
> > > not come up. 
> > > When i switch to my fallback rom it boots, now i switch back to the
> > > image that was not 
> > > booting and now it boots just fine.
> > > 
> > > So i was a little premature with my earlier mail.
> > > 
> > > I added the boot log in pastebin <A HREF="http://pastebin.com/g83qwpnj">http://pastebin.com/g83qwpnj</A>
> > 
> > That log shows SeaBIOS succesfully booting.  Do you have a log where
> > seabios fails?
> > 
> > -Kevin


</PRE>
</BLOCKQUOTE>
<BR>
<PRE>
_______________________________________________
SeaBIOS mailing list
<A HREF="mailto:SeaBIOS@seabios.org">SeaBIOS@seabios.org</A>
<A HREF="http://www.seabios.org/mailman/listinfo/seabios">http://www.seabios.org/mailman/listinfo/seabios</A>
</PRE>
<BR>
</BODY>
</HTML>