267466 Commits

Author SHA1 Message Date
kre
6aaf09f01b revert previous. somehowI failedto see that was already done. 2019-05-12 01:45:25 +00:00
kre
1aa98bd080 install rc.d 2019-05-12 01:33:47 +00:00
kre
7476299781 Restructure code a little.
Use quoting everywhere possibly useful (always the right way, except
in the few cases where it is wrong...)

Avoid using cut & grep (from /usr/bin) so script could run before /usr
is mounted (pity cpuctl is in /usr/sbin ...).

Use sysctl -n rather than attempting to parse its output.
2019-05-12 00:24:03 +00:00
maxv
907a706c0b Add smtoff, an rc.d script that disables Simultaneous Multi-Threading. It
parses the output of cpuctl, and executes "cpuctl offline" for each CPU
that has SmtID!=0.

The default is "smtoff=NO", which means that SMT remains enabled.
2019-05-11 19:31:03 +00:00
christos
7fd95dd161 elide clang warnings 2019-05-11 17:44:16 +00:00
kre
17a7ea5b15 Undo previous. Not needed (and file included isn't installed anyway. 2019-05-11 17:21:07 +00:00
christos
c975cf3b97 Undo previous 2019-05-11 13:41:52 +00:00
christos
30c8f14196 Undo previous, fixed in userland. 2019-05-11 13:40:26 +00:00
christos
914397cddf Add cpufunc.h 2019-05-11 13:04:40 +00:00
christos
11e52b4657 need cpufunc.h for rdmsr 2019-05-11 12:59:50 +00:00
christos
5d4f0b2aaf expose the {rd,wr}msr functions to userland and install the header for
the benefit of cpuctl (fix the build).
2019-05-11 12:58:17 +00:00
mlelstv
14098003aa Fix copy&paste error, the function is named rdmsr().
Found by kre@
2019-05-11 12:24:42 +00:00
maxv
4a34c4e1c3 Check the return value of cpuset_set(), to prevent future surprises. 2019-05-11 11:59:21 +00:00
maxv
dedb2f3a2d Fix bug, the computation of cpuset_nentries was incorrect, we must do +1
to be able to address the last 32 bits.

On a machine with 80 CPUs, this caused "cpuctl identify >64" to return
garbage.
2019-05-11 11:53:55 +00:00
maxv
c32e3374f1 Replace "VMM" by "emulator", clearer. 2019-05-11 07:44:00 +00:00
maxv
113821f1a2 Sync with reality. 2019-05-11 07:40:38 +00:00
maxv
bfb4017486 Rework the machine configuration interface.
Provide three ranges in the conf space: <libnvmm:0-100>, <MI:100-200> and
<MD:200-...>. Remove nvmm_callbacks_register(), and replace it by the conf
op NVMM_MACH_CONF_CALLBACKS, handled by libnvmm. The callbacks are now
per-machine, and the emulators should now do:

-	nvmm_callbacks_register(&cbs);
+	nvmm_machine_configure(&mach, NVMM_MACH_CONF_CALLBACKS, &cbs);

This provides more granularity, for example if the process runs two VMs
and wants different callbacks for each.
2019-05-11 07:31:56 +00:00
skrll
fea8008511 #define<tab> for consistency 2019-05-11 06:50:42 +00:00
maya
1218f89b8c Don't use a confusing GCC extension. NFC 2019-05-11 03:26:43 +00:00
christos
3dedd71659 Everyone is using gcc-7 now. 2019-05-11 02:40:31 +00:00
christos
fcd7b61e5b regen for ppc64 2019-05-11 02:39:48 +00:00
christos
19f0e0e583 remove the ppc64 long-double-128; the default is 64 now. 2019-05-11 02:39:32 +00:00
christos
6f6e225c3d Switch PPC64 long double to 64 bits until the compiler is fixed.
XXX: This changes the ABI of the libraries.
2019-05-11 02:37:58 +00:00
christos
797048a392 Don't return the raw audio formats; return the ones after we disabled some
of them because the device does not support them. Fixes panic in virtualbox.
2019-05-11 02:34:19 +00:00
macallan
5c2563f670 general overhaul, in no particular order:
- use MIPS_PHYS_TO_KSEG1()
- get rid of duplicated rasops_allocattr() and _mapchar() methods
- use rasops_init()
- support fonts that aren't 8x16
- use fastclear mode for rectangle fills
- don't mess with XMAP9's config register
- initialize all 32 XMAP9 mode registers, just in case
- make newport_fill_rectangle() use x, y, wi, he like everyone else
- use R3G3B2 palette in preparation for alpha font support
2019-05-10 23:21:42 +00:00
macallan
0139044fe6 move the CIDMATCH bits where they belong, now FASTCLEAR mode can actually work 2019-05-10 22:54:51 +00:00
mgorny
3d15a13bb7 Fix typo: PT_GETFOREGS -> PT_GETFPREGS (NFC) 2019-05-10 21:08:26 +00:00
maxv
240cde3bbc Clean up, and add sanity checks on the microcode lengths. 2019-05-10 18:21:01 +00:00
mgorny
989594cf4b Add PT_SET*REGS tests for mm/xmm registers. 2019-05-10 18:07:10 +00:00
mgorny
d0d1caee46 Remove obsolete size asserts. 2019-05-10 17:34:26 +00:00
skrll
d62764c424 Fix a printf 2019-05-10 16:43:09 +00:00
mlelstv
138085ddce Get CPU topology data for AMD processors. 2019-05-10 16:42:57 +00:00
mgorny
d8aacecd69 Use newly-filled i386 reg structs in PT_GETFPREGS & PT_GETXMMREGS tests. 2019-05-10 16:28:00 +00:00
mgorny
a6cdb70d1b Fill 'struct fpreg' & 'struct xmmregs' in
The 'struct fpreg' data type used by PT_GETFPREGS, and 'struct xmmregs'
used by PT_GETXMMREGS are currently opaque.  Define them to contain
correct data structs instead, the same way they are defined for amd64.
For 'struct fpreg' this means 'struct save87', and for 'struct xmmregs'
this means 'struct fxsave'.  This makes it more transparent for
consumers how the data is formatted, and allows using it without need
for explicit casts.

Reviewed by <kamil>.
2019-05-10 16:27:03 +00:00
mgorny
2d583f722a Add tests for PT_SETREGS 2019-05-10 16:24:35 +00:00
nakayama
063ec26a98 Don't build compat LLVM PIC libraries since it is unused if MKCOMPATX11 == "no". 2019-05-10 09:42:46 +00:00
wiz
c5e9de7253 Remove src/external/bsd/bind - latest version is in src/external/mpl/bind
This directory was already unhooked from the build (in August 2018).

ok christos@
2019-05-10 09:13:17 +00:00
skrll
03d81e1364 Take a lead from sys/dev/gpio/gpio.c:gpio_intr_str and report edge vs
level. etc interrupt type.

From yarl-baudig
2019-05-10 08:28:50 +00:00
msaitoh
007b45a492 Use %08x to print ifmedia word (IFMEDIA_DEBUG). 2019-05-10 08:24:54 +00:00
msaitoh
eff7c04a8e Remove extra parentheses. No functional change. 2019-05-10 06:53:42 +00:00
msaitoh
6a30297b4f Add missing parentheses for IFQ_CLASSIFY macro's argument. 2019-05-10 06:45:19 +00:00
msaitoh
d39d3b7cbe Remove extra parenthesis. 2019-05-10 06:33:14 +00:00
mrg
0175edc37e add new INTEL_DRIVER_DATE variable that defaults to 2019, but can
be set to 2014 and the older KMS based driver will be used (which
is the last actual release.)

this fixes some display issues on older systems.  for me, sandy
bridge has minor issues with the new drivrer, but kaby lake really
likes to have the newer driver.

perhaps change default later, but this enables simple testing.
2019-05-10 06:25:58 +00:00
mrg
324b4eb87f add an entry to find upcoming intel-2014 driver. 2019-05-10 06:19:54 +00:00
cnst
87a3b9da5d envsys(4): mention ioctl(2) commands left over from Nx 1.5/4.0 experimental API 2019-05-10 05:59:47 +00:00
msaitoh
d154fb91b7 Modify comment to make the data structure clear. No functional change. 2019-05-10 05:16:34 +00:00
msaitoh
a321b0ae4f Fix typo. This code is not used yet. 2019-05-10 02:56:08 +00:00
maya
e5523bd00e G/C unused code.
gcc -combine is no longer a thing, so this entire block isn't usable.
2019-05-09 23:34:51 +00:00
kamil
56198cf278 Report TRAP_EXEC (for exec()) to a debugger in the PT_SYSCALL mode
Orignally exec() reporting was disabled in the NetBSD version as there
was no support for fine-grained reporting. Meanwhile PT_SYSCALL was broken
for years and there is no software that depends on this behavior.

There is need to catch exec() events in syscall tracers using ptrace(2).
Instead of adding workarounds of guessing that exec() happened, report the
event directly from the kernel.

All ATF ptrace(2) tests pass.
2019-05-09 20:50:14 +00:00
maxv
661cae2406 Invalidate the cache before updating the microcode. Some platforms require
this. Seen in Illumos and FreeBSD.
2019-05-09 18:53:14 +00:00