diff options
-rw-r--r-- | gnu-efi-3.0/apps/AllocPages.c | 4 | ||||
-rw-r--r-- | gnu-efi-3.0/apps/Makefile | 9 | ||||
-rw-r--r-- | gnu-efi-3.0/inc/aarch64/efibind.h | 8 | ||||
-rw-r--r-- | gnu-efi-3.0/lib/misc.c | 12 |
4 files changed, 32 insertions, 1 deletions
diff --git a/gnu-efi-3.0/apps/AllocPages.c b/gnu-efi-3.0/apps/AllocPages.c index 34b8c5d..4c7083d 100644 --- a/gnu-efi-3.0/apps/AllocPages.c +++ b/gnu-efi-3.0/apps/AllocPages.c @@ -98,6 +98,9 @@ BS_Code 0000000071902000-00000000721FEFFF 00000000000008FD 000000000000000F #define CHAR_SPACE L' ' +#ifdef DEBUG +#undef DEBUG +#endif #define DEBUG 0 INTN @@ -174,7 +177,6 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *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"); diff --git a/gnu-efi-3.0/apps/Makefile b/gnu-efi-3.0/apps/Makefile index 5a91289..bd7e658 100644 --- a/gnu-efi-3.0/apps/Makefile +++ b/gnu-efi-3.0/apps/Makefile @@ -58,7 +58,11 @@ LOADLIBES += -lefi -lgnuefi LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) LOADLIBES += -T $(LDSCRIPT) +ifeq ($(ARCH),aarch64) +FORMAT := pe-aarch64-little +else FORMAT = efi-app-$(ARCH) +endif TARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \ printenv.efi t7.efi tcc.efi modelist.efi \ @@ -71,8 +75,13 @@ TARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS) all: $(TARGETS) +ifeq ($(ARCH),aarch64) +$(TARGET_BSDRIVERS): +$(TARGET_RTDRIVERS): +else $(TARGET_BSDRIVERS): FORMAT=efi-bsdrv-$(ARCH) $(TARGET_RTDRIVERS): FORMAT=efi-rtdrv-$(ARCH) +endif clean: rm -f $(TARGETS) *~ *.o *.so diff --git a/gnu-efi-3.0/inc/aarch64/efibind.h b/gnu-efi-3.0/inc/aarch64/efibind.h index 7b78a5a..40f79a7 100644 --- a/gnu-efi-3.0/inc/aarch64/efibind.h +++ b/gnu-efi-3.0/inc/aarch64/efibind.h @@ -26,6 +26,9 @@ resolving these issues." #error "GNU-Efi not ported for this compiler on this architecure yet" #endif +#define AARCH64 "aarch64" +#define ARCH AARCH64 + /* These defines are dependent on the widths written above, why they are in * architecture dependent header files, I don't know. Moving them out into * multi-architecture headerfiles might save on some code duplication, but what @@ -91,3 +94,8 @@ typedef uint64_t UINTN; #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)) + +#ifdef EFI_FUNCTION +#undef EFI_FUNCTION +#endif +#define EFI_FUNCTION diff --git a/gnu-efi-3.0/lib/misc.c b/gnu-efi-3.0/lib/misc.c index 32f48cc..076f964 100644 --- a/gnu-efi-3.0/lib/misc.c +++ b/gnu-efi-3.0/lib/misc.c @@ -108,6 +108,18 @@ SetMem ( RtSetMem (Buffer, Size, Value); } +#ifdef AARCH64 +VOID +memset ( + IN VOID *Buffer, + IN UINTN Size, + IN UINT8 Value +) +{ + return SetMem(Buffer, Size, Value); +} +#endif + VOID CopyMem ( IN VOID *Dest, |