search for: uefi_call_wrapp

Displaying 20 results from an estimated 39 matches for "uefi_call_wrapp".

Did you mean: uefi_call_wrapper
2016 Feb 28
0
[PATCH 0/1] UEFI UDP/TFTP
...tval FALSE Some error occured. + +**/ +BOOLEAN +efi_udp_get_mapping (UDP_IO* udp_io, EFI_UDP4_CONFIG_DATA* udata) +{ + EFI_STATUS status; + EFI_UDP4* udp; + EFI_IP4_MODE_DATA Ip4Mode; + +// ASSERT (UseDefaultSetting); + + udp = udp_io->Protocol_Udp4; + + status = uefi_call_wrapper( BS->SetTimer, 3, + udp_io->Timeout_Timer, + TimerRelative, + UDP_TIME_TO_GETMAP + ); + + if (EFI_ERROR (status)) + return FALSE; + + while (EFI_ERROR ( uefi_call_wrapper(BS->CheckEvent, 1, udp_io->Timeout_Timer) )) + { + udp->Poll(udp); + + if (!EFI_ERROR(udp-...
2016 Feb 24
6
[PATCH 2/5] ntfs: remove unused variable and have ntfssect use char API calls
The variable 'ok' is never used and generates a warning. Remove it. Also ntfssect.c is designed to be compiled in non Unicode mode when using MSVC compilers, so remove all ambiguity about it (LPCTSTR -> LPCSTR, use of 'A' API calls) so that it doesn't break when compiled in Unicode mode, which is what Rufus uses with MSVC. -------------- next part --------------
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...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. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, + map, + &key, + &desc_sz, + &desc_ver); + if (!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...
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 13
3
[syslinux:master] efi/pxe: Reuse handle
...ol, child, *handles = NULL; > - UINTN i, nr_handles = 0; > + EFI_HANDLE protocol, child; > > b = malloc(sizeof(*b)); > if (!b) > return NULL; > > - status = LibLocateHandle(ByProtocol, bguid, NULL, &nr_handles, &handles); > + status = uefi_call_wrapper(BS->OpenProtocol, 6, pxe_handle, > + bguid, (void **)&sbp, > + image_handle, pxe_handle, > + EFI_OPEN_PROTOCOL_GET_PROTOCOL); > if (status != EFI_SUCCESS) > goto free_binding;...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...FI_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. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, + map, + &key, + &desc_sz, + &desc_ver); + if (!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 + * GetMemory...
2013 Jan 08
1
[PATCH][firmware] efi: Fix build with gnu-efi >= 3.0s
From: Matt Fleming <matt.fleming at intel.com> For x86_64 versions of gnu-efi >= 3.0s GNU_EFI_USE_MS_ABI is enabled which turns on the Microsoft ABI, allowing the compiler to do all the work of interfacing with the EFI firmware instead of jumping through uefi_call_wrapper(). Add support to turn this on in the gnu-efi headers, otherwise we'll encounter undefined references to uefi_call_wrapper(). This addresses the simplest case assuming a distribution's gnu-efi was compiled with GNU_EFI_USE_MS_ABI. If you're compiling everything from source and you t...
2016 Mar 20
0
[PATCH 0/1] EFI image booting capabilities
...ight 2011-2014 Intel Corporation - All Rights Reserved > */ I'm not a legal expert but I've more typically seen newer lines below the old lines and as a part of the same comment. > @@ -348,7 +352,11 @@ char efi_getchar(char *hi) > > do { > status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); > - } while (status == EFI_NOT_READY); > + } while (status != EFI_NOT_READY); > + > + status = WaitForSingleEvent(in->WaitForKey, 0); > + status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); > + &...
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...INTN *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 NULL and call get_memory_map() first? > + if (status == EFI_BUFFER_TOO_SMALL) { > + if (map) > +...
2015 Feb 20
6
[PATCH 0/1] EFI image booting capabilities
...00 -0600 +++ b/efi/main.c 2015-02-18 19:48:27.215899105 -0700 @@ -1,4 +1,8 @@ /* + * EFI image boot capabilities by Patrick Masotta (Serva) (c)2015 + */ + +/* * Copyright 2011-2014 Intel Corporation - All Rights Reserved */ @@ -348,7 +352,11 @@ char efi_getchar(char *hi) do { status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); - } while (status == EFI_NOT_READY); + } while (status != EFI_NOT_READY); + + status = WaitForSingleEvent(in->WaitForKey, 0); + status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); + if (!key.ScanCode) return (char)key....
2015 Jul 22
3
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
...sbp->CreateChild) in the next code line. ... for (i = 0; i < nr_handles; i++) { DevicePath = DevicePathFromHandle(handles[i]); if (efi_get_MAC(DevicePath, &mac_2, PXE_MAC_LENGTH) && memcmp(mac_1, mac_2, PXE_MAC_LENGTH) == 0) { sb_handle = handles[i]; status = uefi_call_wrapper(BS->OpenProtocol, 6, sb_handle, bguid, (void **)&sbp, image_handle, sb_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL); if (status == EFI_SUCCESS) { mnpsb_handle = sb_handle; break; } } } } if (status != EFI_SUCCESS) goto free_binding; child...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...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; + *allocsize = size + allocsizeadd; + map = AllocatePool(*allocsize); + } + } while (status == EFI...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...TOR *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; > + *allocsize = size + allocsizeadd; > + map = AllocatePo...
2015 Jun 17
4
EFI & PXE-booting: very slow TFTP performance on a VMWare test setup
...e UDP packet. A single CPU has a 100% load here: start = jiffies(); while (cb_status == -1) { /* 15ms receive timeout... */ if (jiffies() - start >= 30) { if (jiffies() - start >= 60) printf("Failed to cancel UDP\n"); uefi_call_wrapper(udp->Cancel, 2, udp, &token); printf("core_udp_recv: timed out\n"); } uefi_call_wrapper(udp->Poll, 1, udp); } Just to rule out some stupid missed interrupt or so, I gave it an extra CPU. > I presume you disabled VMware's isc-dhcp on vm...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...>>> +{ >>> + 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 NULL and call get_memory_map() first? > > I cannot call get_memory_map at all because I wouldn't control how > muc...
2015 Oct 07
2
Hyper-V Gen 2 waiting for ldlinux.e64
...t start\n"); fs_init(ops, (void *)&priv); + Print(L"fs_init done.\n"); /* * There may be pending user input that wasn't processed by @@ -1383,8 +1385,10 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); } while (status == EFI_SUCCESS); + Print(L"load_env32 start\n"); if (!setjmp(load_error_buf)) load_env32(NULL); + Print(L"load_env32 done.\n"); /* load_env32() failed.. cancel timer...
2013 Nov 08
4
syslinux.efi pxeboot across multiple subnets
...i/udp.c +++ b/efi/udp.c @@ -41,8 +41,7 @@ int core_udp_open(struct pxe_pvt_inode *socket) udp = (EFI_UDP4 *)udp_reader->this; memset(&udata, 0, sizeof(udata)); - udata.AcceptPromiscuous = TRUE; - udata.AcceptAnyPort = TRUE; + udata.AcceptBroadcast = TRUE; status = uefi_call_wrapper(udp->Configure, 2, udp, &udata); if (status != EFI_SUCCESS) @@ -50,6 +49,18 @@ int core_udp_open(struct pxe_pvt_inode *socket) socket->net.efi.binding = b; + /* + * Save the random local port number that the UDPv4 Protocol + * Driver picked for us. The TFTP prot...
2013 Nov 08
4
syslinux.efi pxeboot across multiple subnets
I did change both instances of txdata->GatewayAddress, but I think something may be wrong in my toolchain. If I extract syslinux.zip and attempt to make from there (without modifying any files), the cached DHCP packet isn't read on the same subnet. I receive "Succeed to download NBP file." twice before anything from syslinux is loaded, so I believe the duplicate request for
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...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 NULL and call get_memory_map() first? I cannot call get_memory_map at all because I wouldn't control how much memory is allocated, and thi...
2015 Jul 25
0
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
...++) { > DevicePath = DevicePathFromHandle(handles[i]); > if (efi_get_MAC(DevicePath, &mac_2, PXE_MAC_LENGTH) > && memcmp(mac_1, mac_2, PXE_MAC_LENGTH) == 0) { > sb_handle = handles[i]; > status = uefi_call_wrapper(BS->OpenProtocol, 6, sb_handle, > bguid, (void **)&sbp, > image_handle, sb_handle, > EFI_OPEN_PROTOCOL_GET_PROTOCOL); > if (status == EFI_SUCC...