[coreboot] Intel Leafhill/Apollolake wrong CBFS header address in coreboot.rom

Gailu Singh gailu96 at gmail.com
Sun Mar 19 07:20:36 CET 2017


Failing grub code
------------------------------------------
static void
init_cbfsdisk (void)
{
  grub_uint32_t ptr;
  struct cbfs_header *head;

  ptr = *(grub_uint32_t *) 0xfffffffc;
  head = (struct cbfs_header *) (grub_addr_t) ptr;
  grub_dprintf ("cbfs", "head=%p\n", head);

  /* coreboot current supports only ROMs <= 16 MiB. Bigger ROMs will
     have problems as RCBA is 18 MiB below end of 32-bit typically,
     so either memory map would have to be rearranged or we'd need to
support
     reading ROMs through controller directly.
   */
  if (ptr < 0xff000000
      || 0xffffffff - ptr < (grub_uint32_t) sizeof (*head) + 0xf
      || !validate_head (head))
    return;
------------------------------------------

On Sun, Mar 19, 2017 at 11:47 AM, Gailu Singh <gailu96 at gmail.com> wrote:

> Hi Experts,
>
> On Intel Leafhill board grub fails to find cbfsdisk. We tried to debug and
> found that cbfs header address validation fails.
>
> According to https://github.com/mrnuke/coreboot/blob/master/
> documentation/cbfs.txt,
> "A pointer to the location of the header will be located at offset -4 from
> the end of the ROM. This translates to address 0xFFFFFFFC on a normal x86
> system. The pointer will be to physical memory somewhere between -
> 0xFFFFB000 and 0xFFFFFFF0".
>
>
> We checked the coreboot.rom in hex editor and address in last 4 bytes is
> all ones (FFFFFFFF) as a result grub is not able to find cbfs header.
>
>
> We have earlier used coreboot on baytrail and in the coreboot.rom cbfs
> header address in last 4 byte was a valid pointer.
>
>
> What is the location grub can find cbfs header on this board?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20170319/4ec7027d/attachment.html>


More information about the coreboot mailing list