vc.c File Reference

virtual console stuff ATTENTION: it's multi threaded More...

Go to the source code of this file.

Functions

static int vc_open_in (struct l4con_vc *vc)
 Do CON_IN part of open.
static int vc_open_out (struct l4con_vc *vc)
 Do CON_OUT part of open.
static void nothing_sync (void)
static void convert_color (struct l4con_vc *vc, l4con_pslim_color_t *color)
 Convert l4con_pslim_color_t into ``drawable'' color.
static int vc_l4io_init (void)
static void vc_init_gr (void)
 Init graphics console driver.
static int vc_font_init (void)
 Init font.
void vc_init ()
static int vc_open (struct l4con_vc *vc, l4_uint8_t mode, l4_threadid_t ev_handler)
 Open new virtual console (already set to CON_OPENING).
int vc_close (struct l4con_vc *this_vc)
 Close virtual console.
static int vc_puts (struct l4con_vc *vc, int from_user, const char *str, int len, l4_int16_t x, l4_int16_t y, l4con_pslim_color_t fg_color, l4con_pslim_color_t bg_color)
 Render string to screen.
static int vc_fill (struct l4con_vc *vc, int from_user, l4con_pslim_rect_t *rect, l4con_pslim_color_t color)
 fill rectangle of screen.
static int vc_puts_scale (struct l4con_vc *vc, int from_user, const char *str, int len, l4_int16_t x, l4_int16_t y, l4con_pslim_color_t fg_color, l4con_pslim_color_t bg_color, int scale_x, int scale_y)
 Put characters with scale >= 1.
void vc_show_id (struct l4con_vc *this_vc)
 Show id of current console at bottom of screen.
void vc_show_dmphys_poolsize (struct l4con_vc *this_vc)
void vc_show_cpu_load (struct l4con_vc *this_vc)
void vc_show_drops_cscs_logo (void)
void vc_clear (struct l4con_vc *vc)
 Clear vc.
long con_vc_smode_component (CORBA_Object _dice_corba_obj, unsigned char mode, const l4_threadid_t *ev_handler, CORBA_Server_Environment *_dice_corba_env)
 Setup mode of current virtual console: input, output or in/out.
long con_vc_gmode_component (CORBA_Object _dice_corba_obj, unsigned char *mode, unsigned long *sbuf_1size, unsigned long *sbuf_2size, unsigned long *sbuf_3size, CORBA_Server_Environment *_dice_corba_env)
 Get mode of current virtual console.
long con_vc_share_component (CORBA_Object _dice_corba_obj, const l4_threadid_t *client, CORBA_Server_Environment *_dice_corba_env)
long con_vc_revoke_component (CORBA_Object _dice_corba_obj, const l4_threadid_t *client, CORBA_Server_Environment *_dice_corba_env)
long con_vc_close_component (CORBA_Object _dice_corba_obj, l4_int16_t *_dice_reply, CORBA_Server_Environment *_dice_corba_env)
 Close current virtual console.
long con_vc_graph_smode_component (CORBA_Object _dice_corba_obj, l4_uint8_t g_mode, CORBA_Server_Environment *_dice_corba_env)
 Setup graphics mode of current virtual console.
long con_vc_graph_gmode_component (CORBA_Object _dice_corba_obj, l4_uint8_t *g_mode, l4_uint32_t *xres, l4_uint32_t *yres, l4_uint32_t *bits_per_pixel, l4_uint32_t *bytes_per_pixel, l4_uint32_t *bytes_per_line, l4_uint32_t *flags, l4_uint32_t *xtxt, l4_uint32_t *ytxt, CORBA_Server_Environment *_dice_corba_env)
 Get graphics mode of current virtual console.
long con_vc_graph_get_rgb_component (CORBA_Object _dice_corba_obj, l4_uint32_t *red_offs, l4_uint32_t *red_len, l4_uint32_t *green_offs, l4_uint32_t *green_len, l4_uint32_t *blue_offs, l4_uint32_t *blue_len, CORBA_Server_Environment *_dice_corba_env)
 Get Get RGB pixel values.
long con_vc_graph_mapfb_component (CORBA_Object _dice_corba_obj, unsigned long fb_offset, l4_snd_fpage_t *page, unsigned long *page_offset, CORBA_Server_Environment *_dice_corba_env)
long con_vc_ev_sflt_component (CORBA_Object _dice_corba_obj, unsigned long filter, CORBA_Server_Environment *_dice_corba_env)
long con_vc_ev_gflt_component (CORBA_Object _dice_corba_obj, unsigned long *filter, CORBA_Server_Environment *_dice_corba_env)
long con_vc_pslim_fill_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, l4con_pslim_color_t color, CORBA_Server_Environment *_dice_corba_env)
 Fill rectangular area of virtual framebuffer with color.
long con_vc_pslim_copy_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, l4_int16_t dx, l4_int16_t dy, CORBA_Server_Environment *_dice_corba_env)
 Copy rectangular area of virtual framebuffer to (dx,dy).
long con_vc_pslim_bmap_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, l4con_pslim_color_t fg_color, l4con_pslim_color_t bg_color, const l4_uint8_t *bmap, long bmap_size, l4_uint8_t bmap_type, CORBA_Server_Environment *_dice_corba_env)
 Set rectangular area of virtual framebuffer with foreground and background color mask in bitmap.
long con_vc_pslim_set_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, const l4_uint8_t *pmap, long pmap_size, CORBA_Server_Environment *_dice_corba_env)
 Set rectangular area of virtual framebuffer with color in pixelmap.
long con_vc_pslim_cscs_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, const unsigned char *y, int y_l, const unsigned char *u, int u_l, const unsigned char *v, int v_l, long yuv_type, char scale, CORBA_Server_Environment *_dice_corba_env)
 Convert pixmap from YUV to RGB color space, scale and set rectangular area of virtual framebuffer.
long con_vc_puts_component (CORBA_Object _dice_corba_obj, const char *s, int len, short x, short y, l4con_pslim_color_t fg_color, l4con_pslim_color_t bg_color, CORBA_Server_Environment *_dice_corba_env)
 Set rectangular area of virtual framebuffer with color in pixelmap.
long con_vc_puts_scale_component (CORBA_Object _dice_corba_obj, const char *s, int len, short x, short y, l4con_pslim_color_t fg_color, l4con_pslim_color_t bg_color, short scale_x, short scale_y, CORBA_Server_Environment *_dice_corba_env)
 Set rectangular area of virtual framebuffer with color in pixelmap.
long con_vc_puts_attr_component (CORBA_Object _dice_corba_obj, const short *s, int strattr_size, short x, short y, CORBA_Server_Environment *_dice_corba_env)
 Set rectangular area of virtual framebuffer with color in pixelmap.
long con_vc_direct_update_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect, CORBA_Server_Environment *_dice_corba_env)
long con_vc_direct_setfb_component (CORBA_Object _dice_corba_obj, const l4dm_dataspace_t *data_ds, CORBA_Server_Environment *_dice_corba_env)
long con_vc_stream_cscs_component (CORBA_Object _dice_corba_obj, const l4con_pslim_rect_t *rect_src, const l4con_pslim_rect_t *rect_dst, l4_uint8_t yuv_type, l4_snd_fpage_t *buffer, unsigned long *offs_y, unsigned long *offs_u, unsigned long *offs_v, CORBA_Server_Environment *_dice_corba_env)
 Convert pixmap from YUV to RGB color space, scale and set rectangular area of virtual framebuffer.
void vc_brightness_contrast (int diff_brightness, int diff_contrast)
void vc_init_rcvstring (int nb, l4_umword_t *addr, l4_umword_t *size, CORBA_Server_Environment *env)
 inits receive strings (replaces call to flick_server_set_rcvstring)
void vc_loop (struct l4con_vc *this_vc)
 con_vc - IDL server loop.
void vc_error (l4_msgdope_t result, CORBA_Server_Environment *env)

Variables

const char _binary_font_psf_start []
l4_umword_t status_area = 0
static vidix_video_eq_t cscs_eq
pslim_copy_fn fg_do_copy = sw_copy
pslim_copy_fn bg_do_copy = sw_copy
pslim_fill_fn fg_do_fill = sw_fill
pslim_fill_fn bg_do_fill = sw_fill
pslim_sync_fn fg_do_sync = nothing_sync
pslim_sync_fn bg_do_sync = nothing_sync
pslim_drty_fn fg_do_drty
con_accel_t hw_accel
static const l4con_pslim_color_t color_tab15 [16]
 Color tables for puts_attr.
static const l4con_pslim_color_t color_tab16 [16]
static const l4con_pslim_color_t color_tab32 [16]


Detailed Description

virtual console stuff ATTENTION: it's multi threaded

Date:
2001
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de> Frank Mehnert <fm3@os.inf.tu-dresden.de>

Definition in file vc.c.


Function Documentation

long con_vc_graph_get_rgb_component ( CORBA_Object  _dice_corba_obj,
l4_uint32_t *  red_offs,
l4_uint32_t *  red_len,
l4_uint32_t *  green_offs,
l4_uint32_t *  green_len,
l4_uint32_t *  blue_offs,
l4_uint32_t *  blue_len,
CORBA_Server_Environment *  _dice_corba_env 
)

Get Get RGB pixel values.

Parameters:
_dice_corba_obj IDL request structure
Return values:
red_offs offset of red value in pixel
red_len length of red value in pixel
green_offs offset of green value in pixel
green_len length of green value in pixel
blue_offs offset of blue value in pixel
blue_len length of blue value in pixel
_dice_corba_env IDL exception (unused)
Returns:
0 success

Definition at line 939 of file vc.c.

long con_vc_graph_gmode_component ( CORBA_Object  _dice_corba_obj,
l4_uint8_t *  g_mode,
l4_uint32_t *  xres,
l4_uint32_t *  yres,
l4_uint32_t *  bits_per_pixel,
l4_uint32_t *  bytes_per_pixel,
l4_uint32_t *  bytes_per_line,
l4_uint32_t *  flags,
l4_uint32_t *  xtxt,
l4_uint32_t *  ytxt,
CORBA_Server_Environment *  _dice_corba_env 
)

Get graphics mode of current virtual console.

Definition at line 901 of file vc.c.

long con_vc_graph_smode_component ( CORBA_Object  _dice_corba_obj,
l4_uint8_t  g_mode,
CORBA_Server_Environment *  _dice_corba_env 
)

Setup graphics mode of current virtual console.

Definition at line 891 of file vc.c.

long con_vc_pslim_bmap_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect,
l4con_pslim_color_t  fg_color,
l4con_pslim_color_t  bg_color,
const l4_uint8_t *  bmap,
long  bmap_size,
l4_uint8_t  bmap_type,
CORBA_Server_Environment *  _dice_corba_env 
)

Set rectangular area of virtual framebuffer with foreground and background color mask in bitmap.

Definition at line 1104 of file vc.c.

long con_vc_pslim_copy_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect,
l4_int16_t  dx,
l4_int16_t  dy,
CORBA_Server_Environment *  _dice_corba_env 
)

Copy rectangular area of virtual framebuffer to (dx,dy).

Definition at line 1076 of file vc.c.

long con_vc_pslim_cscs_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect,
const unsigned char *  y,
int  y_l,
const unsigned char *  u,
int  u_l,
const unsigned char *  v,
int  v_l,
long  yuv_type,
char  scale,
CORBA_Server_Environment *  _dice_corba_env 
)

Convert pixmap from YUV to RGB color space, scale and set rectangular area of virtual framebuffer.

Definition at line 1160 of file vc.c.

long con_vc_pslim_fill_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect,
l4con_pslim_color_t  color,
CORBA_Server_Environment *  _dice_corba_env 
)

Fill rectangular area of virtual framebuffer with color.

Definition at line 1054 of file vc.c.

long con_vc_pslim_set_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect,
const l4_uint8_t *  pmap,
long  pmap_size,
CORBA_Server_Environment *  _dice_corba_env 
)

Set rectangular area of virtual framebuffer with color in pixelmap.

Definition at line 1135 of file vc.c.

long con_vc_puts_attr_component ( CORBA_Object  _dice_corba_obj,
const short *  s,
int  strattr_size,
short  x,
short  y,
CORBA_Server_Environment *  _dice_corba_env 
)

Set rectangular area of virtual framebuffer with color in pixelmap.

Definition at line 1252 of file vc.c.

long con_vc_puts_component ( CORBA_Object  _dice_corba_obj,
const char *  s,
int  len,
short  x,
short  y,
l4con_pslim_color_t  fg_color,
l4con_pslim_color_t  bg_color,
CORBA_Server_Environment *  _dice_corba_env 
)

Set rectangular area of virtual framebuffer with color in pixelmap.

Definition at line 1206 of file vc.c.

long con_vc_puts_scale_component ( CORBA_Object  _dice_corba_obj,
const char *  s,
int  len,
short  x,
short  y,
l4con_pslim_color_t  fg_color,
l4con_pslim_color_t  bg_color,
short  scale_x,
short  scale_y,
CORBA_Server_Environment *  _dice_corba_env 
)

Set rectangular area of virtual framebuffer with color in pixelmap.

Definition at line 1228 of file vc.c.

long con_vc_stream_cscs_component ( CORBA_Object  _dice_corba_obj,
const l4con_pslim_rect_t *  rect_src,
const l4con_pslim_rect_t *  rect_dst,
l4_uint8_t  yuv_type,
l4_snd_fpage_t *  buffer,
unsigned long *  offs_y,
unsigned long *  offs_u,
unsigned long *  offs_v,
CORBA_Server_Environment *  _dice_corba_env 
)

Convert pixmap from YUV to RGB color space, scale and set rectangular area of virtual framebuffer.

Definition at line 1398 of file vc.c.

static void convert_color ( struct l4con_vc *  vc,
l4con_pslim_color_t *  color 
) [inline, static]

Convert l4con_pslim_color_t into ``drawable'' color.

Definition at line 92 of file vc.c.

void vc_clear ( struct l4con_vc *  vc  ) 

Clear vc.

Precondition:
have vc->fb_lock

Definition at line 745 of file vc.c.

int vc_close ( struct l4con_vc *  this_vc  ) 

Close virtual console.

Parameters:
this_vc information structure
Returns:
0 success -1 failed

Definition at line 402 of file vc.c.

static int vc_fill ( struct l4con_vc *  vc,
int  from_user,
l4con_pslim_rect_t *  rect,
l4con_pslim_color_t  color 
) [static]

fill rectangle of screen.

Precondition:
have vc->fb_lock

Definition at line 491 of file vc.c.

void vc_loop ( struct l4con_vc *  this_vc  ) 

con_vc - IDL server loop.

Definition at line 1661 of file vc.c.

static int vc_open ( struct l4con_vc *  vc,
l4_uint8_t  mode,
l4_threadid_t  ev_handler 
) [static]

Open new virtual console (already set to CON_OPENING).

Parameters:
vc current information structure
mode CON_OUT, CON_INOUT
ev_handler event handler thread return 0 success

Definition at line 266 of file vc.c.

int vc_open_in ( struct l4con_vc *  vc  )  [static]

Do CON_IN part of open.

Parameters:
vc current information structure
Returns:
0 success -1 failed

Definition at line 303 of file vc.c.

int vc_open_out ( struct l4con_vc *  vc  )  [static]

Do CON_OUT part of open.

Parameters:
vc current information structure
Returns:
0 success -1 failed

Definition at line 322 of file vc.c.

static int vc_puts ( struct l4con_vc *  vc,
int  from_user,
const char *  str,
int  len,
l4_int16_t  x,
l4_int16_t  y,
l4con_pslim_color_t  fg_color,
l4con_pslim_color_t  bg_color 
) [static]

Render string to screen.

Precondition:
have vc->fb_lock

Definition at line 448 of file vc.c.

static int vc_puts_scale ( struct l4con_vc *  vc,
int  from_user,
const char *  str,
int  len,
l4_int16_t  x,
l4_int16_t  y,
l4con_pslim_color_t  fg_color,
l4con_pslim_color_t  bg_color,
int  scale_x,
int  scale_y 
) [static]

Put characters with scale >= 1.

Precondition:
have vc->fb_lock

Definition at line 508 of file vc.c.

void vc_show_id ( struct l4con_vc *  this_vc  ) 

Show id of current console at bottom of screen.

Precondition:
have vc->fb_lock

Definition at line 562 of file vc.c.


Variable Documentation

const l4con_pslim_color_t color_tab15[16] [static]

Initial value:

{ 
  0x0000, 0x0015, 0x02a0, 0x02b5, 0x5400, 0x5415, 0x5540, 0x56b5,
  0x294a, 0x295f, 0x2bea, 0x2bff, 0x7d4a, 0x7d5f, 0x7fea, 0x7fff
}
Color tables for puts_attr.

Definition at line 72 of file vc.c.

const l4con_pslim_color_t color_tab16[16] [static]

Initial value:

{ 
  0x0000, 0x0015, 0x0540, 0x0555, 0xa800, 0xa815, 0xaaa0, 0xad55,
  0x52aa, 0x52bf, 0x57ea, 0x57ff, 0xfaaa, 0xfabf, 0xffea, 0xffff
}

Definition at line 77 of file vc.c.

const l4con_pslim_color_t color_tab32[16] [static]

Initial value:

{
  0x00000000, 0x000000aa, 0x0000aa00, 0x0000aaaa,
  0x00aa0000, 0x00aa00aa, 0x00aa5500, 0x00aaaaaa,
  0x00555555, 0x005555ff, 0x0055ff55, 0x0055ffff,
  0x00ff5555, 0x00ff55ff, 0x00ffff55, 0x00ffffff
}

Definition at line 82 of file vc.c.

con_accel_t hw_accel

Initial value:

{ copy:sw_copy, fill:sw_fill, sync:nothing_sync }

Definition at line 68 of file vc.c.


Generated on Wed Apr 11 06:37:05 2012 for DROPS Console: Internals by  doxygen 1.5.6