Subversion Repositories HelenOS

Rev

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

Rev 4346 Rev 4348
Line 35... Line 35...
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>
39
#include <console/chardev.h>
-
 
40
#include <proc/thread.h>
40
 
41
 
41
/* number of bytes in the TOC magic, including the terminating '\0' */
42
/* number of bytes in the TOC magic, including the NULL-terminator */
42
#define TOC_MAGIC_BYTES     8
43
#define TOC_MAGIC_BYTES     8
43
 
44
 
44
/* number of bytes in the TOC key, including the terminating '\0' */
45
/* number of bytes in the TOC key, including the NULL-terminator */
45
#define TOC_KEY_SIZE        8
46
#define TOC_KEY_SIZE        8
46
 
47
 
47
/* maximum number of entries in the SRAM table of contents */
48
/* maximum number of entries in the SRAM table of contents */
48
#define MAX_TOC_ENTRIES     32
49
#define MAX_TOC_ENTRIES     32
49
 
50
 
50
/* 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 */
51
#define SGCN_MAGIC_BYTES    4
52
#define SGCN_MAGIC_BYTES    4
52
 
53
 
53
/**
54
/**
54
 * 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
55
 * 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 114... Line 115...
114
   
115
   
115
    /** offset within the SGCN buffer of the output buffer write pointer */
116
    /** offset within the SGCN buffer of the output buffer write pointer */
116
    uint32_t out_wrptr;
117
    uint32_t out_wrptr;
117
} __attribute__ ((packed)) sgcn_buffer_header_t;
118
} __attribute__ ((packed)) sgcn_buffer_header_t;
118
 
119
 
-
 
120
typedef struct {
-
 
121
    thread_t *thread;
-
 
122
    indev_t *srlnin;
-
 
123
} sgcn_instance_t;
-
 
124
 
119
void sgcn_grab(void);
125
extern void sgcn_grab(void);
120
void sgcn_release(void);
126
extern void sgcn_release(void);
121
indev_t *sgcnin_init(void);
127
extern sgcn_instance_t *sgcnin_init(void);
-
 
128
extern void sgcnin_wire(sgcn_instance_t *, indev_t *);
122
void sgcnout_init(void);
129
extern void sgcnout_init(void);
123
 
130
 
124
#endif
131
#endif
125
 
132
 
126
/** @}
133
/** @}
127
 */
134
 */