a20 apic_cpu
API Reference Manual  /  4 Model-to-Model Interfaces  / 

apic_bus

Description
This interface is implemented by all apic buses, and used by the IO-APICs to send a message over the bus.

Messages with delivery mode Apic_Delivery_Mode_Ext_INT needs to be acknowledged. They are acknowledged at the object pointed to by the apic's "pic" attribute via the interrupt_cpu interface.

SIM_INTERFACE(apic_bus) {
        apic_bus_status_t (*interrupt)(conf_object_t *obj,
                                       apic_destination_mode_t dest_mode,
                                       apic_delivery_mode_t delivery_mode,
                                       int level_assert,
                                       apic_trigger_mode_t trigger_mode,
                                       uint8 vector,
                                       uint8 destination);
};

#define APIC_BUS_INTERFACE "apic_bus"

typedef enum {
        Apic_Destination_Mode_Physical = 0,
        Apic_Destination_Mode_Logical = 1
} apic_destination_mode_t;

typedef enum {
        Apic_Delivery_Mode_Fixed = 0,
        Apic_Delivery_Mode_Lowest_Priority = 1,
        Apic_Delivery_Mode_SMI = 2,
        Apic_Delivery_Mode_Remote_Read = 3,
        Apic_Delivery_Mode_NMI = 4,
        Apic_Delivery_Mode_INIT = 5,
        Apic_Delivery_Mode_Start_Up = 6,
        Apic_Delivery_Mode_Ext_INT = 7
} apic_delivery_mode_t;

typedef enum {
        Apic_Trigger_Mode_Edge = 0,
        Apic_Trigger_Mode_Level = 1
} apic_trigger_mode_t;

typedef enum {
        Apic_Bus_Accepted = 0,
        Apic_Bus_Retry = 1,
        Apic_Bus_No_Target = 2,
        Apic_Bus_Invalid = 3
} apic_bus_status_t;

See the architecture software developer's manual for more information about the parameters. For IPIs, the sender is responsible for filtering out reserved vectors (vectors 0 through 15) and flagging the appropriate error on the sending side. For I/O-APIC initiated interrupts, reserved vectors can be sent and will flag errors in the receiving APICs.

Execution Context
Cell Context for all methods.

a20 apic_cpu