diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-15 21:39:18 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-17 17:23:15 +0800 |
commit | e2d934b4dae97493db2a74211a82b433776e2000 (patch) | |
tree | 3d2ffdbdd2d0ffebba1ad40d6fe504d96140cf15 /drivers/video/bochs.h | |
parent | 085f8db6b98dfdd8c1707797003d677ce654904f (diff) | |
download | u-boot-e2d934b4dae97493db2a74211a82b433776e2000.tar.gz u-boot-e2d934b4dae97493db2a74211a82b433776e2000.tar.bz2 u-boot-e2d934b4dae97493db2a74211a82b433776e2000.zip |
x86: video: Add a driver for QEMU bochs emulation
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>
Diffstat (limited to 'drivers/video/bochs.h')
-rw-r--r-- | drivers/video/bochs.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/video/bochs.h b/drivers/video/bochs.h new file mode 100644 index 0000000000..4c8ec83a55 --- /dev/null +++ b/drivers/video/bochs.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Modified from coreboot bochs.c + */ + +#ifndef __BOCHS_H +#define __BOCHS_H + +#define VGA_INDEX 0x3c0 + +#define IOPORT_INDEX 0x01ce +#define IOPORT_DATA 0x01cf + +enum { + INDEX_ID, + INDEX_XRES, + INDEX_YRES, + INDEX_BPP, + INDEX_ENABLE, + INDEX_BANK, + INDEX_VIRT_WIDTH, + INDEX_VIRT_HEIGHT, + INDEX_X_OFFSET, + INDEX_Y_OFFSET, + INDEX_VIDEO_MEMORY_64K +}; + +#define ID0 0xb0c0 + +#define ENABLED BIT(0) +#define LFB_ENABLED BIT(6) +#define NOCLEARMEM BIT(7) + +#define MMIO_BASE 0x500 + +#endif |