:: commit 7be0b35f6f0685f6710bcee6b2877ab84494f5c6

mintsuki <mintsuki@protonmail.com> — 2021-03-04 06:18

parents: 1be84baf84

We got the config to load

diff --git a/Makefile b/Makefile
index 545c03d6..6cd99174 100644
--- a/Makefile
+++ b/Makefile
@@ -123,20 +123,12 @@ fat32-test: | test-clean test.hdd bootloader all
 	sudo mount `cat loopback_dev`p1 test_image
 	sudo mkdir test_image/boot
 	sudo cp -rv bin/* test/* test_image/boot/
-ifeq ($(TARGET), uefi)
-	sudo mkdir -p test_image/EFI/BOOT
-	sudo cp bin/BOOTX64.EFI test_image/EFI/BOOT/
-endif
 	sync
 	sudo umount test_image/
 	sudo losetup -d `cat loopback_dev`
 	rm -rf test_image loopback_dev
 	bin/limine-install test.hdd
-ifeq ($(TARGET), bios)
 	qemu-system-x86_64 -net none -smp 4 -enable-kvm -cpu host -hda test.hdd -debugcon stdio
-else ifeq ($(TARGET), uefi)
-	qemu-system-x86_64 -L ovmf -bios ovmf/OVMF.fd -net none -smp 4 -enable-kvm -cpu host -hda test.hdd -debugcon stdio
-endif
 
 iso9660-test: | test-clean test.hdd bootloader
 	$(MAKE) -C test
diff --git a/stage23/Makefile b/stage23/Makefile
index 07af9a65..72d8d2f7 100644
--- a/stage23/Makefile
+++ b/stage23/Makefile
@@ -125,6 +125,7 @@ limine_efi.elf: $(OBJ) font.o sys/smp_trampoline.o
 		-T../gnu-efi/gnuefi/elf_x86_64_efi.lds \
 		../gnu-efi/x86_64/gnuefi/crt0-efi-x86_64.o \
 		../gnu-efi/x86_64/gnuefi/libgnuefi.a \
+		../gnu-efi/lib/x86_64/efi_stub.o \
 		$(OBJ) font.o sys/smp_trampoline.o -o $@
 
 -include $(HEADER_DEPS)
diff --git a/stage23/entry.s3.c b/stage23/entry.s3.c
index c03aa345..5fe6ec70 100644
--- a/stage23/entry.s3.c
+++ b/stage23/entry.s3.c
@@ -24,15 +24,12 @@
 void stage3_common(void);
 
 #if defined (uefi)
-__attribute__((ms_abi))
-EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
-    (void)ImageHandle;
-
+EFI_STATUS EFIAPI efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
     gST = SystemTable;
     gBS = SystemTable->BootServices;
     gRT = SystemTable->RuntimeServices;
 
-    print("Limine " LIMINE_VERSION "\n%X\n", print);
+    print("Limine " LIMINE_VERSION "\n\n", print);
 
     volume_create_index();
 
tab: 248 wrap: offon