From 62ba4ba25399b0261aae4a46863fcba441d13111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 20 Aug 2022 23:11:30 +0100 Subject: [PATCH] hex.S: Fix a bug where store label was called rather than jumped into. --- Development/hex2.c | 5 ++++- Makefile | 2 +- amd64/Development/hex2.S | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Development/hex2.c b/Development/hex2.c index 911888d..dddfa51 100644 --- a/Development/hex2.c +++ b/Development/hex2.c @@ -54,7 +54,7 @@ void* memset(void* ptr, int value, int num) for(s = ptr; 0 < num; num = num - 1) { s[0] = value; - s = s + 1; + s = s + 1; } return ptr; @@ -401,5 +401,8 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system input->close(input); output->close(output); + rootdir->close(rootdir); + boot->close_protocol(root_device, &guid2, image_handle, 0); + boot->close_protocol(image_handle, &guid1, image_handle, 0); return 0; } diff --git a/Makefile b/Makefile index b2e5e73..eadeb92 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ $(build_dir)/disk.img: $(build_dir)/esp.img @echo -e "\nRun 'make qemu' to try it inside QEMU" qemu: $(build_dir)/disk.img $(OVMF_IMG) - $(QEMU) -cpu qemu64 -net none \ + $(QEMU) -cpu qemu64 -net none -m 4G \ $(QEMU_KVM) \ -drive if=pflash,format=raw,unit=0,file=$(OVMF_IMG),readonly=on \ -drive if=ide,format=raw,file=$< diff --git a/amd64/Development/hex2.S b/amd64/Development/hex2.S index 0573538..66636e9 100644 --- a/amd64/Development/hex2.S +++ b/amd64/Development/hex2.S @@ -167,7 +167,7 @@ First_pass: jne First_pass_0 # Deal with label - call StoreLabel + jmp StoreLabel First_pass_0: # Check for !