201599 Commits

Author SHA1 Message Date
ngie
1765ee7015 MFC r294127:
Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6
2016-01-21 05:57:32 +00:00
jamie
edc9e0e402 MFC r294183:
Clear errno before calling getpw*.

MFC r294196:

  Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
  handled by ifconfig, and it was doing it wrong when the paramater included
  extra ifconfig options.

PR:		205926
2016-01-21 04:37:16 +00:00
rpokala
ad88a89c79 MFC r294042: Add rotationrate to geom disk dumpconf
Parse and report the nominal rotation rate reported by the drive.

Approved by:	jhb
2016-01-21 03:05:03 +00:00
jhb
92f20bcad8 MFC 292682:
Fix remaining direct tests of the carry flag in the v86 %eflags via a
magic number to use V86_CY() instead.  These should have been fixed as
part of the cleanup in r226746 but were missed.

The md5 sums of the object files were unchanged, so there should be no
functional change.

PR:		205424
Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>
2016-01-21 01:25:28 +00:00
allanjude
c599610d3a MFC: r294191
Never 4k align the MBR bootpool because zfsldr can not deal with a gap

Sponsored by:	ScaleEngine Inc.
2016-01-21 01:15:40 +00:00
ian
501fb1d31d Add strlcat and strlcpy to libstand on ia64. This is conceptually part
of the MFC done in r294342, but since ia64 is gone in -current this is a
direct commit to 10-stable to add the functions.
2016-01-20 22:05:49 +00:00
emaste
73f3f54cd9 Leave temporary ia64 loader.sym behind if the build fails
This facilitates investigation of the build failure, and is the same way
it's done for other architectures using EFI.
2016-01-20 21:22:06 +00:00
emaste
1f21751dc8 MFC r276539: Update ELF headers to include additional defines
The elftoolchain project includes these additional defines for various
userland programs. Given that arch-specific defines are still interesting
in the context of userland programs reading or writing ELF metadata, they
should be included in top-level ELF headers.

Remove duplicate defines from ARM and MIPS elf headers.

Submitted by:	will (initial version)
Sponsored by:	The FreeBSD Foundation
2016-01-20 21:06:24 +00:00
brooks
6ef41be39c MFC r293856:
Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206178
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
2016-01-20 19:26:04 +00:00
emaste
b0b221cc1e MFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition 2016-01-20 19:20:28 +00:00
brooks
e2eb05d1c7 MFC r293855:
Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206177
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
2016-01-20 19:08:49 +00:00
emaste
8ac497f63e MFC r288083, r288138: elfdump: report MIPS-specific ELF section types 2016-01-20 17:40:11 +00:00
emaste
891fcb7338 MFC r293245: loader.efi style(9) cleanup
Submitted by:	smh
2016-01-20 17:38:21 +00:00
emaste
778c0e779e MFC r293234: Enable the beastie menu for the UEFI console
As of r294445 [in stable/10] the UEFI console includes basic terminal
emulator support.

Relnotes:	Yes
2016-01-20 16:59:37 +00:00
emaste
edbebd2db4 MFC r293233: loader.efi: add terminal emulation support
This is based on the vidconsole implementation.

Submitted by:	Toomas Soome <tsoome@me.com>
Relnotes:	Yes
2016-01-20 16:53:38 +00:00
emaste
a418893174 MFC r293281: Use standard name for ASCII LF and FF control codes
PR:		205778
2016-01-20 16:41:00 +00:00
royger
0ad0bd3893 MFC r277215, r277291, r277418, r280953 and r280954:
loader: implement multiboot support for Xen Dom0

Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.

Sponsored by: Citrix Systems R&D
2016-01-20 13:23:02 +00:00
arybchik
2f8109724f MFC r294372
sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 09:00:42 +00:00
arybchik
8e1b4efdf3 MFC r294310
sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:28:32 +00:00
arybchik
c051b72131 MFC r294309
sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:26:58 +00:00
arybchik
1dee23352d MFC r294259
sfxge: regenerate EF10 registers definition for Medford

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:25:41 +00:00
arybchik
bdc333fcf3 MFC r294257
sfxge: regenerate siena_flash.h from FW sources

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:24:00 +00:00
arybchik
42521ae1a6 MFC r294256
sfxge: cleanup: remove extra empty lines

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:21:07 +00:00
arybchik
af0e4d5ba3 MFC r294255
sfxge: highlight that descriptor cache sizes are configured using TLV now

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:20:00 +00:00
arybchik
85a4a8aa58 MFC r294254
sfxge: support RFID-selectable segments of dynamic configuration

tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:18:43 +00:00
arybchik
9922da0262 MFC r294253
sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU

This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:17:28 +00:00
arybchik
e3a3a0b3d0 MFC r294094
sfxge: check the RX DMA end padding configuration on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:16:30 +00:00
arybchik
75532d9d50 MFC r294092
sfxge: rename Huntington MAC methods to EF10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:14:42 +00:00
arybchik
b93db4d029 MFC r294091
sfxge: rename common hunt PHY methods to ef10 and use for Medford

Leaving BIST methods for now as, though the Medford bootrom now has lots
of BIST support, production firmware doesn't appear to have been updated
yet.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:13:59 +00:00
arybchik
3523a88c0d MFC r294081
sfxge: cleanup: simplify ef10_get_datapath_caps

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:13:10 +00:00
arybchik
be43d11767 MFC r294079
sfxge: Medford still needs fallback for no privilege mask

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:11:12 +00:00
arybchik
c4ff19d5d9 MFC r294078
sfxge: medford stores a single global copy of VPD

Not per PF copies as on Huntington.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:08:44 +00:00
arybchik
ae46773d3c MFC r294077
sfxge: support FATSOv2

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:07:30 +00:00
arybchik
883a89bce1 MFC r294076
sfxge: rework MCDI request completion

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:05:56 +00:00
arybchik
5ce9cb2350 MFC r294075
sfxge: rename hunt_link_state_t to ef10_link_state_t

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:03:30 +00:00
arybchik
b7871cb668 MFC r293902
sfxge: cleanup: quieten efx_mcdi_read_resonse_header error reporting

The "mcdi_err_arg" probe still reports results of failed MCDI
commands, unless the caller invoked efx_mcdi_execute_quiet().

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:02:11 +00:00
arybchik
95a756ad4d MFC r293901,r294371
sfxge: add accessors for license-related MCDI calls to common code

Add support for Huntington MCDI licensing interface to common code.
Ported from Linux net driver IOCTL functions with restructuring for
initial support for V3 licensing API.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:01:21 +00:00
arybchik
bbc583eeb0 MFC r293900
sfxge: add table entries for License NVRAM partition

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:59:04 +00:00
arybchik
4b9f4885a9 MFC r293899
sfxge: cleanup: adjust efx_mcdi_get_port_modes() comment for clarity

Fix an explanatory comment which did not explain very well.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:57:18 +00:00
arybchik
59fb3e0b1e MFC r293895
sfxge: fix common code VPD iterator and duplicate tag verification

Fix efx_vpd_hunk_next() which has -- since its inception -- failed to
correctly iterate over the tags and keywords contained in the VPD data.
Only the first tag or keyword would be returned and the next call with
*contp == 1 would walk to the end of the data and finish.

This was spotted when fixing up errors spotted by Prefast code analysis
(which neglected to set all of the out parameters in all successful cases)

Also fix efx_vpd_verify() on Siena and EF10 which (as a side effect of
correctly iterating over all the tags and keywords) was failing as it
detected that both the static VPD and dynamic VPD storage contained an
RV keyword in the VPD-R tag.  This is intentional as the static VPD and
dynamic VPD are stored separately (firmware merges their contents and
computes a new RV keyword checksum for the data readable from the VPD
capability in PCIe configuration space).

Submitted by:   Andrew Lee <alee at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:53:26 +00:00
arybchik
9d665fc54f MFC r293892
sfxge: use correct register definitions for setting interrupt moderation on Medford

The only value which has changed is the number of rows
(ER_DZ_EVQ_TMR_REG_ROWS is 2048 vs 1024 for FR_BZ_TIMER_COMMAND_REGP0_ROWS)
but that isn't used, so this shouldn't change behaviour.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:52:24 +00:00
arybchik
aeca94898e MFC r293891
sfxge: support FATSOv2 in common code

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:51:23 +00:00
arybchik
fa1d117e18 MFC r293890
sfxge: rx_prefix_pktlen methods do not require EFSYS_OPT_RX_SCALE

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:50:00 +00:00
arybchik
13a2c477eb MFC r293889,r294080,r294093,r294201,r294249-r294252
sfxge: convert nvram methods to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:48:49 +00:00
arybchik
d19037575e MFC r293888
sfxge: rework MCDI start request

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:44:05 +00:00
arybchik
f7859a7f29 MFC r293887
sfxge: add Medford NIC methods

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 07:42:31 +00:00
jhb
24f353ebf7 Regen for r294368. 2016-01-20 01:11:01 +00:00
jhb
77733541d4 MFC 289769,289822,290143,290144:
Rename remaining linux32 symbols from linux_* to linux32_*.

289769:
Rename remaining linux32 symbols such as linux_sysent[] and
linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
linux64.ko.  While here, add support for linux64 binaries to systrace.
- Update NOPROTO entries in amd64/linux/syscalls.master to match the
  main table to fix systrace build.
- Add a special case for union l_semun arguments to the systrace
  generation.
- The systrace_linux32 module now only builds the systrace_linux32.ko.
  module on amd64.
- Add a new systrace_linux module that builds on both i386 and amd64.
  For i386 it builds the existing systrace_linux.ko.  For amd64 it
  builds a systrace_linux.ko for 64-bit binaries.

289822:
Fix build for the KTR-enabled kernels.

290143:
Fix build with DEBUG defined.

290144:
Update for LINUX32 rename.  The assembler didn't complain about undefined
symbols but just used 0 after the rename.
2016-01-20 01:09:53 +00:00
ian
2651e6b1c6 MFC r292337, r292552, r292553:
Build mount_smbfs for arm.  Also sort the subdirs.

  Avoid unaligned memory accesses when encoding netbios names in libsmb.

  The current code for encoding a netbios name converts each byte to a 16-bit
  value and stores the result by casting a char* to u_short*, resulting in
  alignment faults on strict-alignment platforms.

  This change reimplements the encoding routine using only byte accesses to
  memory. There is no particular reason to work with 16-bit values just
  because the encoding process creates two bytes of output for every byte of
  input. Working a byte at at time also avoids endian problems for big-endian
  platforms.

  Make the building of libsmb and mount_smbfs unconditional, now that r292552
  has eliminated alignment and endian problems that were making it fail on
  some platforms.

PR:           180438
PR:           189415
Relnotes:	Yes
2016-01-19 23:36:49 +00:00
ngie
223081e0c8 Default __MAKE_SHELL to /bin/sh when generating aton_ether_subr.c via
`gen_ether_subr`.

__MAKE_SHELL is only defined when installworld is run on stable/10,
which breaks workflows dealing with source trees mounted with noexec [*]

This is a direct commit to stable/10

Reported by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
Sponsored by: EMC / Isilon Storage Division
2016-01-19 23:18:49 +00:00