Commit Graph

12242 Commits

Author SHA1 Message Date
martin 8420f92950 Pull up following revision(s) (requested by manu in ticket #1632):
share/man/man8/man8.x86/boot.8: revision 1.27
	sys/arch/i386/stand/efiboot/version: revision 1.3
	share/man/man8/man8.x86/boot.8: revision 1.28 (via patch)
	share/man/man8/man8.x86/boot.8: revision 1.29 (via patch)
	sys/arch/i386/stand/lib/exec.c: revision 1.79
	sys/arch/i386/stand/efiboot/efiboot.c: revision 1.13
	sys/arch/i386/stand/efiboot/bootx64/efibootx64.c: revision 1.6
	sys/arch/i386/stand/efiboot/bootia32/efibootia32.c: revision 1.6
	sys/arch/i386/stand/efiboot/boot.c: revision 1.22
	sys/arch/amd64/amd64/locore.S: revision 1.219
	sys/arch/i386/stand/efiboot/bootia32/startprog32.S: revision 1.3
	sys/arch/i386/stand/efiboot/efiboot.h: revision 1.12
	sys/arch/amd64/conf/files.amd64: revision 1.121
	sys/arch/amd64/conf/std.amd64: revision 1.13
	share/man/man8/man8.x86/pxeboot.8: revision 1.6
	sys/arch/i386/stand/efiboot/bootx64/startprog64.S: revision 1.4
	sys/arch/amd64/amd64/locore.S: revision 1.220
	share/man/man8/man8.x86/dosboot.8: revision 1.4
	share/man/man4/options.4: revision 1.524

Add reloc keyworkd to let EFI bootstrap load amd64 kernel at any address

EFI bootstrap assumes it can copy the amd64 kernel to its ELF load
address (that is KERNTEXTOFF - KERNBASE = 0x200000), but it can
clash with previous UEFI memory allocation, as described here:
http://mail-index.netbsd.org/tech-kern/2023/04/07/msg028833.html

This change adds a reloc keyword for controling where the EFI
boostrap will copy the kernel image. Possible values are:
default - the default and prior behavior, copy at 0x200000.
none - do not copy and use the kernel image where it was loaded.
address - specify an explicit address where to copy the kernel.

This comes with an amd64 kernel patch that makes it self-relocatable.
It first discover where it was loaded in memory, and if this is
different than the expected 0x200000, hhe the kernel relocates
itself and start over at the right address.

Merge x86 boot options in x86/boot(8) and add undocumented UEFI options

We were supposed to keep the option list in x86/boot(8), x86/dosoot(8)
and x86/pxeboot(8) in sync, but it did not happen, hence it may work
better with all the options in x86/boot(8). Also add the undocumented
UEFI boot options.

Add a SELFRELOC kernel option for the sake of documentation clarity.
Instead of telling that x86/boot(8) reloc command needs a kernel able
to self relocate, we can tell it needs a kernel built with the
SELFRELOC option. This keeps the reader from wondering what could
make a kernel able to self relocate.

Remove XXX todo marker left by mistake

Raise the version for new feature (here reloc command)
Suggested by Masanobu SAITOH
2023-05-13 11:45:53 +00:00
martin f6e9b66052 Pull up following revision(s) (requested by khorben in ticket #1631):
share/man/man4/video.4: revision 1.11

video(4): fix a typo (PR misc/57364)
2023-05-13 11:30:45 +00:00
martin 13ef3b7e97 Pull up following revision(s) (requested by nia in ticket #1599):
share/man/man4/urndis.4: revision 1.11
	sys/dev/usb/if_urndis.c: revision 1.48

urndis(4): Add OnePlus 5T to the quirky devices list. This allows it to
be attached as an urndis instead of ugen, and to transmit this commit
message across the tubes.

urndis.4: Add OnePlus 5T
2023-02-17 17:41:24 +00:00
martin c5837dfc62 Pull up following revision(s) (requested by thorpej in ticket #1580):
share/man/man4/puc.4: revision 1.44
	sys/dev/pci/pucdata.c: revision 1.114

Add and entry for the EXAR XR17V354 4-port UART.
From Hakan Engvall.
PR kern/57202
2023-01-30 11:35:15 +00:00
martin 051495185f Pull up following revision(s) (requested by msaitoh in ticket #1568):
share/man/man4/lm.4: revision 1.38
	sys/dev/ic/nslm7x.c: revision 1.79
	sys/dev/isa/wbsio.c: revision 1.30
	sys/dev/isa/wbsioreg.h: revision 1.11

lm(4): Add Nuvoton NCT6797D support.
2023-01-19 10:40:25 +00:00
martin 3beac9b3e5 Pull up following revision(s) (requested by msaitoh in ticket #1541):
share/man/man4/lm.4: revision 1.37
	sys/dev/isa/wbsio.c: revision 1.28
	sys/dev/ic/nslm7x.c: revision 1.78
	sys/dev/isa/wbsioreg.h: revision 1.10

Add Nuvoton NCT6799D support.

Add NCT679[89] to the supported list.
2022-10-15 09:45:54 +00:00
martin d5badbfc7a Pull up following revision(s) (requested by msaitoh in ticket #1539):
share/man/man4/man4.x86/amdsmn.4: revision 1.5
	sys/arch/x86/pci/amdsmn.c: revision 1.14
	sys/arch/x86/pci/amdzentemp.c: revision 1.12-1.15

amdzentemp(4): Add Zen 3 support.

amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD.

Fix build failure on i386.

amdsmn(4),amdzentemp(4): Add support for 17h/6xh and 19h/6xh.

amdsmn.4: Now support AMD Family 19h processors.
2022-10-11 18:16:20 +00:00
martin 218efff726 Pull up the following, requested by msaitoh in ticket #1524:
sys/dev/ic/mfireg.h				1.22
	sys/dev/pci/mfii.c				1.16-1.22,1.27 via patch
	share/man/man4/mfii.4				1.3 via patch

- Fix wrong access in mfii_start().
- Add SAS3216,SAS3224,SAS3316 and SAS3324 support.
- Add CVPM02 BBU support.
- Use bus_space_write_8() if available.
- Don't panic on detach if no any sensor device.
- Add comment. Sort entries. KNF.
2022-09-16 18:27:38 +00:00
martin 7e3b24646b Pull up following revision(s) (requested by riastradh in ticket #1495):
share/man/man4/tpm.4: revision 1.7
	sys/dev/ic/tpm.c: revision 1.17
	sys/dev/ic/tpmvar.h: revision 1.10
	sys/dev/ic/tpm.c: revision 1.18
	sys/dev/ic/tpm.c: revision 1.19
	sys/dev/acpi/tpm_acpi.c: revision 1.14
	sys/dev/ic/tpmreg.h: revision 1.10
	sys/dev/ic/tpmreg.h: revision 1.11
	sys/dev/ic/tpm.c: revision 1.21
	sys/dev/ic/tpm.c: revision 1.22
	sys/dev/ic/tpm.c: revision 1.23
	sys/dev/ic/tpm.c: revision 1.24
	sys/dev/ic/tpm.c: revision 1.25
	sys/dev/ic/tpmreg.h: revision 1.7
	sys/dev/ic/tpmreg.h: revision 1.8
	sys/dev/ic/tpmreg.h: revision 1.9
	sys/dev/ic/tpmvar.h: revision 1.8
	sys/dev/ic/tpmvar.h: revision 1.9

dev/ic/tpm: Tidy up headers.
- Add include guards.
- Add necessary includes.
- Sort includes.
- Use _BYTE_ORDER, not BYTE_ORDER, for public header.

dev/ic/tpm: Add missing line break in attach output.

dev/ic/tpm: Take advantage of entropy source if available.

If the tpm is deactivated, though, detach the entropy source so we
don't continue to try polling it -- it can't be activated without a
reboot anyway.

Add note about enabling TPM and rnd(4) source.

tpm(4): Handle TPM 2.0 random source too, and loop on short reads.
Tested on ThinkPad T480.

tpm(4): Preserve error if any on ending commands.
This way we don't spuriously suppress an error, such as
TPM_DEACTIVATED, in a loop where we rely on it.

tpm@acpi: Require only one locality's worth of register space.
We don't actually use the registers for the other localities, and
some older TPMs only have the first locality exposed via ACPI.


tpm(4): Fix disabling of rnd source if tpm is deactivated.

Nothing prevents a second worker from being queued when the first one
is about to do rnd_detach_source.  Instead, just set a flag so future
requests don't bother running a new thread; if there's a concurrent
one that's already been scheduled on another CPU, well, too bad, we
get a couple extra log messages but that's fine.

A better way to do this would probably be to detect whether the tpm
is deactivated at attach time, but that requires reading more of the
tpm spec than I care to do when there are alternative ways to
procrastinate like scrubbing the toilet.


tpm(4): Fix suspend and rework I/O transaction lock.

Use sc->sc_lock over individual I/O transactions, not open/close of
the whole device.  This way there is a bounded time before the tpm is
unbusied even if userland is getting at it, so userland can't hold up
suspend indefinitely.  Of course, the tpm might be suspended and
resumed in the middle of the user's session this way -- tough.

This limits the response buffer to 1024 bytes -- which is already a
bit hefty to have on the stack (but it's probably not very deep on
the stack from userland so maybe not a big deal).  If it turns out we
need more, we can use kmem to allocate a buffer on the heap, with the
caveat that it might fail.  This is necessary so that suspend doesn't
block indefinitely on uiomove in tpmread.


tpm(4): Nix TPM_BE16/TPM_BE32.  Just use sys/endian.h.
2022-08-03 16:00:47 +00:00
bouyer e2b2c46ef4 Pull up following revision(s) via patch (requested by msaitoh in ticket #1454):
sys/dev/ic/mfi.c: revisions 1.63, 1.66-77
	sys/dev/ic/mfireg.h: revisions 1.11-1.20 via patch
	sys/dev/pci/mfi_pci.c: revision 1.21
	sys/dev/pci/mfii.c: revisions 1.6-1.7, 1.10-1.15
	share/man/man4/mfi.4: revision 1.13

Improve mfi(4) and mfii(4):
- Set 'ld_sync' to NULL as part of 'again', to prevent use-after-free.
- Add some code for the SKINNY variant to make Dell PERC H310 work.
- Print the percentage correctly when the background initialization is
  running.
- Clear mailbox to not to pass garbage data.
- Use union mbox instead of unit8_t xxx[] to avoid unaligned access.
- Set stripe size for BIOCVOL to show the size correctly in bioctl.
- Add support for iBBU-09 to show BBU voltage, current and temperature
  correctly.
- Fix typos in comments.
- Sprinkle static.
- Improve debug printf()s.
- KNF. Remove extra semicolon. Whitespace fixes.
2022-05-17 10:29:47 +00:00
martin 731e37de20 Pull up the following revisions (all via patch), requested by msaitoh
in ticket #1382:

	sys/dev/pci/pucdata.c				1.106-1.112
	share/man/man4/puc.4				1.42-1.43

- Add NetMos NM9900 Quad and Octal serial card.
- Add ASIX AX99100 PCIe 4port serial card.
- Add Oxford Semiconductor Exsys EX-41098 PCI serial card.
2021-12-03 18:11:41 +00:00
martin 05d44060d0 Pull up following revision(s) (requested by msaitoh in ticket #1368):
sys/conf/files: revision 1.1288
	sys/kern/uipc_mbuf.c: revision 1.244
	share/man/man4/options.4: revision 1.520

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.

defparam NMBCLUSTERS_MAX.
2021-10-25 15:47:50 +00:00
martin 11da51e401 Pull up the following, requested by msaitoh in ticket #1363:
share/man/man4/wm.4			1.42
	sys/dev/pci/files.pci			1.434
	sys/dev/pci/if_wm.c			1.690,1.692-1.693,1.697-1.704,
						1.706-1.715 via patch

- Add missing drain for pcq in wm_stop_locked().
- Add support for I219V 15-19 and I219LM 16-19.
- Fix Tx stall.
- Use wm_flush_desc_rings() workaround more on I219.
- Change DMA physical address in wm_flush_desc_rings() to match other
  OSes.
- Check return value correctly in wm_lv_jumbo_workaround_ich8lan().
- Add new sysctl hw.wmN.debug_flags. This sysctl can be used if
  WM_DEBUG is set.
- Add some sysctl values for debugging TX/RX queues.
- Use atomic_{load,store}_relaxed for evcnt 64 bit counter.
- WM_EVENT_COUNTER is enabled by default on 64 bit architectures.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxq->rxq_ptr updating.
- Stop legacy interrupts before calling softint.
- Disable printf()s in wm_flush_desc_rings() because the code is
  verified.
- Print I219's version number.
- Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.
- Fix return value of interrupt handler.
- Only print an error about missing I/O BARs for chips that need it.
- Do not return a void value from a void function.
- Fix comment.
- Whitespace fixes. No functional change.
2021-10-21 14:30:10 +00:00
martin bac8e9e98f Pull up following revision(s) (requested by abs in ticket #1359):
sys/arch/amiga/dev/amidisplaycc.c: revision 1.33
	share/man/man4/man4.amiga/amidisplaycc.4: revision 1.14
	sys/arch/amiga/dev/amidisplaycc.c: revision 1.35
	sys/arch/amiga/dev/amidisplaycc.c: revision 1.36

Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.

Add support for WSDISPLAYIO_MODE_DUMBFB to WSDISPLAYIO_SMODE.

Remove parentheses from return. No functional changes.

Update documentation to mention current status of X11
2021-10-13 16:07:41 +00:00
martin e57a70ef47 Pull up the following (via patch), requested by msaitoh in ticket #1346:
sys/dev/pci/ixgbe/ixgbe.c			1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.73, 1.76-1.80 via patch
	sys/dev/pci/ixgbe/ix_txrx.c			1.68-1.93
	sys/dev/pci/ixgbe/ixv.c				1.153, 1.157-1.161, 1.163-1.166 via patch
	sys/dev/pci/ixgbe/if_bypass.c			1.7-1.9
	sys/dev/pci/ixgbe/if_fdir.c			1.4-1.5
	sys/dev/pci/ixgbe/if_sriov.c			1.10-1.11
	sys/dev/pci/ixgbe/ixgbe_82598.c			1.16
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.23
	sys/dev/pci/ixgbe/ixgbe_api.c			1.25
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.2
	sys/dev/pci/ixgbe/ixgbe_common.c		1.30-1.33
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.10-1.11
	sys/dev/pci/ixgbe/ixgbe_dcb.h			1.7
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.8-1.9
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.h		1.7
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c		1.8-1.9
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.h		1.7
	sys/dev/pci/ixgbe/ixgbe_fdir.h			1.3
	sys/dev/pci/ixgbe/ixgbe_features.h		1.3
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.12
	sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.13, 1.16-1.17
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.13-1.14
	sys/dev/pci/ixgbe/ixgbe_netmap.c		1.3-1.4
	sys/dev/pci/ixgbe/ixgbe_netmap.h		1.2
	sys/dev/pci/ixgbe/ixgbe_osdep.c			1.7
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.29-1.30
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.24
	sys/dev/pci/ixgbe/ixgbe_rss.h			1.5
	sys/dev/pci/ixgbe/ixgbe_sriov.h			1.4
	sys/dev/pci/ixgbe/ixgbe_type.h			1.49
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.27
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.18-1.19
	sys/dev/pci/ixgbe/ixgbe_x540.h			1.9
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.19-1.20
	sys/dev/pci/ixgbe/ixgbe_x550.h			1.6
	sys/dev/pci/files.pci				1.438
	share/man/man4/ixg.4				1.15
	share/man/man4/ixv.4				1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
  Before this commit, resource shortage was easily occurred because
  the total number of the clusters is small.
- Improve performance:
  - Use m_adj(ETHER_ALIGN) more.
  - Sprinkle __predict_false() in the RX path.
  - Don't pre-allocate a cluster for RXCOPY case to improve short
    packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
  DMA buffer. Also, when the buffer is already freed, do not call
  bus_dmamap_unload(9) (no resource leaks with this change). This
  change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
  ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
  on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
  address. At least, this change is required for macppc
  (sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
  panic.
- Save the discard_multidesc state to not to forget the state by
  exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
  packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
  change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
2021-09-15 16:30:50 +00:00
martin a163257afc Pull up following revision(s) (requested by manu in ticket #1343):
share/man/man7/sysctl.7: revision 1.153
	sys/kern/vfs_lockf.c: revision 1.74
	lib/libc/sys/fcntl.2: revision 1.46
	lib/libc/sys/flock.2: revision 1.23

Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
2021-09-07 17:12:21 +00:00
snj 8a76b7d851 Pull up following revision(s) (requested by nia in ticket #1326):
distrib/sets/lists/man/mi: revision 1.1724
	share/man/man4/man4.x86/amdccp.4: revision 1.1
	share/man/man4/man4.x86/Makefile: revision 1.23 via patch
Add a man page for amdccp(4)
2021-08-03 16:10:24 +00:00
martin d9e01fb54a Pull up following revision(s) (requested by nia in ticket #1260):
distrib/sets/lists/man/mi: revision 1.1718 (patch)
	share/man/man4/man4.evbarm/sun8icrypto.4: revision 1.1
	share/man/man4/man4.evbarm/Makefile: revision 1.12 (patch)

add a man page for sun8icrypto(4)
2021-04-30 13:49:55 +00:00
martin 47de039ad5 Pull up following revision(s) (requested by nia in ticket #1232),
all via patch and adpated to netbsd-9:

	share/man/man4/pci.4: revision 1.111
	share/man/man4/pci.4: revision 1.112
	share/man/man4/pci.4: revision 1.113
	share/man/man4/pci.4: revision 1.114
	share/man/man4/pci.4: revision 1.115
	share/man/man4/pci.4: revision 1.116

add ena(4)
Put cross-references in a useful place, copying usb(4)
Caught a few drivers in the list that no longer exist this way.
Be less redundant in the DESCRIPTION
cross-reference pci(9)
add rtsx(4)
s/Disk and tape/Storage/g, more relevant cross-references
2021-03-22 17:15:16 +00:00
martin 2cbceaad59 Pull up the following (all via patch) requested by msaitoh in ticket #1231:
sys/dev/pci/ixgbe/ixgbe.c			1.259, 1.278-1.279
	sys/dev/pci/ixgbe/ixgbe.h			1.75
	sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.12
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.24-1.26
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.17
	sys/dev/pci/ixgbe/ixv.c				1.155-1.156
	sys/dev/pci/ixgbe/ix_txrx.c			1.64-67
	sys/dev/pci/files.pci				1.436
	share/man/man4/ixg.4				1.13-1.14
	share/man/man4/ixv.4				1.6-1.7

- Fix a problem that the RX path stalled when the mbuf cluster is
  exhausted.
- Modify some parameters to reduce packet dropping. See also the
  manual's OPTIONS section for the detail.
- ixv(4): The max number of queue(pair) is not 7 but 8. Correctly
  reset the hardware.
- Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make
  it more understandable.
- Fix a bug that some advertise speeds can't be set with
  hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error
  message, too.
- Fix typo in comment or debug message.
2021-03-11 16:00:24 +00:00
martin 87e691aa25 Pull up following revision(s) (requested by nia in ticket #1224):
share/man/man4/iic.4: revision 1.23
	share/man/man4/iic.4: revision 1.24
	share/man/man4/iic.4: revision 1.25

iic.4: add ssdfb

Describe the i2c ioctl interface

iic.4: Add FILES section. Fix copypasto.
2021-03-05 13:55:27 +00:00
martin 2f3fbecc58 Pull up following revision(s) (requested by nia in ticket #1223):
share/man/man4/spi.4: revision 1.10
	share/man/man4/spi.4: revision 1.8
	share/man/man4/spi.4: revision 1.9

Document the userspace /dev/spi interface to the best of my ability.

Add ssdfb(4).

Based mostly on a mailing list post by mlelstv;
https://mail-index.netbsd.org/port-arm/2019/02/07/msg005454.html

spi.4: Add a FILES section

spi.4: mention history of ioctl interface
2021-03-05 13:52:58 +00:00
martin aafcd6a4e2 Pull up following revision(s) (requested by nia in ticket #1220):
share/man/man4/pad.4: revision 1.7
	share/man/man4/pad.4: revision 1.8
	share/man/man4/pad.4: revision 1.9
	share/man/man4/pad.4: revision 1.10

Use /dev/audioX rather than /dev/soundX in examples.

Avoids accidentally running into confusing behavior.
Add another example of recording the output of an application.

Explain something that confused me.

Slightly adjust wording.

It does seem to work with multiple applications concurrently writing to
the device in a quick test I did.

Explain the format of the raw PCM data users can read from a pad(4).

Since it's headerless this is important so the data can be interpreted
properly. Also, ordinary audio ioctls cannot be used on a pad and the
format can't be changed, so applications that attempt to automatically
determine the format of a device like audiorecord don't work.
2021-03-02 15:57:06 +00:00
martin 50334b4638 Pull up following revision(s) (requested by knakahara in ticket #1185):
share/man/man9/pci_msi.9: revision 1.18

Fix PR kern/55920 .  Add pci_msi_count() and pci_msix_count() description.
2021-01-15 17:46:40 +00:00
martin 8e17c11c0d Pull up following revision(s) (requested by isaki in ticket #1157):
share/man/man4/audio.4: revision 1.104

Remove an old description.
This behavior was modified in sys/dev/audio/audio.c rev 1.65 (Mar. 2020).
2020-12-19 13:52:36 +00:00
martin 5eab323c8d Pull up following revision(s) (requested by nia in ticket #1101):
share/man/man8/afterboot.8: revision 1.74

ifconfig up before doing wifi stuff
2020-10-08 16:49:37 +00:00
martin a2ae325361 Pull up following revision(s) (requested by nia in ticket #1100):
sys/dev/pckbport/synaptics.c: revision 1.69
	sys/dev/pckbport/synaptics.c: revision 1.70
	share/man/man4/pms.4: revision 1.38

erect a signpost for weary travellers

synaptics: Emulate scrolling when the middle button is held with TrackPoints
idea stolen from various other operating systems.

this configurable with a sysctl in case somebody wants to hold the middle
button, e.g.  with old window managers that close menus when a button is
released.
2020-10-08 16:47:12 +00:00
martin 83fb3e3fb7 Pull up following revision(s) (requested by riastradh in ticket #1082):
share/man/man9/atomic_loadstore.9: revision 1.6
	share/man/man9/ipi.9: revision 1.5
	lib/libc/atomic/membar_ops.3: revision 1.6

Spell out acronyms in title for clarity.

Update membar_ops(3) man page with examples and relation to C11.

Add exhortation to always always always document how membars come in
pairs for synchronization between two CPUs when you use them.

atomic_load/store_* appeared in NetBSD 9, not 10.

Pullup preceded release of 9.0.
2020-09-13 12:20:22 +00:00
martin 92edc5b6e7 Pull up following revision(s) (requested by kim in ticket #1080):
etc/rc.d/motd: revision 1.10
	etc/rc.d/motd: revision 1.11
	share/man/man5/rc.conf.5: revision 1.186
	share/man/man5/rc.conf.5: revision 1.187
	etc/defaults/rc.conf: revision 1.159

Add optional release info in /etc/motd

My personal preferencese for /etc/rc.conf:

    update_motd_release=YES
    motd_release_tag='Binaries: '

This provides an explanation to users about the second version in motd.

Document update_motd_release and motd_release_tag

New sentence, new line.

Make a ": " suffix a fixed part of the release info tag

This results in correct updates to /etc/motd even when the value of
motd_release_tag is changed (a likely event).

Add safe quoting to outputting the read kernel version.

Thanks to kre@ for the feedback.
2020-09-13 12:11:07 +00:00
martin 1354ab71e5 Pull up following revision(s) (requested by nia in ticket #1063):
share/man/man8/afterboot.8: revision 1.68
	share/man/man8/afterboot.8: revision 1.69
	share/man/man8/afterboot.8: revision 1.70
	share/man/man8/afterboot.8: revision 1.71
	share/man/man8/afterboot.8: revision 1.72
	share/man/man8/afterboot.8: revision 1.73
	share/man/man8/afterboot.8: revision 1.63
	share/man/man8/afterboot.8: revision 1.64
	share/man/man8/afterboot.8: revision 1.65
	share/man/man8/afterboot.8: revision 1.66
	share/man/man8/afterboot.8: revision 1.67
afterboot.8: Explain how connecting to open WiFi works with wpa_supplicant

afterboot.8: Explain how to install pkgin on a fresh system
afterboot.8: Be clearer about exactly when you might need to login as root
afterboot.8: Explain devpubd
afterboot.8: Mention mdnsd
afterboot.8: Use cdn. Don't be arch specific. Requested by leot.
afterboot.8: Correct URL directory order
afterboot.8: Use wpa_* for everything WiFi, update links
reasoning: ifconfig scan is unreliable while wpa_supplicant is running
afterboot.8: Start the daemons after configuring wpa_supplicant.
afterboot.8: uname -p, pointed out by various people
afterboot.8: If it needs a disclaimer that most people shouldn't do it...
2020-08-27 09:12:52 +00:00
martin 91344bbdc0 Pull up following revision(s) (requested by kim in ticket #1013):
sys/arch/i386/stand/boot/boot2.c: revision 1.74
	share/man/man8/man8.x86/boot.8: revision 1.21

Let consdev command also set speed
Adapted from PR install/55490 by Sunil Nimmagadda

Document optional speed argument to consdev
2020-07-15 15:51:03 +00:00
martin 1cb614f71f Pull up following revision(s) (requested by nia in ticket #1012):
share/man/man4/wskbd.4: revision 1.20
	share/man/man4/wskbd.4: revision 1.21

Whitespace/macro usage fixes.
obviously wrong country code
2020-07-15 15:48:25 +00:00
martin 5370387bc5 Pull up following revision(s) (requested by riastradh in ticket #1007):
share/man/man9/rnd.9: revision 1.26
	share/man/man9/rnd.9: revision 1.27

Update rnd(9) man page to reflect reality since netbsd-7.
- Note rndsource_setcb, RND_FLAG_HASCB, and rnd_add_data_sync.
- Note user's obligation to serialize access to each rndsource.

Simplify macro usage.
2020-07-15 13:47:40 +00:00
martin 80bd499c1b Pull up following revision(s) (requested by nia in ticket #1002):
sys/dev/wscons/wsksymdef.h: revision 1.68
	sys/dev/wscons/wsksymdef.h: revision 1.69
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.28
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.29
	sys/dev/hid/hidkbdmap.c: revision 1.10
	share/man/man4/pckbd.4: revision 1.23
	share/man/man4/wskbd.4: revision 1.18
	share/man/man4/wskbd.4: revision 1.19
	share/man/man4/pckbd.4: revision 1.25
	sys/dev/wscons/wsksymdef.h: revision 1.70
	sys/dev/wscons/wsksymdef.h: revision 1.71
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.30
	sys/dev/wscons/wsksymdef.h: revision 1.72
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.31
	sys/dev/wscons/wsksymdef.h: revision 1.73
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.32
	sys/dev/pckbport/wskbdmap_mfii.c: revision 1.33
	sys/dev/hid/hidkbdmap.c: revision 1.4
	sbin/wsconsctl/wsconsctl.8: revision 1.30
	sys/dev/hid/hidkbdmap.c: revision 1.5
	etc/wscons.conf: revision 1.20
	sys/dev/hid/hidkbdmap.c: revision 1.6
	etc/wscons.conf: revision 1.21
	sys/dev/hid/hidkbdmap.c: revision 1.7
	sys/dev/hid/hidkbdmap.c: revision 1.8
	sys/dev/hid/hidkbdmap.c: revision 1.9

Add support for the Brazilian keyboard layout to pckbd and ukbd.

This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.

Thanks to lun-4 for helping test this.

PR kern/44570
Update lists of keyboard layouts to add Turkish and Brazilian

Bring br.nodead closer to X11

Add Estonian layout as a variation of Swedish for ukbd and pckbd

Add KB_TR for uhid keyboards (it was PS/2 only, this seems wrong)

Add Icelandic keyboard layout to ukbd/pckbd.

Add keyboard layout for Latin American Spanish to ukbd/pckbd

Canadian French keyboard layout for ukbd/pckbd

Clarify that KB_TR is the "Q" layout - there's two standards for Turkish.

Move description of keyboard layouts to wskbd.4, add newer layouts

Previously, the best reference was pckbd.4. This does not make much
sense to read if you are on, say, an evbarm device with only USB.
wsconsctl.8 contained a vaguer description of supported language names,
which isn't very useful because you can't pass full language names
to the command. Point readers to wskbd.4 instead.

Note in the wskbd.4 page that while all layouts are generally supported
by pckbd(4) and ukbd(4), older keyboard interfaces might only support
a subset.

wskbd.4: Add KB_LA

Point readers at wskbd.4
2020-07-13 14:22:47 +00:00
martin fc997682c1 Pull up following revision(s) (requested by jmcneill in ticket #980):
sys/dev/pci/if_aq.c: revision 1.4
	sys/dev/pci/if_aq.c: revision 1.5
	sys/arch/amd64/conf/GENERIC: revision 1.553
	sys/dev/pci/files.pci: revision 1.419
	sys/arch/amd64/conf/XEN3_DOM0: revision 1.170
	sys/dev/pci/if_aq.c: revision 1.9
	share/man/man4/Makefile: revision 1.693
	sys/dev/pci/pcidevs: revision 1.1411
	share/man/man4/aq.4: revision 1.1
	share/man/man4/aq.4: revision 1.3
	sys/arch/i386/conf/ALL: revision 1.479
	share/man/man4/aq.4: revision 1.4
	sys/dev/pci/if_aq.c: revision 1.10
	sys/dev/pci/files.pci: revision 1.421
	sys/dev/pci/if_aq.c: revision 1.11
	sys/dev/pci/if_aq.c: revision 1.12
	sys/dev/pci/if_aq.c: revision 1.13
	sys/dev/pci/if_aq.c: revision 1.14
	sys/dev/pci/if_aq.c: revision 1.15
	sys/dev/pci/if_aq.c: revision 1.16
	sys/dev/pci/pcidevs: revision 1.1408
	sys/arch/amd64/conf/ALL: revision 1.135
	sys/net/ethertypes.h: revision 1.19
	sys/arch/i386/conf/GENERIC: revision 1.1218
	distrib/sets/lists/man/mi: revision 1.1668
	sys/dev/pci/if_aq.c: revision 1.1
	sys/dev/pci/if_aq.c: revision 1.2
	sys/dev/pci/pcidevs: revision 1.1395
	sys/dev/pci/if_aq.c: revision 1.3
	sys/arch/evbarm/conf/GENERIC64: revision 1.125

Add the ETHERTYPE_QINQ for 802.1ad VLAN stacking

add Aquantia AQC 10G network adapters
add support Aquantia AQC seriese 10G network adapters.

this driver is based on the FreeBSD version https://github.com/Aquantia/aqtion-freebsd ,
but drastically rewritten for NetBSD.

add aq(4)

 Add Aquantia AQC100, AQC100S and D100.

add support VLAN HW filter

set/clear IFF_OACTIVE flag only on txring 0

make counters per queue

support internal PHY temperature sensor

Found by kUBSan:
- Use unsigned to avoid undefined behavior in aq_hw_init().
- Cast to unsigned to avoid undefined behavior in aq_set_mac_addr().

fix descriptions of register map in comment

return the ifmedia active status correctly even while the link is not up after attach.
pointed out by msaitoh@. thanks.

On FIBRE devices, there are times when linkstat interrupt doesn't occur?
reported from Andrius V. thanks.
- use polling instead of linkstat interrupt when FIBRE
- add AQ_FORCE_POLL_LINKSTAT options (not by default)

sort product table, and tabify

add support AQC100S and D100.
not tested, but they are probably the same as the AQC100.
2020-07-07 10:29:05 +00:00
martin 70c6ca6df1 Pull up following revision(s) (requested by isaki in ticket #875):
sys/dev/audio/audio.c: revision 1.59
	share/man/man4/audio.4: revision 1.102
	share/man/man4/audio.4: revision 1.103
	sys/dev/audio/audio.c: revision 1.43

Limit the number of channels that userland apps can set (by AUDIO_SETINFO)
to the number of channels supported by the hardware or less, if the hardware
supports multi channels.
- On monaural or stereo hardware, userland apps can always set 1ch or 2ch.
  The kernel (audio layer) can convert mono-stereo each other.
- On 3ch (2.1ch) hardware, for example, userland apps can set 1, 2, or 3ch,
  but not 4ch or more.

This allows userland apps to know actual number of channels supported by
the hardware in the same way as before.

PR kern/54973.


Reinitialize the sticky parameters whenever the hardware format is changed.

When the number of the hardware channels becomes less than the number of
channels that sticky parameters remember, subsequent open("/dev/sound") will
fail without this treatment.  This is for rev 1.43.


Add description about channel limitation introduced in audio.c 1.43.
PR kern/54973.

Remove trailing whitespace.
2020-04-30 15:40:50 +00:00
martin ac3322cbfb Pull up following revision(s) (requested by jmcneill in ticket #864):
share/man/man4/rtsx.4: revision 1.6
	sys/dev/pci/pcidevs: revision 1.1410
	sys/dev/pci/rtsx_pci.c: revision 1.9

Add an eclectic mix of
GeForce GTX 680, RTS522A PCI-E Card Reader, intel wifi 9560
+ whitespace

Add support for Realtek RTS522A
2020-04-28 16:26:43 +00:00
martin 8b467d5fa1 Pull up following revision(s) (requested by simonb in ticket #851):
share/man/man4/man4.x86/amdzentemp.4: revision 1.7
	share/man/man4/man4.x86/amdsmn.4: revision 1.4
	sys/arch/x86/pci/amdsmn.c: revision 1.7
	sys/arch/x86/pci/amdsmn.c: revision 1.8
	sys/arch/x86/pci/amdsmn.c: revision 1.9
	sys/arch/x86/pci/amdzentemp.c: revision 1.10

Update to support Family 15h Model 60 temperature sensors.

Changes based on FreeBSD amdtemp driver changes by Conrad Meyer.
XXX: Some code duplication between this driver and amdtemp as
     parts of the 15h refresh code share more in common with
     older CPUs while accessing the device more like 17h.
--
Note that these drivers are present on some newer AMD Family 15h
processors.
--
Don't mix sign and unsigned operands. Just use size_t for the loop.
--
Apply previous change ("Don't mix sign and unsigned operands. Just use
size_t for the loop.") to another loop variable.
--
2020-04-24 17:46:44 +00:00
martin 23bccc516c Pull up following revision(s) (requested by kim in ticket #838):
share/man/man5/ifconfig.if.5: revision 1.20
	etc/rc.d/network: revision 1.78 (plus patch)
	usr.sbin/rtsold/rtsold.8: revision 1.42

Add an "rtsol" keyword to ifconfig.if for enabling IPv6 RS/RA

Sort SEE ALSO.
Update date
2020-04-22 17:55:16 +00:00
martin 928b8e5b9f Pull up following revision(s) (requested by simonb in ticket #828):
share/man/man4/uxrcom.4: revision 1.1
	distrib/sets/lists/man/mi: revision 1.1687
	share/man/man4/uxrcom.4: revision 1.2
	share/man/man4/ucom.4: revision 1.28
	sys/dev/usb/uxrcom.c: revision 1.1
	sys/dev/usb/umodem.c: revision 1.74
	sys/dev/usb/umodem_common.c: revision 1.33
	sys/dev/usb/ukyopon.c: revision 1.26
	sys/dev/usb/files.usb: revision 1.173
	share/man/man4/Makefile: revision 1.704
	sys/dev/usb/usbdevs: revision 1.781
	sys/dev/usb/usbdevices.config: revision 1.38

Add uxrcom driver for Exar XR21V141x USB serial adapters.  Based in part
on the OpenBSD single-port XR21V1410 uxrcom driver, but adds support
for multi-port chipsets and uses the common umodem framework instead of
being a standalone driver.

Thanks to skrll@ for much USB clue and mrg@ for financing the
development of this driver.

Add NetBSD CVS tag.
2020-04-12 08:44:42 +00:00
martin 895a2f4d53 Pull up following revision(s) (requested by nia in ticket #809):
sys/dev/pckbport/synaptics.c: revision 1.55
	sys/dev/pckbport/synaptics.c: revision 1.56
	share/man/man4/pms.4: revision 1.35
	share/man/man4/pms.4: revision 1.36

synaptics: Make up_down_emulation useful for single-button clickpads

On devices such as the Thinkpad X250, the clickpad can be pressed
to generate mouse button events 1 and 2. There are also additional
physical buttons which the pms(4) driver recognizes as "up/down" buttons
(mouse buttons 3 and 4). Allow these to be remapped to buttons 1 and 2
and used like normal touchpad buttons with the following sysctl:

While here, adjust the existing "middle button emulation"
(hw.synaptics.up_down_emulation=1) so it works with single-button
clickpads.

XXX: 3 may be a more useful default than the current default,
depending on hardware availability of touchpads with "up/down buttons".

Update the documentation accordingly.

synaptics: Set up_down_emulation=3 by default.

It's a less surprising default for modern hardware.
2020-03-30 18:45:16 +00:00
martin d3789dd7fd Pull up following revision(s) (requested by skrll in ticket #805):
share/man/man9/cprng.9: revision 1.11

Fix cprng_fast64 return type to match code
2020-03-30 18:31:03 +00:00
martin f33c81ffd0 Pull up following revision(s) (requested by christos in ticket #700):
share/man/man5/fstab.5: revision 1.45

fstab.5: add mention of zfs
2020-02-12 19:44:27 +00:00
martin 5c49c16e5e Pull up following revision(s) (requested by maxv in ticket #688):
share/man/man4/nvmm.4: revision 1.5
	lib/libnvmm/libnvmm.3: revision 1.26
	sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.47

Mmh, as noted in PR/54847, this should be uint64_t, not uint16_t. Harmless
because we use only the two lowest bits anyway.

I believe this could be caught by KUBSAN; time to do another round of
NVMM+K_SAN testing.

Reference nvmmctl(8).
2020-02-10 19:05:05 +00:00
martin fbce5c784a Pull up following revision(s) (requested by nia in ticket #635):
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.27
	share/man/man4/pckbd.4: revision 1.22
	sys/dev/hid/hidkbdmap.c: revision 1.2

Support the combination of KB_SWAPCTRLCAPS and UK layout.
Note some more layouts that work with KB_SWAPCTRLCAPS.
2020-01-21 15:39:02 +00:00
martin e84cae6184 Pull up following revision(s) (requested by msaitoh in ticket #626):
sys/arch/amd64/conf/GENERIC: revision 1.552
	sys/dev/pci/if_casreg.h: revision 1.2
	sys/dev/pci/if_cas.c: revision 1.37
	share/man/man4/cas.4: revision 1.4
	sys/dev/pci/if_casvar.h: revision 1.7

 Update supported device list with part number. From FreeBSD.

 Fix a bug that the driver sometimes incorrectly attach gentbi(4) instead of
gphyter(4) on non-fiber device.

Tested with Sun Quad GigaSwift Ethernet UTP (QGE) (part no. 501-6522) on
amd64. On this environment, the problem frequently had occurred. I also
tested with other 4 cas(4) variants.

 Add cas(4).
2020-01-21 11:55:57 +00:00
martin 09dac0d30e Pull up following revision(s) (requested by sevan in ticket #621):
share/man/man9/callout.9: revision 1.29

Update callout_halt() to match src/sys/sys/callout.h
2020-01-21 11:21:52 +00:00
martin a36acae13c Pull up following revision(s) (requested by riastradh in ticket #508):
distrib/sets/lists/comp/mi: revision 1.2294
	share/man/man9/Makefile: revision 1.443
	sys/sys/atomic.h: revision 1.18
	share/man/man9/atomic_loadstore.9: revision 1.1
	share/man/man9/atomic_loadstore.9: revision 1.2

New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.

Document relation to atomic_ops(3) and membar_ops(3).
2019-12-08 14:26:38 +00:00
martin cc49a2c0f8 Pull up following revision(s) (requested by riastradh in ticket #504):
share/man/man4/rnd.4: revision 1.26
	share/man/man4/rnd.4: revision 1.27
	share/man/man4/rnd.4: revision 1.28
	share/man/man4/rnd.4: revision 1.25

Update man page to reflect switch from CTR_DRBG to Hash_DRBG.

Replace slightly wrong rant by shorter and slightly less long rant.
(If X and Y in Z/2Z are independent, then so are X and X+Y.  What was
I thinking.)

Update NIST SP800-90A reference.

New sentence, new line. Use \(em.
2019-12-08 13:16:53 +00:00
martin 1deaf2b152 Pull up following revision(s) (requested by msaitoh in ticket #478):
sys/dev/mii/smscphy.c: revision 1.1
	sys/arch/amd64/conf/ALL: revision 1.127
	sys/arch/amd64/conf/ALL: revision 1.128
	sys/dev/mii/files.mii: revision 1.52
	sys/dev/mii/files.mii: revision 1.53
	sys/arch/i386/conf/ALL: revision 1.473
	share/man/man4/mii.4: revision 1.29
	sys/arch/i386/conf/ALL: revision 1.474
	sys/arch/amd64/conf/GENERIC: revision 1.543
	sys/arch/amd64/conf/GENERIC: revision 1.544
	sys/dev/mii/jmphyreg.h: revision 1.1
	share/man/man4/Makefile: revision 1.687
	share/man/man4/smscphy.4: revision 1.1
	share/man/man4/Makefile: revision 1.688
	sys/dev/mii/jmphy.c: revision 1.1
	sys/dev/DEVNAMES: revision 1.324
	sys/dev/DEVNAMES: revision 1.325
	distrib/sets/lists/man/mi: revision 1.1661
	sys/arch/i386/conf/GENERIC: revision 1.1214
	distrib/sets/lists/man/mi: revision 1.1662
	sys/arch/i386/conf/GENERIC: revision 1.1215
	share/man/man4/jmphy.4: revision 1.1
	share/man/man4/jme.4: revision 1.8

Add jmphy(4) from OpenBSD.

Add jmphy.4.

 Port SMSC LAN87xx 10/100 Ethernet PHY driver from FreeBSD with some cleanup
and IFM_NONE support.
2019-11-25 20:47:24 +00:00