2
* GRUB -- GRand Unified Bootloader
3
* Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
5
* GRUB is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
10
* GRUB is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19
#include <grub/symbol.h>
22
* x86_64 uses registry to pass parameters. Unfortunately, gcc and efi use
23
* different call conversion, so we need to do some conversion.
26
* %rdi, %rsi, %rdx, %rcx, %r8, %r9, 8(%rsp), 16(%rsp), ...
29
* %rcx, %rdx, %r8, %r9, 32(%rsp), 40(%rsp), 48(%rsp), ...
36
FUNCTION (efiemu_get_time)
41
call efiemu_get_time_real
46
FUNCTION (efiemu_set_time)
50
call efiemu_set_time_real
56
FUNCTION (efiemu_get_wakeup_time)
62
call efiemu_get_wakeup_time_real
67
FUNCTION (efiemu_set_wakeup_time)
72
call efiemu_set_wakeup_time_real
77
FUNCTION (efiemu_get_variable)
85
call efiemu_get_variable_real
90
FUNCTION (efiemu_get_next_variable_name)
96
call efiemu_get_next_variable_name_real
101
FUNCTION (efiemu_set_variable)
109
call efiemu_set_variable_real
114
FUNCTION (efiemu_get_next_high_monotonic_count)
118
call efiemu_get_next_high_monotonic_count_real
123
FUNCTION (efiemu_reset_system)
130
call efiemu_reset_system_real
135
/* The following functions are always called in physical mode */
136
.section ".text-physical", "ax"
138
FUNCTION (efiemu_set_virtual_address_map)
145
call efiemu_set_virtual_address_map_real
150
FUNCTION (efiemu_convert_pointer)
155
call efiemu_convert_pointer_real