summaryrefslogtreecommitdiff
path: root/efi/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'efi/main.c')
-rw-r--r--efi/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/efi/main.c b/efi/main.c
index 0e6b1370..94878f93 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -691,10 +691,8 @@ EFI_STATUS emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr)
/* Low-memory is super-precious! */
if (end <= 1 << 20)
continue;
- if (start < 1 << 20) {
- size -= (1 << 20) - start;
+ if (start < 1 << 20)
start = (1 << 20);
- }
aligned = (start + align -1) & ~(align -1);