diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-28 14:26:58 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-28 14:26:58 +0100 |
| commit | f77a876e0ac2611079ee188933f0f3de222dd08a (patch) | |
| tree | c8230499b03f8ad2cbdddbb6e06607163a176149 /Private/NewBoot/Source | |
| parent | 2cf9f370d40a5c6512530c600292c5fac0410e11 (diff) | |
HCoreKrnl\HAL\IDT: Work in progress patch(fix) of HCore interrupt system
on x86.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/BootMain.cxx | 19 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile | 10 |
2 files changed, 18 insertions, 11 deletions
diff --git a/Private/NewBoot/Source/BootMain.cxx b/Private/NewBoot/Source/BootMain.cxx index fe9c2d9d..0853180d 100644 --- a/Private/NewBoot/Source/BootMain.cxx +++ b/Private/NewBoot/Source/BootMain.cxx @@ -33,7 +33,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, BTextWriter writer; - writer.Write(L"HCoreLdr: "); + writer.Write(L"MahroussLogic (R) HCoreLdr: "); writer.Write(BVersionString::Shared()).Write(L"\r\n"); @@ -47,7 +47,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, .Write(SystemTable->FirmwareVendor) .Write(L"\r\n"); - BFileReader img(L"HCOREKRNL.DLL", ImageHandle); + BFileReader img(L"HCOREKRNL.EXE", ImageHandle); img.Size(kBootReadSize); img.ReadAll(); @@ -129,6 +129,17 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, systemIni.Size(1); systemIni.ReadAll(); + ST->ConOut->ClearScreen(ST->ConOut); + + writer.Write( + L"Warning: This computer program is protected by copyright " + L"law and international treaties.\r\nUnauthorized reproduction " + L"or distribution of this program, or any portion of it,\r\nmay " + L"result in severe civil and criminal penalties,\r\nand will be " + L"prosecuted to the maximum extent possible under the law.\r\n"); + + EFI::ExitBootServices(MapKey, ImageHandle); + bool isIniNotFound = (systemIni.Blob() == nullptr); if (isIniNotFound) { @@ -136,10 +147,6 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, handoverHdrPtr->f_Version = 0x1011; handoverHdrPtr->f_Bootloader = 0x11; // Installer - writer.Write(L"HCoreLdr: Loading HCore...\r\n"); - - EFI::ExitBootServices(MapKey, ImageHandle); - Main(handoverHdrPtr); } else { diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index 4d714abc..933dd1dd 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -5,12 +5,12 @@ CC_GNU=x86_64-w64-mingw32-g++ LD_GNU=x86_64-w64-mingw32-ld -LD_FLAGS=-e efi_main -shared --subsystem=10 -ffreestanding +LD_FLAGS=-e efi_main --subsystem=10 ASM=nasm -OBJ=$(wildcard *.o) $(wildcard ../../Obj/*.obj) $(wildcard ../../*.exe) $(wildcard HEL/AMD64/*.obj) $(wildcard HEL/AMD64/*.o) +OBJ=$(wildcard *.o) $(wildcard ../../Obj/*.obj) $(wildcard HEL/AMD64/*.obj) 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)/ +FLAG_GNU=-fshort-wchar -fPIC -O0 -D__DEBUG__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__HCORE__ -I./ -I$(HOME)/ .PHONY: invalid-recipe invalid-recipe: @@ -23,11 +23,11 @@ bootloader-amd64: $(LD_GNU) $(OBJ) $(LD_FLAGS) -o HCoreLdr.exe cp HCoreLdr.exe CDROM/EFI/BOOT/BOOTX64.EFI cp HCoreLdr.exe CDROM/EFI/BOOT/HCORELDR.EFI - cp ../../HCoreKrnl.dll CDROM/HCOREKRNL.DLL + cp ../../HCoreKrnl.exe CDROM/HCOREKRNL.EXE .PHONY: run-efi-amd64 run-efi-amd64: - 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 + qemu-system-x86_64 -net none -smp 2 -m 4G -M q35 -bios OVMF.fd -drive file=fat:rw:CDROM,index=1,format=raw -d int .PHONY: download-edk download-edk: |
