All of lore.kernel.org
 help / color / mirror / Atom feed
* cbfsdisk not found
@ 2017-03-16 19:18 Gailu Singh
  2017-03-16 19:22 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-16 19:18 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

Hi Experts,

I am using grub2 with coreboot and configured with --with-platform=coreboot.


I am able to load grub2 from coreboot. However when I run ls command, I do
not see cbfsdisk. ls only shows

(memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)

I have added file in the cbfs as follows and need to access it but when I
try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.

build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile -t
raw

Any idea how to access myfile on cbfsdisk?

Thanks.

[-- Attachment #2: Type: text/html, Size: 863 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-16 19:18 cbfsdisk not found Gailu Singh
@ 2017-03-16 19:22 ` Vladimir 'phcoder' Serbinenko
  2017-03-16 19:43   ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-16 19:22 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:

> Hi Experts,
>
> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>
>
> I am able to load grub2 from coreboot. However when I run ls command, I do
> not see cbfsdisk. ls only shows
>
> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>
> I have added file in the cbfs as follows and need to access it but when I
> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>
> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile -t
> raw
>
> Any idea how to access myfile on cbfsdisk?
>
Try insmod cbfs

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

[-- Attachment #2: Type: text/html, Size: 2220 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-16 19:22 ` Vladimir 'phcoder' Serbinenko
@ 2017-03-16 19:43   ` Gailu Singh
  2017-03-16 19:49     ` Vladimir 'phcoder' Serbinenko
  2017-03-17  3:27     ` Andrei Borzenkov
  0 siblings, 2 replies; 23+ messages in thread
From: Gailu Singh @ 2017-03-16 19:43 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2067 bytes --]

>>Try insmod cbfs

>
Trieed, it does not help. BTW cbfs is already included in my grub elf image
so I don't think I need to do insmod.

./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
--install-modules='linux search configfile normal cbtime cbls memrw iorw
minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
/boot/grub/grub.cfg=./coreboot.cfg

This must be something else. AFAIK memdisk itself resides in CBFS,
Strangely ls comman shows memdisk but not cbfsdisk


On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
phcoder@gmail.com> wrote:

>
>
> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>
>> Hi Experts,
>>
>> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>>
>>
>> I am able to load grub2 from coreboot. However when I run ls command, I
>> do not see cbfsdisk. ls only shows
>>
>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>>
>> I have added file in the cbfs as follows and need to access it but when I
>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>>
>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile
>> -t raw
>>
>> Any idea how to access myfile on cbfsdisk?
>>
> Try insmod cbfs
>
>>
>> Thanks.
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #2: Type: text/html, Size: 5294 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-16 19:43   ` Gailu Singh
@ 2017-03-16 19:49     ` Vladimir 'phcoder' Serbinenko
  2017-03-17  3:11       ` Gailu Singh
  2017-03-17  3:27     ` Andrei Borzenkov
  1 sibling, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-16 19:49 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:

> >>Try insmod cbfs
>
>
> Trieed, it does not help. BTW cbfs is already included in my grub elf
> image so I don't think I need to do insmod.
>
> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
> --install-modules='linux search configfile normal cbtime cbls memrw iorw
> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
> afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
> /boot/grub/grub.cfg=./coreboot.cfg
>
> This must be something else. AFAIK memdisk itself resides in CBFS,
> Strangely ls comman shows memdisk but not cbfsdisk
>
Please share your coreboot image.

>
>
> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
> phcoder@gmail.com> wrote:
>
>
>
> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>
> Hi Experts,
>
> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>
>
> I am able to load grub2 from coreboot. However when I run ls command, I do
> not see cbfsdisk. ls only shows
>
> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>
> I have added file in the cbfs as follows and need to access it but when I
> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>
> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile -t
> raw
>
> Any idea how to access myfile on cbfsdisk?
>
> Try insmod cbfs
>
>
> Thanks.
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 8055 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-16 19:49     ` Vladimir 'phcoder' Serbinenko
@ 2017-03-17  3:11       ` Gailu Singh
  2017-03-17  7:15         ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-17  3:11 UTC (permalink / raw)
  To: The development of GNU GRUB


[-- Attachment #1.1: Type: text/plain, Size: 2729 bytes --]

Please find coreboot image attached. Zipped it to reduce size

On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko <
phcoder@gmail.com> wrote:

>
>
> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>
>> >>Try insmod cbfs
>>
>>
>> Trieed, it does not help. BTW cbfs is already included in my grub elf
>> image so I don't think I need to do insmod.
>>
>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
>> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
>> --install-modules='linux search configfile normal cbtime cbls memrw iorw
>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
>> afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
>> minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
>> procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
>> password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
>> /boot/grub/grub.cfg=./coreboot.cfg
>>
>> This must be something else. AFAIK memdisk itself resides in CBFS,
>> Strangely ls comman shows memdisk but not cbfsdisk
>>
> Please share your coreboot image.
>
>>
>>
>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
>> phcoder@gmail.com> wrote:
>>
>>
>>
>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>>
>> Hi Experts,
>>
>> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>>
>>
>> I am able to load grub2 from coreboot. However when I run ls command, I
>> do not see cbfsdisk. ls only shows
>>
>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>>
>> I have added file in the cbfs as follows and need to access it but when I
>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>>
>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile
>> -t raw
>>
>> Any idea how to access myfile on cbfsdisk?
>>
>> Try insmod cbfs
>>
>>
>> Thanks.
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 11608 bytes --]

[-- Attachment #2: coreboot.zip --]
[-- Type: application/zip, Size: 538552 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-16 19:43   ` Gailu Singh
  2017-03-16 19:49     ` Vladimir 'phcoder' Serbinenko
@ 2017-03-17  3:27     ` Andrei Borzenkov
  2017-03-17  6:19       ` Gailu Singh
  1 sibling, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-17  3:27 UTC (permalink / raw)
  To: grub-devel

16.03.2017 22:43, Gailu Singh пишет:
>>> Try insmod cbfs
> 
>>
> Trieed, it does not help. BTW cbfs is already included in my grub elf image
> so I don't think I need to do insmod.
> 
> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
> --install-modules='linux search configfile normal cbtime cbls memrw iorw
> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
> afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
> /boot/grub/grub.cfg=./coreboot.cfg
> 
> This must be something else. AFAIK memdisk itself resides in CBFS,
> Strangely ls comman shows memdisk but not cbfsdisk
> 

This implies that cbfs address fails validation. Do not include cbfs in
image, boot and run

set debug=cbfs
insmod cbfs

What address it prints?

> 
> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
> phcoder@gmail.com> wrote:
> 
>>
>>
>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>>
>>> Hi Experts,
>>>
>>> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>>>
>>>
>>> I am able to load grub2 from coreboot. However when I run ls command, I
>>> do not see cbfsdisk. ls only shows
>>>
>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>>>
>>> I have added file in the cbfs as follows and need to access it but when I
>>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>>>
>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile
>>> -t raw
>>>
>>> Any idea how to access myfile on cbfsdisk?
>>>
>> Try insmod cbfs
>>
>>>
>>> Thanks.
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17  3:27     ` Andrei Borzenkov
@ 2017-03-17  6:19       ` Gailu Singh
  2017-03-17  7:01         ` Andrei Borzenkov
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-17  6:19 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 3113 bytes --]

>>What address it prints?

I followed suggested steps and I see following print

fs/cbfs.c:347: head=0xffffffff



On Fri, Mar 17, 2017 at 8:57 AM, Andrei Borzenkov <arvidjaar@gmail.com>
wrote:

> 16.03.2017 22:43, Gailu Singh пишет:
> >>> Try insmod cbfs
> >
> >>
> > Trieed, it does not help. BTW cbfs is already included in my grub elf
> image
> > so I don't think I need to do insmod.
> >
> > ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> > default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
> > usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
> > --install-modules='linux search configfile normal cbtime cbls memrw iorw
> > minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi
> chain
> > test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
> > afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> > minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> > procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> > password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
> > /boot/grub/grub.cfg=./coreboot.cfg
> >
> > This must be something else. AFAIK memdisk itself resides in CBFS,
> > Strangely ls comman shows memdisk but not cbfsdisk
> >
>
> This implies that cbfs address fails validation. Do not include cbfs in
> image, boot and run
>
> set debug=cbfs
> insmod cbfs
>
> What address it prints?
>
> >
> > On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
> > phcoder@gmail.com> wrote:
> >
> >>
> >>
> >> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
> >>
> >>> Hi Experts,
> >>>
> >>> I am using grub2 with coreboot and configured with
> --with-platform=coreboot.
> >>>
> >>>
> >>> I am able to load grub2 from coreboot. However when I run ls command, I
> >>> do not see cbfsdisk. ls only shows
> >>>
> >>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
> >>>
> >>> I have added file in the cbfs as follows and need to access it but
> when I
> >>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
> >>>
> >>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile
> >>> -t raw
> >>>
> >>> Any idea how to access myfile on cbfsdisk?
> >>>
> >> Try insmod cbfs
> >>
> >>>
> >>> Thanks.
> >>> _______________________________________________
> >>> Grub-devel mailing list
> >>> Grub-devel@gnu.org
> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >>
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 5151 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17  6:19       ` Gailu Singh
@ 2017-03-17  7:01         ` Andrei Borzenkov
  2017-03-17  7:05           ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-17  7:01 UTC (permalink / raw)
  To: The development of GNU GRUB

On Fri, Mar 17, 2017 at 9:19 AM, Gailu Singh <gailu96@gmail.com> wrote:
>>>What address it prints?
>
> I followed suggested steps and I see following print
>
> fs/cbfs.c:347: head=0xffffffff
>

Then you need to contact coreboot developers and discuss it. GRUB
looks at predefined location at address of cbfs. If this location
contains wrong address, there is nothing we can do here. We need
information how to discover cbfs using other means.

>
>
> On Fri, Mar 17, 2017 at 8:57 AM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
>>
>> 16.03.2017 22:43, Gailu Singh пишет:
>> >>> Try insmod cbfs
>> >
>> >>
>> > Trieed, it does not help. BTW cbfs is already included in my grub elf
>> > image
>> > so I don't think I need to do insmod.
>> >
>> > ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
>> > default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
>> > usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
>> > --install-modules='linux search configfile normal cbtime cbls memrw iorw
>> > minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi
>> > chain
>> > test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
>> > afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
>> > minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
>> > procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
>> > password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
>> > /boot/grub/grub.cfg=./coreboot.cfg
>> >
>> > This must be something else. AFAIK memdisk itself resides in CBFS,
>> > Strangely ls comman shows memdisk but not cbfsdisk
>> >
>>
>> This implies that cbfs address fails validation. Do not include cbfs in
>> image, boot and run
>>
>> set debug=cbfs
>> insmod cbfs
>>
>> What address it prints?
>>
>> >
>> > On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
>> > phcoder@gmail.com> wrote:
>> >
>> >>
>> >>
>> >> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>> >>
>> >>> Hi Experts,
>> >>>
>> >>> I am using grub2 with coreboot and configured with
>> >>> --with-platform=coreboot.
>> >>>
>> >>>
>> >>> I am able to load grub2 from coreboot. However when I run ls command,
>> >>> I
>> >>> do not see cbfsdisk. ls only shows
>> >>>
>> >>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>> >>>
>> >>> I have added file in the cbfs as follows and need to access it but
>> >>> when I
>> >>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>> >>>
>> >>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
>> >>> myfile
>> >>> -t raw
>> >>>
>> >>> Any idea how to access myfile on cbfsdisk?
>> >>>
>> >> Try insmod cbfs
>> >>
>> >>>
>> >>> Thanks.
>> >>> _______________________________________________
>> >>> Grub-devel mailing list
>> >>> Grub-devel@gnu.org
>> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>
>> >>
>> >> _______________________________________________
>> >> Grub-devel mailing list
>> >> Grub-devel@gnu.org
>> >> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>
>> >>
>> >
>> >
>> >
>> > _______________________________________________
>> > Grub-devel mailing list
>> > Grub-devel@gnu.org
>> > https://lists.gnu.org/mailman/listinfo/grub-devel
>> >
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17  7:01         ` Andrei Borzenkov
@ 2017-03-17  7:05           ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-17  7:05 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 4401 bytes --]

On Fri, Mar 17, 2017, 00:01 Andrei Borzenkov <arvidjaar@gmail.com> wrote:

> On Fri, Mar 17, 2017 at 9:19 AM, Gailu Singh <gailu96@gmail.com> wrote:
> >>>What address it prints?
> >
> > I followed suggested steps and I see following print
> >
> > fs/cbfs.c:347: head=0xffffffff
> >
>
> Then you need to contact coreboot developers and discuss it. GRUB
> looks at predefined location at address of cbfs. If this location
> contains wrong address, there is nothing we can do here. We need
> information how to discover cbfs using other means.
>
Coreboot had something called fmap under some cases that we currently don't
support. I didn't look into this particular image. Where did coreboot image
come from?

>
>
> >
> >
> > On Fri, Mar 17, 2017 at 8:57 AM, Andrei Borzenkov <arvidjaar@gmail.com>
> > wrote:
> >>
> >> 16.03.2017 22:43, Gailu Singh пишет:
> >> >>> Try insmod cbfs
> >> >
> >> >>
> >> > Trieed, it does not help. BTW cbfs is already included in my grub elf
> >> > image
> >> > so I don't think I need to do insmod.
> >> >
> >> > ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> >> > default_payload.elf --modules='ls ahci pata ehci uhci ohci
> usb_keyboard
> >> > usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
> cbfs'
> >> > --install-modules='linux search configfile normal cbtime cbls memrw
> iorw
> >> > minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi
> >> > chain
> >> > test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
> affs
> >> > afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> >> > minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> >> > procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> >> > password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
> >> > /boot/grub/grub.cfg=./coreboot.cfg
> >> >
> >> > This must be something else. AFAIK memdisk itself resides in CBFS,
> >> > Strangely ls comman shows memdisk but not cbfsdisk
> >> >
> >>
> >> This implies that cbfs address fails validation. Do not include cbfs in
> >> image, boot and run
> >>
> >> set debug=cbfs
> >> insmod cbfs
> >>
> >> What address it prints?
> >>
> >> >
> >> > On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
> >> > phcoder@gmail.com> wrote:
> >> >
> >> >>
> >> >>
> >> >> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
> >> >>
> >> >>> Hi Experts,
> >> >>>
> >> >>> I am using grub2 with coreboot and configured with
> >> >>> --with-platform=coreboot.
> >> >>>
> >> >>>
> >> >>> I am able to load grub2 from coreboot. However when I run ls
> command,
> >> >>> I
> >> >>> do not see cbfsdisk. ls only shows
> >> >>>
> >> >>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
> >> >>>
> >> >>> I have added file in the cbfs as follows and need to access it but
> >> >>> when I
> >> >>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
> >> >>>
> >> >>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
> >> >>> myfile
> >> >>> -t raw
> >> >>>
> >> >>> Any idea how to access myfile on cbfsdisk?
> >> >>>
> >> >> Try insmod cbfs
> >> >>
> >> >>>
> >> >>> Thanks.
> >> >>> _______________________________________________
> >> >>> Grub-devel mailing list
> >> >>> Grub-devel@gnu.org
> >> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >> >>>
> >> >>
> >> >> _______________________________________________
> >> >> Grub-devel mailing list
> >> >> Grub-devel@gnu.org
> >> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Grub-devel mailing list
> >> > Grub-devel@gnu.org
> >> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >> >
> >>
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 9814 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17  3:11       ` Gailu Singh
@ 2017-03-17  7:15         ` Vladimir 'phcoder' Serbinenko
  2017-03-17 13:24           ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-17  7:15 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 3084 bytes --]

On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:

> Please find coreboot image attached. Zipped it to reduce size
>
This image is actually fine and is read correctly by fstest. Apparently for
some reason reading image at the end of 4GiB doesn't work. Can you try
dumping last 8M before 4G mark from /dev/mem ?

>
> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko <
> phcoder@gmail.com> wrote:
>
>
>
> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>
> >>Try insmod cbfs
>
>
> Trieed, it does not help. BTW cbfs is already included in my grub elf
> image so I don't think I need to do insmod.
>
> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
> --install-modules='linux search configfile normal cbtime cbls memrw iorw
> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
> afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
> /boot/grub/grub.cfg=./coreboot.cfg
>
> This must be something else. AFAIK memdisk itself resides in CBFS,
> Strangely ls comman shows memdisk but not cbfsdisk
>
> Please share your coreboot image.
>
>
>
> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
> phcoder@gmail.com> wrote:
>
>
>
> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>
> Hi Experts,
>
> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>
>
> I am able to load grub2 from coreboot. However when I run ls command, I do
> not see cbfsdisk. ls only shows
>
> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>
> I have added file in the cbfs as follows and need to access it but when I
> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>
> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile -t
> raw
>
> Any idea how to access myfile on cbfsdisk?
>
> Try insmod cbfs
>
>
> Thanks.
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 16579 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17  7:15         ` Vladimir 'phcoder' Serbinenko
@ 2017-03-17 13:24           ` Gailu Singh
  2017-03-17 13:46             ` Andrei Borzenkov
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-17 13:24 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 3942 bytes --]

@Vladimir
I do not have serial console (board has memory mapped uart not support in
grub) to capture memory details. Also on graphics console I can not give
commands from usb keyboard to  dump memory because USB port on board are
3.0 and USB 3.0 is not supported in Grub. Any other thing I could try?

@Andrei
What is the expected address supposed to be printed for successful
identification of CBFS.

I am building coreboot image myself and stitching with other intel firmware
as documented by Intel.

On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko <
phcoder@gmail.com> wrote:

>
>
> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
>
>> Please find coreboot image attached. Zipped it to reduce size
>>
> This image is actually fine and is read correctly by fstest. Apparently
> for some reason reading image at the end of 4GiB doesn't work. Can you try
> dumping last 8M before 4G mark from /dev/mem ?
>
>>
>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko <
>> phcoder@gmail.com> wrote:
>>
>>
>>
>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>>
>> >>Try insmod cbfs
>>
>>
>> Trieed, it does not help. BTW cbfs is already included in my grub elf
>> image so I don't think I need to do insmod.
>>
>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
>> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
>> --install-modules='linux search configfile normal cbtime cbls memrw iorw
>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
>> afs bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
>> minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
>> procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
>> password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
>> /boot/grub/grub.cfg=./coreboot.cfg
>>
>> This must be something else. AFAIK memdisk itself resides in CBFS,
>> Strangely ls comman shows memdisk but not cbfsdisk
>>
>> Please share your coreboot image.
>>
>>
>>
>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko <
>> phcoder@gmail.com> wrote:
>>
>>
>>
>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>>
>> Hi Experts,
>>
>> I am using grub2 with coreboot and configured with --with-platform=coreboot.
>>
>>
>> I am able to load grub2 from coreboot. However when I run ls command, I
>> do not see cbfsdisk. ls only shows
>>
>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>>
>> I have added file in the cbfs as follows and need to access it but when I
>> try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>>
>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n myfile
>> -t raw
>>
>> Any idea how to access myfile on cbfsdisk?
>>
>> Try insmod cbfs
>>
>>
>> Thanks.
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #2: Type: text/html, Size: 23328 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17 13:24           ` Gailu Singh
@ 2017-03-17 13:46             ` Andrei Borzenkov
  2017-03-17 13:59               ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-17 13:46 UTC (permalink / raw)
  To: The development of GNU GRUB

On Fri, Mar 17, 2017 at 4:24 PM, Gailu Singh <gailu96@gmail.com> wrote:
> @Vladimir
> I do not have serial console (board has memory mapped uart not support in
> grub) to capture memory details. Also on graphics console I can not give
> commands from usb keyboard to  dump memory because USB port on board are 3.0
> and USB 3.0 is not supported in Grub. Any other thing I could try?
>
> @Andrei
> What is the expected address supposed to be printed for successful
> identification of CBFS.
>

GRUB reads 4 bytes at offset 0xffffffc0. All ones likely means that
this address simply is not valid.

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." Any chance ROM is mapped somewhere else in your
case?

> I am building coreboot image myself and stitching with other intel firmware
> as documented by Intel.
>
> On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko
> <phcoder@gmail.com> wrote:
>>
>>
>>
>> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
>>>
>>> Please find coreboot image attached. Zipped it to reduce size
>>
>> This image is actually fine and is read correctly by fstest. Apparently
>> for some reason reading image at the end of 4GiB doesn't work. Can you try
>> dumping last 8M before 4G mark from /dev/mem ?
>>>
>>>
>>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko
>>> <phcoder@gmail.com> wrote:
>>>>
>>>>
>>>>
>>>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>>>>>
>>>>> >>Try insmod cbfs
>>>>>
>>>>>
>>>>> Trieed, it does not help. BTW cbfs is already included in my grub elf
>>>>> image so I don't think I need to do insmod.
>>>>>
>>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
>>>>> default_payload.elf --modules='ls ahci pata ehci uhci ohci usb_keyboard
>>>>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
>>>>> --install-modules='linux search configfile normal cbtime cbls memrw iorw
>>>>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
>>>>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs afs
>>>>> bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs minix
>>>>> minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc procfs
>>>>> reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs password_pbkdf2
>>>>> ' --fonts= --themes= --locales= -d grub-core/
>>>>> /boot/grub/grub.cfg=./coreboot.cfg
>>>>>
>>>>> This must be something else. AFAIK memdisk itself resides in CBFS,
>>>>> Strangely ls comman shows memdisk but not cbfsdisk
>>>>
>>>> Please share your coreboot image.
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko
>>>>> <phcoder@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>>>>>>>
>>>>>>> Hi Experts,
>>>>>>>
>>>>>>> I am using grub2 with coreboot and configured with
>>>>>>> --with-platform=coreboot.
>>>>>>>
>>>>>>> I am able to load grub2 from coreboot. However when I run ls command,
>>>>>>> I do not see cbfsdisk. ls only shows
>>>>>>>
>>>>>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>>>>>>>
>>>>>>> I have added file in the cbfs as follows and need to access it but
>>>>>>> when I try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
>>>>>>>
>>>>>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
>>>>>>> myfile -t raw
>>>>>>>
>>>>>>> Any idea how to access myfile on cbfsdisk?
>>>>>>
>>>>>> Try insmod cbfs
>>>>>>>
>>>>>>>
>>>>>>> Thanks.
>>>>>>> _______________________________________________
>>>>>>> Grub-devel mailing list
>>>>>>> Grub-devel@gnu.org
>>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Grub-devel mailing list
>>>>>> Grub-devel@gnu.org
>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Grub-devel mailing list
>>>>> Grub-devel@gnu.org
>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>
>>>>
>>>> _______________________________________________
>>>> Grub-devel mailing list
>>>> Grub-devel@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17 13:46             ` Andrei Borzenkov
@ 2017-03-17 13:59               ` Gailu Singh
  2017-03-24 17:16                 ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-17 13:59 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 5548 bytes --]

>>Any chance ROM is mapped somewhere else in your case?
I need to check, this may be a case.

On Fri, Mar 17, 2017 at 7:16 PM, Andrei Borzenkov <arvidjaar@gmail.com>
wrote:

> On Fri, Mar 17, 2017 at 4:24 PM, Gailu Singh <gailu96@gmail.com> wrote:
> > @Vladimir
> > I do not have serial console (board has memory mapped uart not support in
> > grub) to capture memory details. Also on graphics console I can not give
> > commands from usb keyboard to  dump memory because USB port on board are
> 3.0
> > and USB 3.0 is not supported in Grub. Any other thing I could try?
> >
> > @Andrei
> > What is the expected address supposed to be printed for successful
> > identification of CBFS.
> >
>
> GRUB reads 4 bytes at offset 0xffffffc0. All ones likely means that
> this address simply is not valid.
>
> 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." Any chance ROM is mapped somewhere else in your
> case?
>
> > I am building coreboot image myself and stitching with other intel
> firmware
> > as documented by Intel.
> >
> > On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko
> > <phcoder@gmail.com> wrote:
> >>
> >>
> >>
> >> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
> >>>
> >>> Please find coreboot image attached. Zipped it to reduce size
> >>
> >> This image is actually fine and is read correctly by fstest. Apparently
> >> for some reason reading image at the end of 4GiB doesn't work. Can you
> try
> >> dumping last 8M before 4G mark from /dev/mem ?
> >>>
> >>>
> >>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko
> >>> <phcoder@gmail.com> wrote:
> >>>>
> >>>>
> >>>>
> >>>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
> >>>>>
> >>>>> >>Try insmod cbfs
> >>>>>
> >>>>>
> >>>>> Trieed, it does not help. BTW cbfs is already included in my grub elf
> >>>>> image so I don't think I need to do insmod.
> >>>>>
> >>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> >>>>> default_payload.elf --modules='ls ahci pata ehci uhci ohci
> usb_keyboard
> >>>>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
> cbfs'
> >>>>> --install-modules='linux search configfile normal cbtime cbls memrw
> iorw
> >>>>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci
> lsacpi chain
> >>>>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
> affs afs
> >>>>> bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> minix
> >>>>> minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> procfs
> >>>>> reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> password_pbkdf2
> >>>>> ' --fonts= --themes= --locales= -d grub-core/
> >>>>> /boot/grub/grub.cfg=./coreboot.cfg
> >>>>>
> >>>>> This must be something else. AFAIK memdisk itself resides in CBFS,
> >>>>> Strangely ls comman shows memdisk but not cbfsdisk
> >>>>
> >>>> Please share your coreboot image.
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko
> >>>>> <phcoder@gmail.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
> >>>>>>>
> >>>>>>> Hi Experts,
> >>>>>>>
> >>>>>>> I am using grub2 with coreboot and configured with
> >>>>>>> --with-platform=coreboot.
> >>>>>>>
> >>>>>>> I am able to load grub2 from coreboot. However when I run ls
> command,
> >>>>>>> I do not see cbfsdisk. ls only shows
> >>>>>>>
> >>>>>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
> >>>>>>>
> >>>>>>> I have added file in the cbfs as follows and need to access it but
> >>>>>>> when I try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
> >>>>>>>
> >>>>>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
> >>>>>>> myfile -t raw
> >>>>>>>
> >>>>>>> Any idea how to access myfile on cbfsdisk?
> >>>>>>
> >>>>>> Try insmod cbfs
> >>>>>>>
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>> _______________________________________________
> >>>>>>> Grub-devel mailing list
> >>>>>>> Grub-devel@gnu.org
> >>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Grub-devel mailing list
> >>>>>> Grub-devel@gnu.org
> >>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Grub-devel mailing list
> >>>>> Grub-devel@gnu.org
> >>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Grub-devel mailing list
> >>>> Grub-devel@gnu.org
> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>
> >>> _______________________________________________
> >>> Grub-devel mailing list
> >>> Grub-devel@gnu.org
> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 10030 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-17 13:59               ` Gailu Singh
@ 2017-03-24 17:16                 ` Gailu Singh
  2017-03-24 17:19                   ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-24 17:16 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 5883 bytes --]

It was indeed the ROM mapping issue. solved now. Thank you so much Andrei.

On Fri, Mar 17, 2017 at 7:29 PM, Gailu Singh <gailu96@gmail.com> wrote:

> >>Any chance ROM is mapped somewhere else in your case?
> I need to check, this may be a case.
>
> On Fri, Mar 17, 2017 at 7:16 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
>
>> On Fri, Mar 17, 2017 at 4:24 PM, Gailu Singh <gailu96@gmail.com> wrote:
>> > @Vladimir
>> > I do not have serial console (board has memory mapped uart not support
>> in
>> > grub) to capture memory details. Also on graphics console I can not give
>> > commands from usb keyboard to  dump memory because USB port on board
>> are 3.0
>> > and USB 3.0 is not supported in Grub. Any other thing I could try?
>> >
>> > @Andrei
>> > What is the expected address supposed to be printed for successful
>> > identification of CBFS.
>> >
>>
>> GRUB reads 4 bytes at offset 0xffffffc0. All ones likely means that
>> this address simply is not valid.
>>
>> 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." Any chance ROM is mapped somewhere else in your
>> case?
>>
>> > I am building coreboot image myself and stitching with other intel
>> firmware
>> > as documented by Intel.
>> >
>> > On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko
>> > <phcoder@gmail.com> wrote:
>> >>
>> >>
>> >>
>> >> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>
>> >>> Please find coreboot image attached. Zipped it to reduce size
>> >>
>> >> This image is actually fine and is read correctly by fstest. Apparently
>> >> for some reason reading image at the end of 4GiB doesn't work. Can you
>> try
>> >> dumping last 8M before 4G mark from /dev/mem ?
>> >>>
>> >>>
>> >>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko
>> >>> <phcoder@gmail.com> wrote:
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>>>
>> >>>>> >>Try insmod cbfs
>> >>>>>
>> >>>>>
>> >>>>> Trieed, it does not help. BTW cbfs is already included in my grub
>> elf
>> >>>>> image so I don't think I need to do insmod.
>> >>>>>
>> >>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot
>> -o
>> >>>>> default_payload.elf --modules='ls ahci pata ehci uhci ohci
>> usb_keyboard
>> >>>>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
>> cbfs'
>> >>>>> --install-modules='linux search configfile normal cbtime cbls memrw
>> iorw
>> >>>>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci
>> lsacpi chain
>> >>>>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
>> affs afs
>> >>>>> bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
>> minix
>> >>>>> minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
>> procfs
>> >>>>> reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
>> password_pbkdf2
>> >>>>> ' --fonts= --themes= --locales= -d grub-core/
>> >>>>> /boot/grub/grub.cfg=./coreboot.cfg
>> >>>>>
>> >>>>> This must be something else. AFAIK memdisk itself resides in CBFS,
>> >>>>> Strangely ls comman shows memdisk but not cbfsdisk
>> >>>>
>> >>>> Please share your coreboot image.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko
>> >>>>> <phcoder@gmail.com> wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>>>>>
>> >>>>>>> Hi Experts,
>> >>>>>>>
>> >>>>>>> I am using grub2 with coreboot and configured with
>> >>>>>>> --with-platform=coreboot.
>> >>>>>>>
>> >>>>>>> I am able to load grub2 from coreboot. However when I run ls
>> command,
>> >>>>>>> I do not see cbfsdisk. ls only shows
>> >>>>>>>
>> >>>>>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>> >>>>>>>
>> >>>>>>> I have added file in the cbfs as follows and need to access it but
>> >>>>>>> when I try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not
>> found.
>> >>>>>>>
>> >>>>>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
>> >>>>>>> myfile -t raw
>> >>>>>>>
>> >>>>>>> Any idea how to access myfile on cbfsdisk?
>> >>>>>>
>> >>>>>> Try insmod cbfs
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> Thanks.
>> >>>>>>> _______________________________________________
>> >>>>>>> Grub-devel mailing list
>> >>>>>>> Grub-devel@gnu.org
>> >>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>>>
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> Grub-devel mailing list
>> >>>>>> Grub-devel@gnu.org
>> >>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Grub-devel mailing list
>> >>>>> Grub-devel@gnu.org
>> >>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Grub-devel mailing list
>> >>>> Grub-devel@gnu.org
>> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>
>> >>>
>> >>> _______________________________________________
>> >>> Grub-devel mailing list
>> >>> Grub-devel@gnu.org
>> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>
>> >>
>> >> _______________________________________________
>> >> Grub-devel mailing list
>> >> Grub-devel@gnu.org
>> >> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>
>> >
>> >
>> > _______________________________________________
>> > Grub-devel mailing list
>> > Grub-devel@gnu.org
>> > https://lists.gnu.org/mailman/listinfo/grub-devel
>> >
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>

[-- Attachment #2: Type: text/html, Size: 10933 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-24 17:16                 ` Gailu Singh
@ 2017-03-24 17:19                   ` Vladimir 'phcoder' Serbinenko
  2017-03-24 17:32                     ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-24 17:19 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 6018 bytes --]

On Fri, Mar 24, 2017, 10:17 Gailu Singh <gailu96@gmail.com> wrote:

> It was indeed the ROM mapping issue. solved now. Thank you so much Andrei.
>
Could you please reference the solution for future users with the same
problem?

>
> On Fri, Mar 17, 2017 at 7:29 PM, Gailu Singh <gailu96@gmail.com> wrote:
>
> >>Any chance ROM is mapped somewhere else in your case?
> I need to check, this may be a case.
>
> On Fri, Mar 17, 2017 at 7:16 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
>
> On Fri, Mar 17, 2017 at 4:24 PM, Gailu Singh <gailu96@gmail.com> wrote:
> > @Vladimir
> > I do not have serial console (board has memory mapped uart not support in
> > grub) to capture memory details. Also on graphics console I can not give
> > commands from usb keyboard to  dump memory because USB port on board are
> 3.0
> > and USB 3.0 is not supported in Grub. Any other thing I could try?
> >
> > @Andrei
> > What is the expected address supposed to be printed for successful
> > identification of CBFS.
> >
>
> GRUB reads 4 bytes at offset 0xffffffc0. All ones likely means that
> this address simply is not valid.
>
> 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." Any chance ROM is mapped somewhere else in your
> case?
>
> > I am building coreboot image myself and stitching with other intel
> firmware
> > as documented by Intel.
> >
> > On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko
> > <phcoder@gmail.com> wrote:
> >>
> >>
> >>
> >> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
> >>>
> >>> Please find coreboot image attached. Zipped it to reduce size
> >>
> >> This image is actually fine and is read correctly by fstest. Apparently
> >> for some reason reading image at the end of 4GiB doesn't work. Can you
> try
> >> dumping last 8M before 4G mark from /dev/mem ?
> >>>
> >>>
> >>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko
> >>> <phcoder@gmail.com> wrote:
> >>>>
> >>>>
> >>>>
> >>>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
> >>>>>
> >>>>> >>Try insmod cbfs
> >>>>>
> >>>>>
> >>>>> Trieed, it does not help. BTW cbfs is already included in my grub elf
> >>>>> image so I don't think I need to do insmod.
> >>>>>
> >>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o
> >>>>> default_payload.elf --modules='ls ahci pata ehci uhci ohci
> usb_keyboard
> >>>>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
> cbfs'
> >>>>> --install-modules='linux search configfile normal cbtime cbls memrw
> iorw
> >>>>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci
> lsacpi chain
> >>>>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
> affs afs
> >>>>> bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
> minix
> >>>>> minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
> procfs
> >>>>> reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
> password_pbkdf2
> >>>>> ' --fonts= --themes= --locales= -d grub-core/
> >>>>> /boot/grub/grub.cfg=./coreboot.cfg
> >>>>>
> >>>>> This must be something else. AFAIK memdisk itself resides in CBFS,
> >>>>> Strangely ls comman shows memdisk but not cbfsdisk
> >>>>
> >>>> Please share your coreboot image.
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko
> >>>>> <phcoder@gmail.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
> >>>>>>>
> >>>>>>> Hi Experts,
> >>>>>>>
> >>>>>>> I am using grub2 with coreboot and configured with
> >>>>>>> --with-platform=coreboot.
> >>>>>>>
> >>>>>>> I am able to load grub2 from coreboot. However when I run ls
> command,
> >>>>>>> I do not see cbfsdisk. ls only shows
> >>>>>>>
> >>>>>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
> >>>>>>>
> >>>>>>> I have added file in the cbfs as follows and need to access it but
> >>>>>>> when I try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not found.
> >>>>>>>
> >>>>>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
> >>>>>>> myfile -t raw
> >>>>>>>
> >>>>>>> Any idea how to access myfile on cbfsdisk?
> >>>>>>
> >>>>>> Try insmod cbfs
> >>>>>>>
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>> _______________________________________________
> >>>>>>> Grub-devel mailing list
> >>>>>>> Grub-devel@gnu.org
> >>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Grub-devel mailing list
> >>>>>> Grub-devel@gnu.org
> >>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Grub-devel mailing list
> >>>>> Grub-devel@gnu.org
> >>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Grub-devel mailing list
> >>>> Grub-devel@gnu.org
> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>
> >>> _______________________________________________
> >>> Grub-devel mailing list
> >>> Grub-devel@gnu.org
> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 15487 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-24 17:19                   ` Vladimir 'phcoder' Serbinenko
@ 2017-03-24 17:32                     ` Gailu Singh
  2017-03-24 17:42                       ` Andrei Borzenkov
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-24 17:32 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 6836 bytes --]

>>Could you please reference the solution for future users with the same
problem?
Sure. Infect I should have detailed it without asking. Sorry for that.

Solution can be referenced to following thread in coreboot mailing list
that provide details of memory mapping on the board answered by Adrian

https://www.coreboot.org/pipermail/coreboot/2017-March/083681.html


On Fri, Mar 24, 2017 at 10:49 PM, Vladimir 'phcoder' Serbinenko <
phcoder@gmail.com> wrote:

>
>
> On Fri, Mar 24, 2017, 10:17 Gailu Singh <gailu96@gmail.com> wrote:
>
>> It was indeed the ROM mapping issue. solved now. Thank you so much Andrei.
>>
> Could you please reference the solution for future users with the same
> problem?
>
>>
>> On Fri, Mar 17, 2017 at 7:29 PM, Gailu Singh <gailu96@gmail.com> wrote:
>>
>> >>Any chance ROM is mapped somewhere else in your case?
>> I need to check, this may be a case.
>>
>> On Fri, Mar 17, 2017 at 7:16 PM, Andrei Borzenkov <arvidjaar@gmail.com>
>> wrote:
>>
>> On Fri, Mar 17, 2017 at 4:24 PM, Gailu Singh <gailu96@gmail.com> wrote:
>> > @Vladimir
>> > I do not have serial console (board has memory mapped uart not support
>> in
>> > grub) to capture memory details. Also on graphics console I can not give
>> > commands from usb keyboard to  dump memory because USB port on board
>> are 3.0
>> > and USB 3.0 is not supported in Grub. Any other thing I could try?
>> >
>> > @Andrei
>> > What is the expected address supposed to be printed for successful
>> > identification of CBFS.
>> >
>>
>> GRUB reads 4 bytes at offset 0xffffffc0. All ones likely means that
>> this address simply is not valid.
>>
>> 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." Any chance ROM is mapped somewhere else in your
>> case?
>>
>> > I am building coreboot image myself and stitching with other intel
>> firmware
>> > as documented by Intel.
>> >
>> > On Fri, Mar 17, 2017 at 12:45 PM, Vladimir 'phcoder' Serbinenko
>> > <phcoder@gmail.com> wrote:
>> >>
>> >>
>> >>
>> >> On Thu, Mar 16, 2017, 22:30 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>
>> >>> Please find coreboot image attached. Zipped it to reduce size
>> >>
>> >> This image is actually fine and is read correctly by fstest. Apparently
>> >> for some reason reading image at the end of 4GiB doesn't work. Can you
>> try
>> >> dumping last 8M before 4G mark from /dev/mem ?
>> >>>
>> >>>
>> >>> On Fri, Mar 17, 2017 at 1:19 AM, Vladimir 'phcoder' Serbinenko
>> >>> <phcoder@gmail.com> wrote:
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Thu, Mar 16, 2017, 12:43 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>>>
>> >>>>> >>Try insmod cbfs
>> >>>>>
>> >>>>>
>> >>>>> Trieed, it does not help. BTW cbfs is already included in my grub
>> elf
>> >>>>> image so I don't think I need to do insmod.
>> >>>>>
>> >>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot
>> -o
>> >>>>> default_payload.elf --modules='ls ahci pata ehci uhci ohci
>> usb_keyboard
>> >>>>> usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
>> cbfs'
>> >>>>> --install-modules='linux search configfile normal cbtime cbls memrw
>> iorw
>> >>>>> minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci
>> lsacpi chain
>> >>>>> test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
>> affs afs
>> >>>>> bfs btrfs cbfs cpio cpio_be exfat ext2 fat hfs hfsplus iso9660 jfs
>> minix
>> >>>>> minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc
>> procfs
>> >>>>> reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs
>> password_pbkdf2
>> >>>>> ' --fonts= --themes= --locales= -d grub-core/
>> >>>>> /boot/grub/grub.cfg=./coreboot.cfg
>> >>>>>
>> >>>>> This must be something else. AFAIK memdisk itself resides in CBFS,
>> >>>>> Strangely ls comman shows memdisk but not cbfsdisk
>> >>>>
>> >>>> Please share your coreboot image.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> On Fri, Mar 17, 2017 at 12:52 AM, Vladimir 'phcoder' Serbinenko
>> >>>>> <phcoder@gmail.com> wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> On Thu, Mar 16, 2017, 12:18 Gailu Singh <gailu96@gmail.com> wrote:
>> >>>>>>>
>> >>>>>>> Hi Experts,
>> >>>>>>>
>> >>>>>>> I am using grub2 with coreboot and configured with
>> >>>>>>> --with-platform=coreboot.
>> >>>>>>>
>> >>>>>>> I am able to load grub2 from coreboot. However when I run ls
>> command,
>> >>>>>>> I do not see cbfsdisk. ls only shows
>> >>>>>>>
>> >>>>>>> (memdisk) (ahci0) (ahci0,msdos1) (ahci0,msdos2)
>> >>>>>>>
>> >>>>>>> I have added file in the cbfs as follows and need to access it but
>> >>>>>>> when I try (cbfsdisk)/myfile I get error disk 'cbfsdisk' not
>> found.
>> >>>>>>>
>> >>>>>>> build/util/cbfstool/cbfstool build/coreboot.rom add -f myfile -n
>> >>>>>>> myfile -t raw
>> >>>>>>>
>> >>>>>>> Any idea how to access myfile on cbfsdisk?
>> >>>>>>
>> >>>>>> Try insmod cbfs
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> Thanks.
>> >>>>>>> _______________________________________________
>> >>>>>>> Grub-devel mailing list
>> >>>>>>> Grub-devel@gnu.org
>> >>>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>>>
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> Grub-devel mailing list
>> >>>>>> Grub-devel@gnu.org
>> >>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Grub-devel mailing list
>> >>>>> Grub-devel@gnu.org
>> >>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Grub-devel mailing list
>> >>>> Grub-devel@gnu.org
>> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>>>
>> >>>
>> >>> _______________________________________________
>> >>> Grub-devel mailing list
>> >>> Grub-devel@gnu.org
>> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>
>> >>
>> >> _______________________________________________
>> >> Grub-devel mailing list
>> >> Grub-devel@gnu.org
>> >> https://lists.gnu.org/mailman/listinfo/grub-devel
>> >>
>> >
>> >
>> > _______________________________________________
>> > Grub-devel mailing list
>> > Grub-devel@gnu.org
>> > https://lists.gnu.org/mailman/listinfo/grub-devel
>> >
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #2: Type: text/html, Size: 21513 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-24 17:32                     ` Gailu Singh
@ 2017-03-24 17:42                       ` Andrei Borzenkov
  2017-03-24 18:38                         ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-24 17:42 UTC (permalink / raw)
  To: grub-devel

24.03.2017 20:32, Gailu Singh пишет:
>>> Could you please reference the solution for future users with the same
> problem?
> Sure. Infect I should have detailed it without asking. Sorry for that.
> 
> Solution can be referenced to following thread in coreboot mailing list
> that provide details of memory mapping on the board answered by Adrian
> 
> https://www.coreboot.org/pipermail/coreboot/2017-March/083681.html
> 

Enters FMAP ... I like the

"However, you'd have to know where the FMAP is in order to parse things"

And how should we know this location?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-24 17:42                       ` Andrei Borzenkov
@ 2017-03-24 18:38                         ` Gailu Singh
  2017-03-25  7:15                           ` Andrei Borzenkov
  0 siblings, 1 reply; 23+ messages in thread
From: Gailu Singh @ 2017-03-24 18:38 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]

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 {
SI_DESC@0x0 0x1000
IFWI@0x1000 0x2ff000
FMAP@0x300000 0x800
COREBOOT(CBFS)@0x300800 0xc1d800
UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
RECOVERY_MRC_CACHE@0x0 0x10000
RW_MRC_CACHE@0x10000 0x10000
RW_VAR_MRC_CACHE@0x20000 0x1000
}
BIOS_UNUSABLE@0xf3f000 0x40000
DEVICE_EXTENSION@0xf7f000 0x7f000
UNUSED_HOLE@0xfff000 0x1000
}







On Fri, Mar 24, 2017 at 11:12 PM, Andrei Borzenkov <arvidjaar@gmail.com>
wrote:

> 24.03.2017 20:32, Gailu Singh пишет:
> >>> Could you please reference the solution for future users with the same
> > problem?
> > Sure. Infect I should have detailed it without asking. Sorry for that.
> >
> > Solution can be referenced to following thread in coreboot mailing list
> > that provide details of memory mapping on the board answered by Adrian
> >
> > https://www.coreboot.org/pipermail/coreboot/2017-March/083681.html
> >
>
> Enters FMAP ... I like the
>
> "However, you'd have to know where the FMAP is in order to parse things"
>
> And how should we know this location?
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 4709 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-24 18:38                         ` Gailu Singh
@ 2017-03-25  7:15                           ` Andrei Borzenkov
  2017-03-25  7:22                             ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-25  7:15 UTC (permalink / raw)
  To: grub-devel

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 {
> SI_DESC@0x0 0x1000
> IFWI@0x1000 0x2ff000
> FMAP@0x300000 0x800
> COREBOOT(CBFS)@0x300800 0xc1d800
> UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
> RECOVERY_MRC_CACHE@0x0 0x10000
> RW_MRC_CACHE@0x10000 0x10000
> RW_VAR_MRC_CACHE@0x20000 0x1000
> }
> BIOS_UNUSABLE@0xf3f000 0x40000
> DEVICE_EXTENSION@0xf7f000 0x7f000
> UNUSED_HOLE@0xfff000 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?
"
> 
> 
> 
> 
> 
> On Fri, Mar 24, 2017 at 11:12 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
> 
>> 24.03.2017 20:32, Gailu Singh пишет:
>>>>> Could you please reference the solution for future users with the same
>>> problem?
>>> Sure. Infect I should have detailed it without asking. Sorry for that.
>>>
>>> Solution can be referenced to following thread in coreboot mailing list
>>> that provide details of memory mapping on the board answered by Adrian
>>>
>>> https://www.coreboot.org/pipermail/coreboot/2017-March/083681.html
>>>
>>
>> Enters FMAP ... I like the
>>
>> "However, you'd have to know where the FMAP is in order to parse things"
>>
>> And how should we know this location?
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-25  7:15                           ` Andrei Borzenkov
@ 2017-03-25  7:22                             ` Vladimir 'phcoder' Serbinenko
  2017-03-25  7:39                               ` Andrei Borzenkov
  0 siblings, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-25  7:22 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2920 bytes --]

On Sat, Mar 25, 2017, 00:16 Andrei Borzenkov <arvidjaar@gmail.com> 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 {
> > SI_DESC@0x0 0x1000
> > IFWI@0x1000 0x2ff000
> > FMAP@0x300000 0x800
> > COREBOOT(CBFS)@0x300800 0xc1d800
> > UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
> > RECOVERY_MRC_CACHE@0x0 0x10000
> > RW_MRC_CACHE@0x10000 0x10000
> > RW_VAR_MRC_CACHE@0x20000 0x1000
> > }
> > BIOS_UNUSABLE@0xf3f000 0x40000
> > DEVICE_EXTENSION@0xf7f000 0x7f000
> > UNUSED_HOLE@0xfff000 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

> "
> >
> >
> >
> >
> >
> > On Fri, Mar 24, 2017 at 11:12 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> > wrote:
> >
> >> 24.03.2017 20:32, Gailu Singh пишет:
> >>>>> Could you please reference the solution for future users with the
> same
> >>> problem?
> >>> Sure. Infect I should have detailed it without asking. Sorry for that.
> >>>
> >>> Solution can be referenced to following thread in coreboot mailing list
> >>> that provide details of memory mapping on the board answered by Adrian
> >>>
> >>> https://www.coreboot.org/pipermail/coreboot/2017-March/083681.html
> >>>
> >>
> >> Enters FMAP ... I like the
> >>
> >> "However, you'd have to know where the FMAP is in order to parse things"
> >>
> >> And how should we know this location?
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 6281 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-25  7:22                             ` Vladimir 'phcoder' Serbinenko
@ 2017-03-25  7:39                               ` Andrei Borzenkov
  2017-03-25  7:42                                 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 23+ messages in thread
From: Andrei Borzenkov @ 2017-03-25  7:39 UTC (permalink / raw)
  To: grub-devel

25.03.2017 10:22, Vladimir 'phcoder' Serbinenko пишет:
> On Sat, Mar 25, 2017, 00:16 Andrei Borzenkov <arvidjaar@gmail.com> 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 {
>>> SI_DESC@0x0 0x1000
>>> IFWI@0x1000 0x2ff000
>>> FMAP@0x300000 0x800
>>> COREBOOT(CBFS)@0x300800 0xc1d800
>>> UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
>>> RECOVERY_MRC_CACHE@0x0 0x10000
>>> RW_MRC_CACHE@0x10000 0x10000
>>> RW_VAR_MRC_CACHE@0x20000 0x1000
>>> }
>>> BIOS_UNUSABLE@0xf3f000 0x40000
>>> DEVICE_EXTENSION@0xf7f000 0x7f000
>>> UNUSED_HOLE@0xfff000 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.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-25  7:39                               ` Andrei Borzenkov
@ 2017-03-25  7:42                                 ` Vladimir 'phcoder' Serbinenko
  2017-03-25 11:11                                   ` Gailu Singh
  0 siblings, 1 reply; 23+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-03-25  7:42 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]

On Sat, Mar 25, 2017, 00:40 Andrei Borzenkov <arvidjaar@gmail.com> wrote:

> 25.03.2017 10:22, Vladimir 'phcoder' Serbinenko пишет:
> > On Sat, Mar 25, 2017, 00:16 Andrei Borzenkov <arvidjaar@gmail.com>
> 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 {
> >>> SI_DESC@0x0 0x1000
> >>> IFWI@0x1000 0x2ff000
> >>> FMAP@0x300000 0x800
> >>> COREBOOT(CBFS)@0x300800 0xc1d800
> >>> UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
> >>> RECOVERY_MRC_CACHE@0x0 0x10000
> >>> RW_MRC_CACHE@0x10000 0x10000
> >>> RW_VAR_MRC_CACHE@0x20000 0x1000
> >>> }
> >>> BIOS_UNUSABLE@0xf3f000 0x40000
> >>> DEVICE_EXTENSION@0xf7f000 0x7f000
> >>> UNUSED_HOLE@0xfff000 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 4507 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: cbfsdisk not found
  2017-03-25  7:42                                 ` Vladimir 'phcoder' Serbinenko
@ 2017-03-25 11:11                                   ` Gailu Singh
  0 siblings, 0 replies; 23+ messages in thread
From: Gailu Singh @ 2017-03-25 11:11 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 3015 bytes --]

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 <
phcoder@gmail.com> wrote:

>
>
> On Sat, Mar 25, 2017, 00:40 Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>
>> 25.03.2017 10:22, Vladimir 'phcoder' Serbinenko пишет:
>> > On Sat, Mar 25, 2017, 00:16 Andrei Borzenkov <arvidjaar@gmail.com>
>> 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 {
>> >>> SI_DESC@0x0 0x1000
>> >>> IFWI@0x1000 0x2ff000
>> >>> FMAP@0x300000 0x800
>> >>> COREBOOT(CBFS)@0x300800 0xc1d800
>> >>> UNIFIED_MRC_CACHE@0xf1e000 0x21000 {
>> >>> RECOVERY_MRC_CACHE@0x0 0x10000
>> >>> RW_MRC_CACHE@0x10000 0x10000
>> >>> RW_VAR_MRC_CACHE@0x20000 0x1000
>> >>> }
>> >>> BIOS_UNUSABLE@0xf3f000 0x40000
>> >>> DEVICE_EXTENSION@0xf7f000 0x7f000
>> >>> UNUSED_HOLE@0xfff000 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
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #2: Type: text/html, Size: 7118 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-03-25 11:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16 19:18 cbfsdisk not found Gailu Singh
2017-03-16 19:22 ` Vladimir 'phcoder' Serbinenko
2017-03-16 19:43   ` Gailu Singh
2017-03-16 19:49     ` Vladimir 'phcoder' Serbinenko
2017-03-17  3:11       ` Gailu Singh
2017-03-17  7:15         ` Vladimir 'phcoder' Serbinenko
2017-03-17 13:24           ` Gailu Singh
2017-03-17 13:46             ` Andrei Borzenkov
2017-03-17 13:59               ` Gailu Singh
2017-03-24 17:16                 ` Gailu Singh
2017-03-24 17:19                   ` Vladimir 'phcoder' Serbinenko
2017-03-24 17:32                     ` Gailu Singh
2017-03-24 17:42                       ` Andrei Borzenkov
2017-03-24 18:38                         ` Gailu Singh
2017-03-25  7:15                           ` Andrei Borzenkov
2017-03-25  7:22                             ` Vladimir 'phcoder' Serbinenko
2017-03-25  7:39                               ` Andrei Borzenkov
2017-03-25  7:42                                 ` Vladimir 'phcoder' Serbinenko
2017-03-25 11:11                                   ` Gailu Singh
2017-03-17  3:27     ` Andrei Borzenkov
2017-03-17  6:19       ` Gailu Singh
2017-03-17  7:01         ` Andrei Borzenkov
2017-03-17  7:05           ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.