BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
46
Section 4: System Control and Debug Unit
Document
1250_1125-UM100CB-R
M
AILBOX
R
EGISTERS
Each CPU has a mailbox register that can be used to signal events or small messages. The register may be
accessed by the other CPU (on a BCM1250) or a bus master peripheral. If the part is a device on the PCI bus
(i.e. not the host bridge) then the host on the PCI can use the mailbox to signal the CPU.
A mailbox register is 64 bits wide and has four interrupt lines, for each group of 16 bits the corresponding
interrupt is raised whenever any bit is set. To set a bit in the mailbox a 1 must be written to the appropriate bit
position in the
mbox_set
location. To clear a bit in the mailbox a 1 must be written to the appropriate bit position
in the
mbox_clear
location. Thus there is no need for an atomic read-modify-write. Typically only the CPU
which owns the register would write the clear register and the signalling agent would write the set register.
However, there is no protection in the hardware to enforce this (any agent that can access the
mbox_set
and
mbox_clear
locations can change the mailbox state). The interrupt outputs from a particular mailbox are only
routed to the interrupt mapper of one CPU, thus CPU0 cannot be interrupted by the setting of bits in
mailbox_1
and CPU1 cannot be interrupted by the setting of bits in
mailbox_0
.
Interrupts from the HyperTransport interface can set bits in the mailbox, allowing peripherals to signal events.
This is setup by the way the peripheral interrupts are configured by the system software.
The system software determines the use of the mailbox register and the meaning associated with each of the
bits. Other than the mapping from bit positions to interrupt lines the hardware imposes no restrictions.
The simplest way to use the mailbox is as sixty-four event channels grouped into four (or fewer) priority levels.
The signalling agent writes to set the event bit and the signaled CPU can clear it when it has responded. One
or more of the four interrupts will be raised whenever there are outstanding events in the mailbox. This is likely
to be the best method to use if high speed I/O interrupts will be feeding the mailbox.
At the other extreme, each of the quarters of the mailbox could be considered a channel for passing 16 bit
messages. An example use is in inter-processor procedure calls. The source of the call will marshal arguments
into a shared memory buffer, then make the call by writing the buffer index to the mailbox set location. This
raises an interrupt on the service processor, which will read the buffer index from the mailbox and write the
mailbox clear location. Since the shared memory buffer is coherent the service processor will always see the
correct data, and the ordering imposed by the write-interrupt cleanly transfers buffer ownership. When the
procedure is completed the results could be passed back using the reverse mechanism.
In addition to the normal address, the
mbox_set
and (read only)
mailbox
locations have aliases that are the
only registers in a 4k page. This page is accessible from the PCI interface (through BAR2 for the CPU 0
mailbox and BAR3 for the CPU1 mailbox). Thus PCI devices can only set bits in the mailbox (to signal the CPU)
or read the current mailbox status (to see if a signal was cleared), but can never clear the mailbox. The CPU
(or any other agent in the part) can access all the mailbox registers and can therefore both set and clear bits.
Table 17: Mailbox Registers
mailbox_cpu_0 -
00_1002_00C0
, alias_mailbox_cpu_0 -
00_1002_1xx0
(Read Only)
mailbox_cpu_1 -
00_1002_20C0
, alias_mailbox_cpu_1 -
00_1002_3xx0
(Read Only)
63
48
47
32
31
16
15
0
mbox_int_0
if any bit set
mbox_int_1
if any bit set
mbox_int_2
if any bit set
mbox_int_3
if any bit set
mbox_set_cpu_0 -
00_1002_00C8
, alias_mbox_set_cpu_0 -
00_1002_1xx8
(Write Only)
mbox_set_cpu_1 -
00_1002_20C8
, alias_mbox_set_cpu_1 -
00_1002_3xx8
(Write Only)
When this location is written, any bits that are set will cause the corresponding bit to be set in the mailbox register.
mbox_clr_cpu_0 -
00_1002_00D0
(Write Only)
mbox_clr_cpu_1 -
00_1002_20D0
(Write Only)
When this location is written, any bits that are set will cause the corresponding bit to be cleared in the mailbox register.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...