0
votes

I have a embedded system and there are two pci devices. I want to map always those devices in the same place. I know that Bios can do it. But want I want is doing from Linux.

In the bios, the steps are: https://superuser.com/questions/595672/how-is-memory-mapped-to-certain-hardware-how-is-mmio-accomplished-exactly

1º The BIOS discovers all the devices on the system.

2º Then it interrogates each device to decide whether the BIOS will set that device up and, if so, determine how much memory address space, if any, the device needs.

3ºThe BIOS then assigns space to each device and program's the address decoder by writing to its BAR (base address register).

What I want is do it when the linux initializes. I am using a powerPC and Linux (kernel 3.XX)

Thanks!

1
This document nairobi-embedded.org/linux_pci_device_driver.html seems like it should be of assistance.John Hascall
You perhaps have to write a quirk in architecture dependent code (arch/powerpc).0andriy

1 Answers

0
votes

You could ask the kernel to enumerate the bus again. check the PCIe hotplug implementation in the Linux.