Frame Buffer problem (UEFI)
Posted: Mon Feb 02, 2015 5:39 pm
Hey !
I'm sorry if the question has already been asked, but almost everything I find is related to VBE which calls bios interrupts for switching between modes, etc.
I have a problem when drawing into the framebuffer provided by uefi, after ExitBootServices().
On VMWare, everything goes fine, I can fill the screen with a color an print text. But on real hardware, and Parallel Desktops, the image is broken.
This is how I fill the entire screen with a color, let say 0xAA0000.
The FB pointer and color are uint32
On VMware, the entire screen is filled with the right color, but on Parallel Desktop, I got a strange image with individuals RGB pixels and the text is unaligned.
This is a screenshot of Hello World on AA0000 background
If we look closer, we see RGB pixels
Also, new row is not lfb_start + hrez, but something like hrez/2 + hrez/4 which equals VREZ
The only way to fill the background, is using the same byte for every color, even the alpha one, like 0xAAAAAAAA
When I try to plot a single pixel on a random place, I got 2 pixels on screen. On with the right color, an the other with a random one.
If I fill the background 3px by 3 px using this template :
I got almost all screen filled with the right color, but with black lines every 3 pixels.
When using 32bit color, like 0xFFAA0000, the "fouth" pixel is rendered, but colors correspond to nothing expected.
The Graphics Mode is set to 1024x768x24 (3 bytes per pixels),
Pixel format is 2 (Bit Mask)
and the bit mask is R= 0xFF0000, G = 0xFF00, B = 0xFF
FB Start = 3221225472, FB Size = 268435456
Scan line = 1024
Any ideas ?
I'm sorry if the question has already been asked, but almost everything I find is related to VBE which calls bios interrupts for switching between modes, etc.
I have a problem when drawing into the framebuffer provided by uefi, after ExitBootServices().
On VMWare, everything goes fine, I can fill the screen with a color an print text. But on real hardware, and Parallel Desktops, the image is broken.
This is how I fill the entire screen with a color, let say 0xAA0000.
The FB pointer and color are uint32
Code: Select all
addr = fb->base_addr;
sbytes = fb->hrez * fb->vrez;
while (sbytes--)
{
*addr++ = bg_color;
}
This is a screenshot of Hello World on AA0000 background
If we look closer, we see RGB pixels
Also, new row is not lfb_start + hrez, but something like hrez/2 + hrez/4 which equals VREZ
The only way to fill the background, is using the same byte for every color, even the alpha one, like 0xAAAAAAAA
When I try to plot a single pixel on a random place, I got 2 pixels on screen. On with the right color, an the other with a random one.
If I fill the background 3px by 3 px using this template :
Code: Select all
*addr++ = 0xAA0000;
*addr++ = 0x00AA00;
*addr++ = 0x0000AA;
When using 32bit color, like 0xFFAA0000, the "fouth" pixel is rendered, but colors correspond to nothing expected.
The Graphics Mode is set to 1024x768x24 (3 bytes per pixels),
Pixel format is 2 (Bit Mask)
and the bit mask is R= 0xFF0000, G = 0xFF00, B = 0xFF
FB Start = 3221225472, FB Size = 268435456
Scan line = 1024
Any ideas ?