search for: get_memory_map

Displaying 11 results from an estimated 11 matches for "get_memory_map".

2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...4 insertions(+), 11 deletions(-) > > diff --git a/efi/main.c b/efi/main.c > index 6dbc259..a39ab43 100644 > --- a/efi/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,...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...gt;> index 6dbc259..a39ab43 100644 >>> --- a/efi/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, >>>...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...ff --git a/efi/main.c b/efi/main.c >> index 6dbc259..a39ab43 100644 >> --- a/efi/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, >> + U...
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 03
0
[PATCH] efi: Call ExitBootServices at least twice
...4 >>>> --- a/efi/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...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...ed, 64 insertions(+), 11 deletions(-) > > diff --git a/efi/main.c b/efi/main.c > index 6dbc259..a39ab43 100644 > --- a/efi/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 *...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...++++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/efi/main.c b/efi/main.c index 6dbc259..a39ab43 100644 --- a/efi/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 *des...
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...buf_sz) + return -1; + + /* + * Allocate a pool double the size of the map in + * case if the first call to ExitBootServices() + * fails and the memory map grows before + * GetMemoryMap() is called again. + */ + buf_sz *= 2; + map = AllocatePool(buf_sz); + /* Build efi memory map */ - map = get_memory_map(&nr_entries, &key, &desc_sz, &desc_ver); - if (!map) + map_sz = buf_sz; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &map_sz, + map, + &key, + &desc_sz, + &desc_ver); + if (!map) { + FreePool(map); + return -1; + } +...
2012 Sep 11
4
[PATCH] x86: retrieve keyboard shift status flags from BIOS
.../boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -184,11 +184,16 @@ trampoline_boot_cpu_entry: * 1. Get memory map. * 2. Get Enhanced Disk Drive (EDD) information. * 3. Set video mode. + * 4. Get keyboard shift flags. */ call get_memory_map call get_edd call video + mov $0x0200,%ax + int $0x16 + mov %al,bootsym(kbd_shift_flags) + /* Disable irqs before returning to protected mode. */ cli @@ -221,6 +226,10 @@ trampoline_boot_cpu_entry: skip_realmode:...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...z) + return -1; + + /* + * Allocate a pool double the size of the map in + * case if the first call to ExitBootServices() + * fails and the memory map grows before + * GetMemoryMap() is called again. + */ + buf_sz *= 2; + map = AllocatePool(buf_sz); + /* Build efi memory map */ - map = get_memory_map(&nr_entries, &key, &desc_sz, &desc_ver); - if (!map) + map_sz = buf_sz; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &map_sz, + map, + &key, + &desc_sz, + &desc_ver); + if (!map) { + FreePool(map); + return -1; + } + + status = uefi_call_wr...
2013 Aug 26
5
[RFC PATCH 0/2] GLOBAL() macro for asm code.
Hello, This series has been split into two patches, one for arm and one for x86. I figured that this was easier than doing it as a single combined patch, especially as the changes are functionally independent. x86 has been boot tested, but arm has not even been compile tested as I lack a suitable cross compiler. However, the changes are just text replacement, so I dont expect any issues. The