git: 67e39a0d1bdb - main - stand/efi: Document the copy size trick
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Dec 2022 04:39:23 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67e39a0d1bdb24967591721bf7c995d61e0e1c2d commit 67e39a0d1bdb24967591721bf7c995d61e0e1c2d Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-12-04 00:23:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-12-04 00:23:16 +0000 stand/efi: Document the copy size trick We call bi_copymodules twice: once with 0 and once with the size of the arena. We do this to find the size, it turns out. Document this. Sponsored by: Netflix --- stand/efi/loader/bootinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index afa24c127276..a1081ec185ff 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -413,7 +413,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif bi_load_efi_data(kfp, exit_bs); - size = md_copymodules(0, is64); + size = md_copymodules(0, is64); /* Find the size of the modules */ kernend = roundup(addr + size, PAGE_SIZE); *kernendp = kernend;