From dc2d81f3c7628433bd3c51f1624200b3913ac746 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sat, 7 Dec 2024 11:43:21 +0100 Subject: IMPL: Recover Kernel Window framework from previous commits. IMPL: Compiler fixes and improvements on the source code. Signed-off-by: Amlal --- dev/ZBAKit/BootKit/Support.h | 2 ++ dev/ZBAKit/amd64-efi.make | 4 ++-- dev/ZBAKit/src/HEL/AMD64/BootMain.cc | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'dev/ZBAKit') diff --git a/dev/ZBAKit/BootKit/Support.h b/dev/ZBAKit/BootKit/Support.h index afeabff6..7b315c2d 100644 --- a/dev/ZBAKit/BootKit/Support.h +++ b/dev/ZBAKit/BootKit/Support.h @@ -9,6 +9,8 @@ /// @file Support.h /// @brief Purpose of this file is to help port libs into the bootloader. +#include + #define kLongMax ((long)(~0UL >> 1)) #define kLongMin (~kLongMax) diff --git a/dev/ZBAKit/amd64-efi.make b/dev/ZBAKit/amd64-efi.make index 2d541397..c2bdd63c 100644 --- a/dev/ZBAKit/amd64-efi.make +++ b/dev/ZBAKit/amd64-efi.make @@ -45,7 +45,7 @@ REM_FLAG=-f FLAG_ASM=-f win64 FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__MINOSKRNL__ -D__ZBAOSLDR__ \ -DEFI_FUNCTION_WRAPPER -I./ -I../ZKAKit -I../ -c -nostdlib -fno-rtti -fno-exceptions \ - -std=c++20 -D__HAVE_ZKA_APIS__ -DZBA_USE_FB -D__ZKA_AMD64__ -D__ZKA__ -DZKA_AUTO_FORMAT -Wall + -std=c++20 -D__HAVE_ZKA_APIS__ -DZBA_USE_FB -D__ZKA_AMD64__ -D__ZKA__ -DZKA_AUTO_FORMAT BOOTLOADER=zbaosldr.exe KERNEL=minoskrnl.exe @@ -116,4 +116,4 @@ help: @echo "gpt-img: Format a disk using the Explicit Partition Map." @echo "clean: clean bootloader." @echo "bootloader-amd64: Build bootloader. (PC AMD64)" - @echo "run-efi-amd64: Run bootloader. (PC AMD64)" + @echo "run-efi-amd64-: Run bootloader. (PC AMD64)" diff --git a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc index 445ebd4e..fc61f2ea 100644 --- a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc +++ b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc @@ -197,7 +197,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc); - auto cDefaultMemoryMap = 0; // Grab any usable entries. + auto kDefaultMemoryMap = 0; // Grab any usable entries. //-----------------------------------------------------------// // A simple loop which finds a usable memory region for us. @@ -210,7 +210,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, ZKA_UNUSED(0); } - cDefaultMemoryMap = lookup_index; + kDefaultMemoryMap = lookup_index; //-----------------------------------------------------------// // Update handover file specific table and phyiscal start field. -- cgit v1.2.3