Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 21:50:10 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332156 - in stable/11: stand/efi/boot1 stand/efi/include stand/efi/libefi stand/i386/libfirewire sys/dev/firewire
Message-ID:  <201804062150.w36LoAB8099575@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Apr  6 21:50:09 2018
New Revision: 332156
URL: https://svnweb.freebsd.org/changeset/base/332156

Log:
  MFC r330970, r331067, r331767, r331852, r331858
  
  r330970:
  libefi: UEFI_BOOT_VAR_GUID duplicates EFI_GLOBAL_VARIABLE
  
  Drop UEFI_BOOT_VAR_GUID and use EFI_GLOBAL_VARIABLE.
  
  r331067:
  Only print boot order / boot current if we can get the variables from
  the loader. Some UEFI implementations don't return all of them.
  
  Sponsored by: Netflix
  
  r331767:
  efinet: Do not return only if ReceiveFilter fails
  
  If the network interface or the uefi implementation do not support the
  ReceiveFilter interface do not return only and just print a message.
  U-Boot doesn't support is and likely never will. Also even if this fails
  it doesn't mean that network in EFI isn't supported.
  
  r331852:
  fwohcireg.h is 99% the same between the boot loader and the
  kernel. Delete it and fix up the 1% difference because there's no need
  for them to be different.
  
  r331858:
  The Uninorth ID was really for Uninorth 2.

Deleted:
  stable/11/stand/i386/libfirewire/fwohcireg.h
Modified:
  stable/11/stand/efi/boot1/boot1.c
  stable/11/stand/efi/include/efi.h
  stable/11/stand/efi/libefi/efienv.c
  stable/11/stand/efi/libefi/efinet.c
  stable/11/stand/i386/libfirewire/firewire.c
  stable/11/stand/i386/libfirewire/fwohci.c
  stable/11/stand/i386/libfirewire/fwohci.h
  stable/11/sys/dev/firewire/fwohci_pci.c
  stable/11/sys/dev/firewire/fwohcireg.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/efi/boot1/boot1.c
==============================================================================
--- stable/11/stand/efi/boot1/boot1.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/efi/boot1/boot1.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -467,16 +467,18 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
 
 	boot_current = 0;
 	sz = sizeof(boot_current);
-	efi_global_getenv("BootCurrent", &boot_current, &sz);
-	printf("   BootCurrent: %04x\n", boot_current);
+	if (efi_global_getenv("BootCurrent", &boot_current, &sz) == EFI_SUCCESS) {
+		printf("   BootCurrent: %04x\n", boot_current);
 
-	sz = sizeof(boot_order);
-	efi_global_getenv("BootOrder", &boot_order, &sz);
-	printf("   BootOrder:");
-	for (i = 0; i < sz / sizeof(boot_order[0]); i++)
-		printf(" %04x%s", boot_order[i],
-		    boot_order[i] == boot_current ? "[*]" : "");
-	printf("\n");
+		sz = sizeof(boot_order);
+		if (efi_global_getenv("BootOrder", &boot_order, &sz) == EFI_SUCCESS) {
+			printf("   BootOrder:");
+			for (i = 0; i < sz / sizeof(boot_order[0]); i++)
+				printf(" %04x%s", boot_order[i],
+				    boot_order[i] == boot_current ? "[*]" : "");
+			printf("\n");
+		}
+	}
 
 #ifdef TEST_FAILURE
 	/*

Modified: stable/11/stand/efi/include/efi.h
==============================================================================
--- stable/11/stand/efi/include/efi.h	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/efi/include/efi.h	Fri Apr  6 21:50:09 2018	(r332156)
@@ -59,7 +59,5 @@ Revision History
  */
 #define FREEBSD_BOOT_VAR_GUID \
 	{ 0xCFEE69AD, 0xA0DE, 0x47A9, {0x93, 0xA8, 0xF6, 0x31, 0x06, 0xF8, 0xAE, 0x99} }
-#define UEFI_BOOT_VAR_GUID \
-	{ 0x8be4df61, 0x93ca, 0x11d2, {0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c} }
 
 #endif

Modified: stable/11/stand/efi/libefi/efienv.c
==============================================================================
--- stable/11/stand/efi/libefi/efienv.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/efi/libefi/efienv.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
 #include <efilib.h>
 
 static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID;
-static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID;
+static EFI_GUID GlobalBootVarGUID = EFI_GLOBAL_VARIABLE;
 
 EFI_STATUS
 efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len)

Modified: stable/11/stand/efi/libefi/efinet.c
==============================================================================
--- stable/11/stand/efi/libefi/efinet.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/efi/libefi/efinet.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -225,11 +225,9 @@ efinet_init(struct iodesc *desc, void *machdep_hint)
 	    EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST;
 
 	status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL);
-	if (status != EFI_SUCCESS) {
+	if (status != EFI_SUCCESS)
 		printf("net%d: cannot set rx. filters (status=%lu)\n",
 		    nif->nif_unit, EFI_ERROR_CODE(status));
-		return;
-	}
 
 #ifdef EFINET_DEBUG
 	dump_mode(net->Mode);

Modified: stable/11/stand/i386/libfirewire/firewire.c
==============================================================================
--- stable/11/stand/i386/libfirewire/firewire.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/i386/libfirewire/firewire.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #include <bootstrap.h>
 #include <btxv86.h>
 #include <libi386.h>
+#include <dev/firewire/firewire.h>
 #include "fwohci.h"
 #include <dev/dcons/dcons.h>
 

Modified: stable/11/stand/i386/libfirewire/fwohci.c
==============================================================================
--- stable/11/stand/i386/libfirewire/fwohci.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/i386/libfirewire/fwohci.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -39,8 +39,9 @@
 #include <btxv86.h>
 #include <bootstrap.h>
 
+#include <dev/firewire/firewire.h>
 #include "fwohci.h"
-#include "fwohcireg.h"
+#include <dev/firewire/fwohcireg.h>
 #include <dev/firewire/firewire_phy.h>
 
 static uint32_t fwphy_wrdata ( struct fwohci_softc *, uint32_t, uint32_t);
@@ -62,12 +63,6 @@ char *linkspeed[] = {
 	"S100", "S200", "S400", "S800",
 	"S1600", "S3200", "undef", "undef"
 };
-
-#define FW_EUI64_BYTE(eui, x) \
-	((((x)<4)?				\
-		((eui)->hi >> (8*(3-(x)))): 	\
-		((eui)->lo >> (8*(7-(x))))	\
-	) & 0xff)
 
 /*
  * Communication with PHY device

Modified: stable/11/stand/i386/libfirewire/fwohci.h
==============================================================================
--- stable/11/stand/i386/libfirewire/fwohci.h	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/stand/i386/libfirewire/fwohci.h	Fri Apr  6 21:50:09 2018	(r332156)
@@ -37,10 +37,6 @@
 #define MAX_OHCI 5
 #define CROMSIZE 0x400
 
-struct fw_eui64 {
-        uint32_t hi, lo;
-};
-
 struct fwohci_softc {
 	uint32_t locator;
 	uint32_t devid;

Modified: stable/11/sys/dev/firewire/fwohci_pci.c
==============================================================================
--- stable/11/sys/dev/firewire/fwohci_pci.c	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/sys/dev/firewire/fwohci_pci.c	Fri Apr  6 21:50:09 2018	(r332156)
@@ -169,8 +169,8 @@ fwohci_pci_probe(device_t dev)
 		device_set_desc(dev, "Apple Pangea");
 		return BUS_PROBE_DEFAULT;
 	}
-	if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH)) {
-		device_set_desc(dev, "Apple UniNorth");
+	if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH2)) {
+		device_set_desc(dev, "Apple UniNorth 2");
 		return BUS_PROBE_DEFAULT;
 	}
 	if (id == (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) {

Modified: stable/11/sys/dev/firewire/fwohcireg.h
==============================================================================
--- stable/11/sys/dev/firewire/fwohcireg.h	Fri Apr  6 21:40:23 2018	(r332155)
+++ stable/11/sys/dev/firewire/fwohcireg.h	Fri Apr  6 21:50:09 2018	(r332156)
@@ -72,7 +72,7 @@
 #define		FW_DEVICE_R5C551	(0x0551 << 16)
 #define		FW_DEVICE_R5C552	(0x0552 << 16)
 #define		FW_DEVICE_PANGEA	(0x0030 << 16)
-#define		FW_DEVICE_UNINORTH	(0x0031 << 16)
+#define		FW_DEVICE_UNINORTH2	(0x0031 << 16)
 #define		FW_DEVICE_AIC5800	(0x5800 << 16)
 #define		FW_DEVICE_FW322		(0x5811 << 16)
 #define		FW_DEVICE_7007		(0x7007 << 16)
@@ -328,6 +328,7 @@ struct ohci_registers {
 	struct ohci_dma dma_irch[0x20];
 };
 
+#ifndef _STANDALONE
 struct fwohcidb_tr {
 	STAILQ_ENTRY(fwohcidb_tr) link;
 	struct fw_xfer *xfer;
@@ -337,6 +338,7 @@ struct fwohcidb_tr {
 	bus_addr_t bus_addr;
 	int dbcnt;
 };
+#endif
 
 /*
  * OHCI info structure.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804062150.w36LoAB8099575>