git: b7d1c3fdde3b - main - kboot/amd64: Use efi_bi_loadsmap in bi_loadsmap
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Apr 2025 21:59:21 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b7d1c3fdde3bcd9ec54f5fff49fc0970720fc045 commit b7d1c3fdde3bcd9ec54f5fff49fc0970720fc045 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-04-17 04:05:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-04-17 21:56:46 +0000 kboot/amd64: Use efi_bi_loadsmap in bi_loadsmap For the EFI case, we just need to call efi_bi_loadsmap in bi_loadsmap. If we need to do BIOS again, we'll revisit. Sponsored by: Netflix Reviewed by: kevans, jhibbits Differential Revision: https://reviews.freebsd.org/D49867 --- stand/kboot/kboot/arch/amd64/load_addr.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/stand/kboot/kboot/arch/amd64/load_addr.c b/stand/kboot/kboot/arch/amd64/load_addr.c index e0815cd0790f..7a878ae88cba 100644 --- a/stand/kboot/kboot/arch/amd64/load_addr.c +++ b/stand/kboot/kboot/arch/amd64/load_addr.c @@ -68,18 +68,5 @@ kboot_get_phys_load_segment(void) void bi_loadsmap(struct preloaded_file *kfp) { - struct bios_smap smap[32], *sm; - struct memory_segments *s; - int smapnum, len; - - for (smapnum = 0; smapnum < min(32, nr_seg); smapnum++) { - sm = &smap[smapnum]; - s = &segs[smapnum]; - sm->base = s->start; - sm->length = s->end - s->start + 1; - sm->type = SMAP_TYPE_MEMORY; - } - - len = smapnum * sizeof(struct bios_smap); - file_addmetadata(kfp, MODINFOMD_SMAP, len, &smap[0]); + efi_bi_loadsmap(kfp); }