summaryrefslogtreecommitdiff
path: root/sys/arch/arm64
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2020-05-18 12:14:34 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2020-05-18 12:14:34 +0000
commit55944ac0535a0d5fb9727b508db145e482236caf (patch)
tree170cb0881d4bfc4a1ab9721f95b2bf4d4d325384 /sys/arch/arm64
parent813632fd435e4a9b06da75c682ce162490868708 (diff)
Our check to see if the EFI services support Mtftp() doesn't work
on U-Boot anymore, since we checked if the method is provided, but now U-Boot provides a simple stub that only returns EFI_UNSUPPORTED. A proper UEFI would throw EFI_INVALID_PARAMETER if we pass NULL as first parameter, but U-Boot doesn't. This way we can see if the method is actually provided and not just a stub. ok kettenis@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r--sys/arch/arm64/stand/efiboot/conf.c4
-rw-r--r--sys/arch/arm64/stand/efiboot/efipxe.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/arm64/stand/efiboot/conf.c b/sys/arch/arm64/stand/efiboot/conf.c
index 4e75cce9df9..dde6d512df9 100644
--- a/sys/arch/arm64/stand/efiboot/conf.c
+++ b/sys/arch/arm64/stand/efiboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2020/05/11 16:13:14 kettenis Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2020/05/18 12:14:33 patrick Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -46,7 +46,7 @@
#include "efipxe.h"
#include "softraid_arm64.h"
-const char version[] = "1.0";
+const char version[] = "1.1";
int debug = 0;
struct fs_ops file_system[] = {
diff --git a/sys/arch/arm64/stand/efiboot/efipxe.c b/sys/arch/arm64/stand/efiboot/efipxe.c
index fb01d65aceb..9acf452ab8b 100644
--- a/sys/arch/arm64/stand/efiboot/efipxe.c
+++ b/sys/arch/arm64/stand/efiboot/efipxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efipxe.c,v 1.7 2019/08/20 23:38:19 patrick Exp $ */
+/* $OpenBSD: efipxe.c,v 1.8 2020/05/18 12:14:33 patrick Exp $ */
/*
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
*
@@ -113,8 +113,12 @@ efi_pxeprobe(void)
if (pxe->Mode == NULL)
continue;
- if (pxe->Mtftp != NULL)
- use_mtftp = 1;
+ if (pxe->Mtftp != NULL) {
+ status = EFI_CALL(pxe->Mtftp, NULL, 0, NULL,
+ FALSE, NULL, NULL, NULL, NULL, NULL, FALSE);
+ if (status != EFI_UNSUPPORTED)
+ use_mtftp = 1;
+ }
dhcp = (EFI_PXE_BASE_CODE_DHCPV4_PACKET *)&pxe->Mode->DhcpAck;
memcpy(&bootip, dhcp->BootpYiAddr, sizeof(bootip));