From owner-freebsd-drivers@FreeBSD.ORG Mon May 21 14:44:52 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40EC216A421 for ; Mon, 21 May 2007 14:44:52 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.freebsd.org (Postfix) with ESMTP id F3CDA13C44B for ; Mon, 21 May 2007 14:44:51 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1867830pyh for ; Mon, 21 May 2007 07:44:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=NCawGwIA1t7R35plf0s7MhQNC/TBZdOzaYwJsFx9y2HkS8OF1sXboyR014dwLD0c/FCfE2X9CRKiikJ9B6Qho2QM8ZIaZunqw61Omj6QNdozXv2cJbSQIcSmaBX3n0Telk1I7GaSUdA7Bcqbta5HxG+qntcUCuJf7zKdpeWtkhs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Yi4ASEpd6+b2RiCo5OQHmAsCw6WPDO3trZ+WNwdn6pOiJwvDM1qxBO8VXYGeYGBL0iGC88yeH5lyh2BbUb9xqaf1hyl7QPyooyK8nRspsGde8BWEb2K+Si/qX+gCXtLOs5dhWO5nW6cXJquBjLvLQL21eUH00ShHeO5MZzQWkCQ= Received: by 10.65.81.10 with SMTP id i10mr10954847qbl.1179758690354; Mon, 21 May 2007 07:44:50 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Mon, 21 May 2007 07:44:50 -0700 (PDT) Message-ID: <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> Date: Mon, 21 May 2007 16:44:50 +0200 From: "Die Gestalt" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <86veetgnk4.fsf@dwp.des.no> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-drivers@freebsd.org Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 14:44:52 -0000 On 5/16/07, Dag-Erling Sm=F8rgrav wrote: > > "Die Gestalt" writes: > > As the subject implies I'm currently doing the most unholy thing ever. > I'm > > writing a driver that accesses hard disks through BIOS int13h. The > reasons > > why I'm doing this are many, but mainly I will be in a situation where = I > > > will not be able to update my kernel and where I want to support as muc= h > > devices as possible. I know this will be slow and I know this will only > work > > on the i386 platform, I accept that. > > It won't work nearly as universally as you intend; for some devices > (particularly USB devices), the BIOS tries to enter protected mode when > servicing requests. I know there will be some limitations unfortunately. > So far so good, I have a skeleton which is able to query the drive > > parameters and some basic stuff. But when I want to read, this doesn't > work, > > except in QEmu (http://www.qemu.org). I've tried on a VMWare and a real > > machine, what I get is a stall for maybe 10 s (sometimes not) and the > > operations returns saying it's successful but my buffer is actually lef= t > > > untouched. I get no kernel message. > > Have you verified that the buffer you write from or read into is mapped > correctly in virtual 8086 mode, and that you pass the correct address to > the BIOS? I think so. It works when I request a buffer to be filled with information. For instance function 48h of the int 13h correctly fills my buffer. To pass the address I use vm86_addpage to update a vm86context and then I pass this context to vm86_datacall. I think this might be a DMA problem. When the BIOS writes to the buffer, it does it via DMA, and I get typical DMA problems. However I've tried to use = a buffer allocated via buf_dmamem_alloc() to no success. Thanks for your answer. From owner-freebsd-drivers@FreeBSD.ORG Mon May 21 14:45:01 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98DEF16A41F for ; Mon, 21 May 2007 14:45:01 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF1813C447 for ; Mon, 21 May 2007 14:45:01 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-14-z2.arcor-online.net (mail-in-14-z2.arcor-online.net [151.189.8.31]) by mail-in-11.arcor-online.net (Postfix) with ESMTP id D339311DEE for ; Mon, 21 May 2007 16:44:59 +0200 (CEST) Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by mail-in-14-z2.arcor-online.net (Postfix) with ESMTP id BAD98100C8 for ; Mon, 21 May 2007 16:44:59 +0200 (CEST) Received: from notebook (dslb-088-070-064-118.pools.arcor-ip.net [88.70.64.118]) by mail-in-04.arcor-online.net (Postfix) with SMTP id 67BF41D7143 for ; Mon, 21 May 2007 16:44:59 +0200 (CEST) Message-ID: <000c01c79bb6$9a8af6a0$0302a8c0@notebook> From: "Evgenij Petenev" To: Date: Mon, 21 May 2007 16:44:58 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: RE: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 14:45:01 -0000 Hi, so can I do something to get it running under FreeBSD? I need both, WLAN = and FreeBSD for the school. So i hope you can help me. Best regards, Evgenij Petenev From owner-freebsd-drivers@FreeBSD.ORG Mon May 21 16:54:25 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 229F016A469 for ; Mon, 21 May 2007 16:54:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C1CE113C48A for ; Mon, 21 May 2007 16:54:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4LGqp5F045643; Mon, 21 May 2007 10:52:51 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 21 May 2007 10:52:51 -0600 (MDT) Message-Id: <20070521.105251.41677325.imp@bsdimp.com> To: e.petenev@arcor.de From: Warner Losh In-Reply-To: <000c01c79bb6$9a8af6a0$0302a8c0@notebook> References: <000c01c79bb6$9a8af6a0$0302a8c0@notebook> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 21 May 2007 10:52:52 -0600 (MDT) Cc: freebsd-drivers@freebsd.org Subject: Re: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 16:54:25 -0000 > so can I do something to get it running under FreeBSD? I need both, WLAN and FreeBSD for the school. So i hope you can help me. This should just work. What is broken? Warner From owner-freebsd-drivers@FreeBSD.ORG Mon May 21 18:06:12 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FE2716A46B for ; Mon, 21 May 2007 18:06:12 +0000 (UTC) (envelope-from sastry.tumuluri@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by mx1.freebsd.org (Postfix) with ESMTP id 0D19D13C480 for ; Mon, 21 May 2007 18:06:11 +0000 (UTC) (envelope-from sastry.tumuluri@gmail.com) Received: by nz-out-0506.google.com with SMTP id s1so2325317nze for ; Mon, 21 May 2007 11:06:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=IM+WNjXFTXUR/rPpbgyvWrAnOeUdkCrLUhL3jC4P8WUDwa4nVk6/9HI6iL9yPNEqUvcrzlKvlooJTssb+Cjpcevr6Ya2ORN+Fs/+/hj89GNGl1W1Ms0D4HJZYMHhzk3025gD14+PsdCciEA3+N+7dqA2/g/EqM6ame5zXk2r0HI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=g3EVuE4Ywplo2MrMvIrTUU0lXeM0CPQHJF0QzJqC6TdAM23T272w6lY/v+yufsNXJ/sewDeHc2PbaschlG4XfaeNNv/IvBJlY5TOKE/IfxX6ZJJ1X8inQTi7b/YZkfI6prcLlvdByKJ7yw2DrNiQDCeg1ir13XORb+teNARNhMI= Received: by 10.114.15.1 with SMTP id 1mr2829417wao.1179769300793; Mon, 21 May 2007 10:41:40 -0700 (PDT) Received: by 10.115.54.19 with HTTP; Mon, 21 May 2007 10:41:40 -0700 (PDT) Message-ID: Date: Mon, 21 May 2007 23:11:40 +0530 From: "Sastry Tumuluri" Sender: sastry.tumuluri@gmail.com To: freebsd-drivers@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: f5af6dfa5f056444 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: devd is not catching some events? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 18:06:12 -0000 Friends, I am trying to use devd to catch and do some extra processing on LINK_UP and LINK_DOWN events for my net interfaces (e.g., notify my admin, log the event, ...). Tried this on both FreeBSD 6.1 and on FreeBSD 6.2. I used the following code (shows LINK_DOWN; wrote similar stuff for LINK_UP): notify 10 { match "type" "LINK_DOWN"; action "logger -s alert: Caught LINK_DOWN on dev: $device-name subsys: $subsystem"; }; Didn't work. I tried the above with both strict match conditions (using vendor, device and class matches) as well as very general (like the above). Didn't work. I ran killed devd and ran it in the foreground with "devd -dD". Then I logged into a different pty and used ifconfig lnc0 down #(lnc0 is my ethernet device). devd doesn't even seem to catch the event (no output at all - both on screen and in syslog). On the other hand, "nomatch" and "attach" messages do seem to get through (I wrote similar stuff for nomatch & attach, and they are showing up at bootup and in syslog). What could I be doing wrong? Regards, ==sas3== From owner-freebsd-drivers@FreeBSD.ORG Mon May 21 18:31:59 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF7CC16A475 for ; Mon, 21 May 2007 18:31:59 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mx1.freebsd.org (Postfix) with ESMTP id 67FE513C487 for ; Mon, 21 May 2007 18:31:59 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id AD72B2CAAA6; Mon, 21 May 2007 20:31:57 +0200 (CEST) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id 8BFC6AC84C; Mon, 21 May 2007 20:31:57 +0200 (CEST) Received: from bigtower (dslb-088-070-231-183.pools.arcor-ip.net [88.70.231.183]) by mail-in-06.arcor-online.net (Postfix) with ESMTP id 4BDC235E5B4; Mon, 21 May 2007 20:31:57 +0200 (CEST) From: "Evgeny Petenev" To: "'Warner Losh'" Date: Mon, 21 May 2007 11:31:52 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <20070521.105251.41677325.imp@bsdimp.com> Thread-Index: AcebyYs7thf7MvIDS8ihU6iSh0+Y2QACexew X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070521183157.4BDC235E5B4@mail-in-06.arcor-online.net> Cc: freebsd-drivers@freebsd.org Subject: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 18:31:59 -0000 Hi, It works not. If i attach the card, i get no message from system, nothing happen. I have no device ath0 or something like this. Have installed FreeBSD on one other pc and tried it out - it works. After attaching the card, I get a message that interface ath0 is up. I mean, with hw.cardbus.debug=1 hw.cardbus.cis_debug=1 hw.cbb.debug=1 I get system message like cbb0: cbb_power=3V cbb0: cbb_power=0V It think that cbb0 is the problem. Best regards, Evgenij Petenev From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 15:12:48 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F406416A46B for ; Tue, 22 May 2007 15:12:47 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mx1.freebsd.org (Postfix) with ESMTP id A8BC113C46C for ; Tue, 22 May 2007 15:12:47 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-01-z2.arcor-online.net (mail-in-12-z2.arcor-online.net [151.189.8.29]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 4605D2CB2BB for ; Tue, 22 May 2007 17:12:46 +0200 (CEST) Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 2F9EC27945D; Tue, 22 May 2007 17:12:46 +0200 (CEST) Received: from bigtower (dslb-088-070-086-030.pools.arcor-ip.net [88.70.86.30]) by mail-in-11.arcor-online.net (Postfix) with ESMTP id CACA0341B88; Tue, 22 May 2007 17:12:45 +0200 (CEST) From: "Evgeny Petenev" To: "'Evgeny Petenev'" Date: Tue, 22 May 2007 17:10:37 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcebyYs7thf7MvIDS8ihU6iSh0+Y2QACexewAD5o1dAAAGikwA== In-Reply-To: <20070522150259.31AE612249@mail-in-11.arcor-online.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070522151245.CACA0341B88@mail-in-11.arcor-online.net> Cc: freebsd-drivers@freebsd.org Subject: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 15:12:48 -0000 So, have you something for me? What can I do to get the Card running? b.r., Evgenij Petenev From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 16:09:39 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1256216A41F for ; Tue, 22 May 2007 16:09:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AB54813C44C for ; Tue, 22 May 2007 16:09:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4MG8K0t060577; Tue, 22 May 2007 10:08:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 22 May 2007 10:08:19 -0600 (MDT) Message-Id: <20070522.100819.104092560.imp@bsdimp.com> To: e.petenev@arcor.de From: Warner Losh In-Reply-To: <20070522151245.CACA0341B88@mail-in-11.arcor-online.net> References: <20070522150259.31AE612249@mail-in-11.arcor-online.net> <20070522151245.CACA0341B88@mail-in-11.arcor-online.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 22 May 2007 10:08:20 -0600 (MDT) Cc: freebsd-drivers@freebsd.org Subject: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 16:09:39 -0000 > So, have you something for me? What can I do to get the Card running? Sorry, I've been catching up from being gone at BSDcan 2007. Can you send me the output of pciconf -l? Warner From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 18:19:13 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA8BE16A468 for ; Tue, 22 May 2007 18:19:13 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mx1.freebsd.org (Postfix) with ESMTP id 67A6E13C45D for ; Tue, 22 May 2007 18:19:13 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 33A4A32F086; Tue, 22 May 2007 20:19:12 +0200 (CEST) Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id 27FC7AC45C; Tue, 22 May 2007 20:19:12 +0200 (CEST) Received: from bigtower (dslb-088-070-086-030.pools.arcor-ip.net [88.70.86.30]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id DE7DD28ABA4; Tue, 22 May 2007 20:19:11 +0200 (CEST) From: "Evgeny Petenev" To: "'Warner Losh'" Date: Tue, 22 May 2007 20:17:03 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <20070522.100819.104092560.imp@bsdimp.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: Aceci5ggXA56cb3dRGmblsDo+JEJmAAXJwcw Message-Id: <20070522181911.DE7DD28ABA4@mail-in-07.arcor-online.net> Cc: freebsd-drivers@freebsd.org Subject: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 18:19:14 -0000 >Sorry, I've been catching up from being gone at BSDcan 2007. >Can you send me the output of pciconf -l? >Warner Oh, sorry. Can understand you, its only very important for me. So, hier is output of pciconf -l: ------------------------------------------------------------------------- hostb0@pci0:0:0: class=0x060000 card=0xb03c144d chip=0x27a08086 rev=0x03 hdr=0x00 pcib1@pci0:1:0: class=0x060400 card=0x00000088 chip=0x27a18086 rev=0x03 hdr=0x01 none0@pci0:27:0: class=0x040300 card=0xb03c144d chip=0x27d88086 rev=0x02 hdr=0x00 pcib2@pci0:28:0: class=0x060400 card=0x00000040 chip=0x27d08086 rev=0x02 hdr=0x01 pcib3@pci0:28:1: class=0x060400 card=0x00000040 chip=0x27d28086 rev=0x02 hdr=0x01 pcib4@pci0:28:2: class=0x060400 card=0x00000040 chip=0x27d48086 rev=0x02 hdr=0x01 pcib5@pci0:28:3: class=0x060400 card=0x00000040 chip=0x27d68086 rev=0x02 hdr=0x01 uhci0@pci0:29:0: class=0x0c0300 card=0xb03c144d chip=0x27c88086 rev=0x02 hdr=0x00 uhci1@pci0:29:1: class=0x0c0300 card=0xb03c144d chip=0x27c98086 rev=0x02 hdr=0x00 uhci2@pci0:29:2: class=0x0c0300 card=0xb03c144d chip=0x27ca8086 rev=0x02 hdr=0x00 uhci3@pci0:29:3: class=0x0c0300 card=0xb03c144d chip=0x27cb8086 rev=0x02 hdr=0x00 ehci0@pci0:29:7: class=0x0c0320 card=0xb03c144d chip=0x27cc8086 rev=0x02 hdr=0x00 pcib6@pci0:30:0: class=0x060401 card=0x00000050 chip=0x24488086 rev=0xe2 hdr=0x01 isab0@pci0:31:0: class=0x060100 card=0xb03c144d chip=0x27b98086 rev=0x02 hdr=0x00 atapci0@pci0:31:1: class=0x01018a card=0xb03c144d chip=0x27df8086 rev=0x02 hdr=0x00 none1@pci0:31:3: class=0x0c0500 card=0xb03c144d chip=0x27da8086 rev=0x02 hdr=0x00 none2@pci1:0:0: class=0x030000 card=0xb03c144d chip=0x01d810de rev=0xa1 hdr=0x00 none3@pci4:0:0: class=0x028000 card=0x10018086 chip=0x42228086 rev=0x02 hdr=0x00 bfe0@pci9:5:0: class=0x020000 card=0xb03c144d chip=0x170c14e4 rev=0x02 hdr=0x00 cbb0@pci9:9:0: class=0x060700 card=0xb03c144d chip=0x04761180 rev=0xb4 hdr=0x02 fwohci0@pci9:9:1: class=0x0c0010 card=0xb03c144d chip=0x05521180 rev=0x09 hdr=0x00 none4@pci9:9:2: class=0x080500 card=0xb03c144d chip=0x08221180 rev=0x18 hdr=0x00 none5@pci9:9:3: class=0x088000 card=0xb03c144d chip=0x08431180 rev=0x00 hdr=0x00 none6@pci9:9:4: class=0x088000 card=0xb03c144d chip=0x05921180 rev=0x09 hdr=0x00 none7@pci9:9:5: class=0x088000 card=0xb03c144d chip=0x08521180 rev=0x04 hdr=0x00 ------------------------------------------------------------------------- I cant find anything like my problem is. Nobody know solution of this, because nobody can understand whats going wrong. Best regards, Evgenij Petenev From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 18:30:57 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DE9D16A468 for ; Tue, 22 May 2007 18:30:57 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.freebsd.org (Postfix) with ESMTP id B858313C45E for ; Tue, 22 May 2007 18:30:56 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so129570pyb for ; Tue, 22 May 2007 11:30:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=GY63QY/UpwIC8b+VBHkI3P7O5QPdc9dGs5tOBdXdfLvEb6Mh8P63iDIHhmnW9JF1rSt5dUAcCDQXVs/IE20c0SKEHg0UwKaLeiITBUVu6nDVaLPNevKVCTBUHvWCr5y8dy2aAhQylMguzJAIJclX4m7PQOaAl839WQgDuZFTHhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ZTpQkX/yV6kcH2Lk8XL2tN7TuaaVpuHRKEFT6oxBSe7m9Sahdw96s8U3bOdIGrkH3ghZbaBBPt06BZpaWUUX9ncER+2GOoqqhkB7SwsXvE6aHMcEpDdDIQ1qkncVzVuGRyMGfpjhI688HolfWs8EJFg92lAXxyWY+99XOb71lc0= Received: by 10.64.220.8 with SMTP id s8mr1748959qbg.1179858655131; Tue, 22 May 2007 11:30:55 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Tue, 22 May 2007 11:30:55 -0700 (PDT) Message-ID: <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> Date: Tue, 22 May 2007 20:30:55 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 18:30:57 -0000 Muhahah, despite the world conspiracy against my evil plot to enslave disk drivers with the BIOS I now manage to write to the disk. But I get a : kernel: stray irq14 Of course irq14 is the IRQ of the disk controller. The int13h returns with = a status time out, but the writes succeeded anyways (he had no choice: I have sharks with laser beams attached to their heads). I can see my random bytes when I open the disk with an hex editor. I think what happens is that the BIOS never gets its IRQ14 "back" and cannot acknowledge that the operation went fine. Any hint? On 5/21/07, Die Gestalt wrote: > > On 5/16/07, Dag-Erling Sm=F8rgrav wrote: > > > > "Die Gestalt" < die.gestalt@gmail.com> writes: > > > As the subject implies I'm currently doing the most unholy thing ever= . > > I'm > > > writing a driver that accesses hard disks through BIOS int13h. The > > reasons > > > why I'm doing this are many, but mainly I will be in a situation wher= e > > I > > > will not be able to update my kernel and where I want to support as > > much > > > devices as possible. I know this will be slow and I know this will > > only work > > > on the i386 platform, I accept that. > > > > It won't work nearly as universally as you intend; for some devices > > (particularly USB devices), the BIOS tries to enter protected mode when > > servicing requests. > > > I know there will be some limitations unfortunately. > > > So far so good, I have a skeleton which is able to query the drive > > > parameters and some basic stuff. But when I want to read, this doesn'= t > > work, > > > except in QEmu (http://www.qemu.org). I've tried on a VMWare and a > > real > > > machine, what I get is a stall for maybe 10 s (sometimes not) and the > > > operations returns saying it's successful but my buffer is actually > > left > > > untouched. I get no kernel message. > > > > Have you verified that the buffer you write from or read into is mapped > > correctly in virtual 8086 mode, and that you pass the correct address t= o > > > > the BIOS? > > > I think so. It works when I request a buffer to be filled with > information. For instance function 48h of the int 13h correctly fills my > buffer. > > To pass the address I use vm86_addpage to update a vm86context and then I > pass this context to vm86_datacall. > > I think this might be a DMA problem. When the BIOS writes to the buffer, > it does it via DMA, and I get typical DMA problems. However I've tried to > use a buffer allocated via buf_dmamem_alloc() to no success. > > Thanks for your answer. > From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 20:42:31 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7F5316A41F for ; Tue, 22 May 2007 20:42:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4F50813C4BF for ; Tue, 22 May 2007 20:42:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4MKdkPA062540; Tue, 22 May 2007 14:39:46 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 22 May 2007 14:39:46 -0600 (MDT) Message-Id: <20070522.143946.39216690.imp@bsdimp.com> To: e.petenev@arcor.de From: Warner Losh In-Reply-To: <20070522181911.DE7DD28ABA4@mail-in-07.arcor-online.net> References: <20070522.100819.104092560.imp@bsdimp.com> <20070522181911.DE7DD28ABA4@mail-in-07.arcor-online.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 22 May 2007 14:39:46 -0600 (MDT) Cc: freebsd-drivers@freebsd.org Subject: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 20:42:31 -0000 OK. This sounds like the bus numbering issue. Can you send 'devinfo -v' to me next and I'll send what I think might be a workaround for you? Warner From owner-freebsd-drivers@FreeBSD.ORG Tue May 22 22:35:22 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BE5916A400 for ; Tue, 22 May 2007 22:35:22 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mx1.freebsd.org (Postfix) with ESMTP id 889F913C44C for ; Tue, 22 May 2007 22:35:21 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-01-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 854EA32E8D7; Wed, 23 May 2007 00:35:20 +0200 (CEST) Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 792105BD7A; Wed, 23 May 2007 00:35:20 +0200 (CEST) Received: from bigtower (dslb-088-070-085-219.pools.arcor-ip.net [88.70.85.219]) by mail-in-11.arcor-online.net (Postfix) with ESMTP id 1AE242C1604; Wed, 23 May 2007 00:35:20 +0200 (CEST) From: "Evgeny Petenev" To: "'Warner Losh'" Date: Wed, 23 May 2007 00:33:11 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <20070522.143946.39216690.imp@bsdimp.com> Thread-Index: AcecsbcxFdhIB7mdTpyukc97GhGgzgAWoB+w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070522223520.1AE242C1604@mail-in-11.arcor-online.net> Cc: freebsd-drivers@freebsd.org Subject: AW: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 22:35:22 -0000 -----Urspr=FCngliche Nachricht----- Von: Warner Losh [mailto:imp@bsdimp.com]=20 Gesendet: Dienstag, 22. Mai 2007 13:40 An: e.petenev@arcor.de Cc: freebsd-drivers@freebsd.org Betreff: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release = OK. This sounds like the bus numbering issue. Can you send 'devinfo -v' to me next and I'll send what I think might be a workaround for you? Warner Ok, here is output of devinfo -v: -------------------------------------------------------------------------= --- - nexus0 legacy0 npx0 acpi0 cpu0 pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_PR_.CPU0 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_PR_.CPU1 acpi_acad0 pnpinfo _HID=3DACPI0003 _UID=3D0 at handle=3D\_SB_.ADP1 battery0 pnpinfo _HID=3DPNP0C0A _UID=3D1 at handle=3D\_SB_.BAT1 acpi_lid0 pnpinfo _HID=3DPNP0C0D _UID=3D0 at handle=3D\_SB_.LID0 acpi_button0 pnpinfo _HID=3DPNP0C0C _UID=3D0 at handle=3D\_SB_.PWRB acpi_button1 pnpinfo _HID=3DPNP0C0E _UID=3D0 at handle=3D\_SB_.SLPB pcib0 pnpinfo _HID=3DPNP0A08 _UID=3D0 at handle=3D\_SB_.PCI0 pci0 hostb0 pnpinfo vendor=3D0x8086 device=3D0x27a0 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x060000 at slot=3D0 function=3D0 pcib1 pnpinfo vendor=3D0x8086 device=3D0x27a1 subvendor=3D0x0088 subdevice=3D0x0000 class=3D0x060400 at slot=3D1 function=3D0 = handle=3D\_SB_.PCI0.PEGP pci1 unknown pnpinfo vendor=3D0x10de device=3D0x01d8 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x030000 at slot=3D0 function=3D0 handle=3D\_SB_.PCI0.PEGP.NVID unknown pnpinfo vendor=3D0x8086 device=3D0x27d8 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x040300 at slot=3D27 function=3D0 = handle=3D\_SB_.PCI0.HDEF pcib2 pnpinfo vendor=3D0x8086 device=3D0x27d0 subvendor=3D0x0040 subdevice=3D0x0000 class=3D0x060400 at slot=3D28 function=3D0 = handle=3D\_SB_.PCI0.RP01 pci2 pcib3 pnpinfo vendor=3D0x8086 device=3D0x27d2 subvendor=3D0x0040 subdevice=3D0x0000 class=3D0x060400 at slot=3D28 function=3D1 = handle=3D\_SB_.PCI0.RP02 pci3 pcib4 pnpinfo vendor=3D0x8086 device=3D0x27d4 subvendor=3D0x0040 subdevice=3D0x0000 class=3D0x060400 at slot=3D28 function=3D2 = handle=3D\_SB_.PCI0.RP03 pci4 unknown pnpinfo vendor=3D0x8086 device=3D0x4222 = subvendor=3D0x8086 subdevice=3D0x1001 class=3D0x028000 at slot=3D0 function=3D0 handle=3D\_SB_.PCI0.RP03.PXS3 pcib5 pnpinfo vendor=3D0x8086 device=3D0x27d6 subvendor=3D0x0040 subdevice=3D0x0000 class=3D0x060400 at slot=3D28 function=3D3 = handle=3D\_SB_.PCI0.RP04 pci6 uhci0 pnpinfo vendor=3D0x8086 device=3D0x27c8 subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0300 at slot=3D29 function=3D0 = handle=3D\_SB_.PCI0.USB1 usb0 uhub0 uhci1 pnpinfo vendor=3D0x8086 device=3D0x27c9 subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0300 at slot=3D29 function=3D1 = handle=3D\_SB_.PCI0.USB2 usb1 uhub1 uhci2 pnpinfo vendor=3D0x8086 device=3D0x27ca subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0300 at slot=3D29 function=3D2 = handle=3D\_SB_.PCI0.USB3 usb2 uhub2 ugen0 pnpinfo vendor=3D0x0a5c product=3D0x2101 = devclass=3D0xe0 devsubclass=3D0x01 release=3D0x0100 sernum=3D"" at port=3D0 uhci3 pnpinfo vendor=3D0x8086 device=3D0x27cb subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0300 at slot=3D29 function=3D3 = handle=3D\_SB_.PCI0.USB4 usb3 uhub3 ehci0 pnpinfo vendor=3D0x8086 device=3D0x27cc subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0320 at slot=3D29 function=3D7 = handle=3D\_SB_.PCI0.USB7 usb4 uhub4 umass0 pnpinfo vendor=3D0x13fe product=3D0x1d00 = devclass=3D0x00 devsubclass=3D0x00 release=3D0x0110 sernum=3D"90730B001472" = intclass=3D0x08 intsubclass=3D0x06 at port=3D2 interface=3D0 pcib6 pnpinfo vendor=3D0x8086 device=3D0x2448 subvendor=3D0x0050 subdevice=3D0x0000 class=3D0x060401 at slot=3D30 function=3D0 = handle=3D\_SB_.PCI0.PCIB pci9 bfe0 pnpinfo vendor=3D0x14e4 device=3D0x170c = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x020000 at slot=3D5 function=3D0 handle=3D\_SB_.PCI0.PCIB.LANC miibus0 bmtphy0 pnpinfo oui=3D0x1018 model=3D0x36 rev=3D0x0 at = phyno=3D1 cbb0 pnpinfo vendor=3D0x1180 device=3D0x0476 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x060700 at slot=3D9 function=3D0 handle=3D\_SB_.PCI0.PCIB.CDB0 cardbus0 pccard0 fwohci0 pnpinfo vendor=3D0x1180 device=3D0x0552 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0010 at slot=3D9 function=3D1 handle=3D\_SB_.PCI0.PCIB.OHCI firewire0 fwe0 sbp0 unknown pnpinfo vendor=3D0x1180 device=3D0x0822 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x080500 at slot=3D9 function=3D2 handle=3D\_SB_.PCI0.PCIB.SDHC unknown pnpinfo vendor=3D0x1180 device=3D0x0843 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x088000 at slot=3D9 function=3D3 handle=3D\_SB_.PCI0.PCIB.MMHC unknown pnpinfo vendor=3D0x1180 device=3D0x0592 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x088000 at slot=3D9 function=3D4 handle=3D\_SB_.PCI0.PCIB.MSHC unknown pnpinfo vendor=3D0x1180 device=3D0x0852 = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x088000 at slot=3D9 function=3D5 handle=3D\_SB_.PCI0.PCIB.XDHC isab0 pnpinfo vendor=3D0x8086 device=3D0x27b9 subvendor=3D0x144d subdevice=3D0xb03c class=3D0x060100 at slot=3D31 function=3D0 = handle=3D\_SB_.PCI0.LPCB isa0 adv0 aha0 aic0 bt0 cs0 ed0 fdc0 fe0 ie0 lnc0 ppc0 sc0 sio0 sio1 sio2 sio3 sn0 vga0 vt0 orm0 pmtimer0 atapci0 pnpinfo vendor=3D0x8086 device=3D0x27df = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x01018a at slot=3D31 function=3D1 = handle=3D\_SB_.PCI0.PATA ata0 ad0 subdisk0 acd0 ata1 unknown pnpinfo vendor=3D0x8086 device=3D0x27da = subvendor=3D0x144d subdevice=3D0xb03c class=3D0x0c0500 at slot=3D31 function=3D3 = handle=3D\_SB_.PCI0.SBUS acpi_sysresource0 pnpinfo _HID=3DPNP0C02 _UID=3D1 at = handle=3D\_SB_.PCI0.PDRC unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PEGP.NVID.CRT1 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PEGP.NVID.LCD_ unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PEGP.NVID.TV__ unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PEGP.NVID.DVI_ unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.GFX0 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.GFX0.DD01 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.GFX0.DD02 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.GFX0.DD03 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.GFX0.DD04 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.GFX0.DD05 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.RP01.PXS1 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.RP02.PXS2 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.RP04.PXS4 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.AUD0 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.MODM pci_link0 pnpinfo _HID=3DPNP0C0F _UID=3D1 at = handle=3D\_SB_.PCI0.LPCB.LNKA pci_link1 pnpinfo _HID=3DPNP0C0F _UID=3D2 at = handle=3D\_SB_.PCI0.LPCB.LNKB pci_link2 pnpinfo _HID=3DPNP0C0F _UID=3D3 at = handle=3D\_SB_.PCI0.LPCB.LNKC pci_link3 pnpinfo _HID=3DPNP0C0F _UID=3D4 at = handle=3D\_SB_.PCI0.LPCB.LNKD pci_link4 pnpinfo _HID=3DPNP0C0F _UID=3D5 at = handle=3D\_SB_.PCI0.LPCB.LNKE pci_link5 pnpinfo _HID=3DPNP0C0F _UID=3D6 at = handle=3D\_SB_.PCI0.LPCB.LNKF pci_link6 pnpinfo _HID=3DPNP0C0F _UID=3D7 at = handle=3D\_SB_.PCI0.LPCB.LNKG pci_link7 pnpinfo _HID=3DPNP0C0F _UID=3D8 at = handle=3D\_SB_.PCI0.LPCB.LNKH acpi_ec0 pnpinfo _HID=3DPNP0C09 _UID=3D1 at = handle=3D\_SB_.PCI0.LPCB.H_EC unknown pnpinfo _HID=3DPNP0C32 _UID=3D1 at = handle=3D\_SB_.PCI0.LPCB.H_EC.MBTN atdma0 pnpinfo _HID=3DPNP0200 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.DMAC unknown pnpinfo _HID=3DINT0800 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.FWHD unknown pnpinfo _HID=3DPNP0103 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.HPET atpic0 pnpinfo _HID=3DPNP0000 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.IPIC npxisa0 pnpinfo _HID=3DPNP0C04 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.MATH acpi_sysresource1 pnpinfo _HID=3DPNP0C02 _UID=3D2 at handle=3D\_SB_.PCI0.LPCB.LDRC attimer0 pnpinfo _HID=3DPNP0B00 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.RTC_ attimer1 pnpinfo _HID=3DPNP0100 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.TIMR unknown pnpinfo _HID=3DIFX0102 _UID=3D1 at = handle=3D\_SB_.PCI0.LPCB.TPM_ atkbdc0 pnpinfo _HID=3DPNP0303 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.PS2K atkbd0 psm0 psmcpnp0 pnpinfo _HID=3DPNP0F13 _UID=3D0 at = handle=3D\_SB_.PCI0.LPCB.PS2M unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PATA.PRID unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PATA.PRID.P_D0 unknown pnpinfo _HID=3Dnone _UID=3D0 at = handle=3D\_SB_.PCI0.PATA.PRID.P_D1 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.SATA unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_TZ_.FN00 unknown pnpinfo _HID=3DPNP0C0B _UID=3D0 at handle=3D\_TZ_.FAN0 acpi_tz0 pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_TZ_.TZ00 acpi_tz1 pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_TZ_.TZ01 acpi_timer0 pnpinfo unknown at unknown -------------------------------------------------------------------------= --- Thanks for your Help Best regards, Evgenij Petenev From owner-freebsd-drivers@FreeBSD.ORG Wed May 23 09:23:03 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FC4316A41F for ; Wed, 23 May 2007 09:23:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id C341413C458 for ; Wed, 23 May 2007 09:23:00 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 68F112084; Wed, 23 May 2007 11:22:54 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 4F9812083; Wed, 23 May 2007 11:22:54 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 18C9D508B; Wed, 23 May 2007 11:22:54 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Die Gestalt" References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> Date: Wed, 23 May 2007 11:22:53 +0200 In-Reply-To: <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> (Die Gestalt's message of "Tue\, 22 May 2007 20\:30\:55 +0200") Message-ID: <863b1nvqqa.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-drivers@freebsd.org Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 09:23:03 -0000 "Die Gestalt" writes: > Muhahah, despite the world conspiracy against my evil plot to enslave disk > drivers with the BIOS I now manage to write to the disk. > > But I get a : > > kernel: stray irq14 > > Of course irq14 is the IRQ of the disk controller. The int13h returns wit= h a > status time out, but the writes succeeded anyways (he had no choice: I ha= ve > sharks with laser beams attached to their heads). I can see my random byt= es > when I open the disk with an hex editor. I think what happens is that the > BIOS never gets its IRQ14 "back" and cannot acknowledge that the operation > went fine. > > Any hint? Use PIO mode (no IRQs). It's slower, but using the BIOS is so slow you probably won't notice anyway... Otherwise you need to install an interrupt handler which will catch IRQ 14 and pass it on to the BIOS. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-drivers@FreeBSD.ORG Wed May 23 09:37:54 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0840116A41F for ; Wed, 23 May 2007 09:37:54 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by mx1.freebsd.org (Postfix) with ESMTP id A5AA413C455 for ; Wed, 23 May 2007 09:37:53 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by nz-out-0506.google.com with SMTP id m22so119418nzf for ; Wed, 23 May 2007 02:37:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YZtC4rFxtMM98pxpIDEAXK/vNaACYVU8LUia6RQ8+X18CAkF+zLGj9NupkkUSiHtNHWgbaZVWcq2ueH5wEBBGT4PihhoIs8tgaz12JLej98SsxpULV5bwlQPUKnt+qlqQbj3EFE5Z5rPoPe8kexLkldXlLtU1GkDtpok/oWTfu4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=athXd5y0VhUmOtUA8QtSSUAMoXfuBTnGRevKeOGXJ2ywOQOL2+8hIOHbccq6VzUHk0N0EhyW4yMnmc8smifB2IBcCToEIEECVtDw7MN3iLvoX9ZXSgvaKoFYfpH3/S1rZTD4eJbrgMurabblxvCDYs83Ghds8JlbIAS2Hf2l+7E= Received: by 10.64.143.12 with SMTP id q12mr879228qbd.1179913072770; Wed, 23 May 2007 02:37:52 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Wed, 23 May 2007 02:37:52 -0700 (PDT) Message-ID: <5bf3e10d0705230237w729e8344k777c1cdabcf57697@mail.gmail.com> Date: Wed, 23 May 2007 11:37:52 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <863b1nvqqa.fsf@dwp.des.no> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> <863b1nvqqa.fsf@dwp.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 09:37:54 -0000 On 5/23/07, Dag-Erling Sm=F8rgrav wrote: > > > Use PIO mode (no IRQs). It's slower, but using the BIOS is so slow you > probably won't notice anyway... > > Otherwise you need to install an interrupt handler which will catch IRQ > 14 and pass it on to the BIOS. I cannot decide if PIO will be used or not, since for SCSI devices (for example) I don't think there is a PIO mode... I also would prefer not to depend on the configuration of the BIOS. Unless you have an idea about how to enforce PIO mode from the driver? Although I see how to write an interrupt handler, I don't see how to pass the catched interrupt back to the BIOS. Do I need to read some sort of interrupt table in the BIOS? From owner-freebsd-drivers@FreeBSD.ORG Wed May 23 10:14:32 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 759BF16A51A for ; Wed, 23 May 2007 10:14:32 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.224]) by mx1.freebsd.org (Postfix) with ESMTP id 311B513C457 for ; Wed, 23 May 2007 10:14:31 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by nz-out-0506.google.com with SMTP id m22so126558nzf for ; Wed, 23 May 2007 03:14:31 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ezYM3BY2CarjsIdebcOF1wWhNeJJCscxWrgWJpatZ7z0XQlwtDhVKksPQdpEiowMmjyKw92M+P6FHW1nMVzH1Zkz32itOevqIPUP7hHdBL6SQ0SXOJ0ukyPevK+CiRzNkig0h+jkVAJlMRuS7Tc5u6QHZnvSjVp7EVXxF5EYWw8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Iwcj0AQ7NtafdGIPmP0XAjzNP3XU/a88mXlWxyzUzWjqi1pAgllLemV5TLmfRiFqDVwovDRnccoL+TtIXeoR1YNkrOuWqFt95X9mL1y7t8UQLwUCl8AIzx2Ejlom7FOlrPAFvwOCi8PmaSpDDSeV2d7vcd0GmL7PkfH+wN74S3c= Received: by 10.65.212.3 with SMTP id o3mr348139qbq.1179915271469; Wed, 23 May 2007 03:14:31 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Wed, 23 May 2007 03:14:31 -0700 (PDT) Message-ID: <5bf3e10d0705230314w3038a532uf0d8c0ed18a5d05f@mail.gmail.com> Date: Wed, 23 May 2007 12:14:31 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <863b1nvqqa.fsf@dwp.des.no> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> <863b1nvqqa.fsf@dwp.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 10:14:32 -0000 On 5/23/07, Dag-Erling Sm=F8rgrav wrote: > > > Use PIO mode (no IRQs). It's slower, but using the BIOS is so slow you > probably won't notice anyway... > > Otherwise you need to install an interrupt handler which will catch IRQ > 14 and pass it on to the BIOS. I cannot decide if PIO will be used or not, since for SCSI devices (for example) I don't think there is a PIO mode... I also would prefer not to depend on the configuration of the BIOS. So I will have to write an interrupt handler that catches the IRQ14, has go= t the address of the IRQ14 handler of the BIOS, run this handler in the VM86, and pray The Great Sysop? :p From owner-freebsd-drivers@FreeBSD.ORG Thu May 24 06:26:07 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 437CA16A41F for ; Thu, 24 May 2007 06:26:07 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.freebsd.org (Postfix) with ESMTP id F250A13C455 for ; Thu, 24 May 2007 06:26:06 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.hob.de (Postfix) with ESMTP id 01AE627ADB for ; Thu, 24 May 2007 08:26:05 +0200 (CEST) Received: from mailgate.hob.de ([127.0.0.1]) by localhost (mailgate.hob.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13738-10 for ; Thu, 24 May 2007 08:26:04 +0200 (CEST) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id C64BA27BA1 for ; Thu, 24 May 2007 08:26:04 +0200 (CEST) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id 66410C47F6 for ; Thu, 24 May 2007 08:26:04 +0200 (CEST) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-drivers@freebsd.org Date: Thu, 24 May 2007 07:26:01 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200705240826.01063.marc.loerner@hob.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at hob.de Subject: driver writing to serial console X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 06:26:07 -0000 Hi, at the moment I'm writing a driver that should control a serial console. That means I want to open/write/read to a serial console from within my (dummy) driver. Googling for this topic and reading Chapter 10 of "The Design and Implementation of the FreeBSD Operating System" yielded not the appropriate results. Now I only now that I can overwrite the linesw->l_rint handler to get input from keyboard. I hope someone can give me some pointers in the right direction or has a/some examples. Thanks in advance, Marc From owner-freebsd-drivers@FreeBSD.ORG Thu May 24 15:39:58 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E72FE16A421 for ; Thu, 24 May 2007 15:39:57 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 88BB413C455 for ; Thu, 24 May 2007 15:39:57 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so955003pyi for ; Thu, 24 May 2007 08:39:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=XaQW812yOBBYCWfVNDpG9Sy89CsmJtmnEwRSuOIOCOmYPPbxiPXQY4XThhLi1gH9c+e5ZLQZWeu+D8DuqLdjDvAkRER2r9rjgDLHikFlDr5BAZhXpfeGk9AkBJSHlbLpYsXghNSIMM4rDh7Uba7A4JheTtdT7qm7XspslyHb6vY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Ooe2s1XYKjDDUIc+M4RtRJaBmrAK8dOWo4kZ6J0u4dNZeDBABUnHmmgCRuhoim5acm3RBtowjsRaRqTU7y7JTbr0ThWZklILNMFMw+yvUY+T6I7m9Fs0/hHyyXFWdXbokF9JB4FY6N1DTmpKv1N+rs3TlCuxinTfPXBLWeSj6mY= Received: by 10.65.100.14 with SMTP id c14mr3774234qbm.1180021196810; Thu, 24 May 2007 08:39:56 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Thu, 24 May 2007 08:39:56 -0700 (PDT) Message-ID: <5bf3e10d0705240839x17792a96hf17e6eebfa5a83da@mail.gmail.com> Date: Thu, 24 May 2007 17:39:56 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <5bf3e10d0705230314w3038a532uf0d8c0ed18a5d05f@mail.gmail.com> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> <863b1nvqqa.fsf@dwp.des.no> <5bf3e10d0705230314w3038a532uf0d8c0ed18a5d05f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 15:39:58 -0000 On 5/23/07, Die Gestalt wrote: > > > So I will have to write an interrupt handler that catches the IRQ14, has > got the address of the IRQ14 handler of the BIOS, run this handler in the > VM86, and pray The Great Sysop? :p > Indeed this is what I have to do. I've dwelled inside the heart of the kernel to see how I could set up a hardcore general IRQ 14 handler. This works. This handler should call do a simple vm86_intcall(0x76....) (int 76h is the BIOS handler for the IRQ 14), but the problem is that this results in a deadlock for the very simple fact that the BVM86 is still running waiting for the completion.... I thought about creating a second virtual machine monitor (well simply setting up some pages in locland modifying vm86_initialize and add some vm86_intcall2 functions), but my question is... If I do a vm86_intcall2 from my IRQ14 handler, will the first vm86_datacall (still running) be aware of it? This is Plan A. Plan B would be to be able to stop execution of the first vm86_datacall, save the current context, and replace the code to run before resuming to the IRQ14, when its finished, the previous context is restored. For now I have absolutely no idea about how to do it. :) Well the save/restore context is not very difficult, I could write the following code: save context save ip push marker on stack int 76h -> iret I will end up in vm86_trap in vm86_trap if I see my marker on the stack I do a pop marker restore context get ip back resume execution at ip But how to stop the vm86_datacall and patch it in. It would be much better if Plan A works. :p Any input greatly welcomed. From owner-freebsd-drivers@FreeBSD.ORG Thu May 24 20:46:00 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0006A16A41F for ; Thu, 24 May 2007 20:45:59 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id ADA0F13C45B for ; Thu, 24 May 2007 20:45:59 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so1076791pyi for ; Thu, 24 May 2007 13:45:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=mZP+IAoOxb408Ur10aTpN0Ft4KR1gTsy0OFo0hKK3CdoiOY4fxGxp6IT6HmDfYlKBikCvnnO+PBY/W2EcUhxWTY0cHzOV0i7uAUX7xECi0xHlnELS4dXToucBnW/TXeA/6mrXmenE0lH3wJquE2HpgtmQBsfarhhQJSj8vKzDbU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=RhCVm53Pcv00voa2AArZhfoMa+chGiUAZS7/tj4Yr77MZfVjsJlsUHrT5uUwD1UVXzBtAVOQewVK30EXFVMqO3T9us6QQsXXSQanf5a/ct8hbYlqnFzFPT6h81PV3i+sc3Aeyii8fvmA5ZrKrJw20VkV1CJD+4979KYovVe+fTE= Received: by 10.65.234.2 with SMTP id l2mr4266232qbr.1180039558909; Thu, 24 May 2007 13:45:58 -0700 (PDT) Received: by 10.64.184.8 with HTTP; Thu, 24 May 2007 13:45:58 -0700 (PDT) Message-ID: <5bf3e10d0705241345t11e739we0b896bab868fec6@mail.gmail.com> Date: Thu, 24 May 2007 22:45:58 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <5bf3e10d0705240839x17792a96hf17e6eebfa5a83da@mail.gmail.com> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> <863b1nvqqa.fsf@dwp.des.no> <5bf3e10d0705230314w3038a532uf0d8c0ed18a5d05f@mail.gmail.com> <5bf3e10d0705240839x17792a96hf17e6eebfa5a83da@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Generic int 13h driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 20:46:00 -0000 What I said above is stupid, I will check for the presence of the VM flag and if it's present I will transfer control to the VM86 monitor, no need for the crazy manual task switching. From owner-freebsd-drivers@FreeBSD.ORG Fri May 25 21:30:31 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4D6016A41F for ; Fri, 25 May 2007 21:30:31 +0000 (UTC) (envelope-from rmiranda@digitalrelay.ca) Received: from wrdsl02.terago.ca (wrdsl02.terago.ca [207.54.102.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8592013C484 for ; Fri, 25 May 2007 21:30:31 +0000 (UTC) (envelope-from rmiranda@digitalrelay.ca) Received: from [192.168.0.12] (unknown [64.201.181.165]) by wrdsl02.terago.ca (Postfix) with ESMTP id 1F16D86E6E for ; Fri, 25 May 2007 16:12:01 -0500 (CDT) From: "Roger Miranda" Organization: Digital Relay Inc. To: freebsd-drivers@freebsd.org Date: Fri, 25 May 2007 16:12:42 -0500 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200705251612.42487.rmiranda@digitalrelay.ca> Subject: LOR on e1000 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 21:30:31 -0000 Not to sure if this is the right place to post this. We have posted on the freebsd-stable mailing list, but decided this might b= e a=20 driver issue. We have a machine running freebsd 6.2 with if_bridge just doing proxy=20 interception. The problem is the machine goes into to a dead lock with my= =20 tcp connection (not so much a heavy load). We can only recreate the dead=20 lock with about 25 or more PCs behind our system. Here is a copy of the LOR: =2D------------------------------------------------------------------------= =2D--------------------------------------- lock order reversal: 1st 0xc06e0820 polling (polling) @ /usr/src/sys/kern/kern_poll.c:422 2nd 0xc473070c if_bridge (if_bridge) @ /usr/src/sys/net/if_bridge.c:1976 KDB: stack backtrace: witness_checkorder(c473070c,9,c068bfbc,7b8) at witness_checkorder+0x55c _mtx_lock_flags(c473070c,0,c068bfbc,7b8,c473070c,...) at _mtx_lock_flags+0x= 41 bridge_input(c43d9000,c4740000,c43a828c,c43a8000,c4740000,...) at=20 bridge_input+0x80 ether_input(c43d9000,c4740000,c43a828c,0,c0675f3c,...) at ether_input+0x122 e1000_rxeof(d43f2cbc,c0524e5d,d43f2ca8,1,5,...) at e1000_rxeof+0x19b e1000_poll(c43d9000,0,5) at e1000_poll+0x46 netisr_poll(0) at netisr_poll+0x70 swi_net(0,c4315438,c4323a80,c050a484,c4322648,...) at swi_net+0xb0 ithread_loop(c430f700,d43f2d38,c430f700,c050a484,0,...) at ithread_loop+0x1= de fork_exit(c050a484,c430f700,d43f2d38) at fork_exit+0x7d fork_trampoline() at fork_trampoline+0x8 =2D-- trap 0x1, eip =3D 0, esp =3D 0xd43f2d6c, ebp =3D 0 --- softdep_waitidle: Failed to flush worklist for 0xc44ffcf8 =2D------------------------------------------------------------------------= =2D--------------------------------------- here is the pciconf output for the network intel cards: =2D------------------------------------------------------------------------= =2D--------------------------------------- em0@pci1:1:0:=A0=A0=A0class=3D0x020000 card=3D0x10758086 chip=3D0x10758086 = rev=3D0x00=20 hdr=3D0x00 =A0 =A0 class =A0 =A0=3D network =A0 =A0 subclass =3D ethernet em1@pci3:10:0:=A0=A0class=3D0x020000 card=3D0x10768086 chip=3D0x10768086 re= v=3D0x00=20 hdr=3D0x00 =A0 =A0 class =A0 =A0=3D network =A0 =A0 subclass =3D ethernet =2D------------------------------------------------------------------------= =2D--------------------------------------- Any help will be really appreciated. We have upgrade the Intel drivers to= =20 version (em-6.3.9). Roger