E-26
DINK32 PowerPC ISA Debugger User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
MPC8240 I2O Doorbell Driver
E.3
MPC8240 I2O Doorbell Driver
E.3.1
I2O Description of Doorbell Communication
Between Agent and Host
The sequence of events that transpire during communication via the I2O doorbell registers
between host and agent applications running on Kahlua are described. This implementation
enables basic doorbell communication. It can be expanded to include other Kahlua message
unit activity via the message registers and the I2O message queue.
E.3.1.1
System Startup and Memory Map Initialization
An understanding of the agent’s Embedded Utilities Memory Block Base Address Register
(EUMBBAR) and Peripheral Control and Status Registers Base Address Register
(PCSRBAR) is important for I2O doorbell communication because both host and agent use
the agent’s inbound and outbound doorbell registers and message unit status and control
registers. The host accesses the agent’s registers via the agent’s PCSR and the agent
accesses its own registers via its own EUMB. It is worth noting that some registers, such as
the doorbell registers, can be accessed via either the PCSR or the EUMB. Other registers,
such as the message unit’s status and interrupt mask registers, can only be accessed via one
or the other of the PCSR or EUMB, but not both. The I2O library functions require the
caller to provide the base address (which will be either the PCSR or the EUMB) and a
parameter indicating which is used. In the DINK32 environment, functions are provided to
obtain both of these base addresses: get_kahlua_pcsrbar() and get_eumbbar(). The methods
of setting and obtaining the PCSR and EUMB base addresses are application-specific, but
the register offsets and bit definitions of the registers are specified for the Kahlua chip
memory map B and will be the same for all applications. Details about the register offsets
within the EUMB and PCSR as well as bit definitions within registers are found in the
Kahlua or Kahlua User’s Manual.
When the Kahlua host and agent come up running the DINK32 application, the host
application assigns the agent’s PCI address for the PCSR and writes it in the agent’s
PCSRBAR by calling config_kahlua_agent(). The agent application initializes its own
EUMBBAR [this actually happens in the KahluaInit() function, defined in .../kahlua.s] and
inbound and outbound address translation windows. This is done during initialization in the
main() function, main.c.
/*
** Try to enable a Kahlua slave device. This is only enabled for Map B.
*/
if (address_map[0] == ’B’)
F
n
.