Changeset 94d614e in mainline for kernel/arch/sparc64/src/console.c


Ignore:
Timestamp:
2006-07-13T17:32:38Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a5f76758
Parents:
63cda71
Message:

Remove OpenFirmware calls from kernel/ entirely.

Switch the sparc64 port to use bootinfo.

Copy memcpy from boot/ to sparc64 kernel/ and
adjust it for memcpy_from/to_uspace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/console.c

    r63cda71 r94d614e  
    4040#include <arch/drivers/i8042.h>
    4141#include <genarch/i8042/i8042.h>
    42 #include <genarch/ofw/ofw.h>
    4342#include <console/chardev.h>
    4443#include <console/console.h>
     
    4645#include <arch/register.h>
    4746#include <proc/thread.h>
    48 #include <synch/mutex.h>
    4947#include <arch/mm/tlb.h>
     48#include <arch/boot/boot.h>
    5049
    5150#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 }
    7051
    7152/** Initialize kernel console to use framebuffer and keyboard directly. */
    7253void standalone_sparc64_console_init(void)
    7354{
    74         ofw_console_active = 0;
    7555        stdin = NULL;
    7656
    7757        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);
    9160}
    9261
Note: See TracChangeset for help on using the changeset viewer.