Commit Graph

201753 Commits

Author SHA1 Message Date
Luiz Otavio O Souza
7ec8c789c3 Add AHCI attachment code for Allwinner A10/A20 SoCs.
The Allwinner SoC has an AHCI device on its internal main bus rather
than the PCI bus.  This SoC is somewhat underdocumented, and its SATA
controller is no exception.  The methods to support this chip were
harvested from the Linux Allwinner SDK, and then constants invented to
describe what's going on based on low-level constants contained in the
SATA standard and guess work.

This SoC requires a specific AHCI channel setup in order to start the
operations on the channel properly.

Clock setup and AHCI channel setup idea came from NetBSD.

Tested on Cubieboard 2 and Banana pi (and attachment on Cubieboard by
Pratik Singhal).

Differential Revision:	https://reviews.freebsd.org/D737
Submitted by:	imp
Reviewed by:	imp, ganbold, mav, andrew
2015-07-03 14:11:01 +00:00
Roger Pau Monné
6a8e9695ba netfront: preserve configuration across migrations
Try to preserve the xn configuration when migrating. This is not always
possible since the backend might not have the same set of options
available, in which case we will try to preserve as many as possible.

MFC after:    2 weeks
PR:           183139
Reported by:  mcdouga9@egr.msu.edu
Sponsored by: Citrix Systems R&D
2015-07-03 12:09:05 +00:00
Hans Petter Selasky
49557d2481 Fix broken implementation of "kvasprintf()" function by adding missing
kmalloc() call. Make function global instead of static inline to fix
compiler warnings about passing variable argument lists to inline
functions.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-07-03 11:16:20 +00:00
Edward Tomasz Napierala
424a3f57a2 Remove OpenSSL dependency from iscsid(8) and ctld(8).
Differential Revision:	https://reviews.freebsd.org/D2866
Submitted by:	Tony Morlan <tony at scroner.com> (earlier version)
Reviewed by:	bapt@, delphij@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-07-03 10:08:10 +00:00
Edward Tomasz Napierala
23902fd260 User proper terminology - iSCSI sessions, not iSCSI connections.
Sponsored by:	The FreeBSD Foundation
2015-07-03 10:04:41 +00:00
Bjoern A. Zeeb
bfbc08b848 Move comment to the right position.
PR:		152791
Submitted by:	vangyzen (as part of the functional change)
MFC after:	3 days
2015-07-03 09:53:56 +00:00
Adrian Chadd
ef19855701 Oops - fix typo. 2015-07-03 07:00:24 +00:00
Glen Barber
ef3a5d20dd Test for loader.rc existence before attempting to create
the symlink from loader.rc.sample.

Fix paths relative to the CHROOTDIR.

MFC after:	3 days
X-MFC-With:	r285076, r285078
X-MFC-Before:	10.2-BETA1
Sponsored by:	The FreeBSD Foundation
2015-07-03 06:15:54 +00:00
Simon J. Gerraty
96a11afdff Updated depends 2015-07-03 06:11:54 +00:00
Simon J. Gerraty
1c9b3241f2 Fix generation of src.conf.5
Since makeman turns all options on, we need to guard somethings from
make(showconfig)
2015-07-03 06:10:09 +00:00
Adrian Chadd
b14a705362 Add initial support for the TP-Link Archer C7 v2.
The SoC, the flash, the ethernet ports and ethernet switch all work.
The USB works.

The 11ac PCIe NIC internally is at least seen by the PCIE RC, but
I haven't tried using it yet.  There's no driver and I haven't
yet swapped it out for a non-11ac chip.

The on-chip 2GHz wifi works, but there are some data errors that
get thrown up in STA mode when scanning.  I have a feeling I have
to finish the DDR flush code out and have it run correctly on the
shared interrupts; that'll take a bit of time to get right.

But if you're after an updated piece of hardware, the Archer C7 v2
is certainly there, and you can replace the 11ac NIC with a 3x3
Atheros PCIe device (eg AR9380, AR9390, AR9580, etc) and it'll
"just work".

Tested:

* TP-Link archer c7v2.
2015-07-03 06:09:56 +00:00
Glen Barber
174fe0cfce Revert r285018 and r285019, which attempted to resolve
UFS/MSDOSFS label issues on FreeBSD/arm builds, however
the real problem was addressed in r285076, which is due
to two separate issues, unrelated to md(4) stale device
existence.

MFC after:	3 days
X-MFC-With:	r285076
X-MFC-Before:	10.2-BETA1
Sponsored by:	The FreeBSD Foundation
2015-07-03 06:07:21 +00:00
Adrian Chadd
212faba17d Add pcb1 to the QCA955x.
The Tp-link Archer-C7v2 unit has a QCA9558 internally but hangs the
QCA988x 11ac PCIe NIC off of PCI RC #1, not #0.

So I actually finally /do/ have a board to verify whether PCIe is working.
Grr.

Tested:

* TP-Link Archer-C7v2.
2015-07-03 06:06:44 +00:00
Glen Barber
a6d3c7cdd5 Fix the real problem with missing UFS/MSDOSFS labels on the
FreeBSD/arm builds.  The problem stems from the loader.rc file
not existing, as well as geom_label not being loaded at boot.

For now, add the geom_label_load entry to loader.conf, and
symlink loader.rc.sample to loader.rc, both of which allowed
my BeagleBone Black to boot fine with a UFS label reference in
fstab(5).

MFC after:	3 days
X-MFC-Before:	10.2-BETA1
Sponsored by:	The FreeBSD Foundation
2015-07-03 06:01:37 +00:00
Marcel Moolenaar
4af242aad1 Implement busdma_md_unload() and busdma_sync().
While here:
1.  have the Python bindings contain constants for the space
    identifiers and the sync operation.
2.  change the segment iterators to return None when done,
    not ENXIO.
2015-07-03 05:47:56 +00:00
Marcel Moolenaar
42d3ab5d1b Implement unload and sync operations. 2015-07-03 05:44:58 +00:00
Adrian Chadd
9d0e5a1718 Enable setting the QCA955x GPIO output mux configuration.
It's not used by any boards yet, but it's going to creep up soon
as more boards show up.
2015-07-03 03:34:21 +00:00
Adrian Chadd
3facd56c71 Add register defines for the QCA955x DDR flush and GPIO control. 2015-07-03 03:32:54 +00:00
Marcel Moolenaar
22900685fd Add busdma_md_create, busdma_md_destroy and busdma_md_load. 2015-07-03 02:06:47 +00:00
John-Mark Gurney
e08d13cf83 more word smithing wrt the crd_inject field...
We've already defined IV earlier, so no need to expand it a second
time here...
2015-07-03 01:55:06 +00:00
Marcel Moolenaar
89abdea8f0 Add create, destroy and load of memory descriptors. 2015-07-03 01:52:22 +00:00
Warner Losh
12f05b8446 Kill MFILES and find things automatically. It turned out to be only
lightly used. Find the proper .m file when we depend on *_if.[ch] in
the srcs line, with seat-belts for false positive matches.  This uses
make's path mechanism. A further refinement would be to calculate this
once, and then pass the resulting _MPATH to modules submakes.

Differential Revision: https://reviews.freebsd.org/D2327
2015-07-03 01:50:26 +00:00
Ed Maste
e2a78b0008 mfiutil: increase buffer size to accommodate sprintf string
PR:		201289
MFC after:	1 week
2015-07-03 01:43:11 +00:00
Rick Macklem
d189dcb6e2 Alex Burlyga reported a POLA violation for the new NFS client as
compared to the old NFS client via email to the freebsd-fs@ mailing list.
For the new client, when multiple clients attempted to create a symbolic
link concurrently, more that one client would report success instead of
EEXIST. This was caused by code in the new client that mapped EEXIST to
OK assuming it was caused by a retried RPC request.
Since the old client did not do this, the patch defaults to the old
behaviour and permits the new behaviour to be enabled via a sysctl.

Reported by:	alex.burlyga.ietf@gmail.com
Tested by:	alex.burlyga.ietf@gmail.com
MFC after:	2 weeks
2015-07-03 01:15:21 +00:00
John-Mark Gurney
2ca5eb5d2d update the documentation of the _IV_ flags... _IV_PRESENT doesn't
mean what you think it should...  This will be fixed in the future
with a flag rename, but document what the flag really does and make
the _IV_ flags clear what their presents (or lack there of) means...

Reviewed by:	gnn, eri (both earlier version)
2015-07-03 00:37:16 +00:00
Mathieu Arnold
4e21b8cf6b Add repository.callsign, to help arcanist figure out what repo it's
doing things on when not using Subversion.

With hat:	phabric-admin@
Sponsored by:	Absolight
2015-07-02 22:23:52 +00:00
Mariusz Zaborski
c36e54bb32 Let the nv.h and dnv.h includes be only in sys directory.
Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by:	pjd (mentor)
2015-07-02 21:58:10 +00:00
Mariusz Zaborski
dc619c2f57 Add stddef.h for size_t typedef.
Approved by:	pjd (mentor)
2015-07-02 21:46:07 +00:00
Renato Botelho
4cf57592f7 Bump .Dd due to changes made in r285050 and r285053
Spotted by:	loos
Approved by:	loos
2015-07-02 19:41:08 +00:00
Marcel Moolenaar
3a232946f7 Add an ISA/ACPI bus attachment to proto(4). 2015-07-02 19:21:29 +00:00
Mateusz Guzik
e2f5418e73 sysvshm: fix up some whitespace issues and spurious initialisation 2015-07-02 19:14:30 +00:00
Mateusz Guzik
77a26248a3 sysvshm: don't lock proc when calculating attach_va
vm_daddr is constant and RLIMIT_DATA can be obtained from thread's copy of
rlimits.
2015-07-02 19:03:44 +00:00
Mateusz Guzik
0be3a191a4 sysvshm: fix shmrealloc
The code was supposed to initialize new segs in newsegs array, but used the old
pointer.
2015-07-02 19:00:22 +00:00
Mateusz Guzik
cd336bad26 vm: don't lock proc around accesses to vm_{t,d}addr and RLIMIT_DATA in sys_mmap
vm_{t,d}addr are constant and we can use thread's copy of resource limits
2015-07-02 18:30:12 +00:00
Renato Botelho
6c5f7b239f Improve pw_lock.3 text changed in r285050
Suggested by:	wblock
Approved by:	gnn
2015-07-02 18:27:18 +00:00
Ermal Luçi
d14122b078 Avoid doing multiple route lookups for the same destination IP during forwarding
ip_forward() does a route lookup for testing this packet can be sent to a known destination,
it also can do another route lookup if it detects that an ICMP redirect is needed,
it forgets all of this and handovers to ip_output() to do the same lookup yet again.

This optimisation just does one route lookup during the forwarding path and handovers that to be considered by ip_output().

Differential Revision:	https://reviews.freebsd.org/D2964
Approved by:	ae, gnn(mentor)
MFC after:	1 week
2015-07-02 18:10:41 +00:00
Renato Botelho
d32a66b2a2 When passwd or group information is changed (by pw, vipw, chpass, ...)
temporary file is created and then a rename() call move it to official file.
This operation didn't have any check to make sure data was written to disk
and if a power cycle happens system could end up with a 0 length passwd
or group database.

There is a pfSense bug with more infor about it:

https://redmine.pfsense.org/issues/4523

The following changes were made to protect passwd and group operations:

* lib/libutil/gr_util.c:
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.c
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file

* usr.sbin/pwd_mkdb/pwd_mkdb.c
 - Added O_SYNC flag on dbopen() calls
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.3
 - pw_lock() returns a file descriptor to master password file on success

Differential Revision:	https://reviews.freebsd.org/D2978
Approved by:	bapt
Sponsored by:	Netgate
2015-07-02 17:30:59 +00:00
Andrew Turner
d2676f552e Remove an unneeded define and old comment referencing amd64. 2015-07-02 16:13:29 +00:00
Andrew Turner
b9b3574474 Remove an old comment, the cache is enabled.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2015-07-02 15:26:40 +00:00
Konstantin Belousov
be930a2021 Account for the main process stack being one page below the highest
user address when ABI uses shared page.

Note that the change is no-op for correctness, since shared page does
not fault.  The mapping for the shared page is installed at the
address space creation, the page is unmanaged and its pte/pv entry
cannot be reclaimed.

Submitted by:	Oliver Pinter
Review:	https://reviews.freebsd.org/D2954
MFC after:	1 week
2015-07-02 15:22:13 +00:00
Andrew Turner
40fc1dffc3 Use pmap_load to load table entries. This simplifies finding places where
we access the tables.

Obtained from:	ABT Systems Ltd
Sponsored by:	The fReeBSD Foundation
2015-07-02 15:17:30 +00:00
Andrew Turner
b339ef955c Force the dynamic linker to resolve _end early so we pick up the correct
copy.

Sponsored by:	ABT Systems Ltd
2015-07-02 15:02:59 +00:00
Andrew Turner
74735cf188 Cleanup brk and sbrk to use the same code to find curbrk and minbrk when
both compiling for PIC and non-PIC.

Sponsored by:	ABT Systems Ltd
2015-07-02 14:54:21 +00:00
Ed Maste
4ed220cdd7 Update meta2deps example after i386-elf to i386 rename 2015-07-02 14:44:30 +00:00
Konstantin Belousov
6fdfd88220 Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()
macros on amd64 and i386.  Move the definition to machine/param.h.
kgdb defines INKERNEL() too, the conflict is resolved by renaming kgdb
version to PINKERNEL().

On i386, correct the lowest kernel address.  After the shared page was
introduced, USRSTACK no longer points to the last user address + 1 [*]

Submitted by:	Oliver Pinter [*]
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-07-02 14:37:21 +00:00
Andrew Turner
a380ef6a02 Enable kernel debugging on arm64, other than GDB as it fails to build.
Sponsored by:	ABT Systems Ltd
2015-07-02 14:35:30 +00:00
Konstantin Belousov
1965f86c72 Vnode is not referenced by the vfs_domount() at the point where
asserts are made.  Remove them, since we might dereference freed
memory.  Leaked locks are asserted by the syscall return code anyway.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-07-02 14:31:47 +00:00
Andrew Turner
aeb8eeb590 Save & restore the floating-pont argument registers before calling
_rtld_bind. The compiler may generate code using these registers and not
save them. Unfortunately, as we make use of libc, we are unable to disallow
rtld from using floating-point register without also doing the same for the
parts of libc we use, or by limiting what _rtld_bind is able to call.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FReeBSD Foundation
2015-07-02 14:00:07 +00:00
Christian Brueffer
fa6e0e5334 Add -b to the devlist usage info, forgotten in r260059.
PR:		195094
Submitted by:	robin.hahling@gw-computing.net
MFC after:	1 week
2015-07-02 13:57:26 +00:00
Andrew Turner
5607ec2379 Set MACHINE_CPU to arm64 when building for arm64. This is needed by the
ports tree as they check this value in a number of ports.

PR:		201259
Sponsored by:	ABT Systems Ltd
2015-07-02 13:42:57 +00:00