Go to file
thorpej 7a9a30c5e7 Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
  access to media-related structures / hardware regsiters.  Converted
  drivers use the new ifmedia_init_with_lock() function for this.  The
  new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
  a compatibility lock to be used instead.  Several media-related entry
  points must be aware of this compatibility lock, and are able to acquire
  it recursively a limited number of times, if needed.  This is a SPIN
  mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
  MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex.  The mcx driver still needs to be fully converted to
NET_MPSAFE.
2020-03-15 23:04:50 +00:00
bin Add some commas. 2020-02-26 07:14:47 +00:00
common For kernel, rename ffs to __ffssi2 rather than having a weak symbol. 2020-03-10 08:15:44 +00:00
compat 1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and 2019-10-24 18:46:20 +00:00
crypto Add a libm dependency 2020-03-04 17:30:40 +00:00
dist/pf grammar 2019-09-21 19:48:15 +00:00
distrib hopefully fix builds 2020-03-14 06:39:20 +00:00
doc Note terminfo change 2020-03-13 15:21:32 +00:00
etc provide both miniroot.fs (for people wanting to install NetBSD without 2020-03-14 16:27:19 +00:00
external Make uvm_pagemarkdirty() responsible for putting vnodes onto the syncer 2020-03-14 20:45:23 +00:00
extsrc
games Andrew Weatherall's tattoo and a track on A Pox On The Pioneers album. 2020-02-22 19:03:04 +00:00
include Revert previous 2020-03-01 22:08:17 +00:00
lib werase, wclrtobot, wclrtoeol - make code even more similar. 2020-03-15 01:18:43 +00:00
libexec PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends 2020-03-04 01:21:17 +00:00
regress Redo previous differently. 2019-11-23 20:37:49 +00:00
rescue Redo the sshsk_sign() stuff properly, but putting the helper in libssh.so 2020-03-01 20:59:52 +00:00
sbin route: Enable receive error reporting on the routing socket 2020-03-14 22:26:39 +00:00
share synaptics: Set up_down_emulation=3 by default. 2020-03-14 19:29:39 +00:00
sys Define and implement a locking protocol for the ifmedia / mii layers: 2020-03-15 23:04:50 +00:00
tests tests: ndp_rtm: Check correct source address in RTA_AUTHOR 2020-03-15 21:15:25 +00:00
tools update date for GCC 8.4.0 import. 2020-03-11 10:07:01 +00:00
usr.bin Sort sections. Fix date. 2020-03-14 09:01:11 +00:00
usr.sbin The (unused) md_pre_disklabel() function needs to return success, otherwise 2020-03-09 17:10:31 +00:00
build.sh Fix long-term broken pattern match when determining if uname -p output is 2019-06-07 15:49:20 +00:00
BUILDING Fix a typo 2019-05-08 14:03:57 +00:00
Makefile Enhance the support of LLVM sanitizers 2019-08-27 22:48:53 +00:00
Makefile.inc Re-add files that were accidentally deleted in my previous commit. 2018-05-02 07:34:44 +00:00
README.md Use first-level heading for "NetBSD" title in README.md 2020-01-10 12:33:28 +00:00
UPDATING note GCC 8.4 may need some cleaning. 2020-03-11 21:07:40 +00:00

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git