Simon Glass | 90ca96a | 2023-07-15 21:39:18 -0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Modified from coreboot bochs.c |
| 4 | */ |
| 5 | |
| 6 | #ifndef __BOCHS_H |
| 7 | #define __BOCHS_H |
| 8 | |
| 9 | #define VGA_INDEX 0x3c0 |
| 10 | |
| 11 | #define IOPORT_INDEX 0x01ce |
| 12 | #define IOPORT_DATA 0x01cf |
| 13 | |
| 14 | enum { |
| 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 | |
| 34 | #define MMIO_BASE 0x500 |
| 35 | |
| 36 | #endif |