Commit Graph

271027 Commits

Author SHA1 Message Date
maxv
d2ac291e7d Change the way root_owner works: consider the calling process as root_owner
not if it has root privileges, but if the /dev/nvmm device was opened with
write permissions. Introduce the undocumented nvmm_root_init() function to
achieve that.

The goal is to simplify the logic and have more granularity, eg if we want
a monitoring agent to access VMs but don't want to give this agent real
root access on the system.
2019-10-27 20:17:36 +00:00
jmcneill
2845a430aa Add FDT support 2019-10-27 20:11:13 +00:00
jmcneill
69a9d2ed61 Add tiiic, tps65217pmic 2019-10-27 19:11:24 +00:00
jmcneill
15623435b8 Add I2C support. 2019-10-27 19:11:07 +00:00
jmcneill
cfd274ae7c Add atmel,24c256 compat data 2019-10-27 19:10:38 +00:00
maxv
dd1fff52d1 Add PCID support in the guests. This speeds up most 64bit guests, because
since Meltdown, everybody uses PCID (including NetBSD).
2019-10-27 18:26:54 +00:00
jmcneill
58899b3b16 Add support for TI AM335x 2019-10-27 18:00:46 +00:00
jmcneill
1eaba8939a Use Timer2 for timecounter, and enable hw module. 2019-10-27 17:59:21 +00:00
jmcneill
39cdc44604 Place devmap above KERNEL_IO_VBASE 2019-10-27 17:58:42 +00:00
jmcneill
8241df9978 Disable autoidle 2019-10-27 17:21:23 +00:00
jmcneill
9ae9137088 Add USB support. 2019-10-27 16:31:26 +00:00
jmcneill
64360384b8 Add MMCHS support. 2019-10-27 15:43:46 +00:00
jmcneill
4924c2329b Add driver for one-register-per-pin type pinctrl devices. 2019-10-27 15:31:15 +00:00
pgoyette
0c89d4ea55 accept() is a function, not an argument! 2019-10-27 12:28:13 +00:00
jmcneill
fe577260a1 Add EDMA TPCC and TPTC drivers. 2019-10-27 12:14:51 +00:00
jmcneill
a4fc703fcb Make com work again 2019-10-27 11:33:56 +00:00
martin
cfda7c78d1 Back out previous - fixed differently by rin already. 2019-10-27 11:21:52 +00:00
maxv
65054ef1a1 Mask CPUID leaf 0x0A on Intel, because we don't want the guest to try (and
fail) to probe the PMC MSRs. This avoids "Unexpected WRMSR" warnings in
qemu-nvmm.
2019-10-27 11:11:09 +00:00
martin
dd04fcad9b Define _KERNEL while including reg.h: we need the (now protected) register
names.
2019-10-27 11:08:04 +00:00
maxv
93f947bbaa Add a new VCPU conf option, that allows userland to request VMEXITs after a
TPR change. This is supported on all Intel CPUs, and not-too-old AMD CPUs.

The reason for wanting this option is that certain OSes (like Win10 64bit)
manage interrupt priority in hardware via CR8 directly, and for these OSes,
the emulator may want to sync its internal TPR state on each change.

Add two new fields in cap.arch, to report the conf capabilities. Report TPR
only on Intel for now, not AMD, because I don't have a recent AMD CPU on
which to test.
2019-10-27 10:28:55 +00:00
rin
bafb9a11bc Expose register difinitions for _STANDALONE.
Fix build failure in arch/luna68k/stand/boot.
2019-10-27 09:38:09 +00:00
maxv
06a4f19afb Use the new PTE naming, and define CR3_FRAME_* separately. No functional
change.
2019-10-27 08:30:05 +00:00
maxv
a6418236ed Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.
2019-10-27 07:08:15 +00:00
christos
5f6e383c7a make this a bit bigger to prepare for gcc-8 2019-10-27 02:07:42 +00:00
christos
a33f2da334 - use accept4 instead of paccept for everyone.
- add test for accept preserving non-block
- comment on FreeBSD and Linux behavior.
2019-10-26 23:08:27 +00:00
christos
c61fe20bc9 add some more machines to the 32 bit part 2019-10-26 18:36:25 +00:00
christos
f20a32fee4 Separate the NetBSD-specific fenv functions from the standard ones.
No functional change.
2019-10-26 17:57:20 +00:00
christos
f3edc77c31 disable -Wshadow because in c99 mode these get marked as builtins. 2019-10-26 17:51:49 +00:00
christos
292e9d0303 Add missing FALLTHROUGH (I am not 100% certain if this is correct), but
breaking/returning will end up printing nothing.
2019-10-26 17:50:18 +00:00
christos
d9c1c1cea0 Hide the register definitions that should eventually be removed (or prefixed
with _REG_ with #ifdef _KERNEL. This avoids conflicts with let's say PC in
<termcap.h>.
2019-10-26 17:49:34 +00:00
jmcneill
0223ab780f Add bus driver for TI sysc interconncet. 2019-10-26 15:58:55 +00:00
jmcneill
538dc118f5 Fix am33xx_platform_early_putchar for pre-MMU output 2019-10-26 15:58:15 +00:00
jmcneill
dade7b1526 Do not search 64-bit directories for dts files 2019-10-26 15:01:18 +00:00
jmcneill
ca25f0ce13 Adapt ti fdt glue to support GENERIC kernel. 2019-10-26 14:57:27 +00:00
christos
e4c1bc56d0 use strlcpy() for the uts conversion, makes the code simpler and more readable. 2019-10-26 11:34:48 +00:00
tsutsui
b05cccc336 Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding
2019-10-26 10:10:14 +00:00
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