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