More info from traces. In the correct mode I see


VBE: Getting information about VESA mode 4114
VBE: resolution:  800x600@16
VBE: framebuffer: e0000000
VBE: Setting VESA mode 4114
VGA Option ROM was run

and in the non working:


VBE: Getting information about VESA mode 4115
VBE: resolution:  0x0@0
VBE: framebuffer: e0000000
VBE: Setting VESA mode 4115
VGA Option ROM was run





De: coreboot <coreboot-bounces@coreboot.org> en nombre de Jorge Fernandez Monteagudo <jorgefm@cirsa.com>
Enviado: jueves, 6 de septiembre de 2018 8:02:15
Para: coreboot@coreboot.org
Asunto: [coreboot] Divide Error in Tianocore payload
 

Hi,


I'm debugging an problem I have with coreboot & tianocore payload. I'm using

ae05d095b36ac835a6b1a221e6858065e5486888 commit from Tue May 8 17:09:57 2018

My board is an AMD Bettong. The options enabled to set the video mode:


CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
CONFIG_HAVE_VBE_LINEAR_FRAMEBUFFER=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
CONFIG_VBE_LINEAR_FRAMEBUFFER=y
CONFIG_LINEAR_FRAMEBUFFER=y

Configuring 800x600 64k-color (5:6:5)
CONFIG_FRAMEBUFFER_VESA_MODE_114=y
CONFIG_FRAMEBUFFER_VESA_MODE=0x114

the video mode is set ok but using 800x600 16.8M-color (8:8:8)
CONFIG_FRAMEBUFFER_VESA_MODE_115=y
CONFIG_FRAMEBUFFER_VESA_MODE=0x115

I get
!!!! X64 Exception Type - 00(#DE - Divide Error)  CPU Apic ID - 00000010 !!!!                                                                                                                                    
RIP  - 000000008F5A2EC4, CS  - 0000000000000038, RFLAGS - 0000000000010246                                                                                                                                       
RAX  - 0000000000000000, RCX - 000000008F58D618, RDX - 0000000000000000                                                                                                                                          
RBX  - 000000008F593A98, RSP - 000000008FDA7700, RBP - 0000000000000000                                                                                                                                          
RSI  - 000000008F58CF98, RDI - 0000000000000000                                                                                                                                                                  
R8   - 0000000000000000, R9  - 000000008F5A3A3F, R10 - FFFFFFFF70A73180                                                                                                                                          
R11  - 000000008FDC3F88, R12 - 0000000000000000, R13 - 000000008F58CF18                                                                                                                                          
R14  - 000000008FA32EA0, R15 - 000000008F58D518                                                                                                                                                                  
DS   - 0000000000000030, ES  - 0000000000000030, FS  - 0000000000000030                                                                                                                                          
GS   - 0000000000000030, SS  - 0000000000000030                                                                                                                                                                  
CR0  - 0000000080000011, CR2 - 0000000000000000, CR3 - 000000008FB87000                                                                                                                                          
CR4  - 0000000000000628, CR8 - 0000000000000000                                                                                                                                                                  
DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000                                                                                                                                          
DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400                                                                                                                                          
GDTR - 000000008FB73F98 0000000000000047, LDTR - 0000000000000000                                                                                                                                                
IDTR - 000000008F903018 0000000000000FFF,   TR - 0000000000000000                                                                                                                                                
FXSAVE_STATE - 000000008FDA7360                                                                                                                                                                                  
!!!! 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!

I've set some traces in src/lib/coreboot_table.c in


static void lb_framebuffer(struct lb_header *header)

{

...

    if (!IS_ENABLED(CONFIG_LINEAR_FRAMEBUFFER) || fill_lb_framebuffer(&fb))
        return;

    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",
        fb.physical_address,
        fb.x_resolution,
        fb.y_resolution,
        fb.bytes_per_line,
        fb.bits_per_pixel,
        fb.red_mask_pos,
        fb.red_mask_size,
        fb.green_mask_pos,
        fb.green_mask_size,
        fb.blue_mask_pos,
        fb.blue_mask_size,
        fb.reserved_mask_pos,
        fb.reserved_mask_size );


to see in console that when is correct

-->> lb_framebuffer: 3758096384 - 800x600 bpl 1664 bpp 16 r 11:5 g 5:6 b 0:5 res 0:0

but when the exception is produced:
-->> lb_framebuffer: 3758096384 - 0x0 bpl 0 bpp 0 r 0:0 g 0:0 b 0:0 res 0:0

Maybe some problem computing the values from mode?

Regards