summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewBoot')
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootMain.cxx20
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootPlatform.cxx2
-rw-r--r--Private/NewBoot/Source/makefile4
3 files changed, 12 insertions, 14 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
index dd973d0c..8b10503a 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
@@ -34,7 +34,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
writer.Write(L"Mahrouss-Logic (R) NewOS: ").Write(BVersionString::Shared());
- writer.Write(L"\r\nNewBoot.exe: Firmware Vendor: ")
+ writer.Write(L"\r\nNewOS: Firmware Vendor: ")
.Write(SystemTable->FirmwareVendor)
.Write(L"\r\n");
@@ -43,15 +43,12 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
/// if ATA drive is initialized and EFI vendor supports an EPM scheme.
/// @EDK tells our OS that it supports EPM scheme as well.
- if (ataDev) {
+ if (ataDev && SystemTable->FirmwareVendor[0] == '@') {
Char namePart[kEPMNameLength] = {"NewBoot"};
/// tries to read an EPM block, or writes one if it fails.
isEpmFound = boot_write_epm_partition(namePart, kEPMNameLength, &ataDev);
} else {
- writer.Write(
- L"NewOS: This computer can't work with NewOS, please use Mahrouss-"
- L"Logic products instead\r\nNewBoot.exe: Our website: "
- L"www.el-mahrouss-logic.com\r\n");
+ writer.Write(L"NewOS: This computer can't work with NewOS.\r\n");
return kEfiFail;
}
@@ -71,9 +68,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
if (BS->AllocatePool(EfiLoaderData, sizeof(UInt32), (VoidPtr*)&SizePtr) !=
kEfiOk) {
- EFI::RaiseHardError(
- L"__bad_alloc",
- L"NewBoot ran out of memory!");
+ EFI::RaiseHardError(L"__bad_alloc", L"NewBoot ran out of memory!");
}
/****
@@ -86,9 +81,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
if (BS->AllocatePool(EfiLoaderData, sizeof(EfiMemoryDescriptor),
(VoidPtr*)&Descriptor) != kEfiOk) {
- EFI::RaiseHardError(
- L"__bad_alloc",
- L"NewBoot ran out of memory!");
+ EFI::RaiseHardError(L"__bad_alloc", L"NewBoot ran out of memory!");
}
/****
@@ -98,7 +91,8 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
*/
while (BS->GetMemoryMap(SizePtr, Descriptor, &MapKey, &SzDesc, &RevDesc) !=
- kEfiOk);
+ kEfiOk)
+ ;
HEL::HandoverInformationHeader* handoverHdrPtr = nullptr;
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootPlatform.cxx b/Private/NewBoot/Source/HEL/AMD64/BootPlatform.cxx
index b27654cb..00f7bdd8 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootPlatform.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootPlatform.cxx
@@ -14,4 +14,4 @@ EXTERN_C void rt_sti() { asm volatile("sti"); }
EXTERN_C void rt_cld() { asm volatile("cld"); }
-EXTERN_C void rt_std() { asm volatile("std"); } \ No newline at end of file
+EXTERN_C void rt_std() { asm volatile("std"); }
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile
index 7fc566b6..595010d3 100644
--- a/Private/NewBoot/Source/makefile
+++ b/Private/NewBoot/Source/makefile
@@ -17,11 +17,14 @@ EMU=qemu-system-x86_64w.exe
endif
IMG=epm.img
+IMG_2=epm-slave.img
EMU_FLAGS=-net none -smp 4 -m 4G -M q35 -bios OVMF.fd -device piix3-ide,id=ide -drive id=disk,file=$(IMG),format=raw,if=none -device ide-hd,drive=disk,bus=ide.0 -drive file=fat:rw:CDROM,index=2,format=raw -d int
LD_FLAGS=-e efi_main --subsystem=10
+
OBJ=$(wildcard *.o) $(wildcard HEL/AMD64/*.obj)
+
REM=rm
REM_FLAG=-f
@@ -55,6 +58,7 @@ run-efi-amd64:
.PHONY: epm-img
epm-img:
qemu-img create -f raw $(IMG) 256M
+ qemu-img create -f raw $(IMG_2) 256M
.PHONY: download-edk
download-edk: