Commit Graph

259458 Commits

Author SHA1 Message Date
jakllsch cabede45bc 'virt' platform adjustments:
- support broader CPU model range
 - move kernel physical and virtual base to avoid bootloader,
   and keep KVA at or above 2GiB
 - add relevant drivers
2018-06-15 15:00:14 +00:00
jakllsch 937a05b0ed Big endian support for virt_platform_early_putchar and xputc. 2018-06-15 14:37:35 +00:00
jakllsch a94f858987 fix xputc FIFO address for virt platform 2018-06-15 14:32:29 +00:00
jakllsch bfc9d6e036 Add "arm,arm-v7" to compatible strings.
(for `qemu-system-arm -M virt`)
2018-06-15 14:27:57 +00:00
jakllsch 1a12da05b5 Bump PIC_MAXSOURCES to 352.
(`qemu-system-arm -M virt` currently needs 288)
2018-06-15 14:25:22 +00:00
yamaguchi 78e4f33125 Add if_vlan directory to lists to fix the build failure
build.sh was failed when using "-V MKDEBUG=yes"
2018-06-15 09:54:02 +00:00
mrg 62adeb39c4 simplify priq_class_create(): if the alloc for cl_q fails,
then only clean up required to to free cl.  delete all the
code at err_ret that was probably used in the past, and move
the free + return upon failure earlier.
2018-06-15 08:34:18 +00:00
kre 5a2f6188e2 Revert previous, mrg's fix is better (even with possible namespace issues,
which I guess are not great in compat includes) .... the perils of two
people doing fixes at around the same time.
2018-06-15 08:17:38 +00:00
kre 3d346d985a If we are going to use offsetof() we'd need to include <stddef.h> to
get it defined.  Rather than deal with potential namespace issues
with that, just clear the entire struct, rather than attempting to
stop after the potential padding field.   If the compiler is good enough
it should make no difference (there are just 3 fields, 2 named ones
are assigned to, immediately after the memset() - the compiler can
detect that, and not bother assigning (via memset()) to the unmamed
3rd padding field).   If the compiler is not smart enough to deal
with this, then I doubt writing 8 more zero bytes will make enough
difference to matter.
2018-06-15 07:46:59 +00:00
mrg 2b3c41532d include libkern.h or string.h & stddef.h, to get the offsetof()
and memset() definitions.
2018-06-15 07:33:27 +00:00
jakllsch c25f7d4b74 Fix queue address setup bug introduced in 1.31.
This use-before-initialization problem resulted in non-zero queues never
being initialized with their virtqueue pointer, and queue zero's pointer
to be clobbered with the virtqueue pointer for the higest-indexed ring.
2018-06-15 01:37:40 +00:00
christos fdf2ea1385 Add -n (don't send mail if command exited normally) option. From OpenBSD via
Job Snidjers.
2018-06-14 22:04:28 +00:00
christos 4911152229 Replace with the OpenBSD man page. It removes some historical comparisons
that are not very useful (and trully if any they belong to a separate section
instead of being interspersed in the document), and organizes and formats
the information better.
2018-06-14 22:02:57 +00:00
maya 40b0fdad11 for consistency, print the statement that is true in the error case.
also add missing closing paren
2018-06-14 21:57:25 +00:00
maya b4dd0f8b48 Test for FE_INVALID in a way that works for powerpc too.
powerpc seems to return FE_INVALID | FE_VXSOFT rather than just FE_INVALID.
XXX need extra careful reading of standards
2018-06-14 21:11:08 +00:00
maxv 27027ffab1 Install the FPU state on the current CPU in setregs (execve). 2018-06-14 18:00:15 +00:00
maxv 0ca1eb2675 Eager FPU on i386. 2018-06-14 17:58:22 +00:00
macallan 8ac19a42a6 make this work on rv350 chips found in last generation *Books
Needs testing on non-Apple hardware.
2018-06-14 17:41:27 +00:00
christos c85e5e1ae4 PR/53365: Thomas Barabosch: memory leak in route6d
XXX: pullup 7, 8
2018-06-14 16:17:18 +00:00
maxv edb6f1effc SpectreV4, backports in NetBSD-8, no XSAVEOPT 2018-06-14 14:48:59 +00:00
maxv fbf420517e Add some code to support eager fpu switch, INTEL-SA-00145. We restore the
FPU state of the lwp right away during context switches. This guarantees
that when the CPU executes in userland, the FPU doesn't contain secrets.

Maybe we also need to clear the FPU in setregs(), not sure about this one.

Can be enabled/disabled via:

	machdep.fpu_eager = {0/1}

Not yet turned on automatically on affected CPUs (Intel Family 6).

More generally it would be good to turn it on automatically when XSAVEOPT
is supported, because in this case there is probably a non-negligible
performance gain; but we need to fix PR/52966.
2018-06-14 14:36:46 +00:00
jmcneill 33b9f57fe7 arm: Add support for QEMU ARM Virtual Machine ("virt"). 2018-06-14 10:57:42 +00:00
jmcneill 2417111f9f Add support for QEMU ARM Virtual Machine ("virt"). 2018-06-14 10:56:39 +00:00
jmcneill 2f78d473d8 Increase storage space for FDT data 2018-06-14 10:53:39 +00:00
uwe 4ac70e4d2b timespec_to_timespec50 - don't leak kernel memory in struct padding.
On 64-bit machines struct timespec50 has padding between 32-bit tv_sec
and long tv_nsec that is not affected by normal assignment.  Scrub it.
The result is most likely about to be passed to the user space by the
caller, so do it here to take care of them all.
2018-06-14 10:30:55 +00:00
kamil 079a9ba6ba Make the alignof() usage more portable in grep(1)
Remove NetBSD specific check and replace it with GCC extension __alignof__
that is available since GCC 2.x.

Requested by <kre>
2018-06-14 10:14:39 +00:00
msaitoh 24189a7035 Remove extra tabs. No functional change. 2018-06-14 09:29:55 +00:00
yamaguchi c9cc6dd9e6 Update the error message in t_vlan (ENXIO => EINVAL)
ok ozaki-r@
2018-06-14 08:38:24 +00:00
yamaguchi fac50df193 Fix to check whether the address has been added before delete
The list named ifv_mc_listhead saves multicast addresses that
are added through SIOCADDMULTI. Each nodes added to the list
are used for deleting the related address from a parent I/F
when remove the configuration of parent I/F.
In carp(4) and OpenBSD's vlan(4), the lists is used to check
a parameter of SIOCDELMULTI in addition to the use.
Based on them, the check is added to vlan(4)

ok ozaki-r@
2018-06-14 08:33:18 +00:00
ryo 9c9fdef1bf Widen shift to the LHS type.
same as aarch64/db_interface.c r1.4, PR/53338.
2018-06-14 08:27:10 +00:00
yamaguchi 9de5f4c04e Add test cases for multicast address handling of vlan(4)
ok ozaki-r@
2018-06-14 08:22:52 +00:00
yamaguchi ebf325ec6a Add the lock to refer the list included in ethercom for safety
The lock is already held while adding and deleting
ok ozaki-r@
2018-06-14 08:06:07 +00:00
yamaguchi e6eb667a4d Remove ETHER_LOOKUP_MULTI()
The macro has been replaced with a function.
ok ozaki-r@
2018-06-14 08:00:24 +00:00
yamaguchi 70db832747 Use ether_lookup_multi() instead of the macro
ok ozaki-r@
2018-06-14 07:54:57 +00:00
yamaguchi 6ab9099c9a Replace macros related to multicast address with inline functions
ok ozaki-r@
2018-06-14 07:44:31 +00:00
yamaguchi 15df08b929 Move macros related to multicast address into #ifdef _KERNEL
Those macros and structure are only used in the kernel.
reviewed by ozaki-r@n.o, thanks.
2018-06-14 07:39:16 +00:00
msaitoh 067b405cde s/regisrer/register/. No functional change. 2018-06-14 07:19:47 +00:00
msaitoh 8d2136076c The revision number of Yukon FE A2 is not 0x3 but 0x2. Same as other OSes. 2018-06-14 06:58:15 +00:00
msaitoh b0e1e22279 Regen. 2018-06-14 04:00:13 +00:00
msaitoh d897553535 Add Mobility Radeon HD 4300(0x9552) and Mobility Radeon HD 4500(0x9553)
from OpenBSD.
2018-06-14 03:59:53 +00:00
christos 3ae7054da4 remove notreached 2018-06-14 02:46:56 +00:00
christos 721572cdb2 return to caller instead of exit(2) 2018-06-14 02:44:16 +00:00
jdolecek 75f9f75f0c sort the models, and add several more variants; data found in OpenBSD eephy.c
this also makes makphy match model 88E3016, which adresses PR kern/53301
by Chris Humphries
2018-06-13 23:27:48 +00:00
jdolecek d871fe233a regen 2018-06-13 23:25:41 +00:00
jdolecek b7ee738b08 add E1000 with model id 0x0006, it exists according to OpenBSD
rename E1000 model 0x0000 to E1000_0 for consistency
2018-06-13 23:25:25 +00:00
jdolecek 1009e7c059 fix device name in printf when not matched 2018-06-13 20:18:54 +00:00
jdolecek 87182ff736 actually recognize the Yukon 2 variants up to SK_YUKON_OPTIMA2 as such 2018-06-13 20:17:03 +00:00
reinoud 7e24c78564 Split out error reporting and make it compile without SCSIVERBOSE 2018-06-13 19:59:14 +00:00
jdolecek 5f8aba250d sync and adapt with OpenBSD if_msk.c rev. 1.43-1.65 (modulo some
cosmetics, stuff we already had, or stuff which does not apply due
to different frameworks):

- Add support for fiber on 88E8021/22
- Avoid unnecessary resets.  This should make fiber 88E8021/22 work completely
- Only probe phy's at address 0; gets rid of bogus phy's on the
  Marvell Yukon 88E8036
- Remove an unused function msk_setfilt() which was copied from sk(4)
- Make msk(4) detachable
- Simplify the combination use of pci_mapreg_type()/pci_mapreg_map()
2018-06-13 19:37:23 +00:00
jdolecek 5cfbb15973 revert rev. 1.29 'Only tick mii if the phy had a status change', as neither
OpenBSD nor FreeBSD drivers have this conditional
2018-06-13 19:28:18 +00:00