Subversion Repositories HelenOS

Rev

Rev 3675 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3675 Rev 4377
Line 34... Line 34...
34
 
34
 
35
#ifndef KERN_sparc64_SGCN_H_
35
#ifndef KERN_sparc64_SGCN_H_
36
#define KERN_sparc64_SGCN_H_
36
#define KERN_sparc64_SGCN_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
-
 
39
#include <console/chardev.h>
-
 
40
#include <proc/thread.h>
39
 
41
 
40
/* number of bytes in the TOC magic, including the terminating '\0' */
42
/* number of bytes in the TOC magic, including the NULL-terminator */
41
#define TOC_MAGIC_BYTES     8
43
#define TOC_MAGIC_BYTES     8
42
 
44
 
43
/* number of bytes in the TOC key, including the terminating '\0' */
45
/* number of bytes in the TOC key, including the NULL-terminator */
44
#define TOC_KEY_SIZE        8
46
#define TOC_KEY_SIZE        8
45
 
47
 
46
/* maximum number of entries in the SRAM table of contents */
48
/* maximum number of entries in the SRAM table of contents */
47
#define MAX_TOC_ENTRIES     32
49
#define MAX_TOC_ENTRIES     32
48
 
50
 
49
/* number of bytes in the SGCN buffer magic, including the terminating '\0' */
51
/* number of bytes in the SGCN buffer magic, including the NULL-terminator */
50
#define SGCN_MAGIC_BYTES    4
52
#define SGCN_MAGIC_BYTES    4
51
 
53
 
52
/**
54
/**
53
 * Entry in the SRAM table of contents. Describes one segment of the SRAM
55
 * Entry in the SRAM table of contents. Describes one segment of the SRAM
54
 * which serves a particular purpose (e.g. OBP serial console, Solaris serial
56
 * which serves a particular purpose (e.g. OBP serial console, Solaris serial
Line 113... Line 115...
113
   
115
   
114
    /** offset within the SGCN buffer of the output buffer write pointer */
116
    /** offset within the SGCN buffer of the output buffer write pointer */
115
    uint32_t out_wrptr;
117
    uint32_t out_wrptr;
116
} __attribute__ ((packed)) sgcn_buffer_header_t;
118
} __attribute__ ((packed)) sgcn_buffer_header_t;
117
 
119
 
-
 
120
typedef struct {
-
 
121
    thread_t *thread;
-
 
122
    indev_t *srlnin;
-
 
123
} sgcn_instance_t;
-
 
124
 
118
void sgcn_grab(void);
125
extern void sgcn_grab(void);
119
void sgcn_release(void);
126
extern void sgcn_release(void);
120
void sgcn_poll(void);
127
extern sgcn_instance_t *sgcnin_init(void);
-
 
128
extern void sgcnin_wire(sgcn_instance_t *, indev_t *);
121
void sgcn_init(void);
129
extern void sgcnout_init(void);
122
 
130
 
123
#endif
131
#endif
124
 
132
 
125
/** @}
133
/** @}
126
 */
134
 */