Rev 1787 | Rev 2065 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 2015 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #include <arch/asm.h> |
44 | #include <arch/asm.h> |
45 | #include <memstr.h> |
45 | #include <memstr.h> |
46 | #include <console/chardev.h> |
46 | #include <console/chardev.h> |
47 | #include <console/console.h> |
47 | #include <console/console.h> |
48 | #include <sysinfo/sysinfo.h> |
48 | #include <sysinfo/sysinfo.h> |
- | 49 | #include <ddi/ddi.h> |
|
49 | 50 | ||
50 | /* |
51 | /* |
51 | * The EGA driver. |
52 | * The EGA driver. |
52 | * Simple and short. Function for displaying characters and "scrolling". |
53 | * Simple and short. Function for displaying characters and "scrolling". |
53 | */ |
54 | */ |
54 | 55 | ||
- | 56 | static parea_t ega_parea; /**< Physical memory area for EGA video RAM. */ |
|
- | 57 | ||
55 | SPINLOCK_INITIALIZE(egalock); |
58 | SPINLOCK_INITIALIZE(egalock); |
56 | static uint32_t ega_cursor; |
59 | static uint32_t ega_cursor; |
57 | static uint8_t *videoram; |
60 | static uint8_t *videoram; |
58 | 61 | ||
59 | static void ega_putchar(chardev_t *d, const char ch); |
62 | static void ega_putchar(chardev_t *d, const char ch); |
Line 77... | Line 80... | ||
77 | ega_cursor = (hi << 8) | lo; |
80 | ega_cursor = (hi << 8) | lo; |
78 | 81 | ||
79 | chardev_initialize("ega_out", &ega_console, &ega_ops); |
82 | chardev_initialize("ega_out", &ega_console, &ega_ops); |
80 | stdout = &ega_console; |
83 | stdout = &ega_console; |
81 | 84 | ||
- | 85 | ega_parea.pbase = VIDEORAM; |
|
- | 86 | ega_parea.vbase = (uintptr_t) videoram; |
|
- | 87 | ega_parea.frames = 1; |
|
- | 88 | ega_parea.cacheable = false; |
|
- | 89 | ddi_parea_register(&ega_parea); |
|
- | 90 | ||
82 | sysinfo_set_item_val("fb", NULL, true); |
91 | sysinfo_set_item_val("fb", NULL, true); |
83 | sysinfo_set_item_val("fb.kind", NULL, 2); |
92 | sysinfo_set_item_val("fb.kind", NULL, 2); |
84 | sysinfo_set_item_val("fb.width", NULL, ROW); |
93 | sysinfo_set_item_val("fb.width", NULL, ROW); |
85 | sysinfo_set_item_val("fb.height", NULL, ROWS); |
94 | sysinfo_set_item_val("fb.height", NULL, ROWS); |
86 | sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM); |
95 | sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM); |
- | 96 | sysinfo_set_item_val("fb.address.color", NULL, PAGE_COLOR((uintptr_t) |
|
- | 97 | videoram)); |
|
87 | 98 | ||
88 | #ifndef CONFIG_FB |
99 | #ifndef CONFIG_FB |
89 | putchar('\n'); |
100 | putchar('\n'); |
90 | #endif |
101 | #endif |
91 | } |
102 | } |