Commit Graph

270991 Commits

Author SHA1 Message Date
tsutsui
bd0b32eaf1 Fix another boot failure issue of NetBSD/zaurus 8.x and later.
It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.
Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.
2019-10-26 09:58:40 +00:00
tsutsui
3bea62503d Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.
This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.
2019-10-26 09:49:13 +00:00
martin
4327f8a536 In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.
2019-10-26 07:32:52 +00:00
uki
efe35ffde2 Give syspkg names to xserver without machine dependet files 2019-10-26 07:31:39 +00:00
christos
876570509c Unbreak the sanitizers for gcc. The sanitizer offset defined in
libsanitizer needs to match with the compiler concept of
TARGET_ASAN_SHADOW_OFFSET, since the compiler generates instructions
to access memory at that offset in the code, and expects the
sanitizer library to have mapped something there. If there is
disagreement, Mr. Segmentation Fault comes and resolves it for you.
2019-10-25 18:03:59 +00:00
martin
fdafaadd05 Add support for Nuvoton NCT5104D GPIO chips, as found on PC Engines APU
systems. From Andrew Doran in PR kern/54648.
2019-10-25 17:39:56 +00:00
martin
4e37d888c5 whitespace 2019-10-25 17:25:23 +00:00
macallan
fc6dd7c2fb register the IPI before spinning up CPUs, and make sure to do it exactly once
with this, and previous commits, G5s with four CPUs work
tested by Romain Dolbeau
2019-10-25 17:17:30 +00:00
martin
f145d42ea0 Add missing onewire temperature sensors, suggested by Andrew Doran. 2019-10-25 16:50:17 +00:00
martin
c8f8ec1fd4 PR kern/54617: onewire(4):
- Alter locking strategy to avoid deadlock on detach.
 - Auto bus probe chews CPU.  Increase interval from 3s to 10s.
 - Put temp sensor S/N in dev description so it can be identified.
 - Use mutex/condvar.

Patch from Andrew Doran.
2019-10-25 16:25:14 +00:00
martin
df5d049a39 From the compilers point of view sys_exit returns a value.
Adjust the filemon wrapper accordingly (newer gcc is unhappy with the
function pointer casts otherwise and the amd64/ALL kernel fails to build).
2019-10-25 16:22:48 +00:00
martin
f96c1808ac On device where we do not want a MBR (raid, xbd) skip the MBR partitioning
scheme when trying to read partitions from disk. The generic reader will
fall back to disklabel then.
2019-10-25 12:49:58 +00:00
martin
6a81eb289c Honor the "no_mbr" flag (used especially for raid and xbd devices) 2019-10-25 12:24:34 +00:00
maxv
39beb8bb08 Update the libnvmm man page:
- Sync the naming with reality.

 - Replace "relevant" by "desired" and "virtualizer" by "emulator", closer
   to what I meant.

 - Add a "VCPU Configuration" section.

 - Add a "Machine Ownership" section.
2019-10-25 09:09:24 +00:00
christos
4d41cddf70 fix printf formats 2019-10-25 01:32:56 +00:00
macallan
2313a00527 if we have a /cpus node, use it to find and attach all CPUs.
Now we find all CPUs on a 4x G5.
2019-10-24 23:06:25 +00:00
macallan
f7c34b7490 bump CPU_MAXNUM to 4, hardware exists and is being asked about on port-macppc@ 2019-10-24 23:04:46 +00:00
macallan
a192f6aa22 bump NIRQ to 256 since we're going to use vectors above 128 2019-10-24 23:03:35 +00:00
kamil
cff733ff15 libc: Changed the iconv(3) function signature to the POSIX variation 2019-10-24 19:28:47 +00:00
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