[kernel] Pass the fb phys addr to userspace

Instead of always mapping the framebuffer at an arbitrary location, and
so reporting that to userspace, send the physical address so drivers can
call system_map_mmio().
This commit is contained in:
Justin C. Miller
2021-02-04 19:52:59 -08:00
parent b3f59acf7e
commit b3861decc3
4 changed files with 31 additions and 23 deletions

View File

@@ -85,8 +85,13 @@ kernel_main(args::header *header)
fb = memory::to_virtual<args::framebuffer>(reinterpret_cast<uintptr_t>(&header->video));
const args::framebuffer &video = header->video;
log::debug(logs::boot, "Framebuffer: %dx%d[%d] type %s @ %016llx",
video.horizontal, video.vertical, video.scanline, video.type, video.phys_addr);
log::debug(logs::boot, "Framebuffer: %dx%d[%d] type %d @ %llx size %llx",
video.horizontal,
video.vertical,
video.scanline,
video.type,
video.phys_addr,
video.size);
logger_clear_immediate();
}