Commit 895b7ecf authored by Julian Andres Klode's avatar Julian Andres Klode

Imported Upstream version 3.0w

parent 10831ae8
This diff is collapsed.
......@@ -51,19 +51,19 @@ LIBDIR := $(PREFIX)/lib
INSTALL := install
# Compilation tools
prefix := /usr/bin/
CC := $(prefix)gcc
AS := $(prefix)as
LD := $(prefix)ld
AR := $(prefix)ar
RANLIB := $(prefix)ranlib
OBJCOPY := $(prefix)objcopy
HOSTCC := $(prefix)gcc
CC := $(prefix)$(CROSS_COMPILE)gcc
AS := $(prefix)$(CROSS_COMPILE)as
LD := $(prefix)$(CROSS_COMPILE)ld
AR := $(prefix)$(CROSS_COMPILE)ar
RANLIB := $(prefix)$(CROSS_COMPILE)ranlib
OBJCOPY := $(prefix)$(CROSS_COMPILE)objcopy
# Host/target identification
OS := $(shell uname -s)
HOSTARCH := $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
OS := $(shell uname -s)
HOSTARCH := $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed s,i[3456789]86,ia32,)
# FreeBSD (and possibly others) reports amd64 instead of x86_64
ifeq ($(ARCH),amd64)
......@@ -74,18 +74,6 @@ endif
# Variables below derived from variables above
#
GCCVERSION := $(shell $(CC) -dumpversion | cut -f1 -d.)
GCCMINOR := $(shell $(CC) -dumpversion | cut -f2 -d.)
# Rely on GCC MS ABI support?
GCCNEWENOUGH := $(shell ( [ $(GCCVERSION) -gt "4" ] \
|| ( [ $(GCCVERSION) -eq "4" ] \
&& [ $(GCCMINOR) -ge "7" ] ) ) \
&& echo 1)
ifeq ($(GCCNEWENOUGH),1)
CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
endif
# Arch-specific compilation flags
CPPFLAGS += -DCONFIG_$(ARCH)
......@@ -101,12 +89,32 @@ ifeq ($(ARCH),ia32)
endif
ifeq ($(ARCH),x86_64)
GCCVERSION := $(shell $(CC) -dumpversion | cut -f1 -d.)
GCCMINOR := $(shell $(CC) -dumpversion | cut -f2 -d.)
# Rely on GCC MS ABI support?
GCCNEWENOUGH := $(shell ( [ $(GCCVERSION) -gt "4" ] \
|| ( [ $(GCCVERSION) -eq "4" ] \
&& [ $(GCCMINOR) -ge "7" ] ) ) \
&& echo 1)
ifeq ($(GCCNEWENOUGH),1)
CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
endif
CFLAGS += -mno-red-zone -mno-mmx -mno-sse
ifeq ($(HOSTARCH),ia32)
ARCH3264 = -m64
endif
endif
#
# Set HAVE_EFI_OBJCOPY if objcopy understands --target efi-[app|bsdrv|rtdrv],
# otherwise we need to compose the PE/COFF header using the assembler
#
ifneq ($(ARCH),aarch64)
export HAVE_EFI_OBJCOPY=y
endif
# Generic compilation flags
INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-I$(TOPDIR)/inc/protocol
......
......@@ -35,8 +35,8 @@
#
%.efi: %.so
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
-j .rela -j .reloc --target=$(FORMAT) $*.so $@
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel* \
-j .rela* -j .reloc $(FORMAT) $*.so $@
%.so: %.o
$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
......
......@@ -89,7 +89,6 @@ BS_Code 0000000071902000-00000000721FEFFF 00000000000008FD 000000000000000F
#include <efi.h>
#include <efilib.h>
#include <ParseCmdLine.h>
#define MAX_NUM_PAGES 0x000000000F000000
......@@ -108,15 +107,12 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
{
EFI_STATUS efi_status;
EFI_GUID LoadedImageProtocol = LOADED_IMAGE_PROTOCOL;
EFI_LOADED_IMAGE *info;
CHAR16 arglist[MAX_ARGS+1] = {0};
CHAR16 *argv[MAX_ARGS];
INTN argc = 0;
CHAR16 **argv;
INTN argc;
INTN err = 0;
#if DEBUG
INTN c = 0;
#endif
INTN AllocType = -1;
INTN MemType = -1;
INTN NumPages = -1;
......@@ -124,10 +120,6 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
InitializeLib(image, systab);
efi_status = uefi_call_wrapper( BS->HandleProtocol, 3, image,
&LoadedImageProtocol, &info);
Print(L"AllocatePage: __AllocType__ __MemType__ __NumPages__ [__Addr__]\n");
Print(L"__AllocType__ {0,1,2} -- Any, MaxAddr, Addr\n");
Print(L"__MemType__ {0..13}, Reserved ==0, LCode==1, LData==2, BSCode==3, BSData==4, ...\n");
......@@ -137,22 +129,9 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
Print(L"\n");
#if DEBUG
Print(L"%s\n", info->LoadOptions);
#endif
#if DEBUG
Print(L"Set up arglist\n");
#endif
CopyMem(arglist, info->LoadOptions, info->LoadOptionsSize);
#if DEBUG
Print(L"arglist = <%s>\n", arglist);
#endif
#if DEBUG
Print(L"Now try ParseCmdLine\n");
Print(L"Now get argc/argv\n");
#endif
argc = ParseCmdLine(argv, arglist, info->LoadOptionsSize);
argc = GetShellArgcArgv(image, &argv);
#if DEBUG
Print(L"argc = %d\n", argc);
#endif
......@@ -162,7 +141,7 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
Print(L"argv[%d] = <%s>\n", c, argv[c]);
}
#endif
if ( (argc < 3) || (argc > 5) ) {
if ( (argc < 4) || (argc > 5) ) {
Print(L"Wrong argument count\n");
return EFI_SUCCESS;
}
......
......@@ -60,7 +60,6 @@ Available 00000000709FC000-00000000710E3FFF 00000000000006E8 000000000000000F
#include <efi.h>
#include <efilib.h>
#include <ParseCmdLine.h>
/*
* FreePages: __PhysAddr__ __PgCnt__
......@@ -82,13 +81,11 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
{
EFI_STATUS efi_status;
EFI_GUID LoadedImageProtocol = LOADED_IMAGE_PROTOCOL;
EFI_LOADED_IMAGE *info;
CHAR16 arglist[MAX_ARGS+1] = {0};
CHAR16 *argv[MAX_ARGS];
CHAR16 **argv;
INTN argc = 0;
#if DEBUG
INTN c = 0;
#endif
INTN err = 0;
INTN PgCnt = -1;
......@@ -96,10 +93,6 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
InitializeLib(image, systab);
efi_status = uefi_call_wrapper( BS->HandleProtocol, 3, image,
&LoadedImageProtocol, &info);
Print(L"FreePages: __PhysAddr__ __PgCnt__\n");
Print(L"__PhysAddr__ 0... %llx\n", MAX_ADDR);
Print(L"__PgCnt__ [0..%lx]\n", MAX_NUM_PAGES);
......@@ -107,22 +100,9 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
Print(L"\n");
#if DEBUG
Print(L"%s\n", info->LoadOptions);
#endif
#if DEBUG
Print(L"Set up arglist\n");
#endif
CopyMem(arglist, info->LoadOptions, info->LoadOptionsSize);
#if DEBUG
Print(L"arglist = <%s>\n", arglist);
#endif
#if DEBUG
Print(L"Now try ParseCmdLine\n");
Print(L"Now parse argc/argv\n");
#endif
argc = ParseCmdLine(argv, arglist, info->LoadOptionsSize);
argc = GetShellArgcArgv(image, &argv);
#if DEBUG
Print(L"argc = %d\n", argc);
#endif
......
......@@ -58,22 +58,34 @@ LOADLIBES += -lefi -lgnuefi
LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
LOADLIBES += -T $(LDSCRIPT)
FORMAT = efi-app-$(ARCH)
TARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \
printenv.efi t7.efi tcc.efi modelist.efi \
printenv.efi t7.efi t8.efi tcc.efi modelist.efi \
route80h.efi drv0_use.efi AllocPages.efi \
FreePages.efi
TARGET_BSDRIVERS = drv0.efi
TARGET_RTDRIVERS =
ifneq ($(HAVE_EFI_OBJCOPY),)
FORMAT := --target efi-app-$(ARCH)
$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH)
$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH)
else
SUBSYSTEM := 0xa
$(TARGET_BSDRIVERS): SUBSYSTEM = 0xb
$(TARGET_RTDRIVERS): SUBSYSTEM = 0xc
FORMAT := -O binary
LDFLAGS += --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM)
endif
TARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS)
all: $(TARGETS)
$(TARGET_BSDRIVERS): FORMAT=efi-bsdrv-$(ARCH)
$(TARGET_RTDRIVERS): FORMAT=efi-rtdrv-$(ARCH)
clean:
rm -f $(TARGETS) *~ *.o *.so
......
#include <efi.h>
#include <efilib.h>
EFI_STATUS
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
INTN Argc, i;
CHAR16 **Argv;
InitializeLib(ImageHandle, SystemTable);
Argc = GetShellArgcArgv(ImageHandle, &Argv);
Print(L"Hello World, started with Argc=%d\n", Argc);
for (i = 0 ; i < Argc ; ++i)
Print(L" Argv[%d] = '%s'\n", i, Argv[i]);
Print(L"Bye.\n");
return EFI_SUCCESS;
}
......@@ -47,6 +47,9 @@ FILES = reloc_$(ARCH)
OBJS = $(FILES:%=%.o)
# on aarch64, avoid jump tables before all relocations have been processed
reloc_aarch64.o: CFLAGS += -fno-jump-tables
TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
INSTALLTARGETS = $(TARGETS)
......
/*
* crt0-efi-aarch64.S - PE/COFF header for Aarch64 EFI applications
*
* Copright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
*
* This program 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 2 of the License, or (at your option)
* any later version.
*/
.section .text.head
/*
* Magic "MZ" signature for PE/COFF
*/
.globl ImageBase
ImageBase:
.ascii "MZ"
.skip 58 // 'MZ' + pad + offset == 64
.long pe_header - ImageBase // Offset to the PE header.
pe_header:
.ascii "PE"
.short 0
coff_header:
.short 0xaa64 // AArch64
.short 2 // nr_sections
.long 0 // TimeDateStamp
.long 0 // PointerToSymbolTable
.long 1 // NumberOfSymbols
.short section_table - optional_header // SizeOfOptionalHeader
.short 0x206 // Characteristics.
// IMAGE_FILE_DEBUG_STRIPPED |
// IMAGE_FILE_EXECUTABLE_IMAGE |
// IMAGE_FILE_LINE_NUMS_STRIPPED
optional_header:
.short 0x20b // PE32+ format
.byte 0x02 // MajorLinkerVersion
.byte 0x14 // MinorLinkerVersion
.long _edata - _start // SizeOfCode
.long 0 // SizeOfInitializedData
.long 0 // SizeOfUninitializedData
.long _start - ImageBase // AddressOfEntryPoint
.long _start - ImageBase // BaseOfCode
extra_header_fields:
.quad 0 // ImageBase
.long 0x20 // SectionAlignment
.long 0x8 // FileAlignment
.short 0 // MajorOperatingSystemVersion
.short 0 // MinorOperatingSystemVersion
.short 0 // MajorImageVersion
.short 0 // MinorImageVersion
.short 0 // MajorSubsystemVersion
.short 0 // MinorSubsystemVersion
.long 0 // Win32VersionValue
.long _edata - ImageBase // SizeOfImage
// Everything before the kernel image is considered part of the header
.long _start - ImageBase // SizeOfHeaders
.long 0 // CheckSum
.short EFI_SUBSYSTEM // Subsystem
.short 0 // DllCharacteristics
.quad 0 // SizeOfStackReserve
.quad 0 // SizeOfStackCommit
.quad 0 // SizeOfHeapReserve
.quad 0 // SizeOfHeapCommit
.long 0 // LoaderFlags
.long 0x6 // NumberOfRvaAndSizes
.quad 0 // ExportTable
.quad 0 // ImportTable
.quad 0 // ResourceTable
.quad 0 // ExceptionTable
.quad 0 // CertificationTable
.quad 0 // BaseRelocationTable
// Section table
section_table:
/*
* The EFI application loader requires a relocation section
* because EFI applications must be relocatable. This is a
* dummy section as far as we are concerned.
*/
.ascii ".reloc"
.byte 0
.byte 0 // end of 0 padding of section name
.long 0
.long 0
.long 0 // SizeOfRawData
.long 0 // PointerToRawData
.long 0 // PointerToRelocations
.long 0 // PointerToLineNumbers
.short 0 // NumberOfRelocations
.short 0 // NumberOfLineNumbers
.long 0x42100040 // Characteristics (section flags)
.ascii ".text"
.byte 0
.byte 0
.byte 0 // end of 0 padding of section name
.long _edata - _start // VirtualSize
.long _start - ImageBase // VirtualAddress
.long _edata - _start // SizeOfRawData
.long _start - ImageBase // PointerToRawData
.long 0 // PointerToRelocations (0 for executables)
.long 0 // PointerToLineNumbers (0 for executables)
.short 0 // NumberOfRelocations (0 for executables)
.short 0 // NumberOfLineNumbers (0 for executables)
.long 0xe0500020 // Characteristics (section flags)
_start:
stp x29, x30, [sp, #-32]!
mov x29, sp
stp x0, x1, [sp, #16]
mov x2, x0
mov x3, x1
adr x0, ImageBase
adrp x1, _DYNAMIC
add x1, x1, #:lo12:_DYNAMIC
bl _relocate
cbnz x0, 0f
ldp x0, x1, [sp, #16]
bl efi_main
0: ldp x29, x30, [sp], #32
ret
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
{
.text 0x0 : {
*(.text.head)
*(.text)
*(.text.*)
*(.gnu.linkonce.t.*)
*(.srodata)
*(.rodata*)
. = ALIGN(16);
_etext = .;
}
.dynamic : { *(.dynamic) }
.data :
{
*(.sdata)
*(.data)
*(.data1)
*(.data.*)
*(.got.plt)
*(.got)
/* the EFI loader doesn't seem to like a .bss section, so we stick
it all into .data: */
. = ALIGN(16);
_bss = .;
*(.sbss)
*(.scommon)
*(.dynbss)
*(.bss)
*(COMMON)
. = ALIGN(16);
_bss_end = .;
}
.rela.dyn : { *(.rela.dyn) }
.rela.plt : { *(.rela.plt) }
.rela.got : { *(.rela.got) }
.rela.data : { *(.rela.data) *(.rela.data*) }
_edata = .;
_data_size = . - _etext;
. = ALIGN(4096);
.dynsym : { *(.dynsym) }
. = ALIGN(4096);
.dynstr : { *(.dynstr) }
. = ALIGN(4096);
/DISCARD/ :
{
*(.rel.reloc)
*(.eh_frame)
*(.note.GNU-stack)
}
.comment 0 : { *(.comment) }
}
/* reloc_aarch64.c - position independent x86 ELF shared object relocator
Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
Copyright (C) 1999 Hewlett-Packard Co.
Contributed by David Mosberger <davidm@hpl.hp.com>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Hewlett-Packard Co. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
#include <efi.h>
#include <efilib.h>
#include <elf.h>
EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
{
long relsz = 0, relent = 0;
Elf64_Rela *rel = 0;
unsigned long *addr;
int i;
for (i = 0; dyn[i].d_tag != DT_NULL; ++i) {
switch (dyn[i].d_tag) {
case DT_RELA:
rel = (Elf64_Rela*)
((unsigned long)dyn[i].d_un.d_ptr
+ ldbase);
break;
case DT_RELASZ:
relsz = dyn[i].d_un.d_val;
break;
case DT_RELAENT:
relent = dyn[i].d_un.d_val;
break;
default:
break;
}
}
if (!rel && relent == 0)
return EFI_SUCCESS;
if (!rel || relent == 0)
return EFI_LOAD_ERROR;
while (relsz > 0) {
/* apply the relocs */
switch (ELF64_R_TYPE (rel->r_info)) {
case R_AARCH64_NONE:
break;
case R_AARCH64_RELATIVE:
addr = (unsigned long *)
(ldbase + rel->r_offset);
*addr = ldbase + rel->r_addend;
break;
default:
break;
}
rel = (Elf64_Rela*) ((char *) rel + relent);
relsz -= relent;
}
return EFI_SUCCESS;
}
......@@ -23,6 +23,8 @@ all:
clean:
rm -f *~
$(INCDIRINSTALL) \
$(INCDIRINSTALL)/protocol \
$(INCDIRINSTALL)/$(ARCH) \
......
/*
* Turn an CHAR16 * command line into a CHAR16 * argv, INT argc pair.
*
*/
#define MAX_ARGS 512
int ParseCmdLine(CHAR16 **argv[], CHAR16 *buf, int len);
#include <stdint.h>
//
// Basic EFI types of various widths
//
#ifndef __WCHAR_TYPE__
# define __WCHAR_TYPE__ short
#endif
typedef uint64_t UINT64;
typedef int64_t INT64;
typedef uint32_t UINT32;
typedef int32_t INT32;
typedef uint16_t UINT16;
typedef int16_t INT16;
typedef uint8_t UINT8;
typedef int8_t INT8;
typedef __WCHAR_TYPE__ WCHAR;
#undef VOID
#define VOID void
typedef int64_t INTN;
typedef uint64_t UINTN;
#define EFIERR(a) (0x8000000000000000 | a)
#define EFI_ERROR_MASK 0x8000000000000000
#define EFIERR_OEM(a) (0xc000000000000000 | a)
#define BAD_POINTER 0xFBFBFBFBFBFBFBFB
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
#define BREAKPOINT() while (TRUE); // Make it hang on Bios[Dbg]32
//
// Pointers must be aligned to these address to function
//
#define MIN_ALIGNMENT_SIZE 8
#define ALIGN_VARIABLE(Value ,Adjustment) \
(UINTN)Adjustment = 0; \
if((UINTN)Value % MIN_ALIGNMENT_SIZE) \
(UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \
Value = (UINTN)Value + (UINTN)Adjustment
//
// Define macros to build data structure signatures from characters.
//
#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8))
#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16))
#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
//
// EFIAPI - prototype calling convention for EFI function pointers
// BOOTSERVICE - prototype for implementation of a boot service interface
// RUNTIMESERVICE - prototype for implementation of a runtime service interface
// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
// RUNTIME_CODE - pragma macro for declaring runtime code
//
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
#define EFIAPI // Substitute expresion to force C calling convention
#endif
#define BOOTSERVICE
#define RUNTIMESERVICE
#define RUNTIMEFUNCTION
#define RUNTIME_CODE(a) alloc_text("rtcode", a)
#define BEGIN_RUNTIME_DATA() data_seg("rtdata")
#define END_RUNTIME_DATA() data_seg("")
#define VOLATILE volatile
#define MEMORY_FENCE __sync_synchronize
//
// When build similiar to FW, then link everything together as
// one big module.
//
#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
UINTN \
InitializeDriver ( \
VOID *ImageHandle, \
VOID *SystemTable \
) \
{ \
return InitFunction(ImageHandle, \
SystemTable); \
} \
\
EFI_STATUS efi_main( \
EFI_HANDLE image, \
EFI_SYSTEM_TABLE *systab \
) __attribute__((weak, \
alias ("InitializeDriver")));
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
(_if)->LoadInternal(type, name, entry)
//
// Some compilers don't support the forward reference construct:
// typedef struct XXXXX
//
// The following macro provide a workaround for such cases.
#define INTERFACE_DECL(x) struct x
#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
#define EFI_FUNCTION
/*++
Copyright (c) 1998 Intel Corporation
Module Name:
efilibplat.h
Abstract:
EFI to compile bindings
Revision History
--*/
VOID
InitializeLibPlatform (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
......@@ -68,10 +68,10 @@ typedef struct _EFI_DEVICE_PATH {
}
/*
*
* Hardware Device Path (UEFI 2.4 specification, version 2.4 § 9.3.2.)
*/