diff --git a/0001-Don-t-use-MMX-and-SSE-registers-they-aren-t-initiali.patch b/0001-Don-t-use-MMX-and-SSE-registers-they-aren-t-initiali.patch new file mode 100644 index 0000000..a8f0ee5 --- /dev/null +++ b/0001-Don-t-use-MMX-and-SSE-registers-they-aren-t-initiali.patch @@ -0,0 +1,59 @@ +From 2a1167083fc6fa313a202afe179dbae080f04b95 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Fri, 31 May 2013 15:22:37 -0400 +Subject: [PATCH] Don't use MMX and SSE registers, they aren't initialized. + +GCC 4.8.0 will try to use these by default, and you'll wind up looping +across the (uninitialized!) trap handler for uninitialized instructions. + +Signed-off-by: Peter Jones +--- + Cryptlib/Makefile | 2 +- + Cryptlib/OpenSSL/Makefile | 2 +- + Makefile | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Cryptlib/Makefile b/Cryptlib/Makefile +index 925db8d..f1add83 100644 +--- a/Cryptlib/Makefile ++++ b/Cryptlib/Makefile +@@ -10,7 +10,7 @@ LIB_GCC = $(shell $(CC) -print-libgcc-file-name) + EFI_LIBS = -lefi -lgnuefi $(LIB_GCC) + + CFLAGS = -ggdb -O0 -I. -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \ +- -Wall $(EFI_INCLUDES) -mno-red-zone ++ -Wall $(EFI_INCLUDES) -mno-red-zone -mno-sse -mno-mmx + ifeq ($(ARCH),x86_64) + CFLAGS += -DEFI_FUNCTION_WRAPPER + endif +diff --git a/Cryptlib/OpenSSL/Makefile b/Cryptlib/OpenSSL/Makefile +index 7fde382..1bae841 100644 +--- a/Cryptlib/OpenSSL/Makefile ++++ b/Cryptlib/OpenSSL/Makefile +@@ -9,7 +9,7 @@ EFI_PATH = /usr/lib64/gnuefi + LIB_GCC = $(shell $(CC) -print-libgcc-file-name) + EFI_LIBS = -lefi -lgnuefi $(LIB_GCC) + +-CFLAGS = -ggdb -O0 -I. -I.. -I../Include/ -Icrypto -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc \ ++CFLAGS = -ggdb -O0 -I. -I.. -I../Include/ -Icrypto -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc -mno-mmx -mno-sse \ + -Wall $(EFI_INCLUDES) -DOPENSSL_SYSNAME_UWIN -DOPENSSL_SYS_UEFI -DL_ENDIAN -DSIXTY_FOUR_BIT_LONG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_SOCK -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_ERR -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE -DGETPID_IS_MEANINGLESS -DOPENSSL_NO_STDIO -DOPENSSL_NO_FP_API -DOPENSSL_NO_DGRAM -DOPENSSL_NO_SHA0 -DOPENSSL_NO_SHA512 -DOPENSSL_NO_LHASH -DOPENSSL_NO_HW -DOPENSSL_NO_OCSP -DOPENSSL_NO_LOCKING -DOPENSSL_NO_DEPRECATED -DOPENSSL_SMALL_FOOTPRINT -DPEDANTIC -mno-red-zone + ifeq ($(ARCH),x86_64) + CFLAGS += -DEFI_FUNCTION_WRAPPER +diff --git a/Makefile b/Makefile +index 287fbcf..c8f6ec8 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,8 +14,8 @@ EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/ + EFI_CRT_OBJS = $(EFI_PATH)/crt0-efi-$(ARCH).o + EFI_LDS = $(EFI_PATH)/elf_$(ARCH)_efi.lds + +-CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \ +- -Wall -mno-red-zone \ ++CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \ ++ -fshort-wchar -Wall -mno-red-zone -mno-mmx -mno-sse \ + $(EFI_INCLUDES) + ifeq ($(ARCH),x86_64) + CFLAGS += -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI +-- +1.8.2.1 + diff --git a/0001-EFI_PXE_BASE_CODE_DHCPV6_PACKET-is-in-gnu-efi-3.0t.patch b/0001-EFI_PXE_BASE_CODE_DHCPV6_PACKET-is-in-gnu-efi-3.0t.patch new file mode 100644 index 0000000..ee06fa8 --- /dev/null +++ b/0001-EFI_PXE_BASE_CODE_DHCPV6_PACKET-is-in-gnu-efi-3.0t.patch @@ -0,0 +1,32 @@ +From 75f6469dd9b9944124d5e1981458dc275dbc1123 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 30 May 2013 17:23:19 -0400 +Subject: [PATCH] EFI_PXE_BASE_CODE_DHCPV6_PACKET is in gnu-efi-3.0t + +--- + netboot.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/netboot.c b/netboot.c +index 90fb9cb..c44aeac 100644 +--- a/netboot.c ++++ b/netboot.c +@@ -56,15 +56,6 @@ static EFI_IP_ADDRESS tftp_addr; + static char *full_path; + + +-/* +- * Not in the EFI header set yet, so I have to declare it here +- */ +-typedef struct { +- UINT32 MessageType:8; +- UINT32 TransactionId:24; +- UINT8 DhcpOptions[1024]; +-} EFI_PXE_BASE_CODE_DHCPV6_PACKET; +- + typedef struct { + UINT16 OpCode; + UINT16 Length; +-- +1.8.2.1 +