summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i960/rxgen960/startup/memchnl.h
blob: f130de4a5c119c57bfea7a0f6a8004dab031383b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*-------------------------------------*/
/* memchnl.h                           */
/* Last change : 16. 5.95              */
/*-------------------------------------*/ 
/*
 *  $Id$
 */

#ifndef _MEMCHNL_H_
#define _MEMCHNL_H_

/* The following is a dummy for now to be filled in
	as the message passing stuff gets migrated to 
	I20 (or other standard )
*/

typedef
struct memMsg{
	int * foo;
} IOTrCBlk, * iotrcb_ptr_t;

typedef void * iotrcb_sgm_t;

  /* Interrupt arrived from X processor.
   * This is invoked from low-level interrupt dispatcher.
   */
extern void memChnlIntrFromHost(void);
  /* This IOT's processing is completed.
   * Signal the host, it can take it back.
   */
extern void memChnlIotFinished(IOTrCBlk *);
  /* A fault has just occured. Pass a signal over
   * memory channel.
   */
extern void memChnlI960Fault(void);
  /* IOT handler procedure.
   */   
typedef void (* IotHandler)(IOTrCBlk *, int tr_req);
  /* Register handler to process IOT's.
   */   
extern void memChnlRegisterHndl(IotHandler);
  /* Intermediate image buffer.
   * Defined in *.ld
   */
extern unsigned int downloadStart[];   

typedef struct {
  int ptr_len;
  iotrcb_ptr_t ptr_loc;
  iotrcb_ptr_t * ptr_crnt;
  iotrcb_sgm_t * sgm_crnt;
} BufLookupHndl;
  /* Procedures to travel throughout the buffer page list.
   * It should be accomplished as below:
   *    ...
   *    BufLookupHndl hndl;
   *    char * buf;
   *    if (memBufLookupInit(& hndl, iot) != 0)  {
   *       while ((buf = memBufLookupNext(& hndl)) != 0)  {
   *         ... buf is a buffer page address.
   *       }
   *    }
   */
extern BufLookupHndl * memBufLookupInit(BufLookupHndl *, IOTrCBlk *);
extern void * memBufLookupNext(BufLookupHndl *);

#endif
/*-------------*/
/* End of file */
/*-------------*/