search for: efi_status

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

2016 Feb 28
0
[PATCH 0/1] UEFI UDP/TFTP
...ta The UDP configure data to reconfigure the UDP_IO + + @retval TRUE The default address is retrieved and UDP is reconfigured. + @retval 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 (st...
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 --------------
2015 Oct 07
2
Hyper-V Gen 2 waiting for ldlinux.e64
...equest for ldlinux.e64. Is there a way we can enable > some debug somehow to see why the request for ldlinux.e64 includes > the tsize option? Or even disable the tsize option (as it appears it > may be causing the UEFI to hang)? > --- a/efi/main.c +++ b/efi/main.c @@ -1371,7 +1371,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) */ efi_setcwd(DevicePathToStr(info->FilePath)); + Print(L"fs_init start\n"); fs_init(ops, (void *)&priv); + Print(L"fs_init done.\n"); /* * There may be pending u...
2013 May 10
1
[syslinux:firmware] efi: Lookup which file system we were loaded from
On 05/10/2013 06:27 AM, syslinux-bot for Matt Fleming wrote: > > diff --git a/efi/main.c b/efi/main.c > index 31f0bff..27e7f8f 100644 > --- a/efi/main.c > +++ b/efi/main.c > @@ -1177,13 +1177,10 @@ static void efi_setcwd(CHAR16 *dp) > > EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) > { > + EFI_PXE_BASE_CODE *pxe; > EFI_LOADED_IMAGE *info; > EFI_STATUS status = EFI_SUCCESS; > -#if 0 > - const struct fs_ops *ops[] = { &vfat_fs_ops, NULL }; > -#else > - const struct fs_ops *ops[] = { &pxe_fs...
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
...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->GetMemoryMap, 5, &size, map, key, > +...
2016 Feb 28
2
[PATCH 0/1] UEFI UDP/TFTP
...use > - * @param:f, the name of the function as a wide string. > + * @param:udp_io, The UDP_IO containing the EFI_UDP4 socket to configure > + * and the EFI_UDP4_CONFIG_DATA to use. > + * @param:f, The name of the invoking function as a wide string. > * > * @out: status as EFI_STATUS > */ > - > -EFI_STATUS core_udp_configure(EFI_UDP4 *udp, EFI_UDP4_CONFIG_DATA *udata, > - short unsigned int *f) > +EFI_STATUS efi_udp_configure(UDP_IO *udp_io, short unsigned int *f) > { > } > > /** > * Establish a connection on an open socket > * > - * @param:...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...t 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->GetMemoryMap, 5, > &size, map, key, > + desc_sz, desc_ver); > + > + if (status...
2017 May 31
6
[PATCH 1/4] efi/udp: core_udp_connect should use SubnetMask not StationAddress for netmask
Signed-off-by: Julien Viard de Galbert <jviarddegalbert at online.net> --- efi/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/efi/udp.c b/efi/udp.c index 1088f47..b0f13ad 100644 --- a/efi/udp.c +++ b/efi/udp.c @@ -163,7 +163,7 @@ void core_udp_connect(struct pxe_pvt_inode *socket, uint32_t ip, } else { udata.UseDefaultAddress = FALSE;
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...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->GetMemoryMap, 5, &size, map, key, + desc_sz, desc_ver); + + if (status == EFI_BUFFER_TOO_SMALL) { + if (map) + FreePool(...
2015 Oct 09
0
load_env32 WAS: Hyper-V Gen 2 waiting for ldlinux.e64
...way we can enable > > some debug somehow to see why the request for ldlinux.e64 includes > > the tsize option? Or even disable the tsize option (as it appears it > > may be causing the UEFI to hang)? > > > --- a/efi/main.c > +++ b/efi/main.c > @@ -1371,7 +1371,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) > */ > efi_setcwd(DevicePathToStr(info->FilePath)); > > + Print(L"fs_init start\n"); > fs_init(ops, (void *)&priv); > + Print(L"fs_init done.\n"); > >...
2017 Jun 09
2
[PATCH 1/3] The VPrint definition is now part of the exports of gnu-efi
...#define MAX_EFI_ARGS 64 #define WS(c16) (c16 == L' ' || c16 == CHAR_TAB) -/* VPrint is not in export declarations in gnu-efi lib yet - * although it is a global function; declare it here - */ -extern UINTN -VPrint ( - IN CHAR16 *fmt, - va_list args - ); - extern EFI_STATUS efi_errno; void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len); -- 2.1.4
2014 Feb 13
5
[PATCH] Potential bug in emalloc
From: Sylvain Gault <sylvain.gault at gmail.com> I found something suspicious while hunting another bug a while ago. The conditions for that bug to occur seems quite hard to meet, but it's still code quality improvement. See the commit message for details. Sylvain Gault (1): efi: Suspicious size reduction in emalloc efi/main.c | 4 +--- 1 file changed, 1 insertion(+), 3
2015 Oct 08
0
{syslinux} Hyper-V Gen 2 waiting for ldlinux.e64
...way we can > > enable some debug somehow to see why the request for ldlinux.e64 > > includes the tsize option? Or even disable the tsize option (as it > > appears it may be causing the UEFI to hang)? > > > --- a/efi/main.c > +++ b/efi/main.c > @@ -1371,7 +1371,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, > EFI_SYSTEM_TABLE *table) > */ > efi_setcwd(DevicePathToStr(info->FilePath)); > > + Print(L"fs_init start\n"); > fs_init(ops, (void *)&priv); > + Print(L"fs_init done.\n"); > >...
2015 Aug 13
3
[syslinux:master] efi/pxe: Reuse handle
...guid, agent, controller); > } > > +/* As of UEFI-2.4.0, all EFI_SERVICE_BINDINGs are for networking */ > struct efi_binding *efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) > { > EFI_SERVICE_BINDING *sbp; > struct efi_binding *b; > EFI_STATUS status; > - EFI_HANDLE protocol, 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...
2015 Aug 15
3
[PATCH] EFI booting may hang indefinitely when no keyboard is present
...ior. Patch is against 6.03; the issue is still present in 6.04 as per e466d2498604c8eea055a8e98284d65311073b39 Best Regards, Olli --- syslinux-6.03/efi/main.c.orig 2015-08-15 12:31:33.987766223 +0200 +++ syslinux-6.03/efi/main.c 2015-08-15 12:31:44.427993051 +0200 @@ -1324,7 +1324,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EF in = ST->ConIn; do { status = uefi_call_wrapper(in->ReadKeyStroke, 2, in, &key); - } while (status != EFI_NOT_READY); + } while (status == EFI_SUCCESS); if (!setjmp(load_error_buf)) loa...
2017 Nov 21
2
[PATCH] EFI TCP buffer reuse bug
...ose_file(struct inode *i socket->net.efi.binding = NULL; } -static char databuf[8192]; - void core_tcp_fill_buffer(struct inode *inode) { struct pxe_pvt_inode *socket = PVT(inode); @@ -210,7 +208,6 @@ void core_tcp_fill_buffer(struct inode * EFI_TCP4_FRAGMENT_DATA *frag; EFI_STATUS status; EFI_TCP4 *tcp = (EFI_TCP4 *)b->this; - void *data; size_t len; memset(&iotoken, 0, sizeof(iotoken)); @@ -223,10 +220,10 @@ void core_tcp_fill_buffer(struct inode * iotoken.Packet.RxData = &rxdata; rxdata.FragmentCount = 1; - rxdata.DataLength =...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...t;>> +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->GetMemoryMap, 5, &s...
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...+++++++++++++++++++++++++++++++++++-------- 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. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, +...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...d 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->GetMemoryMap, 5, &size, >> map, key, >...