System information

4 Graphic Card Implementation
4.3.3 CHARM Interface of the RPC
The CHARM sends or receives an RPC command with the aid of the RPC driver and
the RPC handler. The RPC driver is the RPC related interface between the host and the
CHARM. It handles the access to the RPC I/O ports from the host and provides a Linux
character device to the CHARM Linux system: /dev/charm/rpc/control. A program on
the CHARM can initiate an RPC command for the host by writing to the RPC device.
The following enumeration illustrates the order to transfer an RPC command to the host
computer:
1. Open a file handle to the RPC device.
2. Write the RPC message as one data packet to the RPC device.
3. Close the RPC device.
The RPC command is immediately added to the command queue. The RPC command
is delivered, if the host requests the CHARM for new RPC commands. There is no signal
like an interrupt to trigger the RPC request of the host. The host computer solely requests
for RPC commands while executing the expansion ROM of the CHARM. Section 4.3.4
illustrates the data flow from the CHARM to the host and vice versa of an RPC message.
In contrast, the receiving and the execution of an RPC message sent by the host is
accomplished by the RPC Handler. The RPC Handler do a blocking read to the RPC
device. The RPC device driver wake ups the RPC handler, if a new RPC command from
the host arrives. The RPC Handler immediately executes the RPC command.
4.3.4 Data Flow of the RPC
Figure 4.18 depicts the data flow of a host initiated RPC command. The host computer
sends the RPC message to the PCI I/O ports of the CHARM. The PCI Target Control
informs the BAR Switch driver about the I/O access. The BAR Switch driver reads out
the data and distributes them to the RPC driver. Section 4.2.3 illustrates the function of
the BAR switch driver precisely. The RPC driver wakes up the RPC Handler which reads
out and processes the RPC messages.
RPC
Driver
PCI
Target Control
BAR Switch
Driver
PCI
Core
CHARM
VGA BIOS
Host
CHARM
RPC
Handler
Figure 4.18: Data flow of a host initiated RPC command. The dark boxes mark hardware
components and the white ones software units.
64