Re: [coreboot] Long boot delay with a large CBFS
* Ben Gardner [151116 19:32]: > [The previous email got chopped. This is a re-send.] > > Hi all, > > I have a 16 MB BIOS flash on a fsp_baytrail based design. > > I tried expanding the CBFS to fill the whole space, but found that to > cause a 10-15 sec boot delay. Sounds like your CBFS file got corrupted. Anything you can share about your build (e.g. log, source code) will raise the chance of getting this fixed. Are you running without ME firmware? What do your sections look like in the firmware descriptor? Stefan -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
Hi Stefan, On Mon, Nov 16, 2015 at 2:09 PM, Stefan Reinauer wrote: > * Ben Gardner [151116 19:32]: >> [The previous email got chopped. This is a re-send.] >> >> Hi all, >> >> I have a 16 MB BIOS flash on a fsp_baytrail based design. >> >> I tried expanding the CBFS to fill the whole space, but found that to >> cause a 10-15 sec boot delay. > > Sounds like your CBFS file got corrupted. Anything you can share about > your build (e.g. log, source code) will raise the chance of getting this > fixed. > > Are you running without ME firmware? What do your sections look like in > the firmware descriptor? Yes, I am using the ME that came with the 'Gold 4' FSP. The regions are as follows. FLREG0:0x Flash Region 0 (Flash Descriptor): - 0fff FLREG1:0x0fff0140 Flash Region 1 (BIOS): 0014 - 00ff FLREG2:0x013f0001 Flash Region 2 (Intel ME): 1000 - 0013 FLREG3:0x0001 Flash Region 3 (GbE): 1000 - 0fff (unused) FLREG4:0x1fff Flash Region 4 (Platform Data): 00fff000 - 0fff (unused) I think I found what may have been the issue, but I'm not sure. I had enabled "fast boot" without fixing the "Virtual ROM Size", which was set to 8 MB instead of 16 MB. Side note: I had started with building an 8 MB image before I figured out how to adjust the IFDT for 16 MB and my flash part, so that is likely where that mismatch came from. I assume this overwrote an important part of the CBFS space when it saved the fast boot cache data That would "corrupt" the CBFS on subsequent boots and cause coreboot to iterate over the 14 MB empty space. I have since drastically changed the layout of the CBFS, so that may be why I can't reproduce the delay now. Thanks, Ben -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
Hi Werner, On Mon, Nov 16, 2015 at 1:04 PM, Werner Zeh wrote: > Hi Ben. > > I currently use a Bay Trail design with 16 MB SPI flash > of which 14 MB are used for CBFS. I Never have seen such effects on my > system. > > Do you use the latest coreboot tree (master)? > > Werner I'm not on the latest, but somewhere between 4.1 and 4.2. -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
Hi Patrick, On Mon, Nov 16, 2015 at 12:54 PM, Patrick Georgi wrote: > 2015-11-16 19:32 GMT+01:00 Ben Gardner : >> What is the purpose behind continuing if a bad entry is encountered? >> It appears that a 'bad' entry only occurs at the end of the CBFS. > With a properly chained CBFS, there are no such entries (except one at > the end, maybe), and large empty regions are simply skipped because > there's an empty file entry. > > Since we're in firmware with few recovery options, we don't want the > computer to die with a black screen if all that happened may be some > minor corruption in a data structure, and so we do a best-effort > recovery by trying to find a new entry point into the chain. The > theory being that it can't get worse. That makes sense. I must have had some corruption in the ROM image. I rebuilt with CONFIG_CBFS_SIZE=0x00EC again and I'm not seeing the long pause. I think I was playing with the 'fast boot' option at the time (now disabled). I'll retry with that enabled. Thanks, Ben -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
Hi Ben. I currently use a Bay Trail design with 16 MB SPI flash of which 14 MB are used for CBFS. I Never have seen such effects on my system. Do you use the latest coreboot tree (master)? Werner Am 16.11.2015 um 19:32 schrieb Ben Gardner: [The previous email got chopped. This is a re-send.] Hi all, I have a 16 MB BIOS flash on a fsp_baytrail based design. I tried expanding the CBFS to fill the whole space, but found that to cause a 10-15 sec boot delay. The offending code appears to be in cbfs_locate() in lib/cbfs.c: if (memcmp(file.magic, CBFS_FILE_MAGIC, sizeof(file.magic))) { offset++; offset = ALIGN_UP(offset, CBFS_ALIGNMENT); continue; } In SeaBIOS, the equivalent code does a break instead of a continue. I'n not terribly familiar with the design goals of the CBFS. What is the purpose behind continuing if a bad entry is encountered? It appears that a 'bad' entry only occurs at the end of the CBFS. Thanks, Ben -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
2015-11-16 19:32 GMT+01:00 Ben Gardner : > What is the purpose behind continuing if a bad entry is encountered? > It appears that a 'bad' entry only occurs at the end of the CBFS. With a properly chained CBFS, there are no such entries (except one at the end, maybe), and large empty regions are simply skipped because there's an empty file entry. Since we're in firmware with few recovery options, we don't want the computer to die with a black screen if all that happened may be some minor corruption in a data structure, and so we do a best-effort recovery by trying to find a new entry point into the chain. The theory being that it can't get worse. Patrick -- Google Germany GmbH, ABC-Str. 19, 20354 Hamburg Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft: Hamburg Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Long boot delay with a large CBFS
[The previous email got chopped. This is a re-send.] Hi all, I have a 16 MB BIOS flash on a fsp_baytrail based design. I tried expanding the CBFS to fill the whole space, but found that to cause a 10-15 sec boot delay. The offending code appears to be in cbfs_locate() in lib/cbfs.c: if (memcmp(file.magic, CBFS_FILE_MAGIC, sizeof(file.magic))) { offset++; offset = ALIGN_UP(offset, CBFS_ALIGNMENT); continue; } In SeaBIOS, the equivalent code does a break instead of a continue. I'n not terribly familiar with the design goals of the CBFS. What is the purpose behind continuing if a bad entry is encountered? It appears that a 'bad' entry only occurs at the end of the CBFS. Thanks, Ben -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] Long boot delay with a large CBFS
Hi all, I have a 16 MB BIOS flash on a fsp_baytrail based design. I tried expanding the CBFS to fill the whole space, but found that to cause a 10-15 sec boot delay. The offending code appears to be here: -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot