search for: get_memory_map_realloc

Displaying 8 results from an estimated 8 matches for "get_memory_map_realloc".

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 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...static int handle_ramdisks(struct linux_header *hdr, > return 0; > } > > +/* > + * Like get_memory_map but try to use the given buffer first, reallocate 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;...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...@ static int handle_ramdisks(struct > linux_header *hdr, return 0; > } > > +/* > + * Like get_memory_map but try to use the given buffer first, > reallocate 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...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...>>> } >>> >>> +/* >>> + * Like get_memory_map but try to use the given buffer first, reallocate >>> 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; >>>...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...t; *hdr, >> return 0; >> } >> >> +/* >> + * Like get_memory_map but try to use the given buffer first, reallocate >> 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; >> + >> + alloc...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...i/main.c +++ b/efi/main.c @@ -1001,19 +1001,79 @@ static int handle_ramdisks(struct linux_header *hdr, return 0; } +/* + * Like get_memory_map but try to use the given buffer first, reallocate 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->GetMemoryMa...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...+/* >>>> + * Like get_memory_map but try to use the given buffer first, >>>> reallocate >>>> 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, allocsi...
2015 Nov 04
1
[PATCH] efi: Call ExitBootServices at least twice
On Tue, Nov 3, 2015 at 8:37 AM, Celelibi <celelibi at gmail.com> wrote: > 2015-11-03 11:24 UTC+01:00, Gene Cumm <gene.cumm at gmail.com>: >>> So, why not try a memory allocation anyway? It works on some >>> implementations (including mine) despite being forbidden by the >>> specification, but we're in this situation because the firmware was