aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/bochs.c
AgeCommit message (Collapse)Author
2023-08-01video: bochs: Set the frame buffer size per configurationBin Meng
At present the uclass stored frame buffer size is set to a hard coded value, but we can calculate the correct value based on what is configured. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Avoid using IO instructions to access VGA IO portBin Meng
At present the driver uses IO instructions to access the legacy VGA IO ports, which unfortunately limits the driver to work only on x86. It turns out the IO instruction is not necessary as Bochs VGA card remaps the legacy VGA IO ports (0x3c0 -> 0x3df) to its memory mapped register space from offset 0x400. Update the driver to use MMIO access for VGA IO port. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Drop the useless argument of bochs_vga_write()Bin Meng
bochs_vga_write() takes 'index' as one argument, but never uses it. While we are here, use macros instead of magic numbers for the VGA IO port register name and value. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Drop inclusion of <asm/mtrr.h>Bin Meng
The driver does not call any MTRR APIs. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-07-17x86: video: Add a driver for QEMU bochs emulationSimon Glass
Bochs is convenient with QEMU on x86 since it does not require a video BIOS. Add a driver for it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>