The problem is that without walling /etc/rc.d/zfs on shutdown, resources
associated with ZFS mounts are not freed and the jails will remain in dying
state. In addition, the dataset is now in a dangling state, as the jail it
is attached to is dying.
A known workaround for jails was to add the following lines
to /etc/jail.conf, to make sure that "service zfs stop" is run
when the jail is stopped:
While the workaround seems to be okay-ish for the jail situation, it is
still unclean. However, for physical hosts this may wreak havoc with the
pool if shared spares are used, as "zfs unshare" is never invoked on
shutdown.
Mark Johnston [Mon, 9 Nov 2020 14:15:06 +0000 (14:15 +0000)]
Add hmac_init_ipad() and hmac_init_opad()
This is a merge of a small portion of r359374 which makes it easier
to maintain OpenCrypto drivers in stable/12. No functional change
intended; this is a direct commit to stable/12.
Alexander Motin [Mon, 9 Nov 2020 01:13:28 +0000 (01:13 +0000)]
MFC r367052: Enable bioq 'car limit' added at r335066 at 128 bios.
Without the 'car limit' enabled (before this), running sequential ZFS scrub
on HDD without command queuing support, I've measured latency on concurrent
random reads reaching 4 seconds (surprised that not more). Enabling this
reduced the latency to 65 milliseconds, while scrub still doing ~180MB/s.
For disks with command queuing this does not make much difference (if any),
since most time all the requests are queued down to the disk or HBA, leaving
nothing in the queue to sort. And even if something does not fit, staying on
the queue, it is likely not for long. To not limit sorting in such bursty
scenarios I've added batched counter zeroing when the queue is getting empty.
The internal scheduler of the SAS HDD I was testing seems to be even more
loyal to random I/O, reducing the scrub speed to ~120MB/s. So in case
somebody worried this is limit is too strict -- it actually looks relaxed.
Do not document default locations of the OpenBSD and NetBSD ports trees
Our own Ports Collection is not targeting those systems at the moment,
so let's stop documenting bits specific to OpenBSD and NetBSD in the ports
documentation. Especially, that it might bit rot one day.
Alexander Motin [Sun, 8 Nov 2020 00:30:53 +0000 (00:30 +0000)]
MFC r367041: Fix incorrect constants of target tag action.
ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(),
which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result
non-SIMPLE requests turned into HEAD or ORDERED depending on direction.
Dimitry Andric [Sat, 7 Nov 2020 19:57:19 +0000 (19:57 +0000)]
MFC r367323:
Update libcxxrt's private copy of elftoolchain demangler
This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with
the most recent version from upstream r3877. Similar to r367322, this
fixes a number of possible assertions, and allows it to correctly
demangle several names that it could not handle before.
PR: 250702
MFC r367337:
Make vector-related functions in libcxxrt's demangler static
Follow-up to r367323 by re-adding static to a number of the functions
copied from elftc's libelftc_vstr.c. This was requested by upstream.
Dimitry Andric [Sat, 7 Nov 2020 19:55:03 +0000 (19:55 +0000)]
Sync up elftoolchain with head, except for the capsicum-related commits,
which are incompatible with stable/12.
MFC r345360 (by oshogbo):
strings: do not depend on stdin
Instead of depending on one stdin FILE structure and use freopen(3), pass to
the functions appropriate FILE structure.
Reviewed by: cem
Discussed with: emaste
Differential Revision: https://reviews.freebsd.org/D18037
MFC r345361 (by oshogbo):
strings: do not continue if getc or getcharacter returns EOF
Reported by: cem
MFC r345362 (by oshogbo):
Fix powerpc and arm builds after r345361.
Reported by: jenkins
MFC r345364 (by oshogbo):
In case of ENCODING_8BIT the EOF code will be pass to putchar.
EOF check should be done before (uint8_t)c > 127 test.
Reported by: cem
MFC r345431 (by oshogbo):
strings: return an error code and the char value separately
If we returning 32 bits value it's hard to distinguish if the returned value
is a valid one or if its an error (in case of EOF). For that reason separate
exit code of the function from the returned character.
Reported by: cem, se
MFC r346323 (by emaste):
readelf: speed up readelf -wo
Use an array instead of STAILQ, and sort at the end instead of while
adding new elements.
PR: 212539
Submitted by: Bora Özarslan <borako.ozarslan@gmail.com>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC r346327 (by emaste):
readelf: use size_t for object counts
PR: 212539
Reported by: cem
Sponsored by: The FreeBSD Foundation
MFC r348776 (by csjp):
Teach readelf about some OpenBSD ELF program headers
- Add constants for OpenBSD wxneeded, bootdata and randomize to the
FreeBSD elf_common.h file. This is the file that gets used by the
elftoolchain library.
- Update readelf and elfdump utilities to decode these program headers
if they are encountered.
Note: FreeBSD has it's own version of elfdump(1), which will be updated
in a subsequent commit. I am adding it here anyway because this diff is
going to be submitted upstream.
These bits are used for Intel CET IBT/Shadow Stack.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20516
MFC r354544 (by emaste):
elfcopy/strip: Ensure sections have required alignment on output
Object files may specify insufficient alignment on certain sections, for
example due to a bug in NASM[1]. When we detect that case in elfcopy or
strip, emit a warning and increase the alignment to the minimum
required.
The NASM bug was fixed in 2015[2], but we might as well have this fixup
(and warning) in elfcopy in case we encounter such a file for any other
reason.
This might be reworked somewhat upstream - see ELF Tool Chain
ticket 485[3].
From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited
upstream (in a slightly different form) as r3831.
Sponsored by: The FreeBSD Foundation
MFC r358631 (by emaste):
Reserve WXNEEDED ELF feature control flag
This will be used to tag binaries that require W+X mappings, in advance
of the ability to prevent W^X in mmap/mprotect.
There is still some discussion about the flag's name, but the ABI won't
change even if the name does (as kib pointed out in the review).
Reviewed by: csjp, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23909
MFC r358637 (by emaste):
readelf: check note namesz and descsz
Previously corrupt note namesz or descsz (perhaps caused by readelf's
current lack of endian support for notes) resulted in a crash. Check
that namesz and descsz do not extend beyond the end of the buffer before
trying to access name and desc data.
Reported by: jhb
Sponsored by: The FreeBSD Foundation
MFC r358639 (by emaste):
readelf: simplify namesz / descsz checks
Sponsored by: The FreeBSD Foundation
MFC r358685 (by emaste):
libelf: rationalize error handling in ELF note conversion
Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's
namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof
(to file) silently truncated. Return false in the latter case too.
Sponsored by: The FreeBSD Foundation
MFC r358706 (by emaste):
readelf: add XEN_ELFNOTE_PHYS32_ENTRY note
See r336469 for details.
Sponsored by: The FreeBSD Foundation
MFC r358708 (by emaste):
readelf: decode and print Xen ELF note strings
Sponsored by: The FreeBSD Foundation
MFC r358713 (by emaste):
readelf: print GNU Build-ID
Sponsored by: The FreeBSD Foundation
MFC r359189 (by emaste):
readelf: simplify Xen string note printing
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24140
> DF_1_SINGLETON Singleton symbols exist.
> DF_1_STUB Object is a stub.
> DF_1_PIE Object is a position-independent executable.
Sponsored by: The FreeBSD Foundation
MFC r364517 (by kib):
Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64.
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273
MFC r365489 (by bdragon):
[PowerPC64LE] PPC64LE support for libelf.
Fix native detection when building on powerpc64le.
I will be submitting this and r361104 upstream shortly.
Sponsored by: Tag1 Consulting, Inc.
MFC r366977 (by emaste):
libelf: add compression header support
GNU and Oracle libelf implementations added support for section
compression, intended to reduce the size of DWARF debug info (which
might be an order of magnitude larger than the code).
There are two compressed ELF section formats:
1. Old GNU - sections are renmaed to start with 'z'. Section contains
a magic number, uncompressed size, and compressed data.
2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag.
The compression header contains the compression type, uncompressed
size, and uncompressed alignment.
The second style is preferred and this change implements only that one.
Submitted by: Tiger Gao <tig@FreeBSDFoundation.org>
Reviewed by: markj
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24566
MFC r367209 (by emaste):
readelf: Add -z decompression support
Compatible with GNU readelf, -z decompresses sections displayed by
-x or -p.
Submitted by: Tiger Gao <tig@FreeBSDFoundation.org>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26909
MFC r367238 (by bdragon):
Fix 32-bit build after r367209
Fix build on systems with a 32-bit size_t.
Since it's being passed as a pointer, a 64-bit write to it will overflow.
MFC with: r367209
MFC r367322 (by dim):
Merge elftoolchain r3877 (by jkoshy):
Incorporate fixes from Dimitry Andric:
- Use a BUFFER_GROW() macro to avoid rounding errors in capacity
calculations.
- Fix a bug introduced in [r3531].
- Fix handling of nested template parameters.
Ticket: #581
This should fix a number of assertions on elftoolchain's cxxfilt, and
allow it to correctly demangle several names that it could not handle
before.
Bjoern A. Zeeb [Sat, 7 Nov 2020 16:35:48 +0000 (16:35 +0000)]
MFC r367327:
arm64: implement bs_sr_<N>
Implement the bs_sr_<N> generic functions based on the generic
mips implementation calling the generic bs_w_<N> functions in a loop.
ral(4) (rt2860.c) panics in RAL_SET_REGION_4() because bs_sr_4()
is NULL. It seems ral(4) and ti(4) might be the only consumers of
these functions I could find quickly so keeping them in C rather than asm.
John Baldwin [Sat, 7 Nov 2020 16:20:37 +0000 (16:20 +0000)]
MFC 366296: Avoid a dubious assignment to bio_data in aio_qbio().
A user pointer is not a suitable value for bio_data and the next block
of code always overwrites bio_data anyway. Just use cb->aio_buf
directly in the call to vm_fault_quick_hold_pages().
Alexander Motin [Sat, 7 Nov 2020 13:16:11 +0000 (13:16 +0000)]
MFC r367022: Fix asymmetry in devstat(9) calls by GEOM.
Before this GEOM passed bio pointer to transaction end, but not start.
It was irrelevant until devstat(9) got DTrace hooks, that appeared to
provide bio pointer on I/O completion, but not on submission.
John Baldwin [Fri, 6 Nov 2020 00:07:46 +0000 (00:07 +0000)]
MFC 365842,365844: Remove support for setting some obscure fields.
365842:
Remove support for setting some obscure fields.
Don't permit setting the exception bitmap or VMCS entry interrupt
information. These are not generally useful to set. If it is needed
in the future, dedicated pseudo registers can be added for these that
would be used with vm_set_register().
Bjoern A. Zeeb [Thu, 5 Nov 2020 15:27:38 +0000 (15:27 +0000)]
MFC r366268 (and epoch parts of r357093):
rtwn: narrow the epoch area
Rather than placing the epoch around the entire receive loop which
might call into rtwn_rx_frame() and USB and sleep, split the loop
into two and leave us with one unlock/lock cycle as well.
Bjoern A. Zeeb [Thu, 5 Nov 2020 13:43:06 +0000 (13:43 +0000)]
MFC r366623:
ip_mroute: fix the viftable export sysctl
It seems that in r354857 I got more than one thing wrong.
Convert the SYSCTL_OPAQUE to a SYSCTL_PROC to properly export the these
days allocated and not longer static per-vnet viftable array.
This fixes a problem with netstat -g which would show bogus information
for the IPv4 Virtual Interface Table.
Bjoern A. Zeeb [Thu, 5 Nov 2020 13:38:26 +0000 (13:38 +0000)]
MFC r366523:
LinuxKPI: add a bitfield.h implementation.
This code was iteratively implemented during the work on various WiFi
drivers -- from individual functions to a macro-created implementations
for the various bit sized needed (and then extended to more for
comepleteness). Some of the bit combinations do not seem to make sense
so are left out.
Bjoern A. Zeeb [Thu, 5 Nov 2020 12:17:50 +0000 (12:17 +0000)]
MFC r366817:
net80211: factor out the priv(9) checks into OS specifc code.
Factor out the priv(9) checks into OS specifc code so other OSes can equally
implement them. This sorts out those XXX in the net80211 code.
We provide 3 arguments (cmd, vap, ifp) where available to the functions, in
order to allow other OSes to use that data but also in case we'd add auditing
to these check to have the information available. For now the arguments are
marked __unused.
Bjoern A. Zeeb [Thu, 5 Nov 2020 12:16:22 +0000 (12:16 +0000)]
MFC r366800:
net80211: update for (more) VHT160 support
Implement two macros IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ()
and its 80+80 counter part to check in vhtcaps for appropriate
levels of support and use the macros throughout the code.
Add vht160_chan_ranges/is_vht160_valid_freq and handle analogue
to vht80 in various parts of the code.
Add ieee80211_add_channel_cbw() which also takes the CBW flag
fields and make the former ieee80211_add_channel() a wrapper to it.
With the CBW flags we can add HT/VHT channels passing them to
getflags() for the 2/5ghz functions.
In ifconfig(8) add the regdomain_addchans() support for VHT160
and VHT80P80.
With this (+ regdoain.xml updates) VHT160 channels can be
configured, listed, and pass regdomain where appropriate.
Bjoern A. Zeeb [Thu, 5 Nov 2020 12:12:26 +0000 (12:12 +0000)]
MFC r366524:
80211: ifconfig replace MS() with _IEEE80211_MASKSHIFT()
As we did in the kernel in r366112 replace the MS() macro with the version(s)
added to the kernel: _IEEE80211_MASKSHIFT(). Also provide its counter part.
This will later allow use to use other macros defined in net80211 headers
here in ifconfig.
Bjoern A. Zeeb [Thu, 5 Nov 2020 12:08:04 +0000 (12:08 +0000)]
MFC r366112:
Provide MS() and SM() macros for 80211 and wireless drivers.
We have (two versions) of MS() and SM() macros which we use throughout
the wireless code. Change all but three places (ath_hal, rtwn, and rsu)
to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK()
macros. Also change one internal case using both _S and _M instead of
just _S away from _M (one of the reasons rtwn and rsu were not changed).
This was done semi-mechanically. No functional changes intended.
Bjoern A. Zeeb [Thu, 5 Nov 2020 11:56:49 +0000 (11:56 +0000)]
MFC r365633:
iwm: fix regression from r365419 (ieee80211_media_change())
In r365419 ieee80211_media_change() callers were updated to not longer
act on the obselete ENETRESET return code.
While in the old days iwm has done a stop/init cycle in these cases,
this was not executed since r193340.
As a consequence simplify iwm code as well by passing ieee80211_media_change()
right to ieee80211_vap_attach() as there is no more need for a local
implementation.
The actual problem was fixed in stable/12 since r365608; this just
reduces changes to HEAD.
Bjoern A. Zeeb [Thu, 5 Nov 2020 11:37:14 +0000 (11:37 +0000)]
MFC r365335:
umass: enhance debugging
Investigating a hang I found having some more error information
available would be helpful, so be more verbose and also tell cam/xpt
status in case of error/panic.
Bjoern A. Zeeb [Thu, 5 Nov 2020 11:19:31 +0000 (11:19 +0000)]
MFC r365333:
cam_sim: harmonize code related to acquiring a mtx
cam_sim_free(), cam_sim_release(), and cam_sim_hold() all assign
a mtx variable during declaration and then if NULL or the mtx is
held may re-asign the variable and/or acquire/release a lock.
Harmonize the code, avoiding double assignments and make it look
the same for all three function (with cam_sim_free() not needing
an extra case).
Bjoern A. Zeeb [Thu, 5 Nov 2020 11:11:50 +0000 (11:11 +0000)]
MFC r364305:
For consistency and to avoid any problems getting past the 31bit
boundry change the last two IF_Mbps(2500) and additionally one
IF_Mbps(5000) to ULL as well.
John Baldwin [Wed, 4 Nov 2020 17:22:12 +0000 (17:22 +0000)]
MFC 359263: Use the newer EINTEGRITY error when authentication fails.
GELI used to fail with EINVAL when a read request spanned a disk
sector whose contents did not match the sector's authentication tag.
The recently-added EINTEGRITY more closely matches to the error in
this case.
Alexander Motin [Wed, 4 Nov 2020 14:13:29 +0000 (14:13 +0000)]
MFC r367112: Use proper variable for device path.
It seems *-passthru commands were broken from the day one, since the
device path is fetched into opt.dev variable and not left in argv[optind].
The other three wrong argv[optind] instances are just in error messages.
Brooks Davis [Tue, 3 Nov 2020 23:29:07 +0000 (23:29 +0000)]
MFC r367121:
Disable ssp raw test without ASAN
r366981 disabled ASAN when it might not be reliable (with an external
compiler), but this test is broken without ASAN so disable it completely
in that case.
Brooks Davis [Tue, 3 Nov 2020 23:26:26 +0000 (23:26 +0000)]
MFC r367063:
Key decleration of union semun on src version
__FreeBSD__ is defined by the compiler derived from the triple. When
building FreeBSD 11 on a FreeBSD 12 with a CROSS_TOOLCHAIN=llvm10,
__FreeBSD__ was set to 12 when building lib32 (for some reason no triple
is being passed which seems to mean that we're taking default values
from the build system). This in turn meant we end up with a double
decleration of union semun which is a build error.
Reviewed by: gshapiro, dim
Differential Revision: https://reviews.freebsd.org/D26902
Instantiate Error in Target::GetEntryPointAddress() only when
necessary
When Target::GetEntryPointAddress() calls
exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
entry_addr is valid, it can immediately be returned.
However, just before that, an llvm::Error value has been setup, but
in this case it is not consumed before returning, like is done
further below in the function.
In https://bugs.freebsd.org/248745 we got a bug report for this,
where a very simple test case aborts and dumps core:
* thread #1, name = 'testcase', stop reason = breakpoint 1.1
frame #0: 0x00000000002018d4 testcase`main(argc=1, argv=0x00007fffffffea18) at testcase.c:3:5
1 int main(int argc, char *argv[])
2 {
-> 3 return 0;
4 }
(lldb) p argc
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
Thread 1 received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3 thr_kill.S: No such file or directory.
(gdb) bt
#0 thr_kill () at thr_kill.S:3
#1 0x00000008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2 0x0000000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3 0x000000000451b5f5 in fatalUncheckedError () at /usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
#4 0x00000000019cf008 in GetEntryPointAddress () at /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
#5 0x0000000001bccbd8 in ConstructorSetup () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
#6 0x0000000001bcd2c0 in ThreadPlanCallFunction () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
#7 0x00000000020076d4 in InferiorCallMmap () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
#8 0x0000000001f4be33 in DoAllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
#9 0x0000000001fe51b9 in AllocatePage () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
#10 0x0000000001fe5385 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
#11 0x0000000001974da2 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
#12 CanJIT () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
#13 0x0000000001a1bf3d in Evaluate () at /usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
#14 0x00000000019ce7a2 in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
#15 0x0000000001ad784c in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
#16 0x0000000001ad86ae in DoExecute () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
#17 0x0000000001a5e3ed in Execute () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
#18 0x0000000001a6c4a3 in HandleCommand () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
#19 0x0000000001a6f98c in IOHandlerInputComplete () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
#20 0x0000000001a90b08 in Run () at /usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
#21 0x00000000019a6c6a in ExecuteIOHandlers () at /usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
#22 0x0000000001a70337 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
#23 0x0000000001d9d812 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
#24 0x0000000001918be8 in MainLoop () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
#25 0x000000000191a114 in main () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890
Fix the incorrect error catch by only instantiating an Error object
if it is necessary.
Michal Meloun [Sat, 31 Oct 2020 17:26:56 +0000 (17:26 +0000)]
MFC r366197:
Don't send a signal with uninitialized 'sig' and 'code' fields. We have a
few shortcuts in the arm trap code to speed up obvious "must fail" cases. In
these situations, make sure that we fill in the "sig" and "code" fields of
the generated signal.
Michal Meloun [Sat, 31 Oct 2020 17:10:55 +0000 (17:10 +0000)]
MFC r366161:
Refine locking inside of syscon driver. In some cases, the syscon driver may
be used by consumer requiring better control about locking (ie. it may be
used as registe file provider for clock driver which needs locked access to
multiple registers). Add fine locking protocol methods together with bunch
of helper functions in syscon driver and implement this functionality in
syscon_generic driver.
Michal Meloun [Sat, 31 Oct 2020 17:09:25 +0000 (17:09 +0000)]
MFC r366156:
Correctly handle nodes compatible with "syscon", "simple-bus". Syscon can
also have child nodes that share a registration file with it. To do this
correctly, follow these steps: - subclass syscon from simplebus and expose it
if the node is also
"simple-bus" compatible.
- block simplebus probe for this compatible string, so it's priority
(bus pass) doesn't colide with syscon driver.
Michal Meloun [Sat, 31 Oct 2020 17:07:43 +0000 (17:07 +0000)]
MFC r342008,r363799,r366146:
r342008:
fdt: Add support for simple-mfd bus
r363799:
Allow child classes of simplebus to call attach directly
r366146:
Make simplebus friendlier for subclassing.
Michal Meloun [Sat, 31 Oct 2020 16:18:55 +0000 (16:18 +0000)]
MFC r362387:
Improve DesignWare PCIe driver: - only normal memory window is mandatory,
prefetchable memory and
I/O windows should be optional
- full PCIe configuration space is supported - remove duplicated check from
function for accessing configuration space.
It is already contained in pci_dw_check_dev()
Michal Meloun [Sat, 31 Oct 2020 16:03:35 +0000 (16:03 +0000)]
MFC r362384,r362385,r362386,r362392:
r362384:
Add DTB files for ARMADA 8040 based boards.
r362385:
Add specialized gpio driver for ARMADA 8k SoC. Older marvell gpio blocks
are to different for reusing/enhancing existing frivers.
r362386:
Add specific stub for ARMADA 8k SoC to Marvell RTC driver. The AXI bridge
is different between ARMADA 38x and 8K, and both platforms needs specific
setup to mitigate HW issues with accessing RTC registers.
r362392:
Adapt ARMADA8k PCIe driver to newly imported 5.7 DT. - temporarily disable
handling with phy, we don't have driver for it yet - always clear cause for
administartive interrupt. While I'm in, fix style(9) (mainly whitespace).
Michal Meloun [Sat, 31 Oct 2020 15:58:05 +0000 (15:58 +0000)]
MFC r362053:
Fix grabbing of tegra uart. An attempt to write to FCR register may corrupt
transmit FIFO, so we should wait for the FIFO to be empty before we can
modify it.
Michal Meloun [Sat, 31 Oct 2020 15:40:52 +0000 (15:40 +0000)]
MFC r360466:
Export tracing facility of GIC500 ITS block. Possibility of tracing of
processing message based interrupts is very useful for debugging of PCIe
driver, mainly for its MSI part.
Michal Meloun [Sat, 31 Oct 2020 15:36:41 +0000 (15:36 +0000)]
MFC r360463,r360469:
r360463:
Don't allow to use FPU inside of rtld library. Clang10 may use FPU
instructions for optimizing operations with memory blocks. But we don't
want to do lengthy save/restore of all FPU registers across each
rtld_start() call.
r360469:
Move ARM specific flags to arm/Makefile.inc
Michal Meloun [Sat, 31 Oct 2020 15:28:21 +0000 (15:28 +0000)]
MFC r360293,r360461:
r360293:
Reorder initialization steps for given pin. If pin is switched from fixed
function to GPIO, it should have prepared direction, pull-up/down and
default value before function gets switched. Otherwise we may produce
unwanted glitch on output pin. Right order of drive strength settings is
questionable, but I think that is slightly safer to do it also before
function switch.
r360461:
Multiple fixes for rockchip iodomain driver: - always initialize selector
of voltage signaling standard.
Various versions of U-boot leaves voltage signaling standard settings for
PMUIO2 domain in different state. Always initialize it into expected
state.
- start the driver as early as possible, the IO domains should be
initialized before other drivers are attached.
- rename RK3399 register to its name founds in TRM.
Michal Meloun [Sat, 31 Oct 2020 15:25:41 +0000 (15:25 +0000)]
MFC r355755,r358807:
r355755:
Add driver for Rockchip PCIe root complex found in RK3399 SOC.
Unfortunately, there are some limitations: - memory aperture of his
controller is only 16MiB, so it is nearly
unusable for graphic cards
- every attempt to generate type 1 config cycle always causes trap.
These config cycles are disabled now and we don't support cards with PCIe
switch.
- in some cases, attempt to do config cycle to (probably) not-yet ready
card also causes trap. This cannot be detected at runtime, but it seems
like very rare issue.
r358807:
Add the missing brackets to the logical expression.
Michal Meloun [Sat, 31 Oct 2020 14:56:16 +0000 (14:56 +0000)]
MFC r353773:
Update Armada 8k drivers to cover newly imported DT and latest changes in
simple multifunction driver. - follow interrupt changes in DT. Split old ICU
driver to function oriented
parts and add drivers for newly defined parts (system error interrupts).
- Many drivers are children of simple multifunction driver. But after r349596
simple MF driver doesn't longer exports memory resources, and all children
must use syscon interface to access their registers. Adapt affected drivers
to this fact.
Gordon Bergling [Sat, 31 Oct 2020 11:56:13 +0000 (11:56 +0000)]
MFC r358891, r358894, r359454, r359513, r359550 and r359556
elf(5) Updates:
- start documenting ELF note sections
- Remove extra Sy from table header
- table markup fixes
- add definitions of FreeBSD notes
- minor update to FreeBSD ELF note descriptions
- correct and expand NT_FREEBSD_NOINIT_TAG description
- expand on NT_FREEBSD_FEATURE_CTL bit definitions