I've spent months debugging it, without any luck.
All the bugs have been fixed and I can set any mode I want.
I just can't get it to plot pixels. No matter what I do.
This code should make my display pink (or light blue). It doesn't!
Code: Select all
framebuffer = (uint32_t*) BAR_2; //(0xB0000000 on my PC)
for(uint32_t x = 0; x < 1920; x++)
{
for(uint32_t y = 0; y < 1080; y++)
{
framebuffer[(y * 1920) + x] = 0xFFABCDFF;
}
}
Code: Select all
plane_surface_1_A[0] = 0;
the graphics memory aperture base == BAR_2 afaikIntel Manuals wrote: It represents an offset from
the graphics memory aperture base and is mapped to physical pages through the global GTT.
Here is how I map it:
Code: Select all
uint64_t* GTT = (uint64_t*) (MMIO_address + 0x800000); //each page (entry) is 8 Bytes long and maps 4096 bytes of RAM
for(uint32_t i = 0; i < (1920 * 1080 * 4); i += 4096)
{
GTT[(BAR_2 + i) / 4096] = (BAR_2 + i) | (1 << 0);
}
//also tried this GTT[i / 4096] = (BAR_2 + i) | (1 << 0);
//and this GTT[i / 4096] = i | (1 << 0);