console_control.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* console_control.h - definitions of the console control protocol */
  2. /*
  3. * GRUB -- GRand Unified Bootloader
  4. * Copyright (C) 2006,2007 Free Software Foundation, Inc.
  5. *
  6. * GRUB is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * GRUB is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. /* The console control protocol is not a part of the EFI spec,
  20. but defined in Intel's Sample Implementation. */
  21. #ifndef GRUB_EFI_CONSOLE_CONTROL_HEADER
  22. #define GRUB_EFI_CONSOLE_CONTROL_HEADER 1
  23. #include <grub/efi/api.h>
  24. #define GRUB_EFI_CONSOLE_CONTROL_GUID \
  25. { 0xf42f7782, 0x12e, 0x4c12, \
  26. { 0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } \
  27. }
  28. enum grub_efi_screen_mode
  29. {
  30. GRUB_EFI_SCREEN_TEXT,
  31. GRUB_EFI_SCREEN_GRAPHICS,
  32. GRUB_EFI_SCREEN_TEXT_MAX_VALUE
  33. };
  34. typedef enum grub_efi_screen_mode grub_efi_screen_mode_t;
  35. struct grub_efi_console_control_protocol
  36. {
  37. grub_efi_status_t
  38. (__grub_efi_api *get_mode) (struct grub_efi_console_control_protocol *this,
  39. grub_efi_screen_mode_t *mode,
  40. grub_efi_boolean_t *uga_exists,
  41. grub_efi_boolean_t *std_in_locked);
  42. grub_efi_status_t
  43. (__grub_efi_api *set_mode) (struct grub_efi_console_control_protocol *this,
  44. grub_efi_screen_mode_t mode);
  45. grub_efi_status_t
  46. (__grub_efi_api *lock_std_in) (struct grub_efi_console_control_protocol *this,
  47. grub_efi_char16_t *password);
  48. };
  49. typedef struct grub_efi_console_control_protocol grub_efi_console_control_protocol_t;
  50. #endif /* ! GRUB_EFI_CONSOLE_CONTROL_HEADER */