|
Virtual Serial PortsWe have created a patch for SCC Linux and the crbif driver (running on the MCPC) that provides virtual serial ports to each SCC core. You can download it here:
The patched crbif driver emulates 4 standard 16550A UARTs on default I/O addresses (0x3f8, 0x2f8, 0x3e8, 0x2e8),
independent for each SCC core (192 devices total). These UARTs are connected to corresponding character
devices on the MCPC, similar to a real setup of two machines connected by a null-modem cable. Standard programs
for accessing serial ports (like Using our virtual serial ports requires recompiling both the crbif driver and SCC Linux. Currently, only the versions compatible with sccKit 1.3.0 are supported. We kindly ask users of newer versions to wait until corresponding sources are published, so we have a chance to change our patches accordingly. InstallationYou need to install modified versions of both the crbif driver and SCC Linux for the serial ports to work. Recompiling crbif.ko with UART supportTo create the modified driver, follow these steps:
Before you can load the new driver, you need to close sccKit or any other program that accesses # sudo rmmod crbif You may also choose to replace the Intel-provided crbif driver with the recompiled one, thus allowing it to get loaded automatically
after booting the MCPC. To do so, replace the corresponding binary under Building SCC Linux with UART supportWe provide two patches for SCC Linux, depending on whether you need support for a root console via the serial port. When using the
Using serial portsWhen starting the modified SCC Linux while the patched crbif driver is loaded on the MCPC, each core recognizes four serial ports. All 192 ports are independently connected to character devices on the MCPC. Serial ports on SCC cores use the names /dev/ttyS0 to /dev/ttyS3, corresponding virtual devices on the MCPC use names like /dev/crbif0rb0c0ttyS0. The number after crbif0rb0c specifies the target SCC core, the remainder of the name is identical to the device name from SCC Linux. For example, /dev/ttyS1 (DOS name COM2) of SCC core 30 is connected to the device /dev/crbif0rb0c30ttyS1 on the MCPC. Devices on both SCC Linux and the MCPC can be used just like real hardware serial ports; e.g., input and output streams of programs can be redirected to them. To write the list of files in the root directory to the serial port, you can use the command ls / -lisa > /dev/ttyS0 on an SCC Linux core. If you have cat /dev/crbif0rb0c0ttyS0 running on the MCPC, it will receive the data sent to the port (this example is for core 0). Please note that we currently simulate a null-modem connection without flow control, so data may be lost if the receiving side is too slow in reading from its port. However, we never experienced this during our experiments. ContactPlease feel free to contact us (Jan-Arne Sobania, Peter Tröger) if you need help or have suggestions for further updates. | |||||||||||||||||||||||||