From owner-svn-src-stable@freebsd.org Fri Apr 6 21:50:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86A49F89699; Fri, 6 Apr 2018 21:50:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35460780BE; Fri, 6 Apr 2018 21:50:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C3521794B; Fri, 6 Apr 2018 21:50:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w36LoBQ6099584; Fri, 6 Apr 2018 21:50:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w36LoAB8099575; Fri, 6 Apr 2018 21:50:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804062150.w36LoAB8099575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 6 Apr 2018 21:50:10 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: stand/efi/boot1 stand/efi/include stand/efi/libefi stand/i386/libfirewire sys/dev/firewire X-SVN-Commit-Revision: 332156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 21:50:11 -0000 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 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 #include #include +#include #include "fwohci.h" #include 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 #include +#include #include "fwohci.h" -#include "fwohcireg.h" +#include #include 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.