Commit Graph

153384 Commits

Author SHA1 Message Date
tnn b17f0570cb efiboot: bump version 2020-10-18 18:09:32 +00:00
tnn 33908812c2 efiboot: recognize the EFI system partition as fstype MSDOS 2020-10-18 18:05:48 +00:00
skrll 77314eed7d Trailing whitespace 2020-10-18 16:28:57 +00:00
christos facf2dbee5 use the GCC_ warning variable 2020-10-18 15:02:12 +00:00
christos 912321b7f4 Avoid alignment of packed member 2020-10-18 14:36:43 +00:00
christos 53f398bf72 Avoid alignment of packed member 2020-10-18 14:33:28 +00:00
jmcneill 0834f1233a Treat ARGB/XRGB as BGRA/BGRX on big endian kernels. 2020-10-18 14:00:08 +00:00
gson a59360497a Suppress the "rn_init: radix functions require max_keylen be set"
message when _KERNEL is defined, to avoid spurious messages from
kernels that have no routable network domains.  Fixes PR kern/55691.
2020-10-18 13:07:31 +00:00
rin dd0005a97a Revert rev 1.75; do not set WSFB_VRAM_IS_RAM flag bit. It indicates
memory type obtained by mmap. I just misunderstood its intention.

Thanks to jmcneill for pointing it out!
2020-10-18 12:47:37 +00:00
rin 1075672ff1 Remove stray TABs. No binary changes. 2020-10-18 12:00:12 +00:00
rin 7a801774a0 For WSDISPLAYIO_GET_FBINFO ioctl, set WSFB_VRAM_IS_RAM to fbi_flags
when shadow FB is used.
2020-10-18 11:54:20 +00:00
rin 4d3ccdb20f Fix undefined behaviors found by kUBSan.
Tested on VirtualBox with amd64 kernel.
2020-10-18 11:51:08 +00:00
rin 27b5f91738 PR kern/55658
Revert rev 1.122:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/uvm/uvm_bio.c#rev1.122

If this commit is applied to NFS client, changes to files in client
side are sometimes invisible in server side, which results in file
corruption.

Demonstrated by test code provided by Anthony Mallet:
https://mail-index.netbsd.org/current-users/2020/10/17/msg039708.html

Whether the test case above passes or not depends on architectures
and size of NFS I/O specified by -r and -w options of mount_nfs(8)
(the default size is 32KB for x86 and 8KB for other archs).

Whereas it fails on amd64 and i386 with the default size, it passes
on other archs (aarch64, arm, alpha, m68k, and powerpc at least) with
their default. On most ports, it fails with some I/O sizes.

However, the condition for failure is still unclear; whereas it fails
with 2KB I/O size on amiga (m68k, 8KB page), it passes with same I/O
size on alpha (8KB page). It may depends on some VM parameters or
details in pmap implementation, or some race conditions are involved.

Great thanks to Anthony Mallet for providing the test code, and sorry
everyone for breakage.
2020-10-18 08:52:15 +00:00
jmcneill 7d45dbc78d mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64 2020-10-17 10:47:28 +00:00
jmcneill abea76d271 wmb (dsb ishst) is not the same as membar_producer (dmb ishst) on aarch64 2020-10-17 10:47:10 +00:00
jmcneill f45d414148 mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64 2020-10-17 10:46:39 +00:00
mlelstv 989036c7f9 Correct KB_NEXT value. No impact since KB_NEXT isn't used anywhere. 2020-10-17 10:28:10 +00:00
mlelstv 17dd4092d1 validate unix socker buffer size and truncate path to prevent overflow. 2020-10-17 09:45:20 +00:00
mlelstv a1e0c45171 Attach disk info even for zero sized disks.
Slight refactoring.
2020-10-17 09:42:35 +00:00
mlelstv cc534ef5d9 Fix error message. No functional change, both commands use the same
bit to select read or write mode.
2020-10-17 09:36:45 +00:00
mlelstv b761783a16 Setting a socket buffer size stops autoscaling. Add a sysctl to
prevent this behaviour. The default is not changed.
2020-10-17 09:06:15 +00:00
mlelstv 77730fa866 Fix RTT values reported by TCP_INFO. 2020-10-17 08:50:38 +00:00
jdc 96cc018006 Avoid declaring autoconf_debug twice when building with DEBUG.
Pointed out by palle@ - thanks!
2020-10-17 08:10:31 +00:00
jmcneill adf8cec6ba Fix mb/wmb/rmb on aarch64 to use dsb instead of dmb. 2020-10-16 22:39:21 +00:00
skrll 5e6f6f761a Remove trailing whitespace 2020-10-16 18:27:34 +00:00
skrll 52a4cb76a9 KNF 2020-10-16 18:27:02 +00:00
macallan bb3c146062 config space accesses to device 15 function 7 cause a machine check exception
on my C200, so weed them out.
Now we can scan the PCI buses without crashing.
2020-10-16 17:59:46 +00:00
macallan 500a7971b4 support *_mmap() 2020-10-16 17:50:44 +00:00
jdc 70ae2a7e8c Move OFW patching routines into their own file. 2020-10-16 07:35:16 +00:00
msaitoh 0bf6a81f22 Fixes a problem that the attach function reported
"wm_gmii_setup_phytype: Unknown PHY model. OUI=000000, model=0000" and
"PHY type is still unknown." Don't call wm_gmii_setup_phytype() three times if
the interface uses SGMII with internal MDIO.

 Tested with I354(Rangeley(SGMII(MDIO))) and I350(SERDES(SFP), SGMII(SFP)).
2020-10-16 05:53:39 +00:00
rin 596cd46650 Byte-swapping instructions for arm and thumb on aarch64eb;
instructions are stored in little-endian byte-order for BE8,
an only valid binary format for ILP32BE executables.

XXX
Apply similar fixes to armv7{,hf}eb.
2020-10-15 23:15:36 +00:00
rin b83874316f Call netbsd32_adjust_limits() in netbsd32_setregs() for sure,
as done for amd64 and sparc64.
2020-10-15 23:10:06 +00:00
rin 7e5bbe7eb4 wait4(2): make error paths match with that of native wait4(2):
https://nxr.netbsd.org/xref/src/sys/kern/kern_exit.c#720
2020-10-15 23:06:06 +00:00
rin 7ba195f620 Fix clone(2) for COMPAT_NETBSD32.
(1) Set r13 (sp for arm32 processes) appropriately when stack is
    specified to fork1().

(2) For arm32 processes, align stack to 8-byte boundary, instead of
    16-byte for native aarch64 processes, to match our 32-bit ABI:

https://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/vm_machdep.c#150

Note that sp alignment checking is disabled in aarch32 mode, and
this works fine with AARCH64_EL0_STACK_ALIGNMENT_CHECK option.

OK ryo
2020-10-15 22:52:08 +00:00
rin 573ed8811c For rev 1.14 and before, netbsd32_process_write_regs() returns EINVAL
if non-modifiable bits are set in CPSR.

Instead, mask out non-modifiable bits and make this function success
regardless of value in CPSR. New behavior matches that of arm:

https://nxr.netbsd.org/xref/src/sys/arch/arm/arm/process_machdep.c#187

This fixes lib/libc/sys/t_ptrace_wait*:access_regs6 tests, in which
register contents retrieved by PT_GETREGS are set back by PT_SETREGS.

No new regression is observed in full ATF run.

OK ryo
2020-10-15 22:41:02 +00:00
rin af36189f13 For cpu_jump_onfault() in data_abort_handler(), stop returning
hard-coded EFAULT and use return value from uvm_fault() instead.

There are some paths that do not call uvm_fault():

(1) For fatalabort case, use EFAULT as before.
(2) When va range is invalid, use EFAULT instead of EINVAL.

These change fixes bytes_transfer_eof_* tests in
sys/lib/libc/sys/t_ptrace_wait*.

Note that without (2) above, some tests like
sys/lib/libc/sys/t_wait:write_error become newly failing.

I've confirmed that there's no new regression in full ATF run.

OK ryo
2020-10-15 22:30:34 +00:00
jmcneill 4ac1d9b778 Reduce scope of memory barriers use in bus_space_barrier() implementation.
Instead of always "dsb sy", use "dsb ishld" for reads, "dsb ishst" for
writes, and "dsh ish" for reads and writes.

Ok skrll@
2020-10-15 21:14:15 +00:00
martin ba228069c7 Add missing 'error' declaration 2020-10-15 18:57:16 +00:00
mgorny d3ecc00638 Remove unnecessary <sys/systm.h> include 2020-10-15 17:43:30 +00:00
mgorny e0a152e645 Fix s87_tw reconstruction to correctly indicate register states
Fix the code reconstructing s87_tw (full tag word) from fx_sw (abridged
tag word) to correctly represent all register states.  The previous code
only distinguished between empty/non-empty registers, and assigned
'regular value' to all non-empty registers.  The new code explicitly
distinguishes the two other tag word values: empty and special.
2020-10-15 17:43:08 +00:00
mgorny 22898a8358 Revert "Merge convert_xmm_s87.c into fpu.c"
I am going to add ATF tests for these two functions, and having them
in a separate file will make it more convenient to build and run them
in userspace.
2020-10-15 17:40:13 +00:00
mgorny c6c4c36d40 9.99.74 changes ptrace_machdep_dorequest() to fix LWP support 2020-10-15 17:38:41 +00:00
mgorny f4ced9b4b9 Fix the machine-dependent ptrace requests to respect LWP number
Fix the machine-dependent ptrace register-related requests (e.g.
PT_GETXMMREGS, PT_GETXSTATE on x86) to correctly respect the LWP number
passed as the data argument.  Before this change, these requests
did not operate on the requested LWP of a multithreaded program.

This change required moving ptrace_update_lwp() out of unit scope,
and changing ptrace_machdep_dorequest() function to take a pointer
to pointer as the second argument, consistently with ptrace_regs().

I am planning to extend the ATF ptrace() register tests in the future
to check for regressions in multithreaded programs, as time permits.

Reviewed by kamil.
2020-10-15 17:37:35 +00:00
roy 3fa9fd328e net: remove IFEF_NO_LINK_STATE_CHANGE
This flag was only set for virtual interfaces.
All virtual interfaces have a means of knowing if they are going to work
or not and as such now support link state changes.

If we want this flag back, it should be used as an indicator that
the interfaces does not support link state changes that userland can use
so it can make a decision on what to do when the link state is UNKNOWN.
2020-10-15 10:20:44 +00:00
roy efd9f92994 wg: with no peers, the link status is DOWN, otherwise UP
This mirrors the recent changes to gif(4) where the link is UP when a
tunnel is set, otherwise DOWN.
2020-10-15 10:09:49 +00:00
jmcneill ebbab2fb82 Rename xhci_op_barrier to xhci_barrier and remove offset/length parameters.
Barriers will be applied to the entire XHCI register space.
2020-10-15 09:37:40 +00:00
jmcneill 14ea18b1c3 Initialise xhci_softc sc_ios 2020-10-15 09:32:40 +00:00
ryo 6d558a35c5 slightly optimized loop for trap_doast() calls 2020-10-15 08:37:20 +00:00
ryo fc5ac492f5 add vmx(4) driver. tested on ESXi-Arm 2020-10-15 04:39:24 +00:00
ryo a099e3b459 Reduces useless "vmxnet3_read_cmd(sc, VMXNET3_CMD_GET_LINK)" calls 2020-10-15 04:37:48 +00:00