Simon Glass | e2d934b | 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 | |
Bin Meng | caae795 | 2023-07-23 12:40:26 +0800 | [diff] [blame] | 9 | #define VGA_INDEX 0x3c0 |
| 10 | |
| 11 | #define VGA_ATT_W 0x3c0 |
| 12 | #define VGA_AR_ENABLE_DISPLAY 0x20 |
Simon Glass | e2d934b | 2023-07-15 21:39:18 -0600 | [diff] [blame] | 13 | |
Simon Glass | e2d934b | 2023-07-15 21:39:18 -0600 | [diff] [blame] | 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 | |
Bin Meng | ffe1c83 | 2023-07-23 12:40:27 +0800 | [diff] [blame] | 34 | #define VGA_BASE 0x400 |
Simon Glass | e2d934b | 2023-07-15 21:39:18 -0600 | [diff] [blame] | 35 | #define MMIO_BASE 0x500 |
| 36 | |
| 37 | #endif |