]> git.proxmox.com Git - grub2.git/blame - include/grub/efi/efi.h
2008-02-12 Alexandre Boeglin <alex@boeglin.org>
[grub2.git] / include / grub / efi / efi.h
CommitLineData
83709125 1/* efi.h - declare variables and functions for EFI support */
2/*
3 * GRUB -- GRand Unified Bootloader
f714229e 4 * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
83709125 5 *
5a79f472 6 * GRUB is free software: you can redistribute it and/or modify
83709125 7 * it under the terms of the GNU General Public License as published by
5a79f472 8 * the Free Software Foundation, either version 3 of the License, or
83709125 9 * (at your option) any later version.
10 *
5a79f472 11 * GRUB is distributed in the hope that it will be useful,
83709125 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
5a79f472 17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
83709125 18 */
19
20#ifndef GRUB_EFI_EFI_HEADER
21#define GRUB_EFI_EFI_HEADER 1
22
23#include <grub/types.h>
24#include <grub/dl.h>
25#include <grub/efi/api.h>
26
27/* Functions. */
28void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_efi_guid_t *protocol,
29 void *registration);
9cacaa17 30grub_efi_handle_t *
31EXPORT_FUNC(grub_efi_locate_handle) (grub_efi_locate_search_type_t search_type,
32 grub_efi_guid_t *protocol,
33 void *search_key,
34 grub_efi_uintn_t *num_handles);
35void *EXPORT_FUNC(grub_efi_open_protocol) (grub_efi_handle_t handle,
36 grub_efi_guid_t *protocol,
37 grub_efi_uint32_t attributes);
83709125 38int EXPORT_FUNC(grub_efi_set_text_mode) (int on);
976a4ea0 39void EXPORT_FUNC(grub_efi_stall) (grub_efi_uintn_t microseconds);
9cacaa17 40void *
41EXPORT_FUNC(grub_efi_allocate_pages) (grub_efi_physical_address_t address,
42 grub_efi_uintn_t pages);
976a4ea0 43void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address,
44 grub_efi_uintn_t pages);
9cacaa17 45int
46EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size,
47 grub_efi_memory_descriptor_t *memory_map,
48 grub_efi_uintn_t *map_key,
49 grub_efi_uintn_t *descriptor_size,
50 grub_efi_uint32_t *descriptor_version);
7f362539 51grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (grub_efi_handle_t image_handle);
2965c7cc 52void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp);
53char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
7f362539 54grub_efi_device_path_t *
55EXPORT_FUNC(grub_efi_get_device_path) (grub_efi_handle_t handle);
89a7d726 56int EXPORT_FUNC(grub_efi_exit_boot_services) (grub_efi_uintn_t map_key);
f714229e 57void EXPORT_FUNC (grub_reboot) (void);
58void EXPORT_FUNC (grub_halt) (void);
976a4ea0 59
60void grub_efi_mm_init (void);
61void grub_efi_mm_fini (void);
62void grub_efi_init (void);
63void grub_efi_fini (void);
2965c7cc 64void grub_efi_set_prefix (void);
83709125 65
66/* Variables. */
67extern grub_efi_system_table_t *EXPORT_VAR(grub_efi_system_table);
68extern grub_efi_handle_t EXPORT_VAR(grub_efi_image_handle);
69
70#endif /* ! GRUB_EFI_EFI_HEADER */