<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm debugging an problem I have with coreboot & tianocore payload. I'm using
<br>
</p>
<p style="margin-top:0;margin-bottom:0"><span>ae05d095b36ac835a6b1a221e6858065e5486888</span> commit from
<span>Tue May 8 17:09:57 2018</span></p>
<p style="margin-top:0;margin-bottom:0">My board is an AMD Bettong. The options enabled to set the video mode:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y<br>
CONFIG_HAVE_VBE_LINEAR_FRAMEBUFFER=y<br>
<div>CONFIG_FRAMEBUFFER_SET_VESA_MODE=y<br>
<div>CONFIG_VBE_LINEAR_FRAMEBUFFER=y<br>
<div>CONFIG_LINEAR_FRAMEBUFFER=y<br>
<br>
</div>
Configuring 800x600 <span>64k-color (5:6:5)</span><br>
</div>
<div>CONFIG_FRAMEBUFFER_VESA_MODE_114=y<br>
CONFIG_FRAMEBUFFER_VESA_MODE=0x114<br>
</div>
</div>
<div><br>
</div>
<div>the video mode is set ok but using <span>800x600 16.8M-color (8:8:8)</span><br>
</div>
<div>CONFIG_FRAMEBUFFER_VESA_MODE_115=y<br>
CONFIG_FRAMEBUFFER_VESA_MODE=0x115<br>
</div>
<div><br>
</div>
I get<br>
</div>
<div>!!!! X64 Exception Type - 00(#DE - Divide Error)  CPU Apic ID - 00000010 !!!!                                                                                                                                    <br>
RIP  - 000000008F5A2EC4, CS  - 0000000000000038, RFLAGS - 0000000000010246                                                                                                                                       <br>
RAX  - 0000000000000000, RCX - 000000008F58D618, RDX - 0000000000000000                                                                                                                                          <br>
RBX  - 000000008F593A98, RSP - 000000008FDA7700, RBP - 0000000000000000                                                                                                                                          <br>
RSI  - 000000008F58CF98, RDI - 0000000000000000                                                                                                                                                                  <br>
R8   - 0000000000000000, R9  - 000000008F5A3A3F, R10 - FFFFFFFF70A73180                                                                                                                                          <br>
R11  - 000000008FDC3F88, R12 - 0000000000000000, R13 - 000000008F58CF18                                                                                                                                          <br>
R14  - 000000008FA32EA0, R15 - 000000008F58D518                                                                                                                                                                  <br>
DS   - 0000000000000030, ES  - 0000000000000030, FS  - 0000000000000030                                                                                                                                          <br>
GS   - 0000000000000030, SS  - 0000000000000030                                                                                                                                                                  <br>
CR0  - 0000000080000011, CR2 - 0000000000000000, CR3 - 000000008FB87000                                                                                                                                          <br>
CR4  - 0000000000000628, CR8 - 0000000000000000                                                                                                                                                                  <br>
DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000                                                                                                                                          <br>
DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400                                                                                                                                          <br>
GDTR - 000000008FB73F98 0000000000000047, LDTR - 0000000000000000                                                                                                                                                <br>
IDTR - 000000008F903018 0000000000000FFF,   TR - 0000000000000000                                                                                                                                                <br>
FXSAVE_STATE - 000000008FDA7360                                                                                                                                                                                  <br>
!!!! Find PE image /mnt/develop/bettong/coreboot/master/coreboot_tiano/payloads/external/tianocore/tianocore/Build/CorebootPayloadPkgX64/RELEASE_COREBOOT/X64/CorebootPayloadPkg/FbGop/FbGop/DEBUG/FbGop.dll (Im!<br>
<br>
</div>
<p style="margin-top:0;margin-bottom:0">I've set some traces in src/lib/coreboot_table.c in</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span>static void lb_framebuffer(struct lb_header *header)</span></p>
<p style="margin-top:0;margin-bottom:0"><span>{<br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>...</span></p>
<p style="margin-top:0;margin-bottom:0"><span></p>
<div>    if (!IS_ENABLED(CONFIG_LINEAR_FRAMEBUFFER) || fill_lb_framebuffer(&fb))<br>
        return;<br>
<br>
    printk(BIOS_INFO, "-->> lb_framebuffer: %lld - %dx%d bpl %d bpp %d r %d:%d g %d:%d b %d:%d res %d:%d\n",<br>
        fb.physical_address,<br>
        fb.x_resolution,<br>
        fb.y_resolution,<br>
        fb.bytes_per_line,<br>
        fb.bits_per_pixel,<br>
        fb.red_mask_pos,<br>
        fb.red_mask_size,<br>
        fb.green_mask_pos,<br>
        fb.green_mask_size,<br>
        fb.blue_mask_pos,<br>
        fb.blue_mask_size,<br>
        fb.reserved_mask_pos,<br>
        fb.reserved_mask_size );<br>
<br>
</div>
<br>
</span>
<p></p>
<p style="margin-top:0;margin-bottom:0">to see <span>in console</span> that when is correct
<br>
</p>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div>-->> lb_framebuffer: 3758096384 - 800x600 bpl 1664 bpp 16 r 11:5 g 5:6 b 0:5 res 0:0<br>
<br>
</div>
but when the exception is produced:</div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<span>-->> lb_framebuffer: 3758096384 - 0x0 bpl 0 bpp 0 r 0:0 g 0:0 b 0:0 res 0:0</span></div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<br>
</div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Maybe some problem computing the values from mode?</div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<br>
</div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Regards<br>
</div>
</div>
</div>
</body>
</html>