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
This commit is contained in:
Warner Losh 2025-04-16 22:05:05 -06:00
parent 50bc81e700
commit b7d1c3fdde

View file

@ -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);
}