<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi <font size="2"><span style="font-size:11pt;">Youness</span></font>! Thanks for your answer!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Yes, I thought about a video initialization problem and for that I set the command line:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span>console=ttyS0,115200n8 console=tty0 earlyprintk=ttyS0,115200n8</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">to be able to receive anything over the serial line. To confirm that this command</p>
<p style="margin-top:0;margin-bottom:0">line is fine, I boot the demoboard from SeaBIOS and load the same bzImage and</p>
<p style="margin-top:0;margin-bottom:0">initrd using grub2 to read them from a pendrive, and once the serial port is initialized</p>
<p style="margin-top:0;margin-bottom:0">I start receiving messages over the serial port.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Today I've been comparing the coreboot output from a working QEMU and comparing</p>
<p style="margin-top:0;margin-bottom:0">the output from my demoboard. You can see it in
<a href="https://github.com/osresearch/heads/issues/440#issuecomment-414708461" class="OWAAutoLink" id="LPlnk505762" previewremoved="true">
https://github.com/osresearch/heads/issues/440#issuecomment-414708461</a></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
The differences I can see. In the QEMU coreboot the CBF is located in 100100:
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p><code>CBFS: 'Master Header Locator' located CBFS at [100100:7fffc0)</code></p>
<p><br>
</p>
<p>There is a Bounce Buffer (I don't know what is) and is used in every segment loaded. For instance:</p>
<p><code>Bounce Buffer at 07f57000, 363552 bytes</code><br>
...<br>
<code>dest 00090000, end 00091080, bouncebuffer 7f57000</code></p>
<p><br>
</p>
<p>In the AMD Bettong coreboot the CBF is located in 100</p>
<p><code><br>
</code></p>
<p><code>CBFS: 'Master Header Locator' located CBFS at [100:7fffc0)</code></p>
<p><br>
</p>
<p>There is an additional segment in</p>
<p><code><br>
</code></p>
<p><code>Loading segment from ROM address 0xff8c7d0c</code><br>
<code>data (compression=0)</code><br>
<code>New segment dstaddr 0x91000 memsize 0xc srcaddr 0xffb4c581 filesize 0xc</code></p>
<p><br>
</p>
<p>which could overwrite the first segment loaded</p>
<p><code><br>
</code></p>
<p><code>New segment dstaddr 0x90000 memsize 0x1080 srcaddr 0xff8c7d60 filesize 0x1080</code></p>
<p><br>
</p>
<p>because 0x90000 + 0x1080 > 0x91000</p>
<p><br>
</p>
<p>And no bounce buffer is used. All segments has something like</p>
<p><code>dest 00090000, end 00091080, bouncebuffer ffffffff</code></p>
<p><br>
</p>
<p>Finally in both coreboots the jump is to 00040000</p>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'll give a try to your suggestion and I'll remove all video support from coreboot and</p>
<p style="margin-top:0;margin-bottom:0">configure the kernel one...<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks!</p>
<p style="margin-top:0;margin-bottom:0">Jorge<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Youness Alaoui <kakaroto@kakaroto.homelinux.net><br>
<b>Enviado:</b> lunes, 20 de agosto de 2018 22:18:39<br>
<b>Para:</b> Jorge Fernandez Monteagudo<br>
<b>Cc:</b> coreboot<br>
<b>Asunto:</b> Re: [coreboot] Using linux as payload</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
I might not be the best one to answer your question, but here are my thoughts :<br>
- the "unknown type 'payload'" error is probably because cbfs changed<br>
the type name from "payload' to "simple elf" since you can add elfs in<br>
there that are not actual 'payloads'. I think though that it<br>
auto-changed the file type to 'simple elf', since you can see in the<br>
cbfs print :<br>
fallback/payload               0xc7a80    simple elf    5244700 none<br>
So the payload is added, it has type "simple elf" and is 5.2MB (which<br>
is the bzImage + initrd.cpio size).<br>
Then in your cbmem log you can see that it did find the payload and<br>
that it decompressed all the sections and everything seems fine :<br>
CBFS: Locating 'fallback/payload'<br>
CBFS: Found @ offset c7b80 size 5006d5<br>
[...]<br>
<br>
And then it jumps into it (i.e: it executes the payload) :<br>
Jumping to boot code at 00040000(8fe11000)<br>
<br>
The reason that's the last messages you see is simply because linux<br>
does not print any messages to cbmem (SeaBIOS does, and if you look at<br>
your old logs, you'd see right after that "jumping to boot code"<br>
there's the SeaBIOS debug messages starting).<br>
<br>
So I think it's all good for you, but your problem is actually with<br>
your linux (Heads) configuration itself, you probably simply do not<br>
have the right graphics driver enabled in the kernel, so linux boots<br>
but it doesn't initialize the GPU so nothing appears. You can either<br>
find and enable your GPU driver in the kernel and rebuild Heads, or<br>
you can tell coreboot to initialize the gpu (either with the GOP<br>
driver+VBT or by running the option rom) and tell it to initialize the<br>
VGA framebuffer (probably in text mode though I'm not sure) or<br>
whatever is needed to actually get some graphics output.<br>
I remember trying a few different options and configurations for the<br>
Librem and in the end, I simply removed the vgabios/vbt from coreboot,<br>
told coreboot not to initialize the graphics, and added the i915<br>
kernel driver to heads and that was all that was needed. Once heads<br>
booted, the kernel driver initialized the graphics and that's it.<br>
<br>
I hope that helps,<br>
Youness.<br>
<br>
On Sat, Aug 18, 2018 at 4:51 AM Jorge Fernandez Monteagudo<br>
<jorgefm@cirsa.com> wrote:<br>
><br>
> Hi all!<br>
><br>
><br>
> I have a coreboot from master git working ok in my AMD Bettong demoboard with SeaBIOS and now<br>
><br>
> I'm trying to use a bzImage (2651888 bytes) and initrd.cpio.xz (2604544 bytes) generated by Heads in<br>
><br>
> order to test the linux payload.<br>
><br>
><br>
> When I compile the coreboot I see:<br>
><br>
><br>
> Created CBFS (capacity = 8388056 bytes)<br>
>     CBFS       apu/amdfw<br>
>     CBFS       AGESA<br>
>     CBFS       fallback/romstage<br>
>     CBFS       fallback/ramstage<br>
>     CBFS       cmos_layout.bin<br>
>     CBFS       pci1002,9874.rom<br>
>     CBFS       fallback/dsdt.aml<br>
>     CBFS       fallback/payload<br>
> W: Unknown type 'payload' ignored<br>
>     CBFS       coreboot.rom<br>
>     CBFSLAYOUT  coreboot.rom<br>
><br>
> This image contains the following sections that can be manipulated with this tool:<br>
><br>
> 'COREBOOT' (CBFS, size 8388096, offset 512)<br>
><br>
> It is possible to perform either the write action or the CBFS add/remove actions on every section listed above.<br>
> To see the image's read-only sections as well, rerun with the -w option.<br>
>     CBFSPRINT  coreboot.rom<br>
><br>
> Name                           Offset     Type           Size   Comp<br>
> cbfs master header             0x0        cbfs header        32 none<br>
> fallback/romstage              0x80       stage           32220 none<br>
> fallback/ramstage              0x7ec0     stage           56689 none<br>
> cmos_layout.bin                0x15c80    cmos_layout      1516 none<br>
> fallback/dsdt.aml              0x162c0    raw              6673 none<br>
> (empty)                        0x17d40    null            32856 none<br>
> apu/amdfw                      0x1fdc0    raw            622592 none<br>
> pci1002,9874.rom               0xb7e00    optionrom       64512 none<br>
> fallback/payload               0xc7a80    simple elf    5244700 none<br>
> (empty)                        0x5c8200   null           228248 none<br>
> AGESA                          0x5ffdc0   raw            690436 none<br>
> (empty)                        0x6a8740   null          1405592 none<br>
> bootblock                      0x7ffa00   bootblock         912 none<br>
><br>
> Built amd/bettong (FP4)<br>
><br>
><br>
> The "W: Unknown type 'payload' ignored" message is ok? Maybe the payload doesn't fit in the<br>
><br>
> coreboot image?<br>
><br>
><br>
> Now when I boot the board the last messages I can see on serial console are:<br>
><br>
><br>
> ...<br>
><br>
> Writing table forward entry at 0x00000500<br>
> Wrote coreboot table at: 00000500, 0x10 bytes, checksum 5ffd<br>
> Writing coreboot table at 0x8fe11000<br>
>  0. 0000000000000000-0000000000000fff: CONFIGURATION TABLES<br>
>  1. 0000000000001000-000000000009ffff: RAM<br>
>  2. 00000000000c0000-000000008fdd9fff: RAM<br>
>  3. 000000008fdda000-000000008fffffff: CONFIGURATION TABLES<br>
>  4. 0000000090000000-00000000cfffffff: RESERVED<br>
>  5. 00000000f8000000-00000000fbffffff: RESERVED<br>
>  6. 00000000fed40000-00000000fed44fff: RESERVED<br>
>  7. 0000000100000000-000000022effffff: RAM<br>
> Board ID: 70<br>
> CBFS: 'Master Header Locator' located CBFS at [100:7fffc0)<br>
> FMAP: Found "FLASH" version 1.1 at 0.<br>
> FMAP: base = ff800000 size = 800000 #areas = 3<br>
> Wrote coreboot table at: 8fe11000, 0x2f4 bytes, checksum 6365<br>
> coreboot table: 780 bytes.<br>
> IMD ROOT    0. 8ffff000 00001000<br>
> IMD SMALL   1. 8fffe000 00001000<br>
> ROMSTG STCK 2. 8ffe6000 00018000<br>
> RAMSTAGE    3. 8feff000 000e7000<br>
> 57a9e100    4. 8fe19000 000e51f0<br>
> COREBOOT    5. 8fe11000 00008000<br>
> IRQ TABLE   6. 8fe10000 00001000<br>
> SMP TABLE   7. 8fe0f000 00001000<br>
> ACPI        8. 8fdeb000 00024000<br>
> TCPA LOG    9. 8fddb000 00010000<br>
> SMBIOS     10. 8fdda000 00000800<br>
> IMD small region:<br>
>   IMD ROOT    0. 8fffec00 00000400<br>
>   CAR GLOBALS 1. 8fffeac0 00000140<br>
>   ROMSTAGE    2. 8fffeaa0 00000004<br>
>   57a9e000    3. 8fffea80 00000018<br>
>   COREBOOTFWD 4. 8fffea40 00000028<br>
> BS: BS_WRITE_TABLES times (us): entry 0 run 207363 exit 0<br>
> CBFS: 'Master Header Locator' located CBFS at [100:7fffc0)<br>
> CBFS: Locating 'fallback/payload'<br>
> CBFS: Found @ offset c7b80 size 5006d5<br>
> Loading segment from ROM address 0xff8c7cb8<br>
>   data (compression=0)<br>
>   New segment dstaddr 0x90000 memsize 0x1080 srcaddr 0xff8c7d60 filesize 0x1080<br>
> Loading segment from ROM address 0xff8c7cd4<br>
>   code (compression=0)<br>
>   New segment dstaddr 0x1000000 memsize 0x2836f0 srcaddr 0xff8c8de0 filesize 0x2836f0<br>
> Loading segment from ROM address 0xff8c7cf0<br>
>   code (compression=0)<br>
>   New segment dstaddr 0x40000 memsize 0xb1 srcaddr 0xffb4c4d0 filesize 0xb1<br>
> Loading segment from ROM address 0xff8c7d0c<br>
>   data (compression=0)<br>
>   New segment dstaddr 0x91000 memsize 0xc srcaddr 0xffb4c581 filesize 0xc<br>
> Loading segment from ROM address 0xff8c7d28<br>
>   data (compression=0)<br>
>   New segment dstaddr 0x4000000 memsize 0x27be00 srcaddr 0xffb4c58d filesize 0x27be00<br>
> Loading segment from ROM address 0xff8c7d44<br>
>   Entry Point 0x00040000<br>
> Loading Segment: addr: 0x0000000000090000 memsz: 0x0000000000001080 filesz: 0x0000000000001080<br>
> lb: [0x000000008ff00000, 0x000000008ffe51f0)<br>
> Post relocation: addr: 0x0000000000090000 memsz: 0x0000000000001080 filesz: 0x0000000000001080<br>
> it's not compressed!<br>
> [ 0x00090000, 00091080, 0x00091080) <- ff8c7d60<br>
> dest 00090000, end 00091080, bouncebuffer ffffffff<br>
> Loading Segment: addr: 0x0000000001000000 memsz: 0x00000000002836f0 filesz: 0x00000000002836f0<br>
> lb: [0x000000008ff00000, 0x000000008ffe51f0)<br>
> Post relocation: addr: 0x0000000001000000 memsz: 0x00000000002836f0 filesz: 0x00000000002836f0<br>
> it's not compressed!<br>
> [ 0x01000000, 012836f0, 0x012836f0) <- ff8c8de0<br>
> dest 01000000, end 012836f0, bouncebuffer ffffffff<br>
> Loading Segment: addr: 0x0000000000040000 memsz: 0x00000000000000b1 filesz: 0x00000000000000b1<br>
> lb: [0x000000008ff00000, 0x000000008ffe51f0)<br>
> Post relocation: addr: 0x0000000000040000 memsz: 0x00000000000000b1 filesz: 0x00000000000000b1<br>
> it's not compressed!<br>
> [ 0x00040000, 000400b1, 0x000400b1) <- ffb4c4d0<br>
> dest 00040000, end 000400b1, bouncebuffer ffffffff<br>
> Loading Segment: addr: 0x0000000000091000 memsz: 0x000000000000000c filesz: 0x000000000000000c<br>
> lb: [0x000000008ff00000, 0x000000008ffe51f0)<br>
> Post relocation: addr: 0x0000000000091000 memsz: 0x000000000000000c filesz: 0x000000000000000c<br>
> it's not compressed!<br>
> [ 0x00091000, 0009100c, 0x0009100c) <- ffb4c581<br>
> dest 00091000, end 0009100c, bouncebuffer ffffffff<br>
> Loading Segment: addr: 0x0000000004000000 memsz: 0x000000000027be00 filesz: 0x000000000027be00<br>
> lb: [0x000000008ff00000, 0x000000008ffe51f0)<br>
> Post relocation: addr: 0x0000000004000000 memsz: 0x000000000027be00 filesz: 0x000000000027be00<br>
> it's not compressed!<br>
> [ 0x04000000, 0427be00, 0x0427be00) <- ffb4c58d<br>
> dest 04000000, end 0427be00, bouncebuffer ffffffff<br>
> Loaded segments<br>
> BS: BS_PAYLOAD_LOAD times (us): entry 0 run 317530 exit 0<br>
> Jumping to boot code at 00040000(8fe11000)<br>
> CPU0: stack: 8ff20000 - 8ff21000, lowest used address 8ff205e0, stack used: 2592 bytes<br>
><br>
><br>
> But no more messages are displayed and the board do nothing. Anyone with a linux payload working already?<br>
><br>
> I'm reporting in the heads github too with no luck...<br>
><br>
> Any hint is welcome!<br>
><br>
><br>
> Regards!<br>
><br>
> --<br>
> coreboot mailing list: coreboot@coreboot.org<br>
> <a href="https://mail.coreboot.org/mailman/listinfo/coreboot">https://mail.coreboot.org/mailman/listinfo/coreboot</a><br>
</div>
</span></font></div>
</body>
</html>