search for: allocsizeadd

Displaying 7 results from an estimated 7 matches for "allocsizeadd".

2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...lways set the allocated size. > + */ > +static EFI_MEMORY_DESCRIPTOR * > +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, > + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, > + UINT32 *desc_ver) > +{ > + EFI_STATUS status; > + UINTN size, allocsizeadd; > + > + allocsizeadd = sizeof(*map) * 2; > + > + do { > + size = *allocsize; > + status = uefi_call_wrapper(BS->GetMemoryMap, 5, > &size, map, key, > + desc_sz, desc_ver); > + > + if (status == EFI_BUFFER_TOO_SMALL) { > + if...
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
.../ > +static EFI_MEMORY_DESCRIPTOR * > +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, > + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, > + UINT32 *desc_ver) > +{ > + EFI_STATUS status; > + UINTN size, allocsizeadd; > + > + allocsizeadd = sizeof(*map) * 2; > + > + do { > + size = *allocsize; > + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, map, key, > + desc_sz, desc_ver); Why not check for...
2015 Aug 26
5
[PATCH] Call ExitBootServices twice
From: Sylvain Gault <sylvain.gault at gmail.com> On some architecture, including my hardware, the function ExitBootServices may need to be called twice in order to successfully exit the boot services. As stated by the UEFI spec, the first call to ExitBootServices may perform a partial shutdown of the services. It seems that during this partial shutdown, the memory map can be modified, thus
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...ocate it if + * it's too small and always set the allocated size. + */ +static EFI_MEMORY_DESCRIPTOR * +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, + UINT32 *desc_ver) +{ + EFI_STATUS status; + UINTN size, allocsizeadd; + + allocsizeadd = sizeof(*map) * 2; + + do { + size = *allocsize; + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, map, key, + desc_sz, desc_ver); + + if (status == EFI_BUFFER_TOO_SMALL) { + if (map) + FreePool(map); + allocsizeadd *= 2; + *a...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...gt; +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >>> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >>> + UINT32 *desc_ver) >>> +{ >>> + EFI_STATUS status; >>> + UINTN size, allocsizeadd; >>> + >>> + allocsizeadd = sizeof(*map) * 2; >>> + >>> + do { >>> + size = *allocsize; >>> + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, >>> map, key, >>> +...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...Y_DESCRIPTOR * >> +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >> + UINT32 *desc_ver) >> +{ >> + EFI_STATUS status; >> + UINTN size, allocsizeadd; >> + >> + allocsizeadd = sizeof(*map) * 2; >> + >> + do { >> + size = *allocsize; >> + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, >> map, key, >> + de...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >>>> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >>>> + UINT32 *desc_ver) >>>> +{ >>>> + EFI_STATUS status; >>>> + UINTN size, allocsizeadd; >>>> + >>>> + allocsizeadd = sizeof(*map) * 2; >>>> + >>>> + do { >>>> + size = *allocsize; >>>> + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, >>>> map, key...