LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   PCI Device BAR0 Assigned, Not Written to PCI Config Space (https://www.linuxquestions.org/questions/linux-kernel-70/pci-device-bar0-assigned-not-written-to-pci-config-space-4175730301/)

paulie_d 10-27-2023 01:09 PM

PCI Device BAR0 Assigned, Not Written to PCI Config Space
 
I am booting Linux version 5.15 on an Intel Tiger Lake processor. I have an issue where none of the I2C controller PCI devices are programmed correctly. The dmesg log shows that the memory regions are assigned to BAR0 but none of the base addresses are programmed in PCI config spce (address 0x010).

Here is dmesg log output:
Code:

[    0.400536] pci 0000:00:15.0: BAR 0: assigned [mem 0x4017001000-0x4017001fff 64bit]
[    0.400560] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f
000-0x000fffff]
[    0.400561] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffe0000 64bit] for e820 entry [mem 0x0009f
000-0x000fffff]
[    0.400562] pci 0000:00:15.1: BAR 0: assigned [mem 0x4017002000-0x4017002fff 64bit]
[    0.400589] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f
000-0x000fffff]
[    0.400590] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffe0000 64bit] for e820 entry [mem 0x0009f
000-0x000fffff]
[    0.400592] pci 0000:00:15.2: BAR 0: assigned [mem 0x4017003000-0x4017003fff 64bit]
[    0.400615] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400616] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffe0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400617] pci 0000:00:15.3: BAR 0: assigned [mem 0x4017004000-0x4017004fff 64bit]
[    0.400641] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400642] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffe0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400643] pci 0000:00:19.0: BAR 0: assigned [mem 0x4017005000-0x4017005fff 64bit]
[    0.400667] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400668] clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffe0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400669] pci 0000:00:19.1: BAR 0: assigned [mem 0x4017006000-0x4017006fff 64bit]
[    0.400693] clipped [mem size 0x00020000] to [mem size 0xfffffffffffc0000] for e820 entry [mem 0x0009f000-0x000fffff]
[    0.400694] clipped [mem size 0x00010000] to [mem size 0xffffffffffff0000] for e820 entry [mem 0x0009f000-0x000fffff]

Here is the PCI config space for on of the I2C controllers. As can be seen, the BAR value has not been written.
Code:

$ lspci -xxx -s 0:15.2
00:15.2 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #2 (rev 20)
00: 86 80 ea a0 06 00 10 00 20 00 80 0c 10 00 80 00
10: 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 70 72
30: 00 00 00 00 80 00 00 00 00 00 00 00 ff 03 00 00

Any ideas what could cause this to occur? I included some 'clipping' messages in the dmesg output. Is this possibly related to my issue?

paulie_d 10-31-2023 04:19 PM

If I execute an lspci -v on the devices, it reveals that the I2C controllers are being mapped into virtual memory space. Is this why nothing is written to the BAR register? How is this function disabled?

Code:

oem@Cooter:~$ lspci -v -s 0:15.2
00:15.2 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #2 (rev 20)
        DeviceName: Onboard - Other
        Subsystem: Intel Corporation Tiger Lake-LP Serial IO I2C Controller
        Flags: bus master, fast devsel, latency 0, IRQ 29
        Memory at 4017003000 (64-bit, non-prefetchable) [virtual] [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: intel-lpss
        Kernel modules: intel_lpss_pci

I am trying to write some ACPI code that uses the BAR register as the base address for the I2C controller registers.


All times are GMT -5. The time now is 08:58 PM.