Commit Graph

271072 Commits

Author SHA1 Message Date
christos
943bd98d5c arm-common.c uses bitmap stuff so put the common-target.a before common.a 2019-10-24 18:48:43 +00:00
christos
741a117e19 arm-common.c needs stack-protector treatment 2019-10-24 18:48:09 +00:00
christos
20f77b55bf 1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc).
   Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove
   it from everywhere else.
2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make
   sense because the documentation says that this flag does not make a
   difference in apcs mode, but might produce larger code in non-APCS mode.
   So we just add it to silence the warnings.
2019-10-24 18:46:20 +00:00
christos
36bc1517f4 Add a function cast 2019-10-24 18:34:22 +00:00
kamil
77a1ad5f00 Switch the iconv(3) prototype to the POSIX conformant variation
Remove const from the 2nd argument.

const char ** and char ** are incompatible types and it was a cost to keep
the technically incompatible form for a more purist variation. NetBSD was
almost the last alive OS to still keep the const argument (known leftovers:
Minix and Illumos).

Keep the const form for the internal purposes inside citrus and rump.

Address the build breakage fallout in the same change.

There are no ABI changes.

Change accepted by core@.
2019-10-24 18:17:14 +00:00
martin
f033e6150f When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.
2019-10-24 18:17:08 +00:00
rhialto
e9ed3c66a2 Solve [ vs. \133 in join.awk which replaces fix in r1.23 of regpkg. Ok uki@. 2019-10-24 16:52:11 +00:00
hannken
3576a6dafd With TLSv1.3 a client has to receive and process metadata.
Update dispatch_tls_eof() to check for metadata and
rearm on success.

Ok: christos@
2019-10-24 08:21:18 +00:00
msaitoh
1117a6999f Fix a bug that ukphy_status() misunderstand master mode. 2019-10-24 03:37:58 +00:00
christos
8cb33180ff mknative tries to build this file with c++ and c++ does not like types
inside offsetof() (a language limitation).
2019-10-24 03:31:38 +00:00
christos
d05d30e64c add new files
XXX: all the arms need regen
2019-10-24 03:26:06 +00:00
christos
eba0817981 arm needs more files 2019-10-24 03:19:14 +00:00
uki
6e824db87c Give syspkg names to xserver mi files 2019-10-23 21:40:36 +00:00
uki
ac8ca99519 Architecture dependency files are obsolete 2019-10-23 21:31:32 +00:00
christos
ad28d61a37 Since add_debug_regex_map is used in opts-global.c unconditionally, we can't
disable the code with #ifndef __NetBSD__ because it breaks cross-building.
2019-10-23 18:55:36 +00:00
kamil
1c5b1926dd Fix polish translation for sysinst
PR install/53870 by Guest01
PR install/53871 by Guest01

patch by Krzysztof Lasocki
2019-10-23 18:08:31 +00:00
martin
e899ddb131 Add note for GCC 8 builds (see PR 54644) 2019-10-23 16:26:42 +00:00
christos
8f75e4b21c simplify more (from rudolf) 2019-10-23 14:45:38 +00:00
christos
fe4d93fad2 Missing ata_channel_unlock(chp). Noted by mjg@freebsd. 2019-10-23 14:44:41 +00:00
maxv
e6f32a5866 Three changes in libnvmm:
- Add 'mach' and 'vcpu' backpointers in the nvmm_io and nvmm_mem
   structures.

 - Rename 'nvmm_callbacks' to 'nvmm_assist_callbacks'.

 - Rename and migrate NVMM_MACH_CONF_CALLBACKS to NVMM_VCPU_CONF_CALLBACKS,
   it now becomes per-VCPU.
2019-10-23 12:02:55 +00:00
kamil
ddffaa17e1 Correct the __libc_thr_keycreate signature in the MSan interceptor
Noted by gcc8.

In practice it might have no impact on the functionality.
2019-10-23 11:27:08 +00:00
maxv
f9fb7866ce Miscellaneous changes in NVMM, to address several inconsistencies and
issues in the libnvmm API.

 - Rename NVMM_CAPABILITY_VERSION to NVMM_KERN_VERSION, and check it in
   libnvmm. Introduce NVMM_USER_VERSION, for future use.

 - In libnvmm, open "/dev/nvmm" as read-only and with O_CLOEXEC. This is to
   avoid sharing the VMs with the children if the process forks. In the
   NVMM driver, force O_CLOEXEC on open().

 - Rename the following things for consistency:
       nvmm_exit*              -> nvmm_vcpu_exit*
       nvmm_event*             -> nvmm_vcpu_event*
       NVMM_EXIT_*             -> NVMM_VCPU_EXIT_*
       NVMM_EVENT_INTERRUPT_HW -> NVMM_VCPU_EVENT_INTR
       NVMM_EVENT_EXCEPTION    -> NVMM_VCPU_EVENT_EXCP
   Delete NVMM_EVENT_INTERRUPT_SW, unused already.

 - Slightly reorganize the MI/MD definitions, for internal clarity.

 - Split NVMM_VCPU_EXIT_MSR in two: NVMM_VCPU_EXIT_{RD,WR}MSR. Also provide
   separate u.rdmsr and u.wrmsr fields. This is more consistent with the
   other exit reasons.

 - Change the types of several variables:
       event.type                  enum -> u_int
       event.vector                uint64_t -> uint8_t
       exit.u.*msr.msr:            uint64_t -> uint32_t
       exit.u.io.type:             enum -> bool
       exit.u.io.seg:              int -> int8_t
       cap.arch.mxcsr_mask:        uint64_t -> uint32_t
       cap.arch.conf_cpuid_maxops: uint64_t -> uint32_t

 - Delete NVMM_VCPU_EXIT_MWAIT_COND, it is AMD-only and confusing, and we
   already intercept 'monitor' so it is never armed.

 - Introduce vmx_exit_insn() for NVMM-Intel, similar to svm_exit_insn().
   The 'npc' field wasn't getting filled properly during certain VMEXITs.

 - Introduce nvmm_vcpu_configure(). Similar to nvmm_machine_configure(),
   but as its name indicates, the configuration is per-VCPU and not per-VM.
   Migrate and rename NVMM_MACH_CONF_X86_CPUID to NVMM_VCPU_CONF_CPUID.
   This becomes per-VCPU, which makes more sense than per-VM.

 - Extend the NVMM_VCPU_CONF_CPUID conf to allow triggering VMEXITs on
   specific leaves. Until now we could only mask the leaves. An uint32_t
   is added in the structure:
	uint32_t mask:1;
	uint32_t exit:1;
	uint32_t rsvd:30;
   The two first bits select the desired behavior on the leaf. Specifying
   zero on both resets the leaf to the default behavior. The new
   NVMM_VCPU_EXIT_CPUID exit reason is added.
2019-10-23 07:01:11 +00:00
hkenken
af57fdaa25 Add SDHC flags.
+ SDHC_FLAG_BROKEN_ADMA2_ZEROLEN
  Broken ADMA2 Zero length descriptor.
  Can't 64K Byte data transfer.
+ SDHC_FLAG_NO_1_8_V
  Support no 1.8V Supply.
  Disable UHS-I bus speed mode (SDR50, DDR50, SDR104).
2019-10-23 05:20:52 +00:00
hkenken
b0e8c45b9a Implement platform reset for i.MX6. 2019-10-23 02:34:43 +00:00
maya
ac76aef9cb we want to check that the allocation is going to be zero, not whether
some pointer is NULL (oops).

Should be the right version this time!
2019-10-23 01:30:54 +00:00
maya
4ab0974ee9 Check if size is zero, too.
PR kern/53734
2019-10-23 01:03:36 +00:00
maya
0555c41502 Avoid kmem_alloc(0,..), which hits an assertion.
PR kern/53734: Prevent kernel panic during Wide Vision FHD Camera detection
2019-10-23 00:52:39 +00:00
tnn
78cce6fa1c allow to have a per-product init function 2019-10-22 22:03:27 +00:00
tnn
c1aa3096da use __SHIFTIN 2019-10-22 21:41:01 +00:00
tnn
634f223d34 define SSD1322 command set 2019-10-22 21:40:10 +00:00
aymeric
c0c61e9616 Disable private timer whose new driver clashes with the global timer's one.
Stopgap measure to make the DE0 Nano Soc work again, targeted for netbsd-9
pullup. We'll see later if we switch to using the private timer.
2019-10-22 18:43:14 +00:00
christos
78be1c9f56 move a{md,arch}64 to gcc 8 2019-10-22 13:49:30 +00:00
hauke
496b616768 When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also <http://mail-index.netbsd.org/tech-x11/2019/08/01/msg002010.html>.

XXX There are probably more of these in the header.
2019-10-22 13:19:47 +00:00
martin
09149b14be Fix channel locking - patch from Christos. 2019-10-22 12:09:11 +00:00
uki
823b76dc06 Give syspkg names to xetc files 2019-10-22 06:28:18 +00:00
uki
5111726743 Give syspkg names to xcomp all online manuals 2019-10-22 03:01:53 +00:00
christos
c92e4f2582 follow the channel locking protocol during probe (like the other drivers) 2019-10-21 19:00:11 +00:00
christos
22c0f21763 chuq does not like insomniac allocations so unlock-alloc-lock instead. 2019-10-21 18:58:57 +00:00
christos
7693ab4db6 Fix assert_sleepable() panic by allocating with NOSLEEP. The alternative is
to unlock and relock the channel, but seems more dangerous to do so.
2019-10-21 18:37:47 +00:00
kamil
a73248db21 Remove preprocessor switch TEST_LWP_ENABLED in t_ptrace_wait*
LWP tests are now enabled always and confirmed to be stable.
2019-10-21 18:36:08 +00:00
kamil
eb8ea5d12d Remove preprocessor switch TEST_VFORK_ENABLED in t_ptrace_wait*
vfork(2) tests are now enabled always and confirmed to be stable.
2019-10-21 18:31:40 +00:00
mgorny
050caffe42 Fix a race condition when handling concurrent LWP signals and add a test
Fix a race condition that caused PT_GET_SIGINFO to return incorrect
information when multiple signals were delivered concurrently
to different LWPs.  Add a regression test that verifies that when 50
threads concurrently use pthread_kill() on themselves, the debugger
receives all signals with correct information.

The kernel uses separate signal queues for each LWP.  However,
the signal context used to implement PT_GET_SIGINFO is stored in 'struct
proc' and therefore common to all LWPs in the process.  Previously,
this member was filled in kpsignal2(), i.e. when the signal was sent.
This meant that if another LWP managed to send another signal
concurrently, the data was overwritten before the process was stopped.

As a result, PT_GET_SIGINFO did not report the correct LWP and signal
(it could even report a different signal than wait()).  This can be
quite reliably reproduced with the number of 20 LWPs, however it can
also occur with 10.

This patch moves setting of signal context to issignal(), just before
the process is actually stopped.  The data is taken from per-LWP
or per-process signal queue.  The added test confirms that the debugger
correctly receives all signals, and PT_GET_SIGINFO reports both correct
LWP and signal number.

Reviewed by kamil.
2019-10-21 17:07:00 +00:00
martin
e1c382678c Skip unwanted (zero sized) partitions. 2019-10-21 16:10:54 +00:00
martin
10ffbb5073 When translating (internal) indices to device names, properly deal with
gaps in partition allocations (e.g. no swap partition).
2019-10-21 16:09:59 +00:00
christos
0263994f06 regen 2019-10-21 14:23:53 +00:00
martin
df91044bef Remove a hardcoded assumption that for BIOS boot we always will have
the first partition as root - in mixed EFI/BIOS setups this might not
be true (and in general the user is free to define arbitrary orders).
Pointed out by Robert Nestor.
2019-10-21 14:07:42 +00:00
uki
03eb71223f Give syspkg names. catman, htmlman, man are remaining 2019-10-21 11:59:01 +00:00
maxv
d47b30fb94 Call cpu_probe_fpu() only once (from cpu0), and style. 2019-10-21 10:09:24 +00:00
msaitoh
26dc6040af if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
2019-10-21 08:22:06 +00:00
msaitoh
806b3dee8c if_ipackets is incremented in can_input(), so don't increment it in
sunxi_can_rx_intr to prevent double count. OK'd by bouyer@.
2019-10-21 08:00:58 +00:00