Changes in kernel/arch/sparc64/include/drivers/sgcn.h [253d3d0:a71c158] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/drivers/sgcn.h
r253d3d0 ra71c158 39 39 #include <console/chardev.h> 40 40 #include <proc/thread.h> 41 #include <synch/spinlock.h> 41 42 42 43 /* number of bytes in the TOC magic, including the NULL-terminator */ 43 #define TOC_MAGIC_BYTES 44 #define TOC_MAGIC_BYTES 8 44 45 45 46 /* number of bytes in the TOC key, including the NULL-terminator */ 46 #define TOC_KEY_SIZE 47 #define TOC_KEY_SIZE 8 47 48 48 49 /* maximum number of entries in the SRAM table of contents */ 49 #define MAX_TOC_ENTRIES 50 #define MAX_TOC_ENTRIES 32 50 51 51 52 /* number of bytes in the SGCN buffer magic, including the NULL-terminator */ 52 #define SGCN_MAGIC_BYTES 53 #define SGCN_MAGIC_BYTES 4 53 54 54 55 /** 55 56 * Entry in the SRAM table of contents. Describes one segment of the SRAM 56 57 * which serves a particular purpose (e.g. OBP serial console, Solaris serial 57 * console, Solaris mailbox,...). 58 * console, Solaris mailbox,...). 58 59 */ 59 60 typedef struct { … … 84 85 /** 85 86 * SGCN buffer header. It is placed at the very beginning of the SGCN 86 * buffer. 87 * buffer. 87 88 */ 88 89 typedef struct { … … 104 105 /** offset within the SGCN buffer of the input buffer write pointer */ 105 106 uint32_t in_wrptr; 106 107 107 108 /** offset within the SGCN buffer of the output buffer start */ 108 109 uint32_t out_begin; … … 119 120 120 121 typedef struct { 122 /** Starting address of SRAM */ 123 uintptr_t sram_begin; 124 125 /** Starting address of the SGCN buffer */ 126 uintptr_t buffer_begin; 127 128 /** 129 * Ensure that writing to the buffer and consequent 130 * update of the write pointer are one atomic operation. 131 */ 132 SPINLOCK_DECLARE(output_lock); 133 134 /** 135 * Prevent the input buffer read/write pointers from 136 * getting to inconsistent state. 137 */ 138 SPINLOCK_DECLARE(input_lock); 139 121 140 thread_t *thread; 122 141 indev_t *srlnin; 123 142 } sgcn_instance_t; 124 143 125 extern void sgcn_grab(void);126 extern void sgcn_release(void);127 144 extern sgcn_instance_t *sgcnin_init(void); 128 145 extern void sgcnin_wire(sgcn_instance_t *, indev_t *); 129 extern voidsgcnout_init(void);146 extern outdev_t *sgcnout_init(void); 130 147 131 148 #endif
Note:
See TracChangeset
for help on using the changeset viewer.