From owner-freebsd-hackers Fri Sep 25 06:17:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA01043 for freebsd-hackers-outgoing; Fri, 25 Sep 1998 06:17:43 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from send1d.yahoomail.com (send1d.yahoomail.com [205.180.60.48]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA01034 for ; Fri, 25 Sep 1998 06:17:40 -0700 (PDT) (envelope-from b_jenkins@yahoo.com) Message-ID: <19980925130946.7967.rocketmail@send1d.yahoomail.com> Received: from [198.206.246.46] by send1d; Fri, 25 Sep 1998 06:09:46 PDT Date: Fri, 25 Sep 1998 06:09:46 -0700 (PDT) From: Brian Jenkins Subject: PCMCIA Controller Not Found To: freebsd-mobile@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Cc: sshetty@andrew.cmu.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have installed FreeBSD 2.2.6 and PAO-980430 on a single board computer with a PCMCIA add-on board. The PCMCIA controller chip is a Cirrus Logic CL-PD6730, but the PCI code is not finding it. I just received the information below from the manufacturer. What is the best way to modify the kernel source code in order to get this working? Brian Jenkins b_jenkins@yahoo.com ---------------------------------------------------- The PCI configuration registers are accessed at I/O ports 0CF8h & 0CFCh. 0CF8h is the index register and 0CFCh is the data register. All accesses must be long word accesses. The high word of the index will be 8000h, and the low word has the target device in the high 5 bits of the high byte, (sub fucntions, if present would be in the low 3 bits) and the byte address of the data in the low byte. Our PCMCIA adaptor (if the first slice on the stack, which is the case for you) is device 4, so the indeces for the PCI configuration registers are 80002000, 80002004, 80002008 etc. Register 1 needs to have 43h ORed in, to enable parity checking, and enabling PCI memory and I/O accesses, and 03E0h must be ORed into register 4 to set that as the standard base for operations that I would expect your drivers to expect to find the controller at. Here is a block of code that should acomplish this: mov dx,CF8h ; pointer to index mov eax,80002004h ; index of register 1 out dx,eax ; set it mov dx,CFCh ; pointer to data in eax,dx ; get the current data or ax,43h ; set the required bits (which are in the low word) out dx,eax ; shove the altered data back out mov dx,CF8h ; pointer to index (again) mov eax,80002010h ; index of register 4 out dx,eax ; set it mov dx,CFCh ; pointer to data in eax,dx ; get the current data or ax,3E0h ; set the required bits (which are in the low word) out dx,eax ; shove this altered data back out This must all happen before your PCMCIA driver(s) start to install. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message