Skip to contentSkip to conversation

pci=earlydump on ARM

DISCUSSION Sinan Kaya 2 participants 3 messages May 23, 2018 – May 24, 2018 2 messages not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

A message that is not in the archive (sent off-list or not yet received): [email protected]/

Sinan Kaya

author
#2 lore raw
Quoted 9 lines

If that doesn't work or you'd rather brute-force it, you could try doing something like "pci=earlydump". This is currently only implemented for x86, so it would be some work to implement something similar for arm64. It would be a nice upstream addition if you *did* implement it.

In the earlydump output I would be looking for clues about the power state of 03:00.0 to try to figure out if the bootloader left it powered off or if Linux is doing something to turn it off.

Is it really possible to implement a generic version of this?

PCI on ARM64 is not really unified. There are several host bridge drivers for different types of access.

If we limit the functionality to ACPI, the answer is still maybe if we can pass the base address of the MMCONFIG region.

All products use a different MMCONFIG region.

Signature · 3 lines
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
#3 lore raw
Quoted 13 lines · Sinan Kaya
Quoted 10 lines

If that doesn't work or you'd rather brute-force it, you could try doing something like "pci=earlydump". This is currently only implemented for x86, so it would be some work to implement something similar for arm64. It would be a nice upstream addition if you *did* implement it.

In the earlydump output I would be looking for clues about the power state of 03:00.0 to try to figure out if the bootloader left it powered off or if Linux is doing something to turn it off.

Is it really possible to implement a generic version of this?

Quoted 7 lines

PCI on ARM64 is not really unified. There are several host bridge drivers for different types of access.

If we limit the functionality to ACPI, the answer is still maybe if we can pass the base address of the MMCONFIG region.

All products use a different MMCONFIG region.

On x86, early dump is implemented off to the side, outside the PCI core, and it takes advantage of arch-specific knowledge about ways to perform config accesses.

But I could imagine something in the pci_scan_device() area, where we have the normal config accessors but we haven't yet touched the device. I think we could get 99% of the early dump utility in a completely generic way.

There might be a few hand-crafted arch-specific quirks that touch PCI devices even before that point, but those should be pretty rare.

Bjorn

author
#4 lore raw
Quoted 26 lines · Bjorn Helgaas
Quoted 13 lines · Sinan Kaya
Quoted 10 lines

If that doesn't work or you'd rather brute-force it, you could try doing something like "pci=earlydump". This is currently only implemented for x86, so it would be some work to implement something similar for arm64. It would be a nice upstream addition if you *did* implement it.

In the earlydump output I would be looking for clues about the power state of 03:00.0 to try to figure out if the bootloader left it powered off or if Linux is doing something to turn it off.

Is it really possible to implement a generic version of this?

Quoted 7 lines

PCI on ARM64 is not really unified. There are several host bridge drivers for different types of access.

If we limit the functionality to ACPI, the answer is still maybe if we can pass the base address of the MMCONFIG region.

All products use a different MMCONFIG region.

On x86, early dump is implemented off to the side, outside the PCI core, and it takes advantage of arch-specific knowledge about ways to perform config accesses.

Quoted 7 lines

But I could imagine something in the pci_scan_device() area, where we have the normal config accessors but we haven't yet touched the device. I think we could get 99% of the early dump utility in a completely generic way.

There might be a few hand-crafted arch-specific quirks that touch PCI devices even before that point, but those should be pretty rare.

I see, you just want to dump the config space of each device as code is walking the bus while scanning. This should be doable.

I'll see what I can do.

Quoted 3 lines

Bjorn

Signature · 3 lines
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.