Changeset 113c677 in mainline


Ignore:
Timestamp:
2008-07-27T15:15:48Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
94fa807d
Parents:
46d8eb9
Message:

reintroduce support for MSIM text console in user space

Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/drivers/ega.c

    r46d8eb9 r113c677  
    9494        sysinfo_set_item_val("fb.height", NULL, ROWS);
    9595        sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM);
    96         sysinfo_set_item_val("fb.address.color", NULL, PAGE_COLOR((uintptr_t)
    97                 videoram));
    9896}
    9997
  • kernel/arch/mips32/include/drivers/msim.h

    r46d8eb9 r113c677  
    3737
    3838/** Address of devices. */
    39 #define MSIM_VIDEORAM           0xB0000000
    40 #define MSIM_KBD_ADDRESS        0xB0000000
     39#define MSIM_VIDEORAM           0x90000000
     40#define MSIM_KBD_ADDRESS        0x90000000
    4141#define MSIM_KBD_IRQ            2
    4242
  • kernel/arch/mips32/include/drivers/serial.h

    r46d8eb9 r113c677  
    3838#include <console/chardev.h>
    3939
    40 #define SERIAL_ADDRESS    0xB8000000
     40#define SERIAL_ADDRESS    0x98000000
    4141
    4242#define SERIAL_MAX        4
  • kernel/arch/mips32/src/drivers/msim.c

    r46d8eb9 r113c677  
    4040#include <console/console.h>
    4141#include <sysinfo/sysinfo.h>
     42#include <ddi/ddi.h>
    4243
     44static parea_t msim_parea;
    4345static chardev_t console;
    4446static irq_t msim_irq;
     
    154156        sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ);
    155157        sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS);
     158       
     159        msim_parea.pbase = KA2PA(MSIM_VIDEORAM);
     160        msim_parea.vbase = MSIM_VIDEORAM;
     161        msim_parea.frames = 1;
     162        msim_parea.cacheable = false;
     163        ddi_parea_register(&msim_parea);
     164       
     165        sysinfo_set_item_val("fb", NULL, true);
     166        sysinfo_set_item_val("fb.kind", NULL, 3);
     167        sysinfo_set_item_val("fb.address.physical", NULL, KA2PA(MSIM_VIDEORAM));
    156168}
    157169
  • uspace/srv/fb/Makefile

    r46d8eb9 r113c677  
    5151        CFLAGS += -DFB_ENABLED
    5252endif
    53 
    5453ifeq ($(ARCH), ia32)
    5554        SOURCES += ega.c
     
    6160endif
    6261ifeq ($(ARCH), mips32)
    63         CFLAGS += -DFB_INVERT_ENDIAN
     62        SOURCES += msim.c
     63        CFLAGS += -DMSIM_ENABLED -DFB_INVERT_ENDIAN
    6464endif
    6565
  • uspace/srv/fb/main.c

    r46d8eb9 r113c677  
    3838#include "fb.h"
    3939#include "ega.h"
     40#include "msim.h"
    4041#include "main.h"
    4142
     
    5960       
    6061        ipcarg_t phonead;
    61         int initialized = 0;
     62        bool initialized = false;
    6263
    6364#ifdef FB_ENABLED
    6465        if (sysinfo_value("fb.kind") == 1) {
    6566                if (fb_init() == 0)
    66                         initialized = 1;
     67                        initialized = true;
    6768        }
    6869#endif
    6970#ifdef EGA_ENABLED
    70         if (!initialized && sysinfo_value("fb.kind") == 2) {
     71        if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
    7172                if (ega_init() == 0)
    72                         initialized = 1;
     73                        initialized = true;
     74        }
     75#endif
     76#ifdef MSIM_ENABLED
     77        if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
     78                if (msim_init() == 0)
     79                        initialized = true;
    7380        }
    7481#endif
Note: See TracChangeset for help on using the changeset viewer.