Subversion Repositories HelenOS

Rev

Rev 3153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3153 Rev 3674
Line 44... Line 44...
44
#include <memstr.h>
44
#include <memstr.h>
45
#include <console/chardev.h>
45
#include <console/chardev.h>
46
#include <console/console.h>
46
#include <console/console.h>
47
#include <sysinfo/sysinfo.h>
47
#include <sysinfo/sysinfo.h>
48
#include <arch/drivers/ega.h>
48
#include <arch/drivers/ega.h>
-
 
49
#include <ddi/ddi.h>
-
 
50
 
49
 
51
 
50
/*
52
/*
51
 * The EGA driver.
53
 * The EGA driver.
52
 * Simple and short. Function for displaying characters and "scrolling".
54
 * Simple and short. Function for displaying characters and "scrolling".
53
 */
55
 */
54
 
56
 
-
 
57
 
-
 
58
static parea_t ega_parea;   /**< Physical memory area for EGA video RAM. */
-
 
59
 
-
 
60
 
55
SPINLOCK_INITIALIZE(egalock);
61
SPINLOCK_INITIALIZE(egalock);
56
static uint32_t ega_cursor;
62
static uint32_t ega_cursor;
57
static uint8_t *videoram;
63
static uint8_t *videoram;
58
 
64
 
59
static void ega_putchar(chardev_t *d, const char ch);
65
static void ega_putchar(chardev_t *d, const char ch);
Line 73... Line 79...
73
     */
79
     */
74
    _memsetw(videoram, SCREEN, 0x0720);
80
    _memsetw(videoram, SCREEN, 0x0720);
75
 
81
 
76
    chardev_initialize("ega_out", &ega_console, &ega_ops);
82
    chardev_initialize("ega_out", &ega_console, &ega_ops);
77
    stdout = &ega_console;
83
    stdout = &ega_console;
-
 
84
 
-
 
85
 
-
 
86
    ega_parea.pbase = VIDEORAM & 0xffffffff;
-
 
87
    ega_parea.vbase = (uintptr_t) videoram;
-
 
88
    ega_parea.frames = 1;
-
 
89
    ega_parea.cacheable = false;
-
 
90
    ddi_parea_register(&ega_parea);
-
 
91
 
78
   
92
   
79
    sysinfo_set_item_val("fb", NULL, true);
93
    sysinfo_set_item_val("fb", NULL, true);
80
    sysinfo_set_item_val("fb.kind", NULL, 2);
94
    sysinfo_set_item_val("fb.kind", NULL, 2);
81
    sysinfo_set_item_val("fb.width", NULL, ROW);
95
    sysinfo_set_item_val("fb.width", NULL, ROW);
82
    sysinfo_set_item_val("fb.height", NULL, ROWS);
96
    sysinfo_set_item_val("fb.height", NULL, ROWS);
-
 
97
    sysinfo_set_item_val("fb.blinking", NULL, true);
83
    sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM);
98
    sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM & 0xffffffff);
84
   
99
   
85
#ifndef CONFIG_FB
100
#ifndef CONFIG_FB
86
    putchar('\n');
101
    putchar('\n');
87
#endif  
102
#endif  
88
}
103
}