openbsd
8 years agoAdd XOR cookies for lr and sp. Stop saving/restoring r12 to/from the jmpbuf.
guenther [Sun, 7 Aug 2016 02:02:57 +0000 (02:02 +0000)]
Add XOR cookies for lr and sp.  Stop saving/restoring r12 to/from the jmpbuf.
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall.

ok deraadt@ kettenis@

8 years agoadd $OpenBSD$ tags
jmatthew [Sun, 7 Aug 2016 00:21:57 +0000 (00:21 +0000)]
add $OpenBSD$ tags

8 years agosync
deraadt [Sat, 6 Aug 2016 21:21:05 +0000 (21:21 +0000)]
sync

8 years agoreset timeout to null when relooping
tedu [Sat, 6 Aug 2016 19:56:51 +0000 (19:56 +0000)]
reset timeout to null when relooping

8 years agoUse internal names for __errno, _memcpy, memset, and {,_}{set,long}jmp
guenther [Sat, 6 Aug 2016 19:16:09 +0000 (19:16 +0000)]
Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmp
Eliminate pointless use of PIC_SYM()
Split out DEFS.h from SYS.h like some other archs

ok kettenis@ deraadt@

8 years agoAlways allocate intrhand with M_WAITOK.
patrick [Sat, 6 Aug 2016 18:21:34 +0000 (18:21 +0000)]
Always allocate intrhand with M_WAITOK.

Requested by and ok kettenis@

8 years agoAlways allocate intrhand with M_WAITOK.
patrick [Sat, 6 Aug 2016 18:18:48 +0000 (18:18 +0000)]
Always allocate intrhand with M_WAITOK.

Requested by and ok kettenis@

8 years agoImplement interrupt controller functionality in the i.MX6 GPIO
patrick [Sat, 6 Aug 2016 18:12:13 +0000 (18:12 +0000)]
Implement interrupt controller functionality in the i.MX6 GPIO
driver.  This allows us to use to hook up the Ethernet interrupt
on the Nitrogen6x, SabreLite and WandBoard like it's described
in the device tree.

ok kettenis@

8 years agoExtend the interrupt controller API with a disestablish functionality.
patrick [Sat, 6 Aug 2016 17:25:14 +0000 (17:25 +0000)]
Extend the interrupt controller API with a disestablish functionality.
This will be helpful for interrupt combiner that need to re-establish
their main interrupt when their interrupt priorities change.

ok kettenis@

8 years agoSwitch imx over to the generic pinctrl API.
kettenis [Sat, 6 Aug 2016 17:18:38 +0000 (17:18 +0000)]
Switch imx over to the generic pinctrl API.

ok patrick@

8 years agoBuild ofw_pinctrl.o and ofw_gpio.o on armv7. The latters here from the
kettenis [Sat, 6 Aug 2016 17:16:13 +0000 (17:16 +0000)]
Build ofw_pinctrl.o and ofw_gpio.o on armv7.  The latters here from the
generic arm files list.  There is no point in building it on armish or
zaurus.

ok patrick@

8 years agoAdd a generic pinctrl "framework".
kettenis [Sat, 6 Aug 2016 17:12:34 +0000 (17:12 +0000)]
Add a generic pinctrl "framework".

ok patrick@

8 years agoPut page tables in normal cachable memory on armv7. Check if the MMU walks
kettenis [Sat, 6 Aug 2016 16:46:25 +0000 (16:46 +0000)]
Put page tables in normal cachable memory on armv7.  Check if the MMU walks
the page tables coherently and also skip flushing modified ptes out of the
cache in that case.  Speeds up building a kernel with a factor of two on
Cortex-A9 (tested by me) and Cortex-A8 (tested by mglocker@).

ok patrick@

8 years agoAdd more tests for better code coverage:
tb [Sat, 6 Aug 2016 15:46:33 +0000 (15:46 +0000)]
Add more tests for better code coverage:
What happens if begin and end are reversed?  What if they are equal?

While there, add a few comments on the purpose of the tests.

8 years agoIf you see code like this, you know something's quite wrong
tb [Sat, 6 Aug 2016 14:41:14 +0000 (14:41 +0000)]
If you see code like this, you know something's quite wrong
(present in some form since r1.1, still present in r1.31):

229                 case 013:
230                         if (randomize)
231                                 begin = BEGIN_DEF;
232                         else if (reps == 0)
233                                 errx(1, "Must specify begin if reps == 0");
234                         begin = ender - reps * s + s;

Add two tests that check for the intended behavior.

8 years agoAdd support for IPv6 tunnel endpoints. This currently only works for
reyk [Sat, 6 Aug 2016 14:33:33 +0000 (14:33 +0000)]
Add support for IPv6 tunnel endpoints.  This currently only works for
unicast mode, multicast is not yet supported.

ifconfig vxlan0 tunnel fd00::1 fd00::2

Roughly based on an earlier diff by goda@
OK yasuoka@

8 years agoFix multicast mode (destination is a multicast IP): the BCAST and
reyk [Sat, 6 Aug 2016 14:29:48 +0000 (14:29 +0000)]
Fix multicast mode (destination is a multicast IP): the BCAST and
MCAST flags have to be cleared from the mbuf after decapsulating
packets.  This fixes tunneled broadcast packets, eg. ARP.  It used to
work before the input path was changed the flags got cleared later in
the stack.

OK yasuoka@

8 years agoRework ampintc's interrupt disestablish code to make it actually do
patrick [Sat, 6 Aug 2016 11:04:47 +0000 (11:04 +0000)]
Rework ampintc's interrupt disestablish code to make it actually do
its job.  Recalculate the mask after the handler is taken from the
list to properly set the new prioritization.

ok kettenis@

8 years agoDynamically attach intc(4) using the FDT and switch omap/am335x
jsg [Sat, 6 Aug 2016 10:07:45 +0000 (10:07 +0000)]
Dynamically attach intc(4) using the FDT and switch omap/am335x
drivers that use the FDT over to the FDT interrupt establish API.

ok kettenis@

8 years agoDisable edma(4). It isn't currently used and is getting in the way of
jsg [Sat, 6 Aug 2016 09:50:55 +0000 (09:50 +0000)]
Disable edma(4).  It isn't currently used and is getting in the way of
future changes as it establishes an interrupt but hasn't been converted
to attach with the fdt.

ok kettenis@

8 years agoAdd PageGrain bits.
visa [Sat, 6 Aug 2016 09:32:04 +0000 (09:32 +0000)]
Add PageGrain bits.

8 years agoUnbreak PSK authentication, broken by previous.
pascal [Sat, 6 Aug 2016 07:08:59 +0000 (07:08 +0000)]
Unbreak PSK authentication, broken by previous.

ok reyk@ florian@

8 years agoLog RX errors only when the interface's debug flag is set.
visa [Sat, 6 Aug 2016 04:32:24 +0000 (04:32 +0000)]
Log RX errors only when the interface's debug flag is set.

While here, remove unused PIP error code aliases.

8 years agoremove now unused board specific phy defines
jsg [Sat, 6 Aug 2016 04:03:20 +0000 (04:03 +0000)]
remove now unused board specific phy defines

8 years agosync
deraadt [Sat, 6 Aug 2016 01:51:04 +0000 (01:51 +0000)]
sync

8 years agoDynamically attach pluart(4) using the FDT.
jsg [Sat, 6 Aug 2016 00:54:02 +0000 (00:54 +0000)]
Dynamically attach pluart(4) using the FDT.
ok kettenis@ patrick@

8 years agoDynamically attach plrtc(4) using the FDT.
jsg [Sat, 6 Aug 2016 00:40:54 +0000 (00:40 +0000)]
Dynamically attach plrtc(4) using the FDT.
ok kettenis@ patrick@

8 years agovirtio no longer attaches to vexpress
jsg [Sat, 6 Aug 2016 00:34:24 +0000 (00:34 +0000)]
virtio no longer attaches to vexpress

8 years agoDynamically attach virtio(4) using the FDT.
jsg [Sat, 6 Aug 2016 00:30:47 +0000 (00:30 +0000)]
Dynamically attach virtio(4) using the FDT.
ok kettenis@ patrick@

8 years agoadjust for fdt changes
jsg [Sat, 6 Aug 2016 00:16:50 +0000 (00:16 +0000)]
adjust for fdt changes

8 years agoSet up the fdt attach args for devices that attach directly to mainbus
jsg [Sat, 6 Aug 2016 00:04:39 +0000 (00:04 +0000)]
Set up the fdt attach args for devices that attach directly to mainbus
the same way as for those that attach to simplebus.

ok kettenis@ patrick@

8 years agoUse m_devget(4). From Artturi Alm.
kettenis [Fri, 5 Aug 2016 22:19:23 +0000 (22:19 +0000)]
Use m_devget(4).  From Artturi Alm.

8 years agoenable the mandoc.db(5) regression suite, code is stable enough now
schwarze [Fri, 5 Aug 2016 21:45:57 +0000 (21:45 +0000)]
enable the mandoc.db(5) regression suite, code is stable enough now

8 years agoDynamically attach sxidog(4).
kettenis [Fri, 5 Aug 2016 21:45:37 +0000 (21:45 +0000)]
Dynamically attach sxidog(4).

8 years agoadjust expected output after the NAME_HEAD fix in mandocdb.c rev. 1.175
schwarze [Fri, 5 Aug 2016 21:42:06 +0000 (21:42 +0000)]
adjust expected output after the NAME_HEAD fix in mandocdb.c rev. 1.175

8 years agoa1xintc -> sxiintc;
jmc [Fri, 5 Aug 2016 21:40:25 +0000 (21:40 +0000)]
a1xintc -> sxiintc;

8 years agoRemove sxirtc(4) from the tables now that it attaches dynamically.
kettenis [Fri, 5 Aug 2016 21:39:02 +0000 (21:39 +0000)]
Remove sxirtc(4) from the tables now that it attaches dynamically.

8 years agomissing <endian.h> reported by Bapt@iste Daroussin, found on FreeBSD
schwarze [Fri, 5 Aug 2016 21:37:39 +0000 (21:37 +0000)]
missing <endian.h> reported by Bapt@iste Daroussin, found on FreeBSD

8 years agoDynamically attach sxirtc(4); another board_id check bites the dust.
kettenis [Fri, 5 Aug 2016 21:29:23 +0000 (21:29 +0000)]
Dynamically attach sxirtc(4); another board_id check bites the dust.

8 years agoCheck if we have the required "reg" property.
kettenis [Fri, 5 Aug 2016 21:28:13 +0000 (21:28 +0000)]
Check if we have the required "reg" property.

8 years agoa1xintc(4) -> sxiintc(4)
kettenis [Fri, 5 Aug 2016 20:41:10 +0000 (20:41 +0000)]
a1xintc(4) -> sxiintc(4)

8 years agoWe don't want drivers with numbers in their names.
kettenis [Fri, 5 Aug 2016 20:38:17 +0000 (20:38 +0000)]
We don't want drivers with numbers in their names.

Requested by deraadt@

8 years agoReplace inappropriate use of CP15_CNTPCT with CP_DCCIMVAC.
kettenis [Fri, 5 Aug 2016 19:56:52 +0000 (19:56 +0000)]
Replace inappropriate use of CP15_CNTPCT with CP_DCCIMVAC.
No binary change.

8 years agoSwitch the sunxi platform over to the new interrupt establish API. This
kettenis [Fri, 5 Aug 2016 19:00:25 +0000 (19:00 +0000)]
Switch the sunxi platform over to the new interrupt establish API.  This
involves turning sxiahci(4) into a real driver that dynamically attaches.
ehci(4) now also attaches dynamically.

ok jsg@, patrick@

8 years agoSwitch pending event clearing to an atomic swap operation
mikeb [Fri, 5 Aug 2016 18:31:21 +0000 (18:31 +0000)]
Switch pending event clearing to an atomic swap operation

Rather than performing an atomic bit clearing for every encountered
event bit set we can adjust the code to perform an atomic swap of a
single row of the events array and decrease the amount of expensive
atomic operations.

Same optimization as for Hyper-V.  From FreeBSD.

8 years agoSwitch pending event clearing to an atomic swap operation
mikeb [Fri, 5 Aug 2016 18:16:04 +0000 (18:16 +0000)]
Switch pending event clearing to an atomic swap operation

Rather than performing an atomic bit clearing for every encountered
event bit set we can adjust the code to perform an atomic swap of a
single row of the events array and decrease the amount of expensive
atomic operations.

From FreeBSD.

8 years agoFixup incorrect EAGAIN handling
mikeb [Fri, 5 Aug 2016 18:12:48 +0000 (18:12 +0000)]
Fixup incorrect EAGAIN handling

8 years agoRead events array offset must be calculated in bytes
mikeb [Fri, 5 Aug 2016 18:12:20 +0000 (18:12 +0000)]
Read events array offset must be calculated in bytes

8 years agoRemove incorrect optimization: ring data portion size is not power of 2
mikeb [Fri, 5 Aug 2016 18:05:44 +0000 (18:05 +0000)]
Remove incorrect optimization: ring data portion size is not power of 2

8 years agoDo not *printf %s NULL
deraadt [Fri, 5 Aug 2016 17:25:51 +0000 (17:25 +0000)]
Do not *printf %s NULL
ok bcook

8 years agofix a typo that prevented names from .Dt from getting priority over
schwarze [Fri, 5 Aug 2016 17:20:30 +0000 (17:20 +0000)]
fix a typo that prevented names from .Dt from getting priority over
names from .Sh NAME; no dire consequences on OpenBSD since we no
longer have MLINKS for mdoc(7) pages

8 years ago* Properly distinguish commands (.Ic) and command modifiers (.Cm).
schwarze [Fri, 5 Aug 2016 17:02:04 +0000 (17:02 +0000)]
* Properly distinguish commands (.Ic) and command modifiers (.Cm).
* Consistently use .Nm for the page name, do not oscillate to .Pa.

8 years agosync
deraadt [Fri, 5 Aug 2016 16:46:50 +0000 (16:46 +0000)]
sync

8 years agoObvious minor fixes:
schwarze [Fri, 5 Aug 2016 16:16:06 +0000 (16:16 +0000)]
Obvious minor fixes:
* Add missing .Dv, .Ev, and .Fa macros.
* Delete deprecated .Tn macros.
* Mark up global variable names with .Va, not with .Fa or .Li.
* Mark up config file commands with .Ic, not with .Fa.
* Fix HISTORY, trivial to verify from the CSRG archive CD.

8 years agouse a larger chunk for getentropy() and save some for next time.
tedu [Fri, 5 Aug 2016 15:42:05 +0000 (15:42 +0000)]
use a larger chunk for getentropy() and save some for next time.
coalesces some syscalls instead of one per random number.
ok deraadt

8 years agoDon't leak the option data of non-DHCPINFORM messages received on
krw [Fri, 5 Aug 2016 14:02:23 +0000 (14:02 +0000)]
Don't leak the option data of non-DHCPINFORM messages received on
the udp socket.

Found by David Carlier.

ok yasuoka@

8 years agoAll four arguments can be omitted by specifying a dash.
tb [Fri, 5 Aug 2016 13:49:19 +0000 (13:49 +0000)]
All four arguments can be omitted by specifying a dash.
While there, remove a superfluous 's'.

discussed with jmc

8 years agoIf reps and steps were omitted, while begin and end were specified,
tb [Fri, 5 Aug 2016 13:43:38 +0000 (13:43 +0000)]
If reps and steps were omitted, while begin and end were specified,
use a default step size of +1 or -1.  Fixes the last two failing
regression tests dhhd and dhhd2.  Adapted from FreeBSD.

'good direction' deraadt

8 years agoIf "%%" appears in the format string, skip it properly.
tb [Fri, 5 Aug 2016 13:33:21 +0000 (13:33 +0000)]
If "%%" appears in the format string, skip it properly.

Part of pjanzen's fixes in r1.8, but was lost in r1.17.
Fixes regression tests wp3, wp4, wp5.

'good direction' deraadt

8 years agoUnmask the timer output signal for real.
kettenis [Fri, 5 Aug 2016 13:31:29 +0000 (13:31 +0000)]
Unmask the timer output signal for real.

ok patrick@, jsg@

8 years agoenable dddd regression test
tb [Fri, 5 Aug 2016 13:24:04 +0000 (13:24 +0000)]
enable dddd regression test

8 years agoInitialize reps, begin, end, steps to their defaults.
tb [Fri, 5 Aug 2016 13:21:31 +0000 (13:21 +0000)]
Initialize reps, begin, end, steps to their defaults.

Makes jot - - - - behave the same way as jot -, jot - - and jot - - -
instead of spurting out zeroes indefinitely.
Fixes the dddd regression test and matches FreeBSD and NetBSD.

From attila () stalphonsos ! com, thanks!
'good direction' deraadt

8 years agoDrop a pointless link carrier check from the RX path.
visa [Fri, 5 Aug 2016 13:18:27 +0000 (13:18 +0000)]
Drop a pointless link carrier check from the RX path.

8 years agoUsing a macro to save 4 chars is mere obfuscation.
jca [Fri, 5 Aug 2016 11:53:23 +0000 (11:53 +0000)]
Using a macro to save 4 chars is mere obfuscation.

8 years agoKill an unused macro
jca [Fri, 5 Aug 2016 11:44:10 +0000 (11:44 +0000)]
Kill an unused macro

...instead of leaving an XXX about it.

8 years agoimxahci(4) needs ahci.c
kettenis [Fri, 5 Aug 2016 11:40:22 +0000 (11:40 +0000)]
imxahci(4) needs ahci.c

8 years agoAdd a -u switch to always log route insertions/deletions.
jca [Fri, 5 Aug 2016 11:38:00 +0000 (11:38 +0000)]
Add a -u switch to always log route insertions/deletions.

Route updates (and associated warnings) are always prefixed with "RTADD"
or "RTDEL".  This is useful for people that previously used the -R
option that got removed.

Tested by Freddy Dissaux.

8 years agoTrigger link state update only on media status updates
mikeb [Fri, 5 Aug 2016 11:37:57 +0000 (11:37 +0000)]
Trigger link state update only on media status updates

8 years agoFixup the condition that prevented heartbeat & co. from attaching
mikeb [Fri, 5 Aug 2016 11:36:24 +0000 (11:36 +0000)]
Fixup the condition that prevented heartbeat & co. from attaching

8 years agoUse tighter pledge(2) restrictions.
jca [Fri, 5 Aug 2016 11:34:51 +0000 (11:34 +0000)]
Use tighter pledge(2) restrictions.

Made possible by the logging overhaul.  Tested by Freddy Dissaux.

8 years agoRework logging.
jca [Fri, 5 Aug 2016 11:32:28 +0000 (11:32 +0000)]
Rework logging.

Use log.c like in many other daemons, with small additions to maintain
a log queue (useful to dump a single log line with several logging
statements).  Use log.c to dump the internal state, and remove the -R
option (a similar feature will be implemented differently soon).

The end goal is to avoid touching the filesystem and use much tighter
pledge(2) restrictions.

Tested by Freddy Dissaux.

8 years agoSwitch from select(2) to poll(2); ok millert@
jca [Fri, 5 Aug 2016 10:34:18 +0000 (10:34 +0000)]
Switch from select(2) to poll(2); ok millert@

No need to check for POLLHUP since those are UDP sockets.

8 years agoshorten the openssl dsa text;
jmc [Fri, 5 Aug 2016 08:12:12 +0000 (08:12 +0000)]
shorten the openssl dsa text;

8 years agogrammar fix;
jmc [Fri, 5 Aug 2016 08:10:51 +0000 (08:10 +0000)]
grammar fix;

8 years agoMake RES_OPTIONS point directly to resolv.conf(5) instead of going through
martijn [Fri, 5 Aug 2016 07:54:15 +0000 (07:54 +0000)]
Make RES_OPTIONS point directly to resolv.conf(5) instead of going through
resolver(3).

OK jmc@

8 years agoCommit in6_selectsrc() split again, with missing assignment fixed.
vgross [Thu, 4 Aug 2016 20:46:24 +0000 (20:46 +0000)]
Commit in6_selectsrc() split again, with missing assignment fixed.

8 years agoDynamically attach ampintc(4) and make it register itself as an interrupt
kettenis [Thu, 4 Aug 2016 15:52:52 +0000 (15:52 +0000)]
Dynamically attach ampintc(4) and make it register itself as an interrupt
controller.  Switch all i.MX6 devices over to the new FDT-aware interrupt
establish API and enable imxgpc(4).

This may break other platforms that use ampintc(4) as their interrupt
controller.  We will fix this as soon as possible by switching them over
to the new interrupt establish API as well.

This also removes the hack in fec(4) to avoid the gpio-based interrupt
workaround.  This commit is an essential step on the road to fix that
issue properly.

ok patrick@, jsg@

8 years agoAdd imxgpc(4), a driver for the i.MX6 General Power Controller (GPC) which
kettenis [Thu, 4 Aug 2016 14:31:50 +0000 (14:31 +0000)]
Add imxgpc(4), a driver for the i.MX6 General Power Controller (GPC) which
acts as a "transparent" interrupt controller.  This driver just hands
interrupt handlers to its parent (the Cortex-A9 GIC).  It doesn't implement
any powermanagement features yet.

ok patrick@

8 years agoAfter fixing up some of the AR8035 PHY registers, issue a reset. This seems
kettenis [Thu, 4 Aug 2016 14:14:05 +0000 (14:14 +0000)]
After fixing up some of the AR8035 PHY registers, issue a reset.  This seems
to fix autonegotiation at 100BaseTX.  Drop the bit of code that powers up
the PHY as the reset should already take care of that.

ok patrick@

8 years agoMention jumbo frames.
visa [Thu, 4 Aug 2016 13:22:20 +0000 (13:22 +0000)]
Mention jumbo frames.

8 years agoAdd support for jumbo frames.
visa [Thu, 4 Aug 2016 13:10:31 +0000 (13:10 +0000)]
Add support for jumbo frames.

8 years agoAdd support for pre-registering interrupts. This allows device drivers to
kettenis [Thu, 4 Aug 2016 12:17:36 +0000 (12:17 +0000)]
Add support for pre-registering interrupts.  This allows device drivers to
establish interrupts before their interrupt controller attaches, solving
dependency problems in various device trees.

Also add support for handing interrupt handlers over to parent interrupt
controllers.

ok jsg@ patrick@ (on an earlier diff)

8 years agoFix an assertion failure that happened when trying to add a page
schwarze [Thu, 4 Aug 2016 09:33:53 +0000 (09:33 +0000)]
Fix an assertion failure that happened when trying to add a page
with makewhatis -d to a completely empty database.
Reported by Mark Patruck <mark at wrapped dot cx>, thanks!

8 years agoadjust database file name and version number to what was committed
schwarze [Thu, 4 Aug 2016 09:18:53 +0000 (09:18 +0000)]
adjust database file name and version number to what was committed

8 years agotpm tweaks;
jmc [Thu, 4 Aug 2016 05:39:28 +0000 (05:39 +0000)]
tpm tweaks;

8 years agoApply a warning fix from lukem@NetBSD circa 1997 (more '()'), and
krw [Wed, 3 Aug 2016 23:37:25 +0000 (23:37 +0000)]
Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and
one from he@NetBSD circa 1998 (more '{}').

Makes gcc happier.

8 years agoApply fix from David Binderman via NetBSD. "Use all 3 of b, p, n
krw [Wed, 3 Aug 2016 23:22:48 +0000 (23:22 +0000)]
Apply fix from David Binderman via NetBSD. "Use all 3 of b, p, n
to determine if route changed".

Spotted by the Echelon team with AppChecker static analyzer.

NetBSD fix pointed out by millert@

8 years agoApply fix from mrouted 3.8 via NetBSD. Our mbone support may
krw [Wed, 3 Aug 2016 23:13:54 +0000 (23:13 +0000)]
Apply fix from mrouted 3.8 via NetBSD. Our mbone support may
be slightly dated.

Spotted by the Echelon team with AppChecker static analyzer.

8 years agomove acpimcfg to keep list sorted
jcs [Wed, 3 Aug 2016 22:50:47 +0000 (22:50 +0000)]
move acpimcfg to keep list sorted

8 years agoreference dwiic here too
jcs [Wed, 3 Aug 2016 22:47:43 +0000 (22:47 +0000)]
reference dwiic here too

8 years agoadd a man page for tpm(4)
jcs [Wed, 3 Aug 2016 22:46:44 +0000 (22:46 +0000)]
add a man page for tpm(4)

8 years agoFix typo, spotted by Holger Mikolon <holger@mikolon.com>
vgross [Wed, 3 Aug 2016 20:45:36 +0000 (20:45 +0000)]
Fix typo, spotted by Holger Mikolon <holger@mikolon.com>

8 years agonot having a century is a known layout by now
jcs [Wed, 3 Aug 2016 17:33:50 +0000 (17:33 +0000)]
not having a century is a known layout by now

8 years agodon't complain about invalid checksum if the bios isn't writing it
jcs [Wed, 3 Aug 2016 17:29:18 +0000 (17:29 +0000)]
don't complain about invalid checksum if the bios isn't writing it
properly, the user isn't going to do anything about it

8 years agoadd a minimal TPM 1.2 driver just to issue a "save state" command
jcs [Wed, 3 Aug 2016 17:23:38 +0000 (17:23 +0000)]
add a minimal TPM 1.2 driver just to issue a "save state" command
before suspending, in order to fix suspend/resume on some newer
machines.

more cleanup and TPM 2.0 support coming later.

earlier version ok pirofti
ok deraadt

8 years agoUse atomic operations to manipulate event masking bits
mikeb [Wed, 3 Aug 2016 17:14:41 +0000 (17:14 +0000)]
Use atomic operations to manipulate event masking bits

8 years agostrnames[i][0] == 'k' && strnames[i][0] == 'f' should be
krw [Wed, 3 Aug 2016 16:32:08 +0000 (16:32 +0000)]
strnames[i][0] == 'k' && strnames[i][0] == 'f' should be
strnames[i][0] == 'k' && strnames[i][1] == 'f'.

Spotted by the Echelon team with AppChecker static analyzer.

millert@ naddy@ and ncurses 6.0 all agree.

8 years agoA couple of "a->blah == a->blah" -> "a->blah == b->blah".
krw [Wed, 3 Aug 2016 16:27:25 +0000 (16:27 +0000)]
A couple of "a->blah == a->blah" -> "a->blah == b->blah".

Spotted by the Echelon team with AppChecker static analyzer.

ok sashan@

8 years agoRemove the periodic timer and do rescheduling during Rx completion
mikeb [Wed, 3 Aug 2016 15:08:06 +0000 (15:08 +0000)]
Remove the periodic timer and do rescheduling during Rx completion

This change adds a check into the Rx ring completion routine that
schedules an interrupt task to be executed immediately after if
consumer index has already advanced itself.  The benefit of doing
this compared to an additional loop after replenishing the ring
(as done in FreeBSD for example) is that first of all this goes
through the loop in the taskqueue thread with a yeild check to
prevent CPU hogging and second is that it triggers Tx completion
as well since interrupt handler runs both.

8 years agoUse an atomic operation to clear pending event bits
mikeb [Wed, 3 Aug 2016 14:55:57 +0000 (14:55 +0000)]
Use an atomic operation to clear pending event bits

Pending event bits are located in a shared memory and are potentially
accessed by multiple CPUs running dom0 and the guest VM.  It appears
that a failure to synchronize changes to this shared memory leads to
race conditions resulting in the guest missing out on notifications.