xeno74 wrote: ↑Mon Mar 01, 2021 8:59 pm
musa wrote: ↑Mon Mar 01, 2021 7:28 pm
Hi Christian what does this patch do ,that the kernel could not before?
Connecting the SB600's i8259 controller rather in pasemi's pci.c than in pasemi's setup.c. "pas_pci_init" was before "nemo_init_IRQ". Now "pas_pci_init" is after "nemo_init_IRQ" in the official kernel source code. I think "pas_pci_init" scans (discovers) the PCI(e) devices and after that, "nemo_init_IRQ" assigns interrupt numbers to these devices if required. It's not possible to assigns interrupt numbers to PCI(e) devices which have not been discovered yet.
@Darren
Could you please explain your patch? I am not sure if I understand it correctly.
You're not far off with your description above.
Originally we initialised the PCI-e ports in setup arch, this is quite early, and it seems uses some kernel functions that were not recommended (They changed a whole lot of different platforms at the same time for the same reason)
After this we added the ISA bridge, then the kernel would init the IRQ contollers.
The patch that broke booting on the X1000 moved the pas_pci_init to a node in the machine description, where it called later in the boot sequence. Unfortunately this is after we've tried to add the i8259 contoller from the pas_init_IRQ. Since our ISA bridge can't be found until we've connected the PCI-e ports the system tries to write to registers that aren't yet mapped - result a kernel panic, but before console I/O has been initialised so it appears to be a hang. We had a similar problem when they were introducing Radix support.
My patch changes our code so that it works with the new kernel code in place. Basically I moved the code that adds the i8259 cascade to after we've scanned for the ISA bridge where I know it will work.
Hopefully this makes sense, shout out if it doesn't
Regards
Darren