Displaying 20 results from an estimated 49 matches for "efi_success".
2015 Jul 22
3
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
...the case of a particular driver that implements Pxebc but it does not implement UDPv4Sb/TCPv4Sb
(HP Elitebook 2560p/8460p) your patch crashes;
In that case the following for(;;) structure will never have a MAC match, then the
BS->OpenProtocol will never fail returning the needed "status != EFI_SUCCESS"
to avoid de-referencing an undefined pointer (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_L...
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
2016 Feb 28
0
[PATCH 0/1] UEFI UDP/TFTP
...wrapper(BS->CheckEvent, 1, udp_io->Timeout_Timer) ))
+ {
+ udp->Poll(udp);
+
+ if (!EFI_ERROR(udp->GetModeData(udp, NULL, &Ip4Mode, NULL, NULL)) &&
+ Ip4Mode.IsConfigured)
+ {
+ udp->Configure(udp, NULL);
+ return (BOOLEAN) (udp->Configure(udp, udata) == EFI_SUCCESS);
+ }
+ }
+
+ return FALSE;
+}
+
+
/**
- * Try to configure this UDP socket
+ * Try to configure this UDP_IO
*
- * @param:udp, the EFI_UDP4 socket to configure
- * @param:udata, the EFI_UDP4_CONFIG_DATA to use
- * @param:f, the name of the function as a wide string.
+ * @param:udp_io, The UD...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...atus == EFI_BUFFER_TOO_SMALL) {
> + if (map)
> + FreePool(map);
> + allocsizeadd *= 2;
> + *allocsize = size + allocsizeadd;
> + map = AllocatePool(*allocsize);
Why don't you use ReallocatePool()?
Besides, you could just return inside loop when GetMemoryMap() returns
EFI_SUCCESS and thus avoiding to check twice for EFI_BUFFER_TOO_SMALL
prior to "status == EFI_SUCCESS" outside loop.
Thanks,
Paulo
> + }
> + } while (status == EFI_BUFFER_TOO_SMALL);
> +
> + if (status == EFI_SUCCESS) {
> + *nr_entries = size / *desc_sz;
> + return map;
> +...
2015 Jul 27
2
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
>>>
> I think these changes would solve the thing.
>
> ...
> -EFI_SERVICE_BINDING *sbp;
> +EFI_SERVICE_BINDING *sbp =NULL;
> ...
>
> -? ? if (status != EFI_SUCCESS)
> +? ? if (status != EFI_SUCCESS || sbp ==
NULL)
>? ? ? ? goto free_binding;
> ...
The presumption was that we'd see an error rather than
non-error from LibLocateHandle() when nr_handles is 0 and be guaranteed to find a
matching handle.? Your additional measures seem the best...
2015 Aug 29
2
HP EFI binaries
...o?&& memcmp(mac_1, mac_2, PXE_MAC_LENGTH) == 0) { is correct
<<<
mmmhh that means there's a match considering the 32 bytes of the MAC (PXE_MAC_LENGTH)
then you don need the previous hack considering only the last 5 bytes of the MAC;
and what happens after the match? do you get EFI_SUCCESS when trying to "open" the
found Service Bind protocol handle???
Best,
Patrick
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...}
Why guess at the exact size needed? GetMemoryMap is required to tell
us the exact resize needed in the return of "size", even in UEFI v2.0.
Was there a system that didn't follow this?
> + } 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...
2015 Jul 25
0
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
...cular driver that implements Pxebc but it does not implement UDPv4Sb/TCPv4Sb
> (HP Elitebook 2560p/8460p) your patch crashes;
>
> In that case the following for(;;) structure will never have a MAC match, then the
> BS->OpenProtocol will never fail returning the needed "status != EFI_SUCCESS"
> to avoid de-referencing an undefined pointer (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)
>...
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 Sep 12
3
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
...o.com> wrote:
>>
>> >>>
>> > I think these changes would solve the thing.
>> >
>> > ...
>> > -EFI_SERVICE_BINDING *sbp;
>> > +EFI_SERVICE_BINDING *sbp =NULL;
>> > ...
>> >
>> > - if (status != EFI_SUCCESS)
>> > + if (status != EFI_SUCCESS || sbp ==
>> NULL)
>> > goto free_binding;
>> > ...
>>
>> The presumption was that we'd see an error rather than
>> non-error from LibLocateHandle() when nr_handles is 0 and be guaranteed
>&g...
2015 Aug 15
3
[PATCH] EFI booting may hang indefinitely when no keyboard is present
...gatrends" on an
Asrock H81M-ITX board.
Reason is the input draining loop near the end in efi/main.c; it calls
ReadKeyStroke() as long as EFI_NOT_READY is not returned. On machines
without keyboard, EFI_DEVICE_ERROR may be returned instead, causing
infinite looping. Positively checking for EFI_SUCCESS keeps the intent
while avoiding this behavior.
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:...
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...ERVICES.ExitBootServices.
+ */
+ map_sz = buf_sz;
+ status = uefi_call_wrapper(BS->GetMemoryMap,
+ 5,
+ &map_sz,
+ map,
+ &key,
+ &desc_sz,
+ &desc_ver);
+
+ /* FreePool() cannot be called after ExitBootServices() */
+ if (status != EFI_SUCCESS)
+ return -1;
+
+ status = uefi_call_wrapper(BS->ExitBootServices,
+ 2,
+ image_handle,
+ key);
+ }
+
+ if (status != EFI_SUCCESS) {
+ printf("Failed to exit boot services: 0x%016lx\n", status);
return -1;
+ }
bp->efi.memmap = (uint32_t)(unsigned long...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...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_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;...
2015 Jul 18
5
[PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
On Wed, Jul 8, 2015 at 7:34 PM, Gene Cumm <gene.cumm at gmail.com> wrote:
> What about the observed symptoms? Have you performed an inline packet
Jeff, there's specific code that creates specific responses that if
you had mentioned what you saw, I'd expect we could have seen
something sooner.
--
-Gene
2015 Aug 29
0
HP EFI binaries
Patrick
Yes it looks like EFI_SUCCESS is true. There is a line if status == EFI_SUCCESS and status is 0 so it continues
On Aug 29, 2015, at 01:00, Patrick Masotta via Syslinux <syslinux at zytor.com> wrote:
> Gene,
> Your binaries didn't work for me,
> <<<
> I had problems with them too (I didn'...
2017 May 31
0
[PATCH 2/4] efi/udp: Add retry disabling UseDefaultAddress in core_udp_connect and core_udp_sendto
...c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/efi/udp.c b/efi/udp.c
index b0f13ad..8f4d7dc 100644
--- a/efi/udp.c
+++ b/efi/udp.c
@@ -52,7 +52,7 @@ EFI_STATUS core_udp_configure(EFI_UDP4 *udp, EFI_UDP4_CONFIG_DATA *udata,
}
} else {
if (status != EFI_SUCCESS) {
- Print(L"%s: udp->Configure() unsuccessful (%d)", f, status);
+ Print(L"%s: udp->Configure() unsuccessful (%d)\n", f, status);
if (!efi_net_def_addr && (status == EFI_INVALID_PARAMETER))
efi_net_def_addr = 2;
}
@@ -158,6 +158,7 @@ void core_ud...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...ttps://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/efi-stub-helper.c?id=e86328c489d7ecdca99410a06a3f448caf7857bf#n66
>
>
>
>>
>>> + } while (status == EFI_BUFFER_TOO_SMALL);
>>> +
>>> + if (status == EFI_SUCCESS) {
>>> + *nr_entries = size / *desc_sz;
>>> + return map;
>>> + }
>>> +
>>> + if (map)
>>> + FreePool(map);
>>> + return NULL;
>>> +}
>>> +
>>> stat...
2015 Aug 13
3
[syslinux:master] efi/pxe: Reuse handle
...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;
>
> - for (i = 0; i < nr_handles; i++) {
> - status = uefi_call_wrapper(BS->OpenProtocol, 6, handles[i],
> - bguid, (void **)&sbp,
> - image_handle, handles[i],
>...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...c v2.6, Section 6.4:
+ * EFI_BOOT_SERVICES.ExitBootServices.
+ */
+ map_sz = buf_sz;
+ status = uefi_call_wrapper(BS->GetMemoryMap,
+ 5,
+ &map_sz,
+ map,
+ &key,
+ &desc_sz,
+ &desc_ver);
+
+ /* FreePool() cannot be called after ExitBootServices() */
+ if (status != EFI_SUCCESS)
+ return -1;
+
+ status = uefi_call_wrapper(BS->ExitBootServices,
+ 2,
+ image_handle,
+ key);
+ }
+
+ if (status != EFI_SUCCESS) {
+ printf("Failed to exit boot services: 0x%016lx\n", status);
return -1;
+ }
bp->efi.memmap = (uint32_t)(unsigned long)map;
- bp->ef...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...10a06a3f448caf7857bf#n1299
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/efi-stub-helper.c?id=e86328c489d7ecdca99410a06a3f448caf7857bf#n66
>
>> + } 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)...