display: a 64-bit framebuffer address, no mirroring onto itself
Three fixes for real machines that broke at any resolution but 800x600: - kmain() took the loader's framebuffer address as uint32, and vga_fb_init() re-published the scanout from that and the 16-bit VBE block. An aperture above 4 GB moved the console onto the wrong memory right after the vga: line. Both now use the loader's 64-bit display block, mapped with ioremap(). - The loader mirrored onto the console splitter's GOP, which forwards to the primary itself, and onto GOPs that share the primary's aperture. After a mode change that rewrote the screen over itself with another mode's stride. Handles without a device path and overlapping apertures are skipped, and a mode change re-matches the remaining mirrors. - A mode whose reported size, stride or aperture does not add up after SetMode is refused, and the loader returns to the previous one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
c9790df04c
commit
fe32833ade
5 changed files with 193 additions and 16 deletions
|
|
@ -42,8 +42,13 @@ int boot_debug;
|
|||
// Bootstrap processor starts running C code here.
|
||||
// Allocate a real stack and switch to it, first
|
||||
// doing some setup required for memory allocator to work.
|
||||
// fb_addr is RBX from the loader, all sixty-four bits of it. It was declared
|
||||
// uint32, which cut an aperture above 4 GB down to whatever its low half
|
||||
// happened to be -- a plausible address below the hole, pointing at nothing
|
||||
// in particular -- and vga_fb_init() moved the console onto it. On a laptop
|
||||
// that is the screen stopping dead at the "vga:" line.
|
||||
int
|
||||
kmain(uint32 fb_addr)
|
||||
kmain(uint64 fb_addr)
|
||||
{
|
||||
// Carried out of the block below, for the framebuffer that could not be
|
||||
// attached there because it needs page tables that do not exist yet.
|
||||
|
|
|
|||
Loading…
Reference in a new issue