summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-27 11:58:54 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-27 11:58:54 +0100
commita33d9510bd36a9fdb98f291250a025cd4bec8bc1 (patch)
treef060a1f0624cf538c34abf700091bb7350a36af1 /Private/NewBoot
parent9614c53b82037f77d5b57777560f8a320cb2ac4f (diff)
Kernel: working on interrupts, almost fix them.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot')
-rw-r--r--Private/NewBoot/Source/BootMain.cxx12
-rw-r--r--Private/NewBoot/Source/makefile4
2 files changed, 8 insertions, 8 deletions
diff --git a/Private/NewBoot/Source/BootMain.cxx b/Private/NewBoot/Source/BootMain.cxx
index 165919ef..fe9c2d9d 100644
--- a/Private/NewBoot/Source/BootMain.cxx
+++ b/Private/NewBoot/Source/BootMain.cxx
@@ -24,7 +24,7 @@
#define kBootReadSize \
(sizeof(DosHeader) + sizeof(ExecHeader) + sizeof(ExecOptionalHeader))
-EXTERN_C EFI_API void RuntimeMain(HEL::HandoverInformationHeader* HIH);
+EXTERN_C void Main(HEL::HandoverInformationHeader* HIH);
EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
EfiSystemTable* SystemTable) {
@@ -126,21 +126,21 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
BFileReader systemIni(L"SYSTEM.INI", ImageHandle);
- systemIni.Size(4096);
+ systemIni.Size(1);
systemIni.ReadAll();
bool isIniNotFound = (systemIni.Blob() == nullptr);
- EFI::ExitBootServices(MapKey, ImageHandle);
-
if (isIniNotFound) {
handoverHdrPtr->f_Magic = 0x55DDFF;
handoverHdrPtr->f_Version = 0x1011;
handoverHdrPtr->f_Bootloader = 0x11; // Installer
- writer.Write(L"HCoreLdr: Jumping to HCore...\r\n");
+ writer.Write(L"HCoreLdr: Loading HCore...\r\n");
+
+ EFI::ExitBootServices(MapKey, ImageHandle);
- RuntimeMain(handoverHdrPtr);
+ Main(handoverHdrPtr);
} else {
handoverHdrPtr->f_Magic = 0xFF55DD;
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile
index 7a8a555f..4d714abc 100644
--- a/Private/NewBoot/Source/makefile
+++ b/Private/NewBoot/Source/makefile
@@ -7,7 +7,7 @@ CC_GNU=x86_64-w64-mingw32-g++
LD_GNU=x86_64-w64-mingw32-ld
LD_FLAGS=-e efi_main -shared --subsystem=10 -ffreestanding
ASM=nasm
-OBJ=$(wildcard *.obj) $(wildcard *.o) $(wildcard ../../Obj/*.obj) $(wildcard HEL/AMD64/*.obj) $(wildcard HEL/AMD64/*.o)
+OBJ=$(wildcard *.o) $(wildcard ../../Obj/*.obj) $(wildcard ../../*.exe) $(wildcard HEL/AMD64/*.obj) $(wildcard HEL/AMD64/*.o)
FLAG_ASM=-f win64
FLAG_GNU=-fshort-wchar -O0 -D__DEBUG__ -fPIC -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__HCORE__ -I./ -I$(HOME)/
@@ -27,7 +27,7 @@ bootloader-amd64:
.PHONY: run-efi-amd64
run-efi-amd64:
- qemu-system-x86_64 -net none -smp 2 -m 8G -M q35 -bios OVMF.fd -drive file=fat:rw:CDROM,index=1,format=raw -d int
+ qemu-system-x86_64 -net none -smp 2 -m 4G -M q35 -bios OVMF.fd -drive file=fat:rw:CDROM,index=1,format=raw -serial stdio
.PHONY: download-edk
download-edk: