Re: Remove useless lock around opendir/readdir

2015-03-29 Thread Philip Guenther
On Fri, Mar 27, 2015 at 2:50 AM, Carlos Martín Nieto c...@dwim.me wrote:
 A call to opendir thread-safe and the readdir calls only share the buffer 
 within the same directory stream,
 which is local to this function. Therefore this lock does not buy us anything.

Yep.

Heads up on this, bcook, in case the Windows opendir/readdir emulation
isn't thread-safe (unlikely).


Philip Guenther



libtls: add tls_accept_fds()

2015-03-29 Thread Jan Klemkow
Hi,

this diff adds tls_accept_fds(3) to libtls.  It allows to accept server
side tls connections based on separate file descriptors for read and
write, like tls_connect_fds(3) for client side connections.

I tried to keep this diff similar to tls_connect_fds.  If anything is
wrong just tell me.  I will fix it.

bye,
Jan

Index: Makefile
===
RCS file: /cvs/src/lib/libtls/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile22 Feb 2015 15:09:54 -  1.7
+++ Makefile30 Mar 2015 00:03:51 -
@@ -50,6 +50,7 @@ MLINKS+=tls_init.3 tls_connect_fds.3
 MLINKS+=tls_init.3 tls_connect_servername.3
 MLINKS+=tls_init.3 tls_connect_socket.3
 MLINKS+=tls_init.3 tls_accept_socket.3
+MLINKS+=tls_init.3 tls_accept_fds.3
 MLINKS+=tls_init.3 tls_read.3
 MLINKS+=tls_init.3 tls_write.3
 
Index: tls.h
===
RCS file: /cvs/src/lib/libtls/tls.h,v
retrieving revision 1.11
diff -u -p -r1.11 tls.h
--- tls.h   26 Feb 2015 10:36:30 -  1.11
+++ tls.h   30 Mar 2015 00:03:51 -
@@ -72,6 +72,8 @@ int tls_configure(struct tls *_ctx, stru
 void tls_reset(struct tls *_ctx);
 void tls_free(struct tls *_ctx);
 
+int tls_accept_fds(struct tls *_ctx, struct tls **_cctx, int _fd_read,
+int _fd_write);
 int tls_accept_socket(struct tls *_ctx, struct tls **_cctx, int _socket);
 int tls_connect(struct tls *_ctx, const char *_host, const char *_port);
 int tls_connect_fds(struct tls *_ctx, int _fd_read, int _fd_write,
Index: tls_init.3
===
RCS file: /cvs/src/lib/libtls/tls_init.3,v
retrieving revision 1.18
diff -u -p -r1.18 tls_init.3
--- tls_init.3  22 Feb 2015 15:09:54 -  1.18
+++ tls_init.3  30 Mar 2015 00:03:51 -
@@ -51,6 +51,7 @@
 .Nm tls_connect_servername ,
 .Nm tls_connect_socket ,
 .Nm tls_accept_socket ,
+.Nm tls_accept_fds ,
 .Nm tls_read ,
 .Nm tls_write
 .Nd TLS client and server API
@@ -122,6 +123,8 @@
 .Ft int
 .Fn tls_accept_socket struct tls *tls struct tls **cctx int socket
 .Ft int
+.Fn tls_accept_fds struct tls *tls struct tls **cctx int fd_read int 
fd_write
+.Ft int
 .Fn tls_read struct tls *ctx void *buf size_t buflen size_t *outlen
 .Ft int
 .Fn tls_write struct tls *ctx const void *buf size_t buflen size_t 
*outlen
@@ -180,6 +183,14 @@ file descriptors by calling
 A server can accept a new client connection by calling
 .Fn tls_accept_socket
 on an already established socket connection.
+If an established connection is based on two separate file descriptors for read
+and write a server can also accept a new client connection by calling
+.Fn tls_accept_fds .
+When using
+.Fn tls_accept_fds
+with two different file descriptors, these descriptors will not closed by
+.Fn tls_close .
+They have to be closed separately.
 .Pp
 Two functions are provided for input and output,
 .Fn tls_read
@@ -360,6 +371,16 @@ connects a client context to an already 
 .Fn tls_accept_socket
 creates a new context suitable for reading and writing on an already
 established socket connection and returns it in
+.Fa *cctx .
+A configured server context should be passed in
+.Fa ctx
+and
+.Fa *cctx
+should be initialized to NULL.
+.It
+.Fn tls_accept_fds
+creates a new context suitable for reading and writing on an already
+established connection of a pair of file descriptors and returns it in
 .Fa *cctx .
 A configured server context should be passed in
 .Fa ctx
Index: tls_server.c
===
RCS file: /cvs/src/lib/libtls/tls_server.c,v
retrieving revision 1.5
diff -u -p -r1.5 tls_server.c
--- tls_server.c7 Feb 2015 09:50:09 -   1.5
+++ tls_server.c30 Mar 2015 00:03:51 -
@@ -99,7 +99,7 @@ err:
 }
 
 int
-tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket)
+tls_accept_fds(struct tls *ctx, struct tls **cctx, int fd_read, int fd_write)
 {
struct tls *conn_ctx = *cctx;
int ret, err;
@@ -116,20 +116,23 @@ tls_accept_socket(struct tls *ctx, struc
}
*cctx = conn_ctx;
 
-   conn_ctx-socket = socket;
+   conn_ctx-socket = fd_read == fd_write ? fd_read : -1;
 
if ((conn_ctx-ssl_conn = SSL_new(ctx-ssl_ctx)) == NULL) {
tls_set_error(ctx, ssl failure);
goto err;
}
 
-   if (SSL_set_fd(conn_ctx-ssl_conn, socket) != 1) {
+   if (SSL_set_rfd(conn_ctx-ssl_conn, fd_read) != 1 ||
+   SSL_set_wfd(conn_ctx-ssl_conn, fd_write) != 1) {
tls_set_error(ctx, ssl set fd failure);
goto err;
}
SSL_set_app_data(conn_ctx-ssl_conn, conn_ctx);
}
 
+   fprintf(stderr, SSL_accept\n);
+
if ((ret = SSL_accept(conn_ctx-ssl_conn)) != 1) {

Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Max Fillinger
Thanks a lot for working on this!

I've tested the diff with my USB headphone amp:

uaudio0 at uhub2 port 1 configuration 1 interface 0 Burr-Brown from TI USB Audi
o DAC rev 1.10/1.00 addr 6
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uhidev2 at uhub2 port 1 configuration 1 interface 2 Burr-Brown from TI USB 
Audio DAC rev 1.10/1.00 addr 6
uhidev2: iclass 3/0
uhid1 at uhidev2: input=1, output=0, feature=0


The device works fine as long as it's not on the same hub as my USB
mouse and keyboard. However, when they are on the same hub, and I try to
play a file using aucat, there are crackling noises in the sound, the
USB mouse and keyboard stop responding, and an endless stream of
newlines is printed. The laptop keyboard and trackpad still work. On
the other hand,

$ cat music.wav  /dev/sound1

plays the music without any problems.



patch: safer temp file handling

2015-03-29 Thread Tobias Stoeckmann
Hi,

sent this mail in December, so let's see if somebody will check it now. ;)


The code for temporary file handling in patch is currently rather poor,
leaving possibilities for race conditions while patching files.  Granted,
there is a bug in patch that makes it rather hard to be successfully
exploited as long as /tmp is on its own partition (which is basically
always true, I hope).  Also permissions of the plan b buffer file are
changed from 600 to 644 (i.e. 666 + umask)

Beside of that, patch's output isn't always true when it comes to
rejected files that couldn't be saved as *.rej, i.e. when they are
left in temporary directory.

I'll try to explain this by using this example:

$ cat my.diff
--- a   Sat Dec 13 19:28:53 2014
+++ a~  Sat Dec 13 19:28:58 2014
@@ -1,3 +1,3 @@
 1
-a
+b
 2
--- b   Sat Dec 13 19:29:03 2014
+++ b~  Sat Dec 13 19:29:07 2014
@@ -1,3 +1,3 @@
 2
-a
+c
 3
--- c   Sat Dec 13 20:43:30 2014
+++ c~  Sat Dec 13 20:43:35 2014
@@ -0,0 +1 @@
+c
$ touch a b c
$ sudo mkdir a.rej b.rej
$ patch -i my.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|--- a  Sat Dec 13 19:28:53 2014
|+++ a~ Sat Dec 13 19:28:58 2014
--
Patching file a using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to a.rej
Can't backup a.rej, output is in /tmp/patchr4mBV12Ow1u: Permission denied
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|--- b  Sat Dec 13 19:29:03 2014
|+++ b~ Sat Dec 13 19:29:07 2014
--
Patching file b using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to b.rej
Can't backup b.rej, output is in /tmp/patchr4mBV12Ow1u: Permission denied
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|--- c  Sat Dec 13 20:43:30 2014
|+++ c~ Sat Dec 13 20:43:35 2014
--
Patching file c using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
done
$ cat /tmp/patchr4mBV12Ow1u
$ _

As you can see, the temporary file is empty.  Even if it would be not
empty, it would contain the rejected hunks from files a and b.

The file is empty because the last patch operation on file c was
successful.  Before each file operation, these temporary files are
re-opened; without calling mkstemp() or the like.


The race condition happens if /tmp is on the same partition as the
target files.  Could also be triggered if TMPDIR environmental variable
is adjusted.  After successful operations, the temporary file that
contains the output is rename()'ed, effectively giving an attacker
a time window to put a new file into the old position -- he would
even know the file name to use...


My diff unifies temporary file handling into temp.c.  Also, it avoids
to re-open files by using proper permissions.  In pch.c, it means that
the temporary patch file is opened r+ to be filled with stdin. In
inp.c, the buffer file for plan b is kept open as r+, too...

To test various cases, these calls are of interest:

$ patch -i my.diff# least file operations
$ patch -x 8 -i my.diff# uses TMP_IN for plan b buffer
$ patch  my.diff# uses TMP_PAT for stdin buffer
$ patch -x 8  my.diff# most file operations

Thoughts on this?


Tobias

Index: Makefile
===
RCS file: /cvs/src/usr.bin/patch/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile16 May 2005 15:22:46 -  1.4
+++ Makefile29 Mar 2015 12:18:20 -
@@ -1,6 +1,6 @@
 #  $OpenBSD: Makefile,v 1.4 2005/05/16 15:22:46 espie Exp $
 
 PROG=  patch
-SRCS=  patch.c pch.c inp.c util.c backupfile.c mkpath.c
+SRCS=  patch.c pch.c inp.c util.c backupfile.c mkpath.c temp.c
 
 .include bsd.prog.mk
Index: common.h
===
RCS file: /cvs/src/usr.bin/patch/common.h,v
retrieving revision 1.28
diff -u -p -r1.28 common.h
--- common.h25 Nov 2014 10:26:07 -  1.28
+++ common.h29 Mar 2015 12:18:20 -
@@ -48,6 +48,11 @@
 #define ORIGEXT .orig
 #define REJEXT .rej
 
+#define TMP_OUT 0
+#define TMP_IN 1
+#define TMP_REJ 2
+#define TMP_PAT 3
+
 /* handy definitions */
 
 #define strNE(s1,s2) (strcmp(s1, s2))
@@ -76,9 +81,7 @@ extern char   *outname;
 extern char*origprae;
 
 extern char*TMPOUTNAME;
-extern char*TMPINNAME;
 extern char*TMPREJNAME;
-extern char*TMPPATNAME;
 extern booltoutkeep;
 extern booltrejkeep;
 
Index: inp.c
===
RCS file: /cvs/src/usr.bin/patch/inp.c,v
retrieving revision 1.43
diff -u -p -r1.43 inp.c
--- inp.c   5 Feb 2015 12:59:57 -   1.43
+++ inp.c   29 Mar 2015 12:18:21 -
@@ -44,6 +44,7 @@
 #include util.h
 #include pch.h
 #include inp.h
+#include temp.h
 
 
 /* 

Re: memory leak in wsdisplay.c (during WSDISPLAY_LDFONT)

2015-03-29 Thread Miod Vallat
 The rasops code does call wsfont_add().  Not sure why the vga code
 doesn't do that.  Perhaps miod@ can shed some light on this.

The vga(4) wsdisplay driver does not use wsfont because it was written
assuming its backing store for fonts will always be the vga memory.

And since this was written before suspend/resume, it was written
assuming font memory would always be preserved (either untouched or
restored upon X exiting). This is apparently no longer the case, so this
will need fixing.

 If it is indeed inappropriate for the vga code to call wsfont_add(),
 then the vga code should probably free the font data.

I'll settle with the vga driver keeping track of the font data for now.
I'll have a look at migrating it towards wsfont as well.



Re: UPDATE: xkeyboard-config 2.14

2015-03-29 Thread Matthieu Herrb
On Sun, Feb 08, 2015 at 03:10:45PM +0500, Alexandr Shadchin wrote:
 Hi,
 
 This diff updates xkeyboard-config to the latest release.
 Tested on amd64.
 
 Comments ? OK ?
 

ok matthieu@. (tested on amd64 with a sun kbd).

-- 
Matthieu Herrb



Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Fabian Raetz
On Sat, Mar 28, 2015 at 11:29:11AM +0100, Martin Pieuchot wrote:
 With the increasing number of machines shipping with rate-matching
 hubs instead of companion controllers to support USB Full and Low-
 speed devices, a number of people asked me if it was possible to
 add support for Full-speed isochronous transfers in order to use
 USB1.1 uaudio(4) devices with ehci(4)-only systems.
 
 The diff below does that.  It also contain some cleanups for the
 High-speed isochronous code and plug some memory leaks for free.
 
 Please let me know how it goes with 1.1 and 2.0 devices.
 

Hi,

i've done some testing over the weekend and as far as i can tell,
it worked great so far.

uaudio0 at uhub3 port 2 configuration 1 interface 0 Logitech Logitech USB 
Headset rev 1.10/1.30 addr 4
uaudio0: audio rev 1.00, 4 mixer controls
audio1 at uaudio0

Tests include:
 - playback/recording with aucat(1)
 - playing sounds/videos via AUDIODEVICE={r,}snd/1 and as snd/0 with
- firefox/chrome
- mpv/vlc


Probably unrelated to your diff but i problems with mpv
while watching some video streams from twitch.tv

When used as below, the audio output was slowed down.
---
$ AUDIODEVICE=rsnd/1 mpv http://www.twitch.tv/gfinitytv
Playing: http://www.twitch.tv/gfinitytv
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
AO: [sndio] 44100Hz stereo 2ch s16
[mixer] Hardware volume control unavailable.
[mixer] Hardware volume control unavailable.
VO: [opengl] 1280x720 yuv420p
AV: 00:00:44 A-V:  0.000 Dropped: 4 Cache:  1s+0KB
[ffmpeg] ?: skipping 1 segments ahead, expired from playlists
AV: 00:00:46 A-V: -0.000 Dropped: 4 Cache:  3s+0KB


   *
    Audio/Video desynchronisation detected! 
   *

This means either the audio or the video is played too slowly.
Possible reasons, problems, workarounds:
- Your system is simply too slow for this file.
 Transcode it to a lower bitrate file with e.g. mpv encoding support.
- Slow video output.
 Try a different --vo driver (--vo=help for a list). Make sure framedrop
 is not disabled, or experiment with different values for --framedrop.
- Playing from a slow network source.
 Download the file instead.
- Try to find out whether audio/video/subs are causing this by experimenting
  with --no-video, --no-audio, or --no-sub.
- If you switched audio or video tracks, try seeking to force synchronization.
If none of this helps you, file a bug report.

AV: 00:00:46 A-V:  3.947 ct:  0.418 Dropped: 4 Cache:  1s+0KB
---

I'm not an audio expert but could it have something to with the
play.rate of my headset is only capable of max 32000?

When watching the same stream with vlc, all worked fine.


Anyway, thanks for this diff!

Cheers,
Fabian

audioctl -f /dev/audio1
---
name=USB audio
encodings=slinear_le:16:2:1
properties=full_duplex,independent
hiwat=10
lowat=7
mode=play
play.rate=32000
play.channels=2
play.precision=16
play.bps=2
play.msb=1
play.encoding=slinear_le
play.samples=0
play.pause=0
play.active=0
play.block_size=6400
play.errors=0
record.rate=32000
record.channels=2
record.precision=16
record.bps=2
record.msb=1
record.encoding=slinear_le
record.samples=0
record.pause=0
record.active=0
record.block_size=6400
record.errors=0

mixerctl -f /dev/mixer1
---
outputs.spkr.mute=off
outputs.spkr=255,255
record.mic.mute=off
record.mic=248

dmesg
---

OpenBSD 5.7-current (GENERIC.MP) #4: Sat Mar 28 12:52:22 CET 2015
mis...@junk.fritz.box:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3849830400 (3671MB)
avail mem = 3729293312 (3556MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdabd5000 (68 entries)
bios0: vendor LENOVO version H3ET70WW(1.07) date 12/12/2012
bios0: LENOVO 3354DSG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT HPET APIC MCFG SLIC FPDT ASF! SSDT SSDT UEFI 
UEFI MSDM UEFI DBG2
acpi0: wakeup devices P0P1(S4) GLAN(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S4) 
PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.44 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) 

Re: memory leak in wsdisplay.c (during WSDISPLAY_LDFONT)

2015-03-29 Thread Miod Vallat
 vesa has a different problem, that i was going to report to bugs@ after some
 more investigation to see if i could fix it, but i think that problem may
 indirectly relate to this. what happens is that when i run X, it garbled any
 fonts i have loaded via wsfontload. while X is running, if i switch to a
 screen using a loaded font, there are broken lines running thru the middle
 of where there should be text. when X exits, cells on the screen are either
 empty or full. if i reload the font, and switch to a running X, it garbles
 it again.
 
 my solution to this was to implement WSDISPLAY_DELFONT (as 'wsfontload -d N')
 to delete and then reload the font in a script, which has been working for me,
 even if it is an ugly solution. but i wonder, if instead the solution to that
 problem may be to reload the fonts after a switch, since i think vesa may be
 using that memory, and thus maybe the font data SHOULD be saved.
 
 maybe this vesa problem is unrelated, but if it is related it would have a
 bearing on the current issue.

A better fix would be to restore fonts, in addition to the textmode
colour palette, in vga_ioctl() in the WSDISPLAYIO_SMODE handler.

This should also probably been done in vga_restore_state() in
dev/pci/vga_pci.c as well.



Re: wsdisplay.4: document IOCTLs

2015-03-29 Thread Miod Vallat
 there were a number of common IOCTLs that weren't documented. i read the
 code pretty thoroughly to make sure everything here is correct. there are
 some things i don't know, like what 'stride' is. currently it just mentions
 that it should be 1 for VGA. i read into the rasops code as far as i could,
 but it's much less straightforward than the vga code, so there are a few
 things undocumented there.

Thanks! I've filled in the blanks and commited this.



UPDATE: xf86-input-synaptics 1.8.2

2015-03-29 Thread Alexandr Shadchin
Hi,

This diff updates xf86-input-synaptics to the latest release.
Tested on amd64.

Comments ? OK ?

-- 
Alexandr Shadchin

Index: ChangeLog
===
RCS file: /cvs/xenocara/driver/xf86-input-synaptics/ChangeLog,v
retrieving revision 1.9
diff -u -p -r1.9 ChangeLog
--- ChangeLog   24 Jan 2015 17:43:59 -  1.9
+++ ChangeLog   29 Mar 2015 11:26:05 -
@@ -1,3 +1,70 @@
+commit 6f8d4bac14ac8f3fd2714f0a8a9e37c5136a4013
+Author: Peter Hutterer peter.hutte...@who-t.net
+Date:   Fri Mar 27 11:26:55 2015 +1000
+
+synaptics 1.8.2
+
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+
+commit 15caf2b53407379f8e677d48a022f4b46b97d83a
+Author: Peter Hutterer peter.hutte...@who-t.net
+Date:   Tue Mar 24 15:41:39 2015 +1000
+
+eventcomm: ignore fake and broken MT devices
+
+An MT device without X/Y is not a touchpad. And neither are fake MT 
devices.
+
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+Reviewed-by: Hans de Goede hdego...@redhat.com
+(cherry picked from commit fc9f490a2c87e6f87b0f483cd6bf5f526dddbb8d)
+
+commit ef8daaf696584f7c1d3e9f192de18b5b9f923bdc
+Author: Peter Hutterer peter.hutte...@who-t.net
+Date:   Mon Mar 23 11:38:15 2015 +1000
+
+eventcomm: prevent possibly division by zero
+
+This came up as a kernel bug, but it's valid to create uinput devices with 
a
+min == max range for x/y. Technically valid, but effectively useless, so 
catch
+it, complain and hobble on along.
+
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+Reviewed-by: Hans de Goede hdego...@redhat.com
+(cherry picked from commit 30866b97be6939b895327b930154ef758eed7ff8)
+
+commit 90c6d7fc60f3db1bd9db1c7702062fcaef3b3352
+Author: Gabriele Mazzotta gabriele@gmail.com
+Date:   Thu Jan 15 22:04:17 2015 +0100
+
+Add a delay between the second button down-up event of double taps
+
+Some applications ignore the second tap of double taps because of the
+lack of a delay between the button down and button up events.
+
+Prevent this by replacing the transition from TS_2B to TS_START with a
+transition from TS_2B to TS_SINGLETAP that emits only a button down
+event. The button up event will be emitted when transitioning from
+TS_SINGLETAP to TS_START.
+
+In addition, decrease the default value of MaxDoubleTapTime from 180 ms
+to 100 ms in order to make double taps faster.
+
+Signed-off-by: Gabriele Mazzotta gabriele@gmail.com
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+(cherry picked from commit 37d34f0356cc556dd8a49ec5d1ed64d49417a9b2)
+
+commit 649b77f0ce617fd1ec073b281636e304e80b56c0
+Author: Gabriele Mazzotta gabriele@gmail.com
+Date:   Thu Jan 15 22:04:16 2015 +0100
+
+Update machine state diagram
+
+The diagram didn't entirely reflect the current state of the code.
+
+Signed-off-by: Gabriele Mazzotta gabriele@gmail.com
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+(cherry picked from commit a357647d3fb918b94efbda98138fb0240a949ef2)
+
 commit d50c4bab8ae2836a0f38b29a5d22be2e950e4d08
 Author: Peter Hutterer peter.hutte...@who-t.net
 Date:   Thu Sep 18 07:40:13 2014 +1000
Index: Makefile.in
===
RCS file: /cvs/xenocara/driver/xf86-input-synaptics/Makefile.in,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.in
--- Makefile.in 15 Jan 2015 01:30:40 -  1.10
+++ Makefile.in 29 Mar 2015 11:26:05 -
@@ -74,8 +74,8 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/xorg-synaptics.pc.in $(top_srcdir)/configure COPYING \
-   ChangeLog INSTALL config.guess config.sub depcomp install-sh \
-   ltmain.sh missing
+   ChangeLog INSTALL compile config.guess config.sub depcomp \
+   install-sh ltmain.sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
Index: compile
===
RCS file: compile
diff -N compile
--- /dev/null   1 Jan 1970 00:00:00 -
+++ compile 29 Mar 2015 11:26:05 -
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey tro...@cygnus.com.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 

sort output file permissions

2015-03-29 Thread Alexander Bluhm
Hi,

While doing make makesum in the ports framework, I realized that
the distinfo file always gets permissions 0600.  It uses sort -o
in a way that the output file will overwrite the input file.  In
this case, sort creates a temp file with 0600 and replaces the
output file at the end.

I would like semantics where the permissions are preserved.  So in
case of overwriting a file, use the minimum of umask and original
permissions.  While there, prevent overwriting files without write
access.

comment/ok?

bluhm

Index: usr.bin/sort/sort.c
===
RCS file: /data/mirror/openbsd/cvs/src/usr.bin/sort/sort.c,v
retrieving revision 1.48
diff -u -p -r1.48 sort.c
--- usr.bin/sort/sort.c 20 Mar 2015 23:04:07 -  1.48
+++ usr.bin/sort/sort.c 29 Mar 2015 18:16:19 -
@@ -1194,6 +1194,17 @@ main(int argc, char *argv[])
}
 
if (real_outfile) {
+   struct stat sb;
+   mode_t mask;
+
+   if (stat(real_outfile, sb)  0)
+   err(2, %s, real_outfile);
+   if (access(real_outfile, W_OK)  0)
+   err(2, write %s, real_outfile);
+   mask = umask(0);
+   umask(mask);
+   chmod(outfile, sb.st_mode  ~mask  (S_IRWXU|S_IRWXG|S_IRWXO));
+
unlink(real_outfile);
if (rename(outfile, real_outfile)  0)
err(2, %s, real_outfile);



Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Christian Weisgerber
Stuart Henderson:

 The diff functions for me in letting audio play, but there are some
 weird scratchy noises on one channel when music is playing, I'll have
 to dig out another machine to try the ua-1ex on on and see if it
 happens there too

I'm seeing, uh, hearing some problems if there are other devices
on the same USB bus.

-- 
Christian naddy Weisgerber  na...@mips.inka.de



Re: [PATCH] pcap manpages

2015-03-29 Thread Jan Stary
The diff below fixes what seem to be errors in pcap.3,
either in factuality or markup or grammar.

Jan



--- pcap.3.orig Sun Mar 29 22:06:49 2015
+++ pcap.3  Sun Mar 29 22:16:50 2015
@@ -169,7 +169,7 @@ at packets on the network.
 .Fa source
 is a string that specifies the network device to open.
 .Fa snaplen
-specifies the maximum number of bytes to capture.
+specifies the maximum number of bytes to capture from one packet.
 .Fa promisc
 specifies if the interface is to be put into promiscuous mode.
 (Note that even if this parameter is false, the interface
@@ -209,7 +209,7 @@ for writing.
 The name
 .Ql -
 is a synonym for
-.Dv stdin .
+.Dv stdout .
 .Dv NULL
 is returned on failure.
 .Fa p
@@ -229,7 +229,7 @@ can be used to get the error text.
 .Pp
 .Fn pcap_dump_fopen
 allows the use of savefile functions on the already-opened stream
-.Dq f .
+.Fa f .
 .Pp
 .Fn pcap_lookupdev
 returns a pointer to a network device suitable for use with
@@ -276,7 +276,7 @@ pointer which is passed in from
 .Fn pcap_dispatch ,
 a pointer to the
 .Fa pcap_pkthdr
-struct (which precede the actual network headers and data),
+struct (which precedes the actual network headers and data),
 and a
 .Fa u_char
 pointer to the packet data.
@@ -351,7 +351,7 @@ return when live read timeouts occur.
 Rather, specifying a non-zero read timeout to
 .Fn pcap_open_live
 and then calling
-.Fn pcap_dispatch
+.Fn pcap_loop
 allows the reception and processing of any packets that arrive when the
 timeout occurs.
 A negative
@@ -490,10 +490,11 @@ It is typically used when just using libpcap for compi
 .Pp
 .Fn pcap_fopen_offline
 may be used to read dumped data from an existing open stream
-.Dq fp .
+.Fa fp .
 .Pp
 .Fn pcap_lib_version
 returns a string describing the version of libpcap.
+.Pp
 .Fn pcap_datalink_val_to_name
 and
 .Fn pcap_datalink_val_to_description



Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Christian Weisgerber
Martin Pieuchot:

 Please let me know how it goes with 1.1 and 2.0 devices.

Playing audio works in principle with the three USB-S/PDIF audio
dongles I have here.

When I tried two audio dongles simultaneously on the same USB bus,
it worked for 44.1 kHz, but audio was distored if one or both ran
at 48 kHz.  When I put one dongle on the same bus with a keyboard,
there were crackling noises in the audio output.


port 5 addr 3: full speed, power 500 mA, config 1, USB Sound Device(0x0104), 
C-Media INC.(0x0d8c), rev 0.10
port 6 addr 4: full speed, power 20 mA, config 1, USB Audio DAC(0x2704), 
Burr-Brown from TI(0x08bb), rev 1.00
port 6 addr 4: full speed, power 500 mA, config 1, HA INFO U2 USB TO 
SPDIF(0x5050), HA INFO(0x1852), rev 0.01

uaudio0 at uhub4 port 5 configuration 1 interface 0 C-Media INC. USB Sound 
Device rev 1.10/0.10 addr 3
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uhidev4 at uhub4 port 5 configuration 1 interface 2 C-Media INC. USB Sound 
Device rev 1.10/0.10 addr 3
uhidev4: iclass 3/0
uhid2 at uhidev4: input=3, output=0, feature=0

uaudio1 at uhub4 port 6 configuration 1 interface 0 Burr-Brown from TI USB 
Audio DAC rev 1.10/1.00 addr 4
uaudio1: audio rev 1.00, 2 mixer controls
audio2 at uaudio1
uhidev5 at uhub4 port 6 configuration 1 interface 2 Burr-Brown from TI USB 
Audio DAC rev 1.10/1.00 addr 4
uhidev5: iclass 3/0
uhid3 at uhidev5: input=1, output=0, feature=0

uhidev5 at uhub4 port 6 configuration 1 interface 0 HA INFO HA INFO U2 USB TO 
SPDIF rev 1.10/0.01 addr 4
uhidev5: iclass 3/0
uhid3 at uhidev5: input=18, output=27, feature=0
uaudio1 at uhub4 port 6 configuration 1 interface 1 HA INFO HA INFO U2 USB TO 
SPDIF rev 1.10/0.01 addr 4
uaudio1: ignored setting with type 8193 format
uaudio1: audio rev 1.00, 2 mixer controls
audio2 at uaudio1

-- 
Christian naddy Weisgerber  na...@mips.inka.de



Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Stuart Henderson
On 2015/03/29 19:00, Fabian Raetz wrote:
 Probably unrelated to your diff but i problems with mpv
 while watching some video streams from twitch.tv
 
 When used as below, the audio output was slowed down.
[..]
 AO: [sndio] 44100Hz stereo 2ch s16
..
 I'm not an audio expert but could it have something to with the
 play.rate of my headset is only capable of max 32000?

Yes, you need to use sndiod if you have to convert sample rates.

The diff functions for me in letting audio play, but there are some
weird scratchy noises on one channel when music is playing, I'll have
to dig out another machine to try the ua-1ex on on and see if it
happens there too (last time I used it was on a USB1 machine where
it did work ok).

OpenBSD 5.7-current (GENERIC.MP) #80: Sat Mar 28 12:34:52 GMT 2015
st...@symphytum.spacehopper.org:/sys/arch/amd64/compile/GENERIC.MP
real mem = 8477306880 (8084MB)
avail mem = 8216530944 (7835MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec400 (90 entries)
bios0: vendor Dell Inc. version A04 date 07/20/2014
bios0: Dell Inc. PowerEdge T20
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SLIC LPIT SSDT SSDT SSDT HPET SSDT MCFG SSDT 
ASF! DMAR
acpi0: wakeup devices PS2K(S3) PS2M(S3) UAR1(S3) PXSX(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) PXSX(S4) 
RP07(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.63 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP02)
acpiprt3 at acpi0: bus 4 (RP03)
acpiprt4 at acpi0: bus -1 (PEG0)
acpiprt5 at acpi0: bus -1 (PEG1)
acpiprt6 at acpi0: bus -1 (PEG2)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C1, PSS
acpicpu1 at acpi0: C1, PSS
acpicpu2 at acpi0: C1, PSS
acpicpu3 at acpi0: C1, PSS
acpitz0 at acpi0: critical temperature is 105 degC
acpitz1 at acpi0: critical temperature is 105 degC
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3392 MHz: speeds: 3201, 3200, 3000, 2900, 2700, 2500, 
2300, 2200, 2000, 1800, 1700, 1500, 1300, 1100, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel Xeon E3-1200 v3 Host rev 0x06
vga1 at pci0 dev 2 function 0 Intel HD Graphics P4600 rev 0x06
intagp at vga1 not configured
inteldrm0 at vga1
drm0 

Re: bounds checks in aml_rwgas

2015-03-29 Thread Jonathan Matthew
On Sat, Mar 28, 2015 at 11:27:30PM +1000, Jonathan Matthew wrote:
 
 The diff below fixes a uvm fault I'm seeing when booting an MP kernel on a
 hp bc2500 blade, somewhere during acpi attach.

Another interesting thing here is that a 5.7ish bsd.rd crashes a bit earlier
(after attaching ioapic0, from what I remember) but the current snapshot bsd.rd
works.  I'm guessing this is due to the recent #ifndef SMALL_KERNEL changes in
acpi.

Also, here's a full dmesg:

OpenBSD 5.7-current (GENERIC.MP) #7: Sat Mar 28 18:02:17 AEST 2015

j...@hp-blade-1-2.eait.uq.edu.au:/home/jono/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4142628864 (3950MB)
avail mem = 4013219840 (3827MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xed5f0 (38 entries)
bios0: vendor Hewlett-Packard version 786E5 v02.14 date 08/06/2008
bios0: Hewlett-Packard HP Blade PC bc2500
acpi0 at bios0: rev 0
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET
acpi0: wakeup devices PCI0(S4) IGFX(S4) PCX1(S4) PCX2(S4) PCX3(S4) HUB_(S4) 
PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 3000+, 1596.23 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 3000+, 1596.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,3DNOWP
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-64
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (IGFX)
acpiprt2 at acpi0: bus 32 (PCX1)
acpiprt3 at acpi0: bus 63 (PCX2)
acpiprt4 at acpi0: bus -1 (PCX3)
acpiprt5 at acpi0: bus 4 (HUB_)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpibtn0 at acpi0: PBTN
acpibtn1 at acpi0: SBTN
cpu0: PowerNow! K8 1596 MHz: speeds: 1600 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 ATI RS690 Host rev 0x00
ppb0 at pci0 dev 1 function 0 ATI RS690 PCIE rev 0x00
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 5 function 0 ATI Radeon X1250 IGP rev 0x00
drm0 at radeondrm0
radeondrm0: msi
ppb1 at pci0 dev 4 function 0 ATI RS690 PCIE rev 0x00: msi
pci2 at ppb1 bus 32
bge0 at pci2 dev 0 function 0 Broadcom BCM5906M rev 0x02, BCM5906 A2 
(0xc002): msi, address 00:21:5a:63:e5:b5
brgphy0 at bge0 phy 1: BCM5906 10/100baseTX PHY, rev. 0
ppb2 at pci0 dev 5 function 0 ATI RS690 PCIE rev 0x00: msi
pci3 at ppb2 bus 63
bge1 at pci3 dev 0 function 0 Broadcom BCM5906M rev 0x02, BCM5906 A2 
(0xc002): msi, address 00:21:5a:63:ed:86
brgphy1 at bge1 phy 1: BCM5906 10/100baseTX PHY, rev. 0
ahci0 at pci0 dev 18 function 0 ATI SB600 SATA rev 0x00: apic 2 int 22, AHCI 
1.1
ahci0: port 0: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, ST980814AS, 3.CH SCSI3 0/direct fixed 
t10.ATA_ST980814AS_5QY12MCV_
sd0: 76319MB, 512 bytes/sector, 156301488 sectors
ohci0 at pci0 dev 19 function 0 ATI SB600 USB rev 0x00: apic 2 int 16, 
version 1.0, legacy support
ehci0 at pci0 dev 19 function 5 ATI SB600 USB2 rev 0x00: apic 2 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 ATI EHCI root hub rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 ATI SBx00 SMBus rev 0x14: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
pciide0 at pci0 dev 20 function 1 ATI SB600 IDE rev 0x00: DMA, channel 0 
configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 2 int 16 for native-PCI interrupt
pcib0 at pci0 dev 20 function 3 ATI SB600 ISA rev 0x00
ppb3 at pci0 dev 20 function 4 ATI SB600 PCI rev 0x00
pci4 at ppb3 bus 4
pchb1 at pci0 dev 24 function 0 AMD AMD64 0Fh HyperTransport rev 0x00
pchb2 at pci0 dev 24 function 1 AMD AMD64 0Fh Address Map rev 0x00
pchb3 at pci0 dev 24 function 2 AMD AMD64 0Fh DRAM Cfg rev 0x00
kate0 at pci0 dev 24 function 3 AMD AMD64 0Fh Misc Cfg rev 0x00: core rev 
BH-G2
usb1 at ohci0: USB