/* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2009 Free Software Foundation, Inc. * * VAS_EBOOT is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VAS_EBOOT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_EFI_GOP_HEADER #define VAS_EBOOT_EFI_GOP_HEADER 1 /* Based on UEFI specification. */ #define VAS_EBOOT_EFI_GOP_GUID \ { 0x9042a9de, 0x23dc, 0x4a38, { 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a }} typedef enum { VAS_EBOOT_EFI_GOT_RGBA8, VAS_EBOOT_EFI_GOT_BGRA8, VAS_EBOOT_EFI_GOT_BITMASK, VAS_EBOOT_EFI_GOT_BLT_ONLY, } VasEBoot_efi_gop_pixel_format_t; typedef enum { VAS_EBOOT_EFI_BLT_VIDEO_FILL, VAS_EBOOT_EFI_BLT_VIDEO_TO_BLT_BUFFER, VAS_EBOOT_EFI_BLT_BUFFER_TO_VIDEO, VAS_EBOOT_EFI_BLT_VIDEO_TO_VIDEO, VAS_EBOOT_EFI_BLT_OPERATION_MAX } VasEBoot_efi_gop_blt_operation_t; struct VasEBoot_efi_gop_blt_pixel { VasEBoot_uint8_t blue; VasEBoot_uint8_t green; VasEBoot_uint8_t red; VasEBoot_uint8_t reserved; }; struct VasEBoot_efi_gop_pixel_bitmask { VasEBoot_uint32_t r; VasEBoot_uint32_t g; VasEBoot_uint32_t b; VasEBoot_uint32_t a; }; struct VasEBoot_efi_gop_mode_info { VasEBoot_efi_uint32_t version; VasEBoot_efi_uint32_t width; VasEBoot_efi_uint32_t height; VasEBoot_efi_gop_pixel_format_t pixel_format; struct VasEBoot_efi_gop_pixel_bitmask pixel_bitmask; VasEBoot_efi_uint32_t pixels_per_scanline; }; struct VasEBoot_efi_gop_mode { VasEBoot_efi_uint32_t max_mode; VasEBoot_efi_uint32_t mode; struct VasEBoot_efi_gop_mode_info *info; VasEBoot_efi_uintn_t info_size; VasEBoot_efi_physical_address_t fb_base; VasEBoot_efi_uintn_t fb_size; }; /* Forward declaration. */ struct VasEBoot_efi_gop; typedef VasEBoot_efi_status_t (__VasEBoot_efi_api *VasEBoot_efi_gop_query_mode_t) (struct VasEBoot_efi_gop *this, VasEBoot_efi_uint32_t mode_number, VasEBoot_efi_uintn_t *size_of_info, struct VasEBoot_efi_gop_mode_info **info); typedef VasEBoot_efi_status_t (__VasEBoot_efi_api *VasEBoot_efi_gop_set_mode_t) (struct VasEBoot_efi_gop *this, VasEBoot_efi_uint32_t mode_number); typedef VasEBoot_efi_status_t (__VasEBoot_efi_api *VasEBoot_efi_gop_blt_t) (struct VasEBoot_efi_gop *this, void *buffer, VasEBoot_efi_uintn_t operation, VasEBoot_efi_uintn_t sx, VasEBoot_efi_uintn_t sy, VasEBoot_efi_uintn_t dx, VasEBoot_efi_uintn_t dy, VasEBoot_efi_uintn_t width, VasEBoot_efi_uintn_t height, VasEBoot_efi_uintn_t delta); struct VasEBoot_efi_gop { VasEBoot_efi_gop_query_mode_t query_mode; VasEBoot_efi_gop_set_mode_t set_mode; VasEBoot_efi_gop_blt_t blt; struct VasEBoot_efi_gop_mode *mode; }; #endif