diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-10 09:15:04 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-10 09:15:04 +0200 |
| commit | f0f5c992ff0216e2e33f84751d5a389ebfb017b8 (patch) | |
| tree | 4b7c5412d1f1d3409c90d8398c7e8011427fec24 /dev/boot/src/HEL/ARM64 | |
| parent | 98b47e78991d4cc7712e98e6dc1496aa0f0fcf38 (diff) | |
fix: better allocation system in BootZ (aarch, amd64)
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/src/HEL/ARM64')
| -rw-r--r-- | dev/boot/src/HEL/ARM64/BootEFI.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dev/boot/src/HEL/ARM64/BootEFI.cc b/dev/boot/src/HEL/ARM64/BootEFI.cc index 44c6a778..12ace024 100644 --- a/dev/boot/src/HEL/ARM64/BootEFI.cc +++ b/dev/boot/src/HEL/ARM64/BootEFI.cc @@ -129,16 +129,17 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle, EfiSystemTa kHandoverHeader->f_BitMapStart = nullptr; /* Start of bitmap. */ kHandoverHeader->f_BitMapSize = kHandoverBitMapSz; /* Size of bitmap in bytes. */ - Int32 trials = 5 * 10000000; + + UInt16 trials = 5; while (BS->AllocatePool(EfiLoaderData, kHandoverHeader->f_BitMapSize, &kHandoverHeader->f_BitMapStart) != kEfiOk) { --trials; if (!trials) { - writer.Write("BootZ: Unable to allocate sufficent memory, trying again with 2GB...\r"); + writer.Write("BootZ: Unable to allocate sufficient memory, trying again with 2GB...\r"); - trials = 3 * 10000000; + trials = 3; kHandoverHeader->f_BitMapSize = kHandoverBitMapSz / 2; /* Size of bitmap in bytes. */ @@ -147,7 +148,7 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle, EfiSystemTa --trials; if (!trials) { - writer.Write("BootZ: Unable to allocate sufficent memory, aborting...\r"); + writer.Write("BootZ: Unable to allocate sufficient memory, aborting...\r"); Boot::Stop(); } } |
