0

Our goal is to boot linux kernel using devicetree. Implementation like bootloader pass dtb file to linux to enumerate pci and stuffs ... In our server platforms we have multiple segments and multiple host bridges. First we try to enumerate one pci host bridge ...

We have these information's only,

0000:00:00.0 Host bridge: Ampere Computing, LLC Device 0300
Subsystem: Ampere Computing, LLC Device e100
Flags: fast devsel, NUMA node 0

0000:00:01.0 PCI bridge: Ampere Computing, LLC Altra PCI Express Root Port a1 (prog-if 00 [Normal decode])

Flags: bus master, fast devsel, latency 0, IRQ 70, NUMA node 0, IOMMU group 27
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: [disabled]
Memory behind bridge: 04000000-041fffff [size=2M]
Prefetchable memory behind bridge: 00006c0100000000-00006c01001fffff [size=2M]
Capabilities: [40] Power Management version 3
Capabilities: [70] Express Root Port (Slot+), MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Virtual Channel
Capabilities: [170] Secondary PCI Express
Capabilities: [1a0] Physical Layer 16.0 GT/s <?>
Capabilities: [1d0] Lane Margining at the Receiver <?>
Capabilities: [218] Extended Capability ID 0x2a
Capabilities: [258] Access Control Services
Capabilities: [270] Downstream Port Containment
Capabilities: [2b4] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
Capabilities: [3b4] Vendor Specific Information: ID=0001 Rev=1 Len=038 <?>
Capabilities: [3ec] Data Link Feature <?>
Capabilities: [3f8] Designated Vendor-Specific: Vendor=0001 ID=0000 Rev=1 Len=64 <?>
Capabilities: [43c] Vendor Specific Information: ID=0005 Rev=1 Len=018 <?>
Kernel driver in use: pcieport

we give a try to create a pci node, it looks like,

pcie0: pcie@6ffff0000000 {
#address-cells = <3>;
#size-cells = <2>;
compatible = "pci-host-cam-generic", "pci-host-ecam-generic";
device_type = "pci";
dma-coherent;
linux,pci-domain = <0x00>;
bus-range = <0x0 0xff>;
reg = <0x6fff 0xf0000000  0x0 0x10000000>;
ranges = <0x2000000 0x00006c01 0x00000000 0x00006c01 0x00000000 0x000003fe 0xe0000000
          0xc3000800 0x00006c00 0x04000000 0x00006c00 0x04000000 0x00000000 0x10000000>;  
};

output will be like,

pci-host-generic 6ffff0000000.pcie: host bridge /pcie@6ffff0000000 ranges:
pci-host-generic 6ffff0000000.pcie: Parsing ranges property...
pci-host-generic 6ffff0000000.pcie:      MEM 0x6c0100000000..0x6fffdfffffff -> 0x6c0100000000
pci-host-generic 6ffff0000000.pcie:      MEM 0x6c0004000000..0x6c0013ffffff -> 0x6c0004000000
pci-host-generic 6ffff0000000.pcie: ECAM at [mem 0x6ffff0000000-0x6fffffffffff] for [bus 00-ff]
pci-host-generic 6ffff0000000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0x6c0100000000-0x6fffdfffffff]
pci_bus 0000:00: root bus resource [mem 0x6c0004000000-0x6c0013ffffff pref]
pci_bus 0000:00: scanning bus
pci 0000:00:00.0: [1def:0300] type 00 class 0x060000
rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
rcu:    1-...0: (10 ticks this GP) idle=702/1/0x4000000000000000 softirq=67/67 fqs=2625 
    (detected by 10, t=5255 jiffies, g=-1055, q=1)
Task dump for CPU 1:
task:swapper/0       state:R  running task     stack:    0 pid:    1 ppid:     0 flags:0x0000002a
Call trace:
 __switch_to+0xf0/0x128
 0x0

any ideas to fix this issue ?

2
  • Why did you choose pci-host-cam-generic when the bus info says ecam? Commented Feb 5, 2024 at 16:10
  • Also tried with this driver "pci-host-ecam-generic" - same issues Commented Feb 6, 2024 at 5:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.