add some indication of video driver status
This commit is contained in:
parent
3a45200d3d
commit
3b316b0603
@ -108,6 +108,12 @@ void graphics_install_preset(uint16_t w, uint16_t h) {
|
|||||||
/* XXX: Massive hack */
|
/* XXX: Massive hack */
|
||||||
uint32_t * herp = (uint32_t *)0xA0000;
|
uint32_t * herp = (uint32_t *)0xA0000;
|
||||||
herp[0] = 0xA5ADFACE;
|
herp[0] = 0xA5ADFACE;
|
||||||
|
herp[1] = 0xFAF42943;
|
||||||
|
|
||||||
|
for (int i = 2; i < 1000; i += 2) {
|
||||||
|
herp[i] = 0xFF00FF00;
|
||||||
|
herp[i+1] = 0x00FF00FF;
|
||||||
|
}
|
||||||
|
|
||||||
for (uintptr_t fb_offset = 0xE0000000; fb_offset < 0xFF000000; fb_offset += 0x01000000) {
|
for (uintptr_t fb_offset = 0xE0000000; fb_offset < 0xFF000000; fb_offset += 0x01000000) {
|
||||||
/* Enable the higher memory */
|
/* Enable the higher memory */
|
||||||
@ -117,13 +123,18 @@ void graphics_install_preset(uint16_t w, uint16_t h) {
|
|||||||
|
|
||||||
/* Go find it */
|
/* Go find it */
|
||||||
for (uintptr_t x = fb_offset; x < fb_offset + 0xFF0000; x += 0x1000) {
|
for (uintptr_t x = fb_offset; x < fb_offset + 0xFF0000; x += 0x1000) {
|
||||||
if (((uintptr_t *)x)[0] == 0xA5ADFACE) {
|
if (((uintptr_t *)x)[0] == 0xA5ADFACE && ((uintptr_t *)x)[1] == 0xFAF42943) {
|
||||||
lfb_vid_memory = (uint8_t *)x;
|
lfb_vid_memory = (uint8_t *)x;
|
||||||
goto mem_found;
|
goto mem_found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 2; i < 1000; i += 2) {
|
||||||
|
herp[i] = 0xFF00FF00;
|
||||||
|
herp[i+1] = 0xFF00FF00;
|
||||||
|
}
|
||||||
|
|
||||||
debug_print(WARNING, "Failed to locate video memory. This could end poorly.");
|
debug_print(WARNING, "Failed to locate video memory. This could end poorly.");
|
||||||
|
|
||||||
mem_found:
|
mem_found:
|
||||||
|
Loading…
Reference in New Issue
Block a user