amd64: parse_memmap(): Move comment about size at proper place
While here, declare 'size' only in the relevant block. No functional change (intended). MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
@@ -827,15 +827,6 @@ native_parse_memmap(vm_paddr_t *physmap, int *physmap_idx)
|
||||
{
|
||||
struct bios_smap *smap;
|
||||
struct efi_map_header *efihdr;
|
||||
u_int32_t size;
|
||||
|
||||
/*
|
||||
* Memory map from INT 15:E820.
|
||||
*
|
||||
* subr_module.c says:
|
||||
* "Consumer may safely assume that size value precedes data."
|
||||
* ie: an int32_t immediately precedes smap.
|
||||
*/
|
||||
|
||||
efihdr = (struct efi_map_header *)preload_search_info(preload_kmdp,
|
||||
MODINFO_METADATA | MODINFOMD_EFI_MAP);
|
||||
@@ -848,7 +839,15 @@ native_parse_memmap(vm_paddr_t *physmap, int *physmap_idx)
|
||||
add_efi_map_entries(efihdr, physmap, physmap_idx);
|
||||
strlcpy(bootmethod, "UEFI", sizeof(bootmethod));
|
||||
} else {
|
||||
size = *((u_int32_t *)smap - 1);
|
||||
/*
|
||||
* Memory map from INT 15:E820.
|
||||
*
|
||||
* subr_module.c says:
|
||||
* "Consumer may safely assume that size value precedes data."
|
||||
* ie: an int32_t immediately precedes smap.
|
||||
*/
|
||||
u_int32_t size = *((u_int32_t *)smap - 1);
|
||||
|
||||
bios_add_smap_entries(smap, size, physmap, physmap_idx);
|
||||
strlcpy(bootmethod, "BIOS", sizeof(bootmethod));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user