grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cbfsdisk not found


From: Gailu Singh
Subject: Re: cbfsdisk not found
Date: Sat, 25 Mar 2017 16:41:06 +0530

Actually we are using bit older version of coreboot (pre fmap implementation) So  we took intel help and they provided us base location (in RAM) where coreboot is loaded and then we calculated as follows which is  working for me.

  ptr = *(grub_uint32_t *)(LOADING_BASE + COREBOOT_ROM_SIZE - 4);
  head = (struct cbfs_header *) (grub_addr_t) (((COREBOOT_ROM_SIZE + ptr)&\
           (COREBOOT_ROM_SIZE -1)) + LOADING_BASE);



On Sat, Mar 25, 2017 at 1:12 PM, Vladimir 'phcoder' Serbinenko <address@hidden> wrote:


On Sat, Mar 25, 2017, 00:40 Andrei Borzenkov <address@hidden> wrote:
25.03.2017 10:22, Vladimir 'phcoder' Serbinenko пишет:
> On Sat, Mar 25, 2017, 00:16 Andrei Borzenkov <address@hidden> wrote:
>
>> 24.03.2017 21:38, Gailu Singh пишет:
>>> This is how it is calculated in coreboot
>>>
>>>
>> https://review.coreboot.org:4430/cgit/coreboot.git/tree/src/lib/cbfs.c?id=refs/heads/master#n268
>>>
>>> ___FMAP__COREBOOT_BASE and ___FMAP__COREBOOT_SIZE are based on values
>>> available in fmd files (depending on 8MB/16Mb coreboot).
>>>
>>>
>>> #grep -r FMAP__COREBOOT_BASE src/lib/cbfs.c: size_t fmap_top =
>>> ___FMAP__COREBOOT_BASE + ___FMAP__COREBOOT_SIZE;
>>> build/fmap_config.h:#define ___FMAP__COREBOOT_BASE 0x300800
>>>
>>> #grep -r FMAP__COREBOOT_SIZE
>>> src/soc/intel/baytrail/romstage/cache_as_ram.inc:#define CODE_CACHE_SIZE
>>>  _ALIGN_UP_POW2(___FMAP__COREBOOT_SIZE)
>>> src/lib/cbfs.c: size_t fmap_top = ___FMAP__COREBOOT_BASE +
>>> ___FMAP__COREBOOT_SIZE;
>>> build/fmap_config.h:#define ___FMAP__COREBOOT_SIZE 0xc1d800
>>>
>>> #cat src/mainboard/intel/leafhill/leafhill.16384.fmd
>>> FLASH 16M {
>>> address@hidden 0x1000
>>> address@hidden 0x2ff000
>>> address@hidden 0x800
>>> COREBOOT(CBFS)@0x300800 0xc1d800
>>> address@hidden 0x21000 {
>>> address@hidden 0x10000
>>> address@hidden 0x10000
>>> address@hidden 0x1000
>>> }
>>> address@hidden 0x40000
>>> address@hidden 0x7f000
>>> address@hidden 0x1000
>>> }
>>>
>>>
>>
>> How does it help us? We have no idea which board grub currently runs on.
>> Do you suggest scanning the whole memory for "__FMAP__" signature?
>>
> I think it ends up at constant offset from the end of ROM
>

But we do not know the end of ROM in general case, that is the problem.
ROM is an overloaded term in this case. I mean the whole ROM, not just the BIOS section that contains coreboot and cbfs

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]