From: Simon Glass Date: Sat, 30 Jul 2022 21:52:04 +0000 (-0600) Subject: video: Renname vbe.h to vesa.h X-Git-Tag: baikal/mips/sdk5.8.2~5^2~252^2~33 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=c6c722d4a84f1bb589cd1db079345b45ef5372dd;p=uboot.git video: Renname vbe.h to vesa.h We want to use VBE to mean Verfiied Boot for Embedded in U-Boot. Rename the existing VBE (Vesa BIOS extensions) to allow this. Verified Boot for Embedded is documented doc/develop/vbe.rst Signed-off-by: Simon Glass --- diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 98cc05de2e..087539ba7d 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c index 6eab0452fd..05519d851a 100644 --- a/arch/x86/lib/coreboot_table.c +++ b/arch/x86/lib/coreboot_table.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 02fd05c9fa..6a7552e695 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/arch/x86/lib/fsp/fsp_graphics.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cmd/elf.c b/cmd/elf.c index 2b33c50bd0..ce40d3f72a 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -14,7 +14,7 @@ #include #include #ifdef CONFIG_X86 -#include +#include #include #include #include diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index cdc5ba6ad9..09da76bc5d 100644 --- a/drivers/bios_emulator/atibios.c +++ b/drivers/bios_emulator/atibios.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include "biosemui.h" diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 73d15e797f..ceeb59d1fe 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c index 2551f162e8..81f0fd8c01 100644 --- a/drivers/video/broadwell_igd.c +++ b/drivers/video/broadwell_igd.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/coreboot.c b/drivers/video/coreboot.c index 7237542c07..3efc65daa2 100644 --- a/drivers/video/coreboot.c +++ b/drivers/video/coreboot.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/video/efi.c b/drivers/video/efi.c index 5f9031f2ec..d60b6e2756 100644 --- a/drivers/video/efi.c +++ b/drivers/video/efi.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include struct pixel { diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c index 1aa5317dd5..18672a1897 100644 --- a/drivers/video/ivybridge_igd.c +++ b/drivers/video/ivybridge_igd.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c index 869e546973..91da939e59 100644 --- a/drivers/video/vesa.c +++ b/drivers/video/vesa.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/vbe.h b/include/vbe.h deleted file mode 100644 index 1631260eb7..0000000000 --- a/include/vbe.h +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ -/****************************************************************************** - * Copyright (c) 2004, 2008 IBM Corporation - * Copyright (c) 2009 Pattrick Hueper - * All rights reserved. - * - * Contributors: - * IBM Corporation - initial implementation - *****************************************************************************/ -#ifndef _VBE_H -#define _VBE_H - -/* these structs are for input from and output to OF */ -struct __packed vbe_screen_info { - u8 display_type; /* 0=NONE, 1= analog, 2=digital */ - u16 screen_width; - u16 screen_height; - /* bytes per line in framebuffer, may be more than screen_width */ - u16 screen_linebytes; - u8 color_depth; /* color depth in bits per pixel */ - u32 framebuffer_address; - u8 edid_block_zero[128]; -}; - -struct __packed vbe_screen_info_input { - u8 signature[4]; - u16 size_reserved; - u8 monitor_number; - u16 max_screen_width; - u8 color_depth; -}; - -/* these structs only store the required a subset of the VBE-defined fields */ -struct __packed vbe_info { - char signature[4]; - u16 version; - u32 oem_string_ptr; - u32 capabilities; - u32 modes_ptr; - u16 total_memory; - u16 oem_version; - u32 vendor_name_ptr; - u32 product_name_ptr; - u32 product_rev_ptr; -}; - -struct __packed vesa_mode_info { - u16 mode_attributes; /* 00 */ - u8 win_a_attributes; /* 02 */ - u8 win_b_attributes; /* 03 */ - u16 win_granularity; /* 04 */ - u16 win_size; /* 06 */ - u16 win_a_segment; /* 08 */ - u16 win_b_segment; /* 0a */ - u32 win_func_ptr; /* 0c */ - u16 bytes_per_scanline; /* 10 */ - u16 x_resolution; /* 12 */ - u16 y_resolution; /* 14 */ - u8 x_charsize; /* 16 */ - u8 y_charsize; /* 17 */ - u8 number_of_planes; /* 18 */ - u8 bits_per_pixel; /* 19 */ - u8 number_of_banks; /* 20 */ - u8 memory_model; /* 21 */ - u8 bank_size; /* 22 */ - u8 number_of_image_pages; /* 23 */ - u8 reserved_page; - u8 red_mask_size; - u8 red_mask_pos; - u8 green_mask_size; - u8 green_mask_pos; - u8 blue_mask_size; - u8 blue_mask_pos; - u8 reserved_mask_size; - u8 reserved_mask_pos; - u8 direct_color_mode_info; - u32 phys_base_ptr; - u32 offscreen_mem_offset; - u16 offscreen_mem_size; - u8 reserved[206]; -}; - -struct vbe_mode_info { - u16 video_mode; - bool valid; - union { - struct vesa_mode_info vesa; - u8 mode_info_block[256]; - }; -}; - -struct vbe_ddc_info { - u8 port_number; /* i.e. monitor number */ - u8 edid_transfer_time; - u8 ddc_level; - u8 edid_block_zero[128]; -}; - -#define VESA_GET_INFO 0x4f00 -#define VESA_GET_MODE_INFO 0x4f01 -#define VESA_SET_MODE 0x4f02 -#define VESA_GET_CUR_MODE 0x4f03 - -extern struct vbe_mode_info mode_info; - -struct video_priv; -struct video_uc_plat; -int vbe_setup_video_priv(struct vesa_mode_info *vesa, - struct video_priv *uc_priv, - struct video_uc_plat *plat); -int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void)); - -#endif diff --git a/include/vesa.h b/include/vesa.h new file mode 100644 index 0000000000..30df58a9f1 --- /dev/null +++ b/include/vesa.h @@ -0,0 +1,113 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * Copyright (c) 2009 Pattrick Hueper + * All rights reserved. + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ +#ifndef _VESA_H +#define _VESA_H + +/* these structs are for input from and output to OF */ +struct __packed vbe_screen_info { + u8 display_type; /* 0=NONE, 1= analog, 2=digital */ + u16 screen_width; + u16 screen_height; + /* bytes per line in framebuffer, may be more than screen_width */ + u16 screen_linebytes; + u8 color_depth; /* color depth in bits per pixel */ + u32 framebuffer_address; + u8 edid_block_zero[128]; +}; + +struct __packed vbe_screen_info_input { + u8 signature[4]; + u16 size_reserved; + u8 monitor_number; + u16 max_screen_width; + u8 color_depth; +}; + +/* these structs only store the required a subset of the VBE-defined fields */ +struct __packed vbe_info { + char signature[4]; + u16 version; + u32 oem_string_ptr; + u32 capabilities; + u32 modes_ptr; + u16 total_memory; + u16 oem_version; + u32 vendor_name_ptr; + u32 product_name_ptr; + u32 product_rev_ptr; +}; + +struct __packed vesa_mode_info { + u16 mode_attributes; /* 00 */ + u8 win_a_attributes; /* 02 */ + u8 win_b_attributes; /* 03 */ + u16 win_granularity; /* 04 */ + u16 win_size; /* 06 */ + u16 win_a_segment; /* 08 */ + u16 win_b_segment; /* 0a */ + u32 win_func_ptr; /* 0c */ + u16 bytes_per_scanline; /* 10 */ + u16 x_resolution; /* 12 */ + u16 y_resolution; /* 14 */ + u8 x_charsize; /* 16 */ + u8 y_charsize; /* 17 */ + u8 number_of_planes; /* 18 */ + u8 bits_per_pixel; /* 19 */ + u8 number_of_banks; /* 20 */ + u8 memory_model; /* 21 */ + u8 bank_size; /* 22 */ + u8 number_of_image_pages; /* 23 */ + u8 reserved_page; + u8 red_mask_size; + u8 red_mask_pos; + u8 green_mask_size; + u8 green_mask_pos; + u8 blue_mask_size; + u8 blue_mask_pos; + u8 reserved_mask_size; + u8 reserved_mask_pos; + u8 direct_color_mode_info; + u32 phys_base_ptr; + u32 offscreen_mem_offset; + u16 offscreen_mem_size; + u8 reserved[206]; +}; + +struct vbe_mode_info { + u16 video_mode; + bool valid; + union { + struct vesa_mode_info vesa; + u8 mode_info_block[256]; + }; +}; + +struct vbe_ddc_info { + u8 port_number; /* i.e. monitor number */ + u8 edid_transfer_time; + u8 ddc_level; + u8 edid_block_zero[128]; +}; + +#define VESA_GET_INFO 0x4f00 +#define VESA_GET_MODE_INFO 0x4f01 +#define VESA_SET_MODE 0x4f02 +#define VESA_GET_CUR_MODE 0x4f03 + +extern struct vbe_mode_info mode_info; + +struct video_priv; +struct video_uc_plat; +int vbe_setup_video_priv(struct vesa_mode_info *vesa, + struct video_priv *uc_priv, + struct video_uc_plat *plat); +int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void)); + +#endif diff --git a/lib/elf.c b/lib/elf.c index d074e4e0a7..0476b2614c 100644 --- a/lib/elf.c +++ b/lib/elf.c @@ -11,7 +11,7 @@ #include #include #ifdef CONFIG_X86 -#include +#include #include #include #endif