summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-06-07 11:14:34 +0200
committerKay Sievers <kay@vrfy.org>2013-06-07 11:14:34 +0200
commitdc845e8b987b584acfdf51a16c544acda8b4902b (patch)
tree82fcf05c6816989abb7e3aca95a7314296ad6841
parent5975f9a421518fe3bd3f2f60695bfc45b2034a98 (diff)
switch to GNU_EFI_USE_MS_ABI (requires gnu-efi-3.0s)
-rw-r--r--Makefile.am7
-rw-r--r--src/efi/gummiboot.c12
2 files changed, 11 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 22e314d..c3dfcb2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -88,12 +88,15 @@ efi_cflags = \
-ffreestanding \
-fno-strict-aliasing \
-fno-stack-protector \
- -Wsign-compare
+ -Wsign-compare \
+ -mno-sse \
+ -mno-mmx
if ARCH_X86_64
efi_cflags += \
+ -mno-red-zone \
-DEFI_FUNCTION_WRAPPER \
- -mno-red-zone
+ -DGNU_EFI_USE_MS_ABI
endif
efi_ldflags = \
diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c
index 9a7f14b..20da9ce 100644
--- a/src/efi/gummiboot.c
+++ b/src/efi/gummiboot.c
@@ -197,7 +197,7 @@ static EFI_STATUS efivar_set_raw(const EFI_GUID *vendor, CHAR16 *name, CHAR8 *bu
if (persistent)
flags |= EFI_VARIABLE_NON_VOLATILE;
- return uefi_call_wrapper(RT->SetVariable, 5, name, vendor, flags, size, buf);
+ return uefi_call_wrapper(RT->SetVariable, 5, name, (EFI_GUID *)vendor, flags, size, buf);
}
static EFI_STATUS efivar_set(CHAR16 *name, CHAR16 *value, BOOLEAN persistent) {
@@ -214,7 +214,7 @@ static EFI_STATUS efivar_get_raw(const EFI_GUID *vendor, CHAR16 *name, CHAR8 **b
if (!buf)
return EFI_OUT_OF_RESOURCES;
- err = uefi_call_wrapper(RT->GetVariable, 5, name, vendor, NULL, &l, buf);
+ err = uefi_call_wrapper(RT->GetVariable, 5, name, (EFI_GUID *)vendor, NULL, &l, buf);
if (EFI_ERROR(err) == EFI_SUCCESS) {
*buffer = buf;
if (size)
@@ -1387,7 +1387,7 @@ static VOID config_entry_add_from_file(Config *config, EFI_HANDLE *device, CHAR1
config_add_entry(config, entry);
}
-static UINTN file_read(EFI_FILE_HANDLE dir, const CHAR16 *name, CHAR8 **content) {
+static UINTN file_read(EFI_FILE_HANDLE dir, CHAR16 *name, CHAR8 **content) {
EFI_FILE_HANDLE handle;
EFI_FILE_INFO *info;
CHAR8 *buf;
@@ -1793,7 +1793,7 @@ static EFI_STATUS image_start(EFI_HANDLE parent_image, const Config *config, con
if (options) {
EFI_LOADED_IMAGE *loaded_image;
- err = uefi_call_wrapper(BS->OpenProtocol, 6, image, &LoadedImageProtocol, &loaded_image,
+ err = uefi_call_wrapper(BS->OpenProtocol, 6, image, &LoadedImageProtocol, (void **)&loaded_image,
parent_image, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR(err)) {
Print(L"Error getting LoadedImageProtocol handle: %r", err);
@@ -1848,7 +1848,7 @@ static VOID config_free(Config *config) {
FreePool(config->entries_auto);
}
-EFI_STATUS EFIAPI efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
+EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
CHAR16 *s;
CHAR8 *b;
UINTN size;
@@ -1872,7 +1872,7 @@ EFI_STATUS EFIAPI efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
efivar_set(L"LoaderFirmwareType", s, FALSE);
FreePool(s);
- err = uefi_call_wrapper(BS->OpenProtocol, 6, image, &LoadedImageProtocol, &loaded_image,
+ err = uefi_call_wrapper(BS->OpenProtocol, 6, image, &LoadedImageProtocol, (void **)&loaded_image,
image, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR(err)) {
Print(L"Error getting a LoadedImageProtocol handle: %r ", err);