Changeset 94d614e in mainline for kernel/arch/sparc64/src/console.c
- Timestamp:
- 2006-07-13T17:32:38Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5f76758
- Parents:
- 63cda71
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/console.c
r63cda71 r94d614e 40 40 #include <arch/drivers/i8042.h> 41 41 #include <genarch/i8042/i8042.h> 42 #include <genarch/ofw/ofw.h>43 42 #include <console/chardev.h> 44 43 #include <console/console.h> … … 46 45 #include <arch/register.h> 47 46 #include <proc/thread.h> 48 #include <synch/mutex.h>49 47 #include <arch/mm/tlb.h> 48 #include <arch/boot/boot.h> 50 49 51 50 #define KEYBOARD_POLL_PAUSE 50000 /* 50ms */ 52 53 static void ofw_sparc64_putchar(chardev_t *d, const char ch);54 55 static volatile int ofw_console_active;56 57 static chardev_t ofw_sparc64_console;58 static chardev_operations_t ofw_sparc64_console_ops = {59 .write = ofw_sparc64_putchar,60 };61 62 /** Initialize kernel console to use OpenFirmware services. */63 void ofw_sparc64_console_init(void)64 {65 chardev_initialize("ofw_sparc64_console", &ofw_sparc64_console, &ofw_sparc64_console_ops);66 stdin = NULL;67 stdout = &ofw_sparc64_console;68 ofw_console_active = 1;69 }70 51 71 52 /** Initialize kernel console to use framebuffer and keyboard directly. */ 72 53 void standalone_sparc64_console_init(void) 73 54 { 74 ofw_console_active = 0;75 55 stdin = NULL; 76 56 77 57 kbd_init(); 78 fb_init(FB_PHYS_ADDRESS, FB_X_RES, FB_Y_RES, FB_COLOR_DEPTH, FB_X_RES * FB_COLOR_DEPTH / 8); 79 } 80 81 /** Write one character using OpenFirmware. 82 * 83 * @param d Character device (ignored). 84 * @param ch Character to be written. 85 */ 86 void ofw_sparc64_putchar(chardev_t *d, const char ch) 87 { 88 if (ch == '\n') 89 ofw_putchar('\r'); 90 ofw_putchar(ch); 58 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, 59 bootinfo.screen.bpp, bootinfo.screen.scanline); 91 60 } 92 61
Note:
See TracChangeset
for help on using the changeset viewer.