The purpose of this is to support user-space VGA drivers with video memory mapped at arbitrary virtual addresses. The default behavior isn't changed except that the address type is usize rather than u32.
FrameBuffer now stores the address (usize), which is calculated in FrameBuffer::new() by combining the video memory start address (default 0xa0000) with an offset which depends on the video map mode.
The video memory start address can be set in the Vga object with the set_memory_start method:
use vga;
vga::vga::VGA.lock().set_memory_start(0xa0000);
The purpose of this is to support user-space VGA drivers with video memory mapped at arbitrary virtual addresses. The default behavior isn't changed except that the address type is
usize
rather thanu32
.FrameBuffer
now stores the address (usize
), which is calculated inFrameBuffer::new()
by combining the video memory start address (default0xa0000
) with an offset which depends on the video map mode.The video memory start address can be set in the
Vga
object with theset_memory_start
method: