Commit Graph

134238 Commits

Author SHA1 Message Date
palle
88429e4286 sun4v: Added handling of trap type 0x034 (address alignment error) + fixed typo mmfsa -> mmufsa. Verified for both sun4u and sun4v using qemu. 2017-02-10 23:26:23 +00:00
tnn
20f5a8dc9c remove misleading comment about version 3.0 microcode
The last known microcode to work is 2.4. Version 3.0 changes
the header signature and fails with "block too big for NPE memory".
Provide a backup download URL since intel removed version < 3.0.
2017-02-10 23:11:30 +00:00
nat
04c18462bb Committed a temporary copy with extra lines of code not needed. Opps... 2017-02-10 21:03:15 +00:00
christos
e344807275 make attach and detach locking symmetric (detaching cloners failed) 2017-02-10 20:56:21 +00:00
tnn
337034d0bf update firmware download URL 2017-02-10 20:30:39 +00:00
nat
f835d36292 Audio now uses fdclone, there is no longer a limitation of one audio
instance per process.  Virtual channels are placed in a queue, so there is
no longer a compile time limit of VAUDIOCHANS.

A new sysctl has been added to control multiple user access.
Mixer labels on virtual channels are now prefixed by vchan.

audiobell.c and audioctl have been updated to reflect these changes.

Use of fdclone was posted to tech-kern@ and improvements made.
Multiuser access control changes and the use of a queue were suggessted by
pgoyette@
2017-02-10 19:31:42 +00:00
ozaki-r
39a63b6b81 Ensure that nobody references a rtentry that is passed to rt_setgate 2017-02-10 13:48:06 +00:00
ozaki-r
f1b2f01b14 Fix locking against myself in ifa_ifwithroute_psref
It happened on the path: rtrequest1 => rt_getifa => ifa_ifwithroute_psref.

Reported by ryo@
2017-02-10 13:44:47 +00:00
maxv
6bc9aa3b62 If the segment list is full, print a warning on the console and launch the
system with the available segments.

High memory systems may have more than VM_PHYSSEG_MAX segments; it is
better to truncate the memory and allow the system to work rather than
just panicking. The user can still increase VM_PHYSSEG_MAX (or ask us to).

Fixes issues such as PR/47093.

Note: the warning is logged but does not appear in dmesg, this too needs
to be fixed for the rest of the bootstrap procedure.
2017-02-10 10:39:36 +00:00
maxv
61cd43dcab Use macros instead of hard-coded constants. By the way, I don't think this
code is correct, but whatever.
2017-02-10 10:02:26 +00:00
maxv
edffb1dd15 Import iomem_ex locally. 2017-02-10 09:57:04 +00:00
msaitoh
2e1b30ad96 Change the Interrupt Moderation flag from global variable to per device. 2017-02-10 08:41:13 +00:00
msaitoh
21c0544e4a - Both mbuf_defrag_failed and m_defrag_failed existed. Remove m_defrag_failed.
- rx_irq, dropped_pkts, morerx, moretx and txloops counters are uncounted, so
  remove them.
- Count handleq in ixv_handle_que().
- Detach event counters correctly.
- Set some per-queue event names correctly.
2017-02-10 06:35:22 +00:00
msaitoh
3cda35de89 No functional change:
- Rename ixv_sysctl_attach() to ixv_add_device_sysctls().
 - Move sysct and evcnt related functions to match ixgbe.c.
2017-02-10 04:34:11 +00:00
christos
74761b40ce kill variable stack allocation 2017-02-10 04:00:48 +00:00
knakahara
cc4d119b61 detach wm(4) evcnt.
pointed out by msaitoh@n.o, thanks.
2017-02-09 23:30:46 +00:00
christos
c1fee05263 regen 2017-02-09 22:02:13 +00:00
christos
0f3fea8105 revert listen 2017-02-09 22:02:05 +00:00
christos
ec6721a751 use proper arg functions, remove bogus ones. 2017-02-09 22:01:48 +00:00
macallan
d1fbfb04b7 fix tpyo 2017-02-09 20:42:30 +00:00
macallan
c867a9ddc9 make fallback to PIO actually work properly 2017-02-09 20:32:19 +00:00
maxv
7d7daa84ad If the preloaded modules cannot be mapped with the initial amount of VA,
discard the associated bootinfo entry. Otherwise the machine faults and
reboots immediately.

I spotted this bug more than a year ago, but I recently saw that there is
already PR/42645 (7 years old), so just fix it. The size has been increased
in the meantime, so the limit is unlikely to be reached anyway.
2017-02-09 19:30:56 +00:00
joerg
69a2ab8761 Bump the ram disk and miniroot size slightly for clang. 2017-02-09 18:15:07 +00:00
joerg
5a64c2ee91 Give clang a bit more space on the RAM disk. 2017-02-09 15:24:08 +00:00
nonaka
0238774f0d efi_md::md_virt always uses uint64_t. 2017-02-09 11:56:40 +00:00
kre
4fbae14d9b PR kern/51280
This allows srt devices to work for IPv6.   srt still needs work
(particularly #ifdef INET6 but also general effeciency and similar.)
2017-02-09 11:43:32 +00:00
ozaki-r
f66c9ca3fd Make bpf MP-safe
By the change, bpf_mtap can run without any locks as long as its bpf filter
doesn't match a target packet. Pushing data to a bpf buffer still needs
a lock. Removing the lock requires big changes and it's a future work.

Another known issue is that we need to remain some obsolete variables to
avoid breaking kvm(3) users such as netstat and fstat. One problem for
MP-ification is that in order to keep statistic counters of bpf_d we need
to use atomic operations for them. Once we retire the kvm(3) users, we
should make the counters per-CPU and remove the atomic operations.
2017-02-09 09:30:26 +00:00
maxv
929132b4a7 No, do not just copy code from i386 and expect it to work on amd64. There
are several structural differences. At least two issues here: segment
registers that could fault in kernel mode with userland TLS, and a non-
canonical %eip on iret.

Not even tested, but just obvious. By the way, I believe this function is
still buggy since we don't call cpu_fsgs_reload while %fs/%gs could have
been reloaded.
2017-02-09 08:38:25 +00:00
maxv
74eedc014a Restore %ds before swapgs. Movs to segment registers are allowed to fault
in kernel mode but simply cause a signal to be sent to userland. The thing
is, in this case %gs is not restored when entering the trap routine, which
means the kernel uses userland's TLS instead of using its own. Which in
short makes it easy to escalate privileges.

Currently, this bug is triggered only in one place, which I am about to
fix too.
2017-02-09 08:23:46 +00:00
knakahara
3ef7c45eeb make some locks and condvar static 2017-02-09 06:03:29 +00:00
kre
65dda4ca5a Sprinkle in a pinch of const, not too much, just enough
to add a little strength without affecting the overall balance...
2017-02-09 04:37:35 +00:00
msaitoh
a6c7aa60cf Supress verbose message "This pci host supports neither MSI nor MSI-X."
on VMware and KVM. OK'd by k-nakahara.
2017-02-09 03:38:01 +00:00
christos
6c78566e83 regen 2017-02-09 03:24:05 +00:00
christos
3cf039dfb6 fix listen 2017-02-09 03:23:59 +00:00
rin
b765dc9992 Shrink the ramdisk of INSTALL kernel for zaurus in order to fit within 5MB.
Now free spaces of the main kernel and ramdisk are about 62KB and 215KB for
INSTALL, respectively.

OK christos
2017-02-08 20:11:18 +00:00
kre
0dcb58b5ac Analagous fix to that just committed to the equiv amd64 sources.
Note: this one has yet to be compile tested, so anything is possible...
2017-02-08 18:53:01 +00:00
kre
4f1bfb58c6 All bow down before the Great Code Compiler.
Specifically, it has been commanded that unused-functions is a warning,
and, as all should know, all warnings be errors.

Hence, since XEN kernels do not call set_sys_gdt(), that function
may not be included (and the XEN kernel  saves a few tens of bytes.)

An alternate fix would be to just remove "static" - but that would be
the equivalent to just giving the compiler the finger ...   hmm, maybe
that would have been a better fix...
2017-02-08 18:50:51 +00:00
christos
d9093907a5 __empty -> __nothing 2017-02-08 18:01:12 +00:00
christos
0976e75ba5 use __nothing instead since __empty is taken in stl_deque.h 2017-02-08 17:59:35 +00:00
maya
708af0751d Add accept4, a tiny wrapper around paccept.
accept4 is a syscall in Linux, FreeBSD and OpenBSD. It is used in
LLVM, zeromq, and probably others. paccept is a superset of it.

adding it to libc ensures it is used by programs and prevents the
need to define the same wrapper in every program.
2017-02-08 17:58:41 +00:00
christos
f0dfa8e226 remove comment in comment 2017-02-08 16:26:19 +00:00
christos
e3abb3c383 don't define __empty. 2017-02-08 16:14:08 +00:00
christos
da41caee7e add __empty 2017-02-08 16:13:04 +00:00
rin
ccc9d98e52 Add smaller versions of fsck_ffs(8) and newfs(8) for install media, where
support for Endian-Independent FFS and Apple UFS is disabled unless FFS_EI=1
and APPLE_UFS=1 are added to CRUNCHENV, respectively.

This reduces the size of ramdisk image for atari by over 15KB.

Thanks tsutsui and christos for their useful comments.
2017-02-08 16:11:39 +00:00
maxv
6d5f205475 Remove gdt_reload_cpu. GDTR takes a VA as base, and in our x86
implementation this VA is per-cpu and does not change; there is therefore
no need to remotely reload GDTR.
2017-02-08 10:08:26 +00:00
maxv
e6ed7762a4 Localify, add a comment and merge some others. 2017-02-08 09:39:32 +00:00
msaitoh
8e8e0ed94f Print CPU number correctly. 2017-02-08 09:00:37 +00:00
msaitoh
f7261b64b9 - Fix aprint_*()s in ixv_allocate_msix().
- Style fix. Reduce diff against ixgbe.c. No functional change.
2017-02-08 08:30:16 +00:00
msaitoh
752517e5d3 Call IFQ_SET_MAXLEN() even if TX multiqueue is used. ALTQ uses it. 2017-02-08 08:13:53 +00:00
msaitoh
a1cede5a70 Enable TX multiqueue by default on both ixg(4) and ixv(4). 2017-02-08 04:32:43 +00:00