aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/libstub/random.c')
-rw-r--r--drivers/firmware/efi/libstub/random.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/random.c b/drivers/firmware/efi/libstub/random.c
index 53f6d3fe6d86..0c9f58c5ba50 100644
--- a/drivers/firmware/efi/libstub/random.c
+++ b/drivers/firmware/efi/libstub/random.c
@@ -73,12 +73,20 @@ efi_status_t efi_random_alloc(efi_system_table_t *sys_table_arg,
73 unsigned long random_seed) 73 unsigned long random_seed)
74{ 74{
75 unsigned long map_size, desc_size, total_slots = 0, target_slot; 75 unsigned long map_size, desc_size, total_slots = 0, target_slot;
76 unsigned long buff_size;
76 efi_status_t status; 77 efi_status_t status;
77 efi_memory_desc_t *memory_map; 78 efi_memory_desc_t *memory_map;
78 int map_offset; 79 int map_offset;
80 struct efi_boot_memmap map;
79 81
80 status = efi_get_memory_map(sys_table_arg, &memory_map, &map_size, 82 map.map = &memory_map;
81 &desc_size, NULL, NULL); 83 map.map_size = &map_size;
84 map.desc_size = &desc_size;
85 map.desc_ver = NULL;
86 map.key_ptr = NULL;
87 map.buff_size = &buff_size;
88
89 status = efi_get_memory_map(sys_table_arg, &map);
82 if (status != EFI_SUCCESS) 90 if (status != EFI_SUCCESS)
83 return status; 91 return status;
84 92