Got some news concerning SYSCON driver for Linux. I was thinking how to implement it, we can access SYSCON directly now by mapping SYSCON MMIO registers with HV call 114 on linux. And i reversed the protocol and MMIO registers of SYSCON which are used by HV to send/receive messages to/from it, it’s simple. And today i figured out how we could implement it with interrupts
I think i have found a way to enable SYSCON interrupt (which is triggered when SYSCON sends messages to HV) on Linux. But it needs HV patching of course. I will try to code a test version this week and then we will have a full access to SYSCON, no need for SC Manager anymore.
SYSCON is on SB bus. Every SB peripheral has an assigned interrupt index, and when the interrupt fires, SB common interrupt handler is called which dispatches the interrupt to the proper handling routine, like ATA, ENCDEC or SYSCON e.g. Furthermore, each interrupt handler for a SB peripheral has an Outlet assigned. For SYSCON, the Outlet pointer is NULL. The idea is to create a new Outlet (possible from Linux), assign it to a VIRQ (also easy). The hard part is to install this Outlet for SYSCON. There is no way doing it with default HV calls, i need to patch HV and store the pointer to the Outlet at the right location. Furthermore, i need to disable HV’s interrupt handler for SYSCON, so only Linux will handle the interrupt.
So much about the theory. Let’s see if i can implement it. If it doesn’t work then we can implement it with polling anyways.