git: 8bf162765f42 - stable/13 - stand/efi: Document the copy size trick
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:13:43 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=8bf162765f4268b31ac17e9fe398f69713752440
commit 8bf162765f4268b31ac17e9fe398f69713752440
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-12-04 00:23:16 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:41 +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
(cherry picked from commit 67e39a0d1bdb24967591721bf7c995d61e0e1c2d)
---
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 c5f0291c9e6e..b93f91dfaf15 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -415,7 +415,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;