Kevin,

I put in the code the following addition, its not a clean way of doing I think, but it works :-)
Below the boot log (partially) that shows that piece of code. Maybe you can figure out
how to do it the clean way.

Marc


diff --git a/src/boot.c b/src/boot.c
index 05fb3dd..b57c8c0 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -97,13 +97,17 @@ find_prio(const char *glob)
static char *
build_pci_path(char *buf, int max, const char *devname, int bdf)
{
+static int last_bdf = 0;
     // Build the string path of a bdf - for example: /pci@i0cf8/isa@1,2
     char *p = buf;
     int parent = pci_bdf_to_bus(bdf);
+    dprintf(1, "buf=%p max=%d name=%s bdf=%d parent=%d PCIpaths=%p\n"
+              , buf, max, devname, bdf, parent, PCIpaths);
     if (PCIpaths)
         parent = PCIpaths[parent];
     int parentdev = parent & 0xffff;
-    if (parent & PP_PCIBRIDGE) {
+    if (parent & PP_PCIBRIDGE && last_bdf != bdf ) {
+ last_bdf = bdf;
         p = build_pci_path(p, max, "pci-bridge", parentdev);
     } else {
         if (parentdev)


Searching CBFS for prefix floppyimg/
Found CBFS file fallback/romstage
Found CBFS file fallback/coreboot_ram
Found CBFS file fallback/payload
Found CBFS file
handle_08
|1ffd4000| pmm_free 0x1ffd3000 (detail=0x1ffd5760)
\1ffd3000/ End thread
|1ffd4000| pmm_free 0x1ffefee0 (detail=0x1ffd5820)
|1ffd4000| pmm_free 0x1ffee000 (detail=0x1ffd57f0)
|1ffd4000| pmm_free 0x1ffefed0 (detail=0x1ffd57c0)
|1ffd4000| pmm_free 0x1ffefec0 (detail=0x1ffd5790)
|1ffd4000| pmm_free 0x1ffd5880 (detail=0x1ffd58a0)
|1ffd2000| pmm_free 0x1ffd4000 (detail=0x1ffd5850)
\1ffd4000/ End thread
|1ffd2000| ata_reset exit status=50
handle_08
|1ffd2000| send_cmd : read error (status=51 err=04)
|1ffd2000| pmm_malloc zone=0x000f5284 handle=ffffffff size=40 align=10 ret=0x000fd5e0 (detail=0x1ffd58a0)
|1ffd2000| pmm_malloc zone=0x000f528c handle=ffffffff size=80 align=10 ret=0x1ffd5820 (detail=0x1ffd5870)
|1ffd2000| ata1-0: WDC WD800JB-22JJC0 ATA-6 Hard-Disk (74 GiBytes)
|1ffd2000| buf=0x1ffd2c5c max=256 name=* bdf=57 parent=0 PCIpaths=0x1ffd5900
|1ffd2000| buf=0x1ffd2c5c max=256 name=pci-bridge bdf=121 parent=0 PCIpaths=0x1ffd5900
|1ffd2000| buf=0x1ffd2c5c max=256 name=pci-bridge bdf=121 parent=0 PCIpaths=0x1ffd5900
|1ffd2000| Searching bootorder for: /pci-root@79/pci@i0cf8/pci-bridge@f,1/pci-bridge@f,1/*@7,1/drive@1/disk@0
|1ffd2000| pmm_malloc zone=0x000f528c handle=ffffffff size=20 align=10 ret=0x1ffd57d0 (detail=0x1ffd57f0)
|1ffd2000| Registering bootable: ata1-0: WDC WD800JB-22JJC0 ATA-6 Hard-Disk (74 GiBytes) (type:2 prio:103 data:fd5e0)
|1ffd2000| ata_detect resetresult=600d
|1ffd2000| powerup iobase=170 st=50
|1ffd2000| powerup iobase=170 st=0
|1ffd2000| ata_detect ata1-1: sc=55 sn=aa dh=b0
|1ffd2000| send_cmd : DRQ not set (status 00)
pmm_free 0x1ffd2000 (detail=0x1ffd56d0)
\1ffd2000/ End thread
All threads complete.

-------- Forwarded Message --------
From: Marc Bertens <mbertens@xs4all.nl>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org
Subject: Re: [SeaBIOS] Question about linker building seabios
Date: Wed, 19 Jan 2011 20:17:34 +0100

Kevin,

I put in that extra debug line in you put on pastebin, and it seems that it deadloops there, see my boot log http://pastebin.com/B3fXSXAZ

Marc




On Mon, 2011-01-17 at 15:09 -0500, Kevin O'Connor wrote:
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 http://pastebin.com/g83qwpnj
> > 
> > That log shows SeaBIOS succesfully booting.  Do you have a log where
> > seabios fails?
> > 
> > -Kevin
> 
> 

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios