Re: Boot hangs "Probing PCI hardware"
David Mosberger <[email protected]>
| Newsgroups | gmane.linux.redhat.ia64.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> On Wed, 03 Apr 2002 19:10:11 +0900, Tatsuya Tsurukawa <[email protected]> said: Tatsuya> There are some BAR operations in pci_read_bases() function Tatsuya> of pci.c to get memory and IO space ranges assigned for Tatsuya> each PCI device by writing 0xffffffff on BAR and reading it Tatsuya> again. If an interrupt from SAPIC occurs during BAR Tatsuya> operations, the first PCI Bus hangs. Interesting. Tatsuya> In this case, the video device gets 64MB memory space from Tatsuya> 0xFC000000 to 0xFFFFFFFF improperly, and it conflicts with Tatsuya> System reserve region (0xFCxxxxxx - 0xFExxxxxx) for SAPIC Tatsuya> interrupt messages. After that the video device reacts to Tatsuya> an SAPIC interrupt improperly. Tatsuya> According to PCI specifications, it is necessary to disable Tatsuya> Memory IO target function during BAR operations by setting Tatsuya> zero to bit0/1 of PCI_COMMAND, but current pci_read_bases() Tatsuya> doesn't do that. Makes sense. Just for completeness (and to save me some time), could you point out the section in the PCI spec that requires this? Tatsuya> I'd like to provide the following patch, and I've already Tatsuya> found it works well on both RHL7.2 and Kernel-2.4.18. The patch looks mostly good to me, except that I think it would be better to replace: pci_write_config_word(dev, PCI_COMMAND, pcicmd_sv & 0xfffc); with: pci_write_config_word(dev, PCI_COMMAND, pcicmd_sv & ~(PCI_COMMAND_IO|PCI_COMMAND_MEMORY)); also, a comment pointing to the appropriate PCI section might be helpful. Are you going to submit this directly to the PCI maintainer? Even though it happens to show on ia64, it's a generic bug. (And why not cc [email protected] while you're at it? ;-) Thanks, --david