2 * \file l4con/server/src/l4con.h
3 * \brief some global structures
6 * \author Christian Helmuth <ch12@os.inf.tu-dresden.de>
7 * Frank Mehnert <fm3@os.inf.tu-dresden.de> */
9 * (c) 2001-2009 Technische Universität Dresden
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
19 #include <l4/l4con/l4con.h>
20 #include <l4/re/c/dataspace.h>
21 #include <l4/sys/types.h>
28 #define MAX_NR_L4CONS (CONFIG_MAX_VC+1) /* number of vc's,
29 * consider master=0 */
33 typedef void (*pslim_copy_fn)(struct l4con_vc*, int sx, int sy,
34 int width, int height, int dx, int dy);
35 typedef void (*pslim_fill_fn)(struct l4con_vc*, int sx, int sy,
36 int width, int height, unsigned color);
37 typedef void (*pslim_blit_fn)(struct l4con_vc*, unsigned fgx, unsigned bgx,
38 const l4_uint8_t* chardata,
39 int width, int height, int yy, int xx);
40 typedef void (*pslim_sync_fn)(void);
41 typedef void (*pslim_drty_fn)(int x, int y, int width, int height);
45 struct l4con_vc *prev;
46 struct l4con_vc *next;
48 l4_uint8_t vc_number; /* which vc is it */
49 l4_uint8_t mode; /* IN, OUT, INOUT, USED, ... */
50 l4_cap_idx_t vc_l4id; /* local pSLIM handler */
52 void *sbuf1; /* 1st buffer for "indirect strings" */
53 void *sbuf2; /* 2nd buffer for "indirect strings" */
54 void *sbuf3; /* 3rd buffer for "indirect strings" */
55 l4_size_t sbuf1_size; /* size of 1st string buffer */
56 l4_size_t sbuf2_size; /* size of 2nd string buffer */
57 l4_size_t sbuf3_size; /* size of 3rd string buffer */
60 l4_uint8_t gmode; /* graphics mode */
61 l4_uint8_t bpp; /* bits per pixel */
62 l4_umword_t client_xres;
63 l4_umword_t client_yres; /* screen dimensions (client visible) */
64 l4_umword_t client_xofs;
65 l4_umword_t client_yofs; /* offsets of user vfb into physical fb */
66 l4_umword_t xres, yres; /* physical dimensions of fb */
67 l4_umword_t pan_xofs, pan_yofs;
68 l4_umword_t logo_x, logo_y;
69 l4_umword_t bytes_per_pixel; /* bytes per pixel */
70 l4_umword_t bytes_per_line; /* bytes per line */
71 l4_umword_t flags; /* miscellaneous flags */
72 l4_uint8_t *vfb; /* begin of vfb in memory */
73 l4_uint8_t *fb; /* whether vfb or h/w */
75 l4_uint8_t vfb_in_server; /* =1: server has allocated a dataspace */
76 l4_uint8_t save_restore; /* =1: save/restore to *vfb */
77 l4_uint8_t fb_mapped; /* =1: phys. framebuffer mapped to client */
78 l4_uint32_t vfb_size; /* size of vfb; depends on g_mode */
79 l4re_ds_t vfb_ds; /* ds for vfb */
80 pthread_mutex_t fb_lock; /* thread is `drawing' - mutex for fb */
81 const l4con_pslim_color_t *color_tab;
83 l4_cap_idx_t vc_partner_l4id; /* partner task (owner of console) */
86 l4_uint8_t ev_mode; /* event filter */
87 l4_cap_idx_t ev_partner_l4id; /* input event handler */
89 pslim_copy_fn do_copy; /* current function for fb_copy */
90 pslim_fill_fn do_fill; /* current function for fb_clean */
91 pslim_sync_fn do_sync; /* current function for sync acceleration */
92 pslim_drty_fn do_drty; /* function for marking framebuffer areas
93 * as dirty after direct framebuffer access */
94 l4_cap_idx_t clients[CONFIG_MAX_CLIENTS];