ARPDAS_QNX6 1.0
Classes | Defines | Typedefs | Functions | Variables
subbusd_int.h File Reference

Defines interface between QNX6 resource manager and subbus hardware. More...

#include <sys/dispatch.h>
#include "subbusd.h"
Include dependency graph for subbusd_int.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  carddef
struct  region

Defines

#define MAX_REGIONS   4

Typedefs

typedef struct carddef card_def

Functions

void incoming_sbreq (int rcvid, subbusd_req_t *req)
void init_subbus (dispatch_t *dpp)
void shutdown_subbus (void)
int expint_attach (int rcvid, char *cardID, unsigned short address, int region, struct sigevent *event, card_def **card)
int expint_detach (int rcvid, char *cardID, unsigned short *addr, unsigned int *bn)
void sb_cache_init (void)
int sb_cache_write (unsigned short addr, unsigned short data)
int sb_cache_read (unsigned short addr, unsigned short *data)

Variables

card_defcarddefs
region regions [MAX_REGIONS]
char * cache_hw_range
char * cache_sw_range

Detailed Description

Defines interface between QNX6 resource manager and subbus hardware.

A different hardware architecture can be supported by reimplementing these functions.

Definition in file subbusd_int.h.


Define Documentation

#define MAX_REGIONS   4

Definition at line 28 of file subbusd_int.h.

Referenced by expint_attach(), and service_expint().


Typedef Documentation

typedef struct carddef card_def

Function Documentation

int expint_attach ( int  rcvid,
char *  cardID,
unsigned short  address,
int  region,
struct sigevent *  event,
card_def **  card 
)
Returns:
On success, returns zero and sets *card to new card_def. errno codes on failure.

Definition at line 60 of file expint.c.

References region::address, carddef::address, carddef::bitno, region::bits, carddefs, carddef::cardID, CardID_MAX, region::def, carddef::event, find_card(), MAX_REGIONS, carddef::next, nl_error, carddef::owner, and carddef::reg_id.

Referenced by int_attach().

Here is the call graph for this function:

Here is the caller graph for this function:

int expint_detach ( int  rcvid,
char *  cardID,
unsigned short *  addr,
unsigned int *  bn 
)

Definition at line 134 of file expint.c.

References delete_card(), find_card(), and nl_error.

Referenced by int_detach(), process_interrupt(), and service_expint().

Here is the call graph for this function:

Here is the caller graph for this function:

void incoming_sbreq ( int  rcvid,
subbusd_req_t req 
)

The basic sanity of the incoming message has been checked by subbus_io_msg before it gets here, so we can at least assume that the message was big enough to include the specified message type, and that the message type is defined.

This is where we serialize the request The basic sanity of the incoming message has been checked by subbus_io_msg before it gets here, so we can at least assume that the message was big enough to include the specified message type, and that the message type is defined.

Definition at line 137 of file sc104.c.

References subbusd_req_data0::address, subbusd_rep_t::capabilities, subbusd_req_hdr_t::command, subbusd_req_t::d0, subbusd_req_t::d1, subbusd_req_t::d4, subbusd_req_data0::data, subbusd_rep_t::data, subbusd_req_data1::data, subbusd_req_t::data, disarm_sic(), enqueue_sbreq(), ErrorReply(), subbusd_cap_t::features, subbusd_rep_t::hdr, int_attach(), int_detach(), LIBRARY_SUB, subbus_mread_req::multread_cmd, subbus_mread_req::n_reads, subbusd_cap_t::name, nl_error, read_ack(), read_failure(), read_switches(), subbusd_rep_hdr_t::ret_type, sb_cache_read(), sb_cache_write(), SB_SERUSB_MAX_REQUEST, SBC_DISARM, SBC_GETCAPS, SBC_INTATT, SBC_INTDET, SBC_MREAD, SBC_QUIT, SBC_READACK, SBC_READCACHE, SBC_READFAIL, SBC_READSW, SBC_SETCMDENBL, SBC_SETCMDSTRB, SBC_SETFAIL, SBC_TICK, SBC_WRITEACK, SBC_WRITECACHE, SBDR_TYPE_CLIENT, subbusd_req_t::sbhdr, SBRT_CAP, SBRT_NONE, SBRT_US, SBS_ACK, SBS_NOACK, SBS_OK, set_cmdenbl(), set_cmdstrobe(), set_failure(), subbusd_rep_hdr_t::status, SUBBUS_FEATURES, SUBBUS_NAME_MAX, subbusd_cap_t::subfunc, tick_sic(), subbusd_rep_t::value, and write_ack().

Referenced by subbus_io_msg().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_subbus ( dispatch_t *  dpp)

Definition at line 238 of file sc104.c.

References enqueue_sbreq(), expint_init(), init_serusb(), nl_error, sb_data_ready(), sb_timeout(), SBDR_TYPE_INTERNAL, SC_SB_CONFIG, SC_SB_HIGHCTRL, SC_SB_LOWCTRL, SC_SB_RESET, and service_expint().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void sb_cache_init ( void  )

Definition at line 101 of file cache.c.

References cache_hw_range, cache_sw_range, hw_max_addr, hw_min_addr, hwcache, new_memory(), nl_error, process_range(), sw_max_addr, sw_min_addr, and swcache.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int sb_cache_read ( unsigned short  addr,
unsigned short *  data 
)

Definition at line 51 of file cache.c.

References hw_max_addr, hw_min_addr, hwcache, nl_error, sw_max_addr, sw_min_addr, and swcache.

Referenced by incoming_sbreq().

Here is the caller graph for this function:

int sb_cache_write ( unsigned short  addr,
unsigned short  data 
)

Definition at line 25 of file cache.c.

References hw_max_addr, hw_min_addr, hwcache, nl_error, sw_max_addr, sw_min_addr, and swcache.

Referenced by incoming_sbreq().

Here is the caller graph for this function:

void shutdown_subbus ( void  )

Definition at line 260 of file sc104.c.

References n_compound_reads, n_part_reads, n_reads, n_writes, and nl_error.

Referenced by main().

Here is the caller graph for this function:


Variable Documentation

Definition at line 18 of file cache.c.

Referenced by sb_cache_init().

Definition at line 18 of file cache.c.

Referenced by sb_cache_init().

Definition at line 28 of file expint.c.

Referenced by expint_attach(), and process_interrupt().

region regions[MAX_REGIONS]

Definition at line 29 of file expint.c.

Referenced by service_expint().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines