User manual

87
In order to perform the operation, the initiator invokes a routine identified by the
get_attention_objects field of the chapi_in descriptor supplying in the parameter brq_handle
the identifier of bus request to get attention objects for, int the parameter cpu_no the
number of CPU which attention objects should be retrieved, in the parameter
attention_object the pointer which will be updated with the pointer to attention object and in
the parameter attention_value the reference where attention value will be stored. Attention
value should be written to attention object in order to interrupt bus server. Invocation
example is shown in the chapter below.
4.9.11 Get bus request objects for the bus server (CHARON deep inegration)
The operation of getting bus request objects for the bus server belongs to the group of
operations previously called “Replacement hardware support requests”, using this function
could require Stromasys consulting.. Such an operation is initiated by the device instance
and CHARON core is defined as the target of the operation. This routine can be used
when working with replacement hardware and interrupts. It should not be used during the
general loadable component development. Bus request objects in a couple with the
attention objects give developers efficient mechanism to interrupt CHARON emulators
from hardware device drivers.
In order to perform the operation, the initiator invokes a routine identified by the get_brq_
objects field of the chapi_in descriptor supplying in the parameter brq_handle the identifier of
bus request to get objects for, int the parameter cpu_no the number of CPU which bus
request objects should be retrieved, in the parameter brq_object the pointer which will be
updated with the pointer to bus request object and in the parameter brq_mask the
reference where bus request mask will be stored. Bus request mask identifies the bit in
bus request object responsible for particular bus request identified bu brq_handle
parameter. The procedure is invoked as follows:
brq_handle_t brq_handle;
const chapi_in * ci = …;
// Connect bus request to the bus getting brq_handle as in previous example
// Ask for attention objects of the first CPU during the initialization.
volatile unsigned long *attention_object = NULL;
volatile unsigned long *brq_object = NULL;
unsigned long attention_value;
unsigned long brq_mask;
if (ci->get_attention_objects) {
if(!ci->get_attention_objects(ci, brq_handle, 0, attention_object,
attention_value)) {
// Failure – report error message here
}
}
if (ci->get_brq_objects) {
if(!ci->get_brq_objects(ci, brq_handle, 0, brq_object, brq_mask)) {