blob: 3facf690e5d233282ceea029b04a237e6a2c8fde [file] [log] [blame]
Simon Glass90ca96a2023-07-15 21:39:18 -06001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Modified from coreboot bochs.c
4 */
5
6#ifndef __BOCHS_H
7#define __BOCHS_H
8
Bin Mengb9e58252023-07-23 12:40:26 +08009#define VGA_INDEX 0x3c0
10
11#define VGA_ATT_W 0x3c0
12#define VGA_AR_ENABLE_DISPLAY 0x20
Simon Glass90ca96a2023-07-15 21:39:18 -060013
Simon Glass90ca96a2023-07-15 21:39:18 -060014enum {
15 INDEX_ID,
16 INDEX_XRES,
17 INDEX_YRES,
18 INDEX_BPP,
19 INDEX_ENABLE,
20 INDEX_BANK,
21 INDEX_VIRT_WIDTH,
22 INDEX_VIRT_HEIGHT,
23 INDEX_X_OFFSET,
24 INDEX_Y_OFFSET,
25 INDEX_VIDEO_MEMORY_64K
26};
27
28#define ID0 0xb0c0
29
30#define ENABLED BIT(0)
31#define LFB_ENABLED BIT(6)
32#define NOCLEARMEM BIT(7)
33
Bin Mengb745ac22023-07-23 12:40:27 +080034#define VGA_BASE 0x400
Simon Glass90ca96a2023-07-15 21:39:18 -060035#define MMIO_BASE 0x500
36
37#endif