The PCI BIOS is plug-n-play and thus the addresses of the I/O serial ports may be assigned to various I/O addresses dependent on a particular BIOS version or card speed. I can determine the I/O address of the serial port by calling a small ‘c’ program at the start of the sysinit file, but I’m not sure how to then get the Dev32.ser drivers started in the sysinit file with that address.
Since I want to use the same sysinit init in various systems that are configured with the same cards and use the same serial port drivers, I need to be able to start the drivers at the addresses derived by the BIOS for each particular system at power-on.
Does anyone know a way to overcome this problem or set the correct port addresses for the drivers dynamically?
My sysinit file starts serial drivers on several ports, i.e.
Dev32.ser -F -y 921600 e800,11 e808,11 e810,11 e818,11 e820,11 e828,11 e830,11 e838,11
and so on.
So if understand you correctly, once I have the port address for the board, I would code
printf("%s,%s %s,%s %s,%s %s,%s …\n", port1, irq, port2, irq, port3, irq, …);
and that would start the drivers at the designated port addresses.
Quickly as a note for interested readers. If you do use this method, you need to place into your sysinit file an invocation of your routine as follows:
myprog | sh -v &
where myprog actually defines the addresses and interrupts and creates the string that would
normally appear as
Dev32.ser -F -y 921600 e800,11 e808,11 e810,11 e818,11 e820,11 e828,11 e830,11 e838,11
and so on.