search for: exit_boot

Displaying 14 results from an estimated 14 matches for "exit_boot".

2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...ve also done thousands of UEFI PXE boots with debug statements to prove that the patch works. From: "Tom Huibregtse via Syslinux" <syslinux at syslinux.org> To: syslinux at syslinux.org Sent: Thursday, June 11, 2020 8:04:06 AM Subject: [syslinux] [PATCH] efi/main: add retry to exit_boot() Sometimes the UEFI memory map changes between GetMemoryMap() and ExitBootServices(), making the MapKey value incorrect. Per the UEFI spec, the memory map should then be fetched again and exiting retried. Signed-off-by: Tom Huibregtse <thuibregtse at xes-inc.com> --- efi/main.c | 81...
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...lt;thuibregtse at xes-inc.com> --- efi/main.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/efi/main.c b/efi/main.c index 6a748412..d7fb637e 100644 --- a/efi/main.c +++ b/efi/main.c @@ -1008,16 +1008,81 @@ static int exit_boot(struct boot_params *bp) 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, buf_sz, map_sz; UINT32 desc_ver; + /* + * Call once with empty buffer size to + * see how large the buffer should be. + *...
2024 Dec 02
2
EFI 64bit and Kernel 32 bit [redux]
...t something I've done I grabbed the vmlinuz and > initrd from https://cdimage.debian.org/debian-cd/current/i386/iso-cd/ > and that also fails on this hardware. > > [...] > > and then freezes. > > Sprinkling some dprintfs in efi/main.c suggests it's failing at > exit_boot: the odd thing is that the dprintf I added _inside_ > exit_boot() itself doesn't get written, which suggests the failure is > in the attempt to call exit_boot itself (either that or dprintf > doesn't work within exit_boot?). > Yes, I'd imagine that dbprintf would use the (...
2020 Jun 18
3
[PATCH] efi/main: add retry to exit_boot()
Hi, Le 18/06/2020 ? 22:24, Tom Huibregtse via Syslinux a ?crit?: > I am a UEFI/BIOS developer. We UEFI PXE boot dozens of times per night. We have run into this error more than a couple of times. We have also done thousands of UEFI PXE boots with debug statements to prove that the patch works. <snip> As far as I can tell, the development of Syslinux has stalled since more than one
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
On Thu, Jun 18, 2020 at 5:09 PM Didier Spaier via Syslinux < syslinux at syslinux.org> wrote: > > As far as I can tell, the development of Syslinux has stalled since more > than one year as shows the log of the git repository. And if I remember > well many very old patches are still in the waiting list. > FWIW, this is one of the last posts I see from H. Peter Anvin:
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
...s == 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; >...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...ap); + allocsizeadd *= 2; + *allocsize = size + 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_memor...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...outside loop. Thanks, Paulo > + } > + } 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; &gt...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...nu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n148 > http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n494 > > > Linux does something similar. It calls get_memory_map + > exit_boot_services a maximum of two times. However, it allows itself > to always call allocate_pool (in efi_get_memory_map) even after > exit_boot_services failed once. Which does not comply with the UEFI > specification. > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n148 http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n494 Linux does something similar. It calls get_memory_map + exit_boot_services a maximum of two times. However, it allows itself to always call allocate_pool (in efi_get_memory_map) even after exit_boot_services failed once. Which does not comply with the UEFI specification. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/boot/compresse...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
.../tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n148 >> http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c?id=206676601eb853fc319df14cd3398fbdfde665ac#n494 >> >> >> Linux does something similar. It calls get_memory_map + >> exit_boot_services a maximum of two times. However, it allows itself >> to always call allocate_pool (in efi_get_memory_map) even after >> exit_boot_services failed once. Which does not comply with the UEFI >> specification. >> >> https://git.kernel.org/cgit/linux/kernel/git/tor...
2016 Mar 20
0
[PATCH 0/1] EFI image booting capabilities
...("%s",buf); > + > +} > + > int efi_pollchar(void) > { > SIMPLE_INPUT_INTERFACE *in = ST->ConIn; This probably deserves a NULL terminator but perhaps calling EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen() may be better. > @@ -1042,6 +1061,97 @@ static int exit_boot(struct boot_params > return 0; > } > > + > +/* efi_boot_efi: > + * Boots an efi image > + */ > +int efi_boot_efi(void *kernel_buf, size_t kernel_size, > + char *cmdline, int cmdlineSize) > +{ > + > +char* szLoadImage = "LoadImage(...
2015 Feb 20
6
[PATCH 0/1] EFI image booting capabilities
...(void) +{ + + //simple form feed leaving only the background if any + char buf[55]; + memset(&buf,'\n',sizeof(buf)); + printf("%s",buf); + +} + int efi_pollchar(void) { SIMPLE_INPUT_INTERFACE *in = ST->ConIn; @@ -1042,6 +1061,97 @@ static int exit_boot(struct boot_params return 0; } + +/* efi_boot_efi: + * Boots an efi image + */ +int efi_boot_efi(void *kernel_buf, size_t kernel_size, + char *cmdline, int cmdlineSize) +{ + +char* szLoadImage = "LoadImage()"; +char* szHandleProtocol = "HandleProtocol()"; +char* szStartI...