Date: Fri, 25 Sep 1998 11:34:58 -0700 From: Mike Smith <mike@smith.net.au> To: Brian Jenkins <b_jenkins@yahoo.com> Cc: freebsd-mobile@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG, sshetty@andrew.cmu.edu Subject: Re: PCMCIA Controller Not Found Message-ID: <199809251834.LAA00465@dingo.cdrom.com> In-Reply-To: Your message of "Fri, 25 Sep 1998 06:09:46 PDT." <19980925130946.7967.rocketmail@send1d.yahoomail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Brian; from the output that you've provided us so far, it seems clear that the system BIOS is not correctly locating and configuring the CL-PD6730, which is why we aren't finding it. If the device isn't configured by the PCI BIOS, it's quite inappropriate for us to attempt to assign resources to it. While the hack proposed below may work in your case, it's not a useful general solution, and you should pursue your vendor to have them explain why their PCI BIOS is not enumerating and configuring the board. > 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? You could add some code to the PCI bus initialisation which would use the pci_conf_read/write routines to make the appropriate changes. The "best" way to do this would involve having the BIOS enumerate and enable the device, and then perhaps adding some trivial code in pcic_p.c. As it stands, however, it's not clear that even the code below will actually be sufficient. If you're not comfortable wrangling with your vendor, please send me a copy of the verbose boot output again, along with your technical contact with the vendor and the details of your hardware (model numbers, BIOS revisions, etc.), and I'll see if we can address this. > 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-mobile" in the body of the message > -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809251834.LAA00465>