From owner-freebsd-arch@FreeBSD.ORG Sun Jun 15 16:04:28 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF361065670 for ; Sun, 15 Jun 2008 16:04:28 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id A8F978FC14 for ; Sun, 15 Jun 2008 16:04:27 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id m5FFWhas014952; Sun, 15 Jun 2008 17:32:43 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id m5FFWgX5014951; Sun, 15 Jun 2008 17:32:42 +0200 (CEST) (envelope-from marius) Date: Sun, 15 Jun 2008 17:32:42 +0200 From: Marius Strobl To: Benno Rice Message-ID: <20080615153242.GA14902@alchemy.franken.de> References: <2DF4DB2C-D2F4-4558-80B8-C92B3A60865C@jeamland.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2DF4DB2C-D2F4-4558-80B8-C92B3A60865C@jeamland.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-arch@freebsd.org Subject: Re: Function to get address within SYS_RES_MEM resource? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 16:04:28 -0000 On Fri, Jun 13, 2008 at 04:09:10PM +1000, Benno Rice wrote: > Hi, > > I'm currently working on porting dmover(9) from NetBSD in order to > support the DMA controller on the PXA255. I believe some others are > eyeing dmover off to support other similar components. > > For those that haven't heard of it, dmover is an API for controlling > hardware data movers. NetBSD's man page is here: > > http://netbsd.gw.com/cgi-bin/man-cgi?dmover > > Currently, dmover supports two types of buffers, in-kernel linear > memory ranges and uio buffers. For the task I want to use it for, I > need to add a third, which is a static address and width or possibly a > SYS_RES_MEM resource with an offset and width. The task in question > is copying a packet out of an ethernet controller via PIO. > > Currently I'm doing this using bus_read_multi_2. In the software > dmover backend I could easily implement this using bus_read_multi_* as > well. However once I try to offload it to the hardware, I need to be > able to get at the physical address that this ends up reading from. > > My current idea in this regard is to add a new bus_space function > along the lines of: > > void *bus_space_address(bus_space_tag_t, bus_space_handle_t, > bus_size_t offset); > > This function would return a pointer to the relevant _virtual_ > address, or NULL if such a thing is not possible. Another option > would be: > > int bus_space_address(bus_space_tag_t, bus_space_handle_t, bus_size_t > offset, void **addr); > > which could return an errno value on failure. > > This could be shortened to bus_address(struct resource *, bus_size_t > offset) in the same way as other > bus_space_* functions. > > I could then turn that into a physical address, either via bus_dma or > pmap, and then feed it to the DMAC. > > I'm also quite willing to be told that there's already an obvious way > to do this and I should use that instead. =) > If you can add the offset on your own I think you can use rman_get_virtual(9) for this (which requires f.e. nexus(4) to do a rman_set_virtual(9) though). Marius From owner-freebsd-arch@FreeBSD.ORG Mon Jun 16 11:06:51 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A69B010656CA for ; Mon, 16 Jun 2008 11:06:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA528FC1E for ; Mon, 16 Jun 2008 11:06:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5GB6pdb036656 for ; Mon, 16 Jun 2008 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5GB6oWv036652 for freebsd-arch@FreeBSD.org; Mon, 16 Jun 2008 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 16 Jun 2008 11:06:50 GMT Message-Id: <200806161106.m5GB6oWv036652@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 11:06:51 -0000 Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon Jun 16 19:01:31 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65E8B106566B; Mon, 16 Jun 2008 19:01:31 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 0836A8FC0A; Mon, 16 Jun 2008 19:01:31 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 1629C1CDB6; Mon, 16 Jun 2008 20:56:32 +0200 (CEST) Date: Mon, 16 Jun 2008 20:56:32 +0200 From: Ed Schouten To: FreeBSD Arch , FreeBSD Current Message-ID: <20080616185632.GY1176@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7fkNIgappiT1g8BG" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: MPSAFE TTY layer - Testers? Reviews? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 19:01:31 -0000 --7fkNIgappiT1g8BG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, I hope almost everyone by now knows I'm working on a new MPSAFE TTY layer for our FreeBSD kernel. A lot has happened since I started hacking (14 Feb). Right now my TTY layer is quite functional. There are still some things that are missing, but I think it's very realistic to have this in the base system before 8.0-RELEASE. This is my first public Call for {Testers,Reviews}. To be precise, I'm interested in a couple of things: - "Works for me"'s. The code should be quite robust, but it's possible I missed a thing or two. I would really appreciate it if I could get some other people to test this code. So far, all my applications work like they should, but you can't be too sure. - Feedback on the overall design of the TTY layer - the `high level' stuff. - Feedback on the smaller details of the code. style(9), logical errors, you name it. - Patches for drivers that still need to be ported. There are still some drivers that I haven't ported to the new TTY layer, mainly because I don't own the actual hardware. The patchset I've developed is available at the following location. The file at the bottom is the latest version. It should survive `make universe', except for the sun4v and ia64 architectures. Be sure to boot the new kernel before running `make installworld'. http://www.il.fontys.nl/~ed/projects/mpsafetty/patches/ Below is a list of TODO items: - The sio(4), cy(4), digi(4), ubser(4), uftdi(4), nmdm(4), ng_h4(4), ng_tty(4), sl(4), ppp(4), snp(4), rp(4), rc(4), si(4), umodem(4), dcons(4), IA64 SKI console driver and Sun4V console driver have not been ported yet. ucom(4) also needs to be polished. sio(4) should be replaced by uart(4). Help wanted. - There is no `zombie state' yet; when a disconnect occurs, proper signals are set the session leader, but according to POSIX, we should return 0 byte read()'s then. Support for IXOFF is also missing. - The manual pages are not up-to-date. - PTY's `packet mode' still has to be implemented properly. - The new TTY layer provides a fallback mechanism to allow drivers that use Giant to still work. I had to make some changes to kern_mutex.c, to allow condvar(9) to work with Giant, but this is not ideal. Any ideas here? It would be foolish if I would ask people to review this code, without actually giving a little background: One of the (in my opinion) bad things about the existing TTY code, is that it is not a front-end for device drivers. Many drivers create the TTY device nodes themselves, implement their own cdev routines, etc. My MPSAFE TTY layer only allows device nodes to be created through the TTY layer itself. This means each TTY created by the TTY layer implements a generic behaviour to user processes. Even the PTY driver is no more different than any other driver. All drivers just supply a structure with hooks (struct ttydevsw). Another important structures inside the TTY layer are `ttyinq' and `ttyoutq'. Unlike the existing code, this TTY layer does not use clists to store data. The advantage here is that these queues are better tailored to our requirements. Both queues support unbuffered copying back to userspace, O(1) line termination, etc. I've also rewritten the PTY drivers. We now have two drivers, pts(4) and ptycompat(4). The first driver implements UNIX98 PTY device names (/dev/pts/%u), while ptycompat(4) supports the traditional device naming. The pts(4) driver is compatible with FreeBSD -CURRENT and Linux binaries, while the ptycompat(4) driver should be uses with RELENG_7 and older. PTY's should be removed from the system properly. This means pstat(8) whill now only show PTY's that are actually being used. If there are any more questions, I would be happy to answer them. I think it would be great if we could eventually get this integrated. This will make it possible to make a lot more drivers MPSAFE (i.e. the input layer). Yours, --=20 Ed Schouten WWW: http://80386.nl/ --7fkNIgappiT1g8BG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhWt2AACgkQ52SDGA2eCwWElACZAetXlRYQ3kHze1hXEP+D0jJH 6cEAnRPSu8SW+2k1VySdKha3OSIxDDKC =skXD -----END PGP SIGNATURE----- --7fkNIgappiT1g8BG-- From owner-freebsd-arch@FreeBSD.ORG Tue Jun 17 16:08:08 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AD91065673; Tue, 17 Jun 2008 16:08:08 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 836778FC28; Tue, 17 Jun 2008 16:08:08 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 890001CC63; Tue, 17 Jun 2008 18:02:40 +0200 (CEST) Date: Tue, 17 Jun 2008 18:02:40 +0200 From: Ed Schouten To: Andrzej Tobola Message-ID: <20080617160240.GF1176@hoeg.nl> References: <20080616185632.GY1176@hoeg.nl> <20080617154914.GA19455@amp2.iem.pw.edu.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xB1oOl40AZk3Y01T" Content-Disposition: inline In-Reply-To: <20080617154914.GA19455@amp2.iem.pw.edu.pl> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Arch , FreeBSD Current Subject: Re: MPSAFE TTY layer - Testers? Reviews? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 16:08:08 -0000 --xB1oOl40AZk3Y01T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Andrzej, (CC'ing this back to the list, to make sure other people don't experience the same problem) * Andrzej Tobola wrote: > Applield for your patch, rebuild world on -curent amd64, but can't > build kernel: I forgot to tell. You should replace this line: device pty by this: device pts device ptycompat I already changed this in GENERIC, which means it should already build right out of the box. Good luck! --=20 Ed Schouten WWW: http://80386.nl/ --xB1oOl40AZk3Y01T Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhX4CAACgkQ52SDGA2eCwXLRQCeKk0kYVSf26IJYj5xXLr9Seb6 2e4Anik8A0qX+LXafTPVyfgBIjoXCOc0 =G7Zw -----END PGP SIGNATURE----- --xB1oOl40AZk3Y01T-- From owner-freebsd-arch@FreeBSD.ORG Wed Jun 18 09:56:56 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE9901065674 for ; Wed, 18 Jun 2008 09:56:56 +0000 (UTC) (envelope-from helen@nstnetwork.com) Received: from Linux-Mail.com (mail.kwww.net [61.129.70.140]) by mx1.freebsd.org (Postfix) with ESMTP id A3B628FC25 for ; Wed, 18 Jun 2008 09:56:56 +0000 (UTC) (envelope-from helen@nstnetwork.com) Received: from nstserver (unknown [121.34.196.142]) by Linux-Mail.com (Postfix) with ESMTP id C45311A86A1 for ; Wed, 18 Jun 2008 17:58:26 +0800 (CST) From: "helen@nstnetwork.com" To: arch@freebsd.org Date: Wed, 18 Jun 2008 16:57:51 +0800 Message-Id: <20080618095826.C45311A86A1@Linux-Mail.com> Cc: Subject: Sell Cisco Systems equipment items X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: helen@nstnetwork.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2008 09:56:57 -0000 Hello: We are specialized in new network products, including switch, firewall, router, GBIC,SFP,WIC,cables etc... We provide high quality products and the most reasonable price with professional services to our customers. So if you are interested in any of our products, please contact with me,we will try our best for you,thanks! example of the products: CWDM-SFP-1G 39dB (Ultra long-haul)--1510nm,1530nm,1550nm,1570nm,1590nm,1610nm WS-G5483, WS-G5487, WS-G5484, WS-G5486, GLC-SX-MM, GLC-LH-SM, GLC-ZX-SM, GLC-T, ...... NM-2FE2W-T1, NM-2FE2W-E1, NM-2FE2W-V2, WIC-1T, WIC-2T, WIC-2A/S, WIC-1B/ST, WIC-1ENET, VWIC-1MFT-T1, VWIC-1MFT-E1, VWIC-2MFT-T1, VWIC-2MFT-E1, VWIC-1MFT-G703, VWIC-2MFT-G703, VWIC-1MFT-T1-DI, VWIC-2MFT-T1-DI, NM-1E, NM-4E, ...... WS-C2950-24, WS-C2950T-24, WS-C2950G-24-EI, WS-C2950G-48-EI, ...... CONSOLE CABLE, CAB-STACK-1M/3M, CAB-V35MT, CAB-V35FC, CAB-SS-V.35MT, CAB-SS-V.35FC, CAB-SS-232MT, CAB-SS-232FC, CAB-232MT, CAB-232FC, CAB-SS-X21MT, CAB-SS-X21FC, CAB-X21MT, ...... MEM-npe400-512MB, MEM-3660-128mb, MEM2600-32D, MEM2600-16FS, MEM2600XM-64D, MEM-S1-128MB, MEM-S2-256MB, MEM-S2-512MB, MEM-MSFC-128MB, MEM2801-256D, MEM3800-256D, MEM3800-512, MEM3745-256D, MEM1841-256D, MEM180X-256D, WS-X6K-MSFC2-KIT, .... and so on. กก Regards Helen.Zhou www.nstnetwork.com MSN: Helen@nstnetwork.com Email: Helen@nstnetwork.com AOL helenxuezhou Icq 320-880-606