Thank you for pointing that out. When I came back to wiki about this I see it's even written there under MCR/MSR registers.
That modem got me a bit confused. I thought it's about the actual modem. But even wiki says: "modem that uses a UART as an interface to the computer".
OUT2 was set. I did modify this in
uart_init and have more information printed about it main main loop.
I have two ways of connecting to this old testing HW - either via other rs232 port on my new-ish box or using usb2rs232 cable (both were tested and worked ok when old HW was running FreeBSD).
This code doesn't work with USB cable on my primary desktop. It has even problems "catching up" with the console output during boot for some reason. It disconnects the session when I'm setting MCR. While MCR is set to 0x8 it doesn't work. I was able to trigger interrupt when I was attempting to kill cu session with ~ ( ~. was not ending the session for some reason (not in ssh session)).
However using my new-ish computer I was able to boot it just fine:
Code:
.>MIOS boot1
Loading kernel
kernel @ 0x200000
__init_kbd_module: about to enable irq1
uart_init: current MCR: 0x3
uart_init: about to enable irq4
welcome to kernel_main
main: master: IRR: 0 (pending ACKs), IMR: e8 (mask), ISR: 0 (EOI waiting)
main: slave: IRR: 0 (pending ACKs), IMR: 0 (mask), ISR: 0 (EOI waiting)
irq0: 00000000000006a8 ; <-- 's' pressed on the keyboard
irq1: 0000000000000001
irq2: 0000000000000000
irq3: 0000000000000000
irq4: 0000000000000000
0x3f8: MCR: 0x8, MSR: 0xb0
uart_isr_handler: hi ; <-- 'm' pressed in cu session
IRR: 4
uart_isr_handler: RBR: 0x6d
As I was writing this reply I got an idea that maybe terminal is messing up something and data is not being sent. But it worked with actual OS. I connected this USB cable to this new-ish box and used that to connect to the box. It worked.
Octocontrabass wrote:
Make sure you don't connect multiple ISA UARTs to the same IRQ line at the same time.
Please can you help me understand this a bit more? I thought there is (usually) only one UART chip on board and that's why I should check which device actually triggered the interrupt in all IIRs (something I'm not yet doing in my code).
edit: Looking at my board I do see two GD75232D chips. I'm assuming one would be for irq3 and one for irq4. If I understood you correctly you told me not to cause irq conflict with these two as it can create even damage to HW. Did I get that right?
In my code I'm still assuming what is where. The big next step would be to parse ACPI tables probably to see what I've got on the system.