mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-03 01:50:25 +00:00
ffe1c8379e
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
37 lines
544 B
C
37 lines
544 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Modified from coreboot bochs.c
|
|
*/
|
|
|
|
#ifndef __BOCHS_H
|
|
#define __BOCHS_H
|
|
|
|
#define VGA_INDEX 0x3c0
|
|
|
|
#define VGA_ATT_W 0x3c0
|
|
#define VGA_AR_ENABLE_DISPLAY 0x20
|
|
|
|
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 VGA_BASE 0x400
|
|
#define MMIO_BASE 0x500
|
|
|
|
#endif
|