[coreboot] Regarding CONFIG_CBFS_LOCATION corruption of sea bios using coreboot

rajashaker Goud rajashakergoudranga at gmail.com
Fri May 13 05:08:23 CEST 2016


Hi All,

I am using coreboot with seabios payload to boot to Win7.

But sometimes Seabios is not able to find its own CBFS partition in the
coreboot image and causes the exception and does not boot OS.



Below is source code which throws exception:

In SeaBIOS config value, the default value of CONFIG_CBFS_LOCATION  is set
to Zero.



struct cbfs_header *hdr = *(void ****)(CONFIG_CBFS_LOCATION - 4);

   if ((u32)hdr & 0x03) {

        dprintf(1, "Invalid CBFS pointer %p\n", hdr);

        return;

    }

Here CBFS header pointer *hdr points to valid address 0xfffffc10 ( that is
being calculated from (CONFIG_CBFS_LOCATION – 4))

but sometimes CBFS header pointer *hdr is invalid and points to 0xffffffff,
thus SeaBIOS  does not execute further ROM code e.g. VGA option ROM.



As we know the address of  seabios CBFS hdr pointer so either we can hard
code the config Variable CONFIG_CBFS_LOCATION  to value 0xfffffc14

OR we can assign *hdr to address 0xfffffc10 in source code.



struct cbfs_header *hdr = *(void ****)(CONFIG_CBFS_LOCATION - 4);

   if ((u32)hdr & 0x03) {

        dprintf(1, "Invalid CBFS pointer %p\n", hdr);

        hdr=0xfffffc10;

    }

Please let me know if any information.
-- 
Thanks,
Rajashaker Goud Ranga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20160513/21a9dc06/attachment.html>


More information about the coreboot mailing list