From 67e39a0d1bdb24967591721bf7c995d61e0e1c2d Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 3 Dec 2022 17:23:16 -0700 Subject: [PATCH] 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;