search for: e820_entry

Displaying 13 results from an estimated 13 matches for "e820_entry".

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
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...esc_ver; @@ -1033,6 +1098,7 @@ static int exit_boot(struct boot_params *bp) * e820 map because it will most likely have changed in the * interim. */ + nr_entries = map_sz / desc_sz; e = e820buf = bp->e820_map; for (i = 0; i < nr_entries && i < E820MAX; i++) { struct e820_entry *prev = NULL; @@ -1089,13 +1155,6 @@ static int exit_boot(struct boot_params *bp) bp->e820_entries = e - e820buf; - status = uefi_call_wrapper(BS->ExitBootServices, 2, image_handle, key); - if (status != EFI_SUCCESS) { - printf("Failed to exit boot services: 0x%016lx\n", stat...
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...EFI_SUCCESS) { > + *nr_entries = size / *desc_sz; > + return map; > + } > + > + if (map) > + FreePool(map); > + return NULL; > +} > + > static int exit_boot(struct boot_params *bp) > { > struct e820_entry *e820buf, *e; > EFI_MEMORY_DESCRIPTOR *map; > EFI_STATUS status; > uint32_t e820_type; > - UINTN i, nr_entries, key, desc_sz; > + UINTN i, nr_entries, key, desc_sz, allocsize; > UINT32 desc_ver; > + int retry; > > -...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...ize + allocsizeadd; + map = AllocatePool(*allocsize); + } + } while (status == EFI_BUFFER_TOO_SMALL); + + if (status == EFI_SUCCESS) { + *nr_entries = size / *desc_sz; + return map; + } + + if (map) + FreePool(map); + return NULL; +} + static int exit_boot(struct boot_params *bp) { struct e820_entry *e820buf, *e; EFI_MEMORY_DESCRIPTOR *map; EFI_STATUS status; uint32_t e820_type; - UINTN i, nr_entries, key, desc_sz; + UINTN i, nr_entries, key, desc_sz, allocsize; UINT32 desc_ver; + int retry; - /* Build efi memory map */ - map = get_memory_map(&nr_entries, &key, &desc_sz,...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...sion = desc_ver; @@ -1033,6 +1098,7 @@ static int exit_boot(struct boot_params *bp) * e820 map because it will most likely have changed in the * interim. */ + nr_entries = map_sz / desc_sz; e = e820buf = bp->e820_map; for (i = 0; i < nr_entries && i < E820MAX; i++) { struct e820_entry *prev = NULL; @@ -1089,13 +1155,6 @@ static int exit_boot(struct boot_params *bp) bp->e820_entries = e - e820buf; - status = uefi_call_wrapper(BS->ExitBootServices, 2, image_handle, key); - if (status != EFI_SUCCESS) { - printf("Failed to exit boot services: 0x%016lx\n", stat...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...(status == EFI_BUFFER_TOO_SMALL); > + > + if (status == EFI_SUCCESS) { > + *nr_entries = size / *desc_sz; > + return map; > + } > + > + if (map) > + FreePool(map); > + return NULL; > +} > + > static int exit_boot(struct boot_params *bp) > { > struct e820_entry *e820buf, *e; > EFI_MEMORY_DESCRIPTOR *map; > EFI_STATUS status; > uint32_t e820_type; > - UINTN i, nr_entries, key, desc_sz; > + UINTN i, nr_entries, key, desc_sz, allocsize; > UINT32 desc_ver; > + int retry; > > - /* Build efi memory map */ > - map = get_me...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...return map; >>> + } >>> + >>> + if (map) >>> + FreePool(map); >>> + return NULL; >>> +} >>> + >>> static int exit_boot(struct boot_params *bp) >>> { >>> struct e820_entry *e820buf, *e; >>> EFI_MEMORY_DESCRIPTOR *map; >>> EFI_STATUS status; >>> uint32_t e820_type; >>> - UINTN i, nr_entries, key, desc_sz; >>> + UINTN i, nr_entries, key, desc_sz, allocsize; >>> UINT32 desc...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...ies = size / *desc_sz; >> + return map; >> + } >> + >> + if (map) >> + FreePool(map); >> + return NULL; >> +} >> + >> static int exit_boot(struct boot_params *bp) >> { >> struct e820_entry *e820buf, *e; >> EFI_MEMORY_DESCRIPTOR *map; >> EFI_STATUS status; >> uint32_t e820_type; >> - UINTN i, nr_entries, key, desc_sz; >> + UINTN i, nr_entries, key, desc_sz, allocsize; >> UINT32 desc_ver; >> + i...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...} >>>> + >>>> + if (map) >>>> + FreePool(map); >>>> + return NULL; >>>> +} >>>> + >>>> static int exit_boot(struct boot_params *bp) >>>> { >>>> struct e820_entry *e820buf, *e; >>>> EFI_MEMORY_DESCRIPTOR *map; >>>> EFI_STATUS status; >>>> uint32_t e820_type; >>>> - UINTN i, nr_entries, key, desc_sz; >>>> + UINTN i, nr_entries, key, desc_sz, allocsize; >>>...
2008 Jun 16
0
Com32/PXELINUX issues when booting on certain hardware
...map.c#2 2008-06-12 18:08:46.000000000 -0700 +++ /b/syslinux/com32/lib/syslinux/memmap.c#3 2008-06-16 11:09:01.000000000 -0700 @@ -42,6 +42,9 @@ #include <com32.h> #include <syslinux/movebits.h> +#define PAGE_SIZE 4096 +#define PAGE_MASK (PAGE_SIZE - 1) + struct e820_entry { uint64_t start; uint64_t len; @@ -87,8 +90,22 @@ break; type = e820buf->type == 1 ? SMT_FREE : SMT_RESERVED; - start = e820buf->start; - len = e820buf->len; + + /* + * If the start and length of a usable region in the BIOS + * memory map are not page-a...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...s actually do that... */ graphics_using_vga(0x0F, vesa_info.mi.h_res, vesa_info.mi.v_res); + +out: + lfree(mi); + lfree(gi); } diff --git a/com32/mboot/mem.c b/com32/mboot/mem.c index 6a31fac..6e3995b 100644 --- a/com32/mboot/mem.c +++ b/com32/mboot/mem.c @@ -49,9 +49,10 @@ struct e820_entry { static int mboot_scan_memory(struct AddrRangeDesc **ardp, uint32_t * dosmem) { com32sys_t ireg, oreg; - struct e820_entry *e820buf = __com32.cs_bounce; + struct e820_entry *e820buf; struct AddrRangeDesc *ard; size_t ard_count, ard_space; + int rv = 0; /* Use INT 1...
2008 Dec 29
0
[PULL] virtio and lguest tree
The following changes since commit 3c92ec8ae91ecf59d88c798301833d7cf83f2179: Linus Torvalds (1): Merge branch 'next' of git://git.kernel.org/.../paulus/powerpc are available in the git repository at: ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
2008 Dec 29
0
[PULL] virtio and lguest tree
The following changes since commit 3c92ec8ae91ecf59d88c798301833d7cf83f2179: Linus Torvalds (1): Merge branch 'next' of git://git.kernel.org/.../paulus/powerpc are available in the git repository at: ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master