xref: /linux/include/uapi/video/uvesafb.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2b889fcf6SDavid Howells #ifndef _UAPI_UVESAFB_H
3b889fcf6SDavid Howells #define _UAPI_UVESAFB_H
4b889fcf6SDavid Howells 
5b889fcf6SDavid Howells #include <linux/types.h>
6b889fcf6SDavid Howells 
7b889fcf6SDavid Howells struct v86_regs {
8b889fcf6SDavid Howells 	__u32 ebx;
9b889fcf6SDavid Howells 	__u32 ecx;
10b889fcf6SDavid Howells 	__u32 edx;
11b889fcf6SDavid Howells 	__u32 esi;
12b889fcf6SDavid Howells 	__u32 edi;
13b889fcf6SDavid Howells 	__u32 ebp;
14b889fcf6SDavid Howells 	__u32 eax;
15b889fcf6SDavid Howells 	__u32 eip;
16b889fcf6SDavid Howells 	__u32 eflags;
17b889fcf6SDavid Howells 	__u32 esp;
18b889fcf6SDavid Howells 	__u16 cs;
19b889fcf6SDavid Howells 	__u16 ss;
20b889fcf6SDavid Howells 	__u16 es;
21b889fcf6SDavid Howells 	__u16 ds;
22b889fcf6SDavid Howells 	__u16 fs;
23b889fcf6SDavid Howells 	__u16 gs;
24b889fcf6SDavid Howells };
25b889fcf6SDavid Howells 
26b889fcf6SDavid Howells /* Task flags */
27b889fcf6SDavid Howells #define TF_VBEIB	0x01
28b889fcf6SDavid Howells #define TF_BUF_ESDI	0x02
29b889fcf6SDavid Howells #define TF_BUF_ESBX	0x04
30b889fcf6SDavid Howells #define TF_BUF_RET	0x08
31b889fcf6SDavid Howells #define TF_EXIT		0x10
32b889fcf6SDavid Howells 
33b889fcf6SDavid Howells struct uvesafb_task {
34b889fcf6SDavid Howells 	__u8 flags;
35b889fcf6SDavid Howells 	int buf_len;
36b889fcf6SDavid Howells 	struct v86_regs regs;
37b889fcf6SDavid Howells };
38b889fcf6SDavid Howells 
39b889fcf6SDavid Howells /* Constants for the capabilities field
40b889fcf6SDavid Howells  * in vbe_ib */
41b889fcf6SDavid Howells #define VBE_CAP_CAN_SWITCH_DAC	0x01
42b889fcf6SDavid Howells #define VBE_CAP_VGACOMPAT	0x02
43b889fcf6SDavid Howells 
44b889fcf6SDavid Howells /* The VBE Info Block */
45b889fcf6SDavid Howells struct vbe_ib {
46b889fcf6SDavid Howells 	char  vbe_signature[4];
47b889fcf6SDavid Howells 	__u16 vbe_version;
48b889fcf6SDavid Howells 	__u32 oem_string_ptr;
49b889fcf6SDavid Howells 	__u32 capabilities;
50b889fcf6SDavid Howells 	__u32 mode_list_ptr;
51b889fcf6SDavid Howells 	__u16 total_memory;
52b889fcf6SDavid Howells 	__u16 oem_software_rev;
53b889fcf6SDavid Howells 	__u32 oem_vendor_name_ptr;
54b889fcf6SDavid Howells 	__u32 oem_product_name_ptr;
55b889fcf6SDavid Howells 	__u32 oem_product_rev_ptr;
56b889fcf6SDavid Howells 	__u8  reserved[222];
57b889fcf6SDavid Howells 	char  oem_data[256];
58b889fcf6SDavid Howells 	char  misc_data[512];
59b889fcf6SDavid Howells } __attribute__ ((packed));
60b889fcf6SDavid Howells 
61b889fcf6SDavid Howells #endif /* _UAPI_UVESAFB_H */
62