diff options
author | 2017-02-04 22:43:46 +0000 | |
---|---|---|
committer | 2017-02-04 22:43:46 +0000 | |
commit | 9a118d7e9271f21c15ee800dc64a92c241c8e864 (patch) | |
tree | c001839466899e9c6db9a08c5225058631a59e52 | |
parent | Appropriately replace "domain name" with "hostname"; less misleading (diff) | |
download | wireguard-openbsd-9a118d7e9271f21c15ee800dc64a92c241c8e864.tar.xz wireguard-openbsd-9a118d7e9271f21c15ee800dc64a92c241c8e864.zip |
In reality our kernel does not need to be aligned at a 256M boundary,
but simply at 2M boundary. This might have been a requirement from
armv7, but it's not true for arm64. This also helps reduce memory
holes below the kernel.
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efiboot.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index a9e7ea38d0b..b7ec03dc6e5 100644 --- a/sys/arch/arm64/stand/efiboot/efiboot.c +++ b/sys/arch/arm64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.3 2017/02/03 08:48:40 patrick Exp $ */ +/* $OpenBSD: efiboot.c,v 1.4 2017/02/04 22:43:46 patrick Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -275,13 +275,12 @@ machdep(void) efi_heap_init(); /* - * The kernel expects to be loaded at offset 0x00200000 into a - * block of memory aligned on a 256MB boundary. We allocate a - * block of 32MB of memory, which gives us plenty of room for - * growth. + * The kernel expects to be loaded into a block of memory aligned + * on a 2MB boundary. We allocate a block of 64MB of memory, which + * gives us plenty of room for growth. */ - if (efi_memprobe_find(EFI_SIZE_TO_PAGES(32 * 1024 * 1024), - 0x10000000, &addr) != EFI_SUCCESS) + if (efi_memprobe_find(EFI_SIZE_TO_PAGES(64 * 1024 * 1024), + 0x200000, &addr) != EFI_SUCCESS) printf("Can't allocate memory\n"); efi_loadaddr = addr; |