From 5563deabd8f7ce3fc713ea23f8cf5bbac33b4024 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 23 Feb 2024 02:58:39 +0100 Subject: Kernel: add heap information (allocator) - Force use of itanium ABI even of MPCC. - Revision of handover has been done. (it is not assuming any starting address) Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/Source/FileReader.cxx | 4 +++- Private/NewBoot/Source/bundle.mk | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Private/NewBoot/Source') diff --git a/Private/NewBoot/Source/FileReader.cxx b/Private/NewBoot/Source/FileReader.cxx index d81248ea..6696a1b4 100644 --- a/Private/NewBoot/Source/FileReader.cxx +++ b/Private/NewBoot/Source/FileReader.cxx @@ -99,6 +99,8 @@ BFileReader::~BFileReader() { BSetMem(this->mPath, 0, kPathLen); } +#define hTransferBufferAddress 0xffffffff10000000 + /** @brief this reads all of the buffer. @param ImageHandle used internally. @@ -107,7 +109,7 @@ Void BFileReader::ReadAll() { /// Allocate Handover page. if (mBlob == nullptr) { - UInt8* blob = (UInt8*)kHandoverStartKernel; + UInt8* blob = (UInt8*)hTransferBufferAddress; if (BS->AllocatePages(AllocateAnyPages, EfiLoaderData, 1, (EfiPhysicalAddress*)&blob) != kEfiOk) { diff --git a/Private/NewBoot/Source/bundle.mk b/Private/NewBoot/Source/bundle.mk index c5a83ffb..cf4ac376 100644 --- a/Private/NewBoot/Source/bundle.mk +++ b/Private/NewBoot/Source/bundle.mk @@ -28,7 +28,7 @@ bootloader-amd64: .PHONY: run-efi-amd64 run-efi-amd64: wget https://retrage.github.io/edk2-nightly/bin/DEBUGX64_OVMF.fd -O OVMF.fd - qemu-system-x86_64 -net none -smp 2 -m 8G -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 -serial stdio .PHONY: clean clean: -- cgit v1.2.3