Changeset 119b46e in mainline for kernel/arch/mips32/src/mips32.c


Ignore:
Timestamp:
2013-03-22T17:25:04Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
59fb782, 8f9d70b, b183ce0a
Parents:
fa33ac4 (diff), 8fe2c9bd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/mips-malta.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mips32.c

    rfa33ac4 r119b46e  
    4141#include <memstr.h>
    4242#include <userspace.h>
    43 #include <console/console.h>
    4443#include <syscall/syscall.h>
    4544#include <sysinfo/sysinfo.h>
    4645#include <arch/debug.h>
    4746#include <arch/debugger.h>
    48 #include <arch/drivers/msim.h>
    49 #include <genarch/fb/fb.h>
    50 #include <genarch/drivers/dsrln/dsrlnin.h>
    51 #include <genarch/drivers/dsrln/dsrlnout.h>
    52 #include <genarch/srln/srln.h>
     47#include <arch/machine_func.h>
    5348
    5449/* Size of the code jumping to the exception handler code
     
    7065
    7166size_t cpu_count = 0;
     67
     68#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     69size_t sdram_size = 0;
     70#endif
    7271
    7372/** Performs mips32-specific initialization before main_bsp() is called. */
     
    8887                        cpu_count++;
    8988        }
     89
     90#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     91        sdram_size = bootinfo->sdram_size;
     92#endif
     93
     94        /* Initialize machine_ops pointer. */
     95        machine_ops_init();
    9096}
    9197
     
    124130{
    125131        interrupt_init();
    126        
    127 #ifdef CONFIG_FB
    128         /* GXemul framebuffer */
    129         fb_properties_t gxemul_prop = {
    130                 .addr = 0x12000000,
    131                 .offset = 0,
    132                 .x = 640,
    133                 .y = 480,
    134                 .scan = 1920,
    135                 .visual = VISUAL_RGB_8_8_8,
    136         };
    137        
    138         outdev_t *fbdev = fb_init(&gxemul_prop);
    139         if (fbdev)
    140                 stdout_wire(fbdev);
    141 #endif
    142 
    143 #ifdef CONFIG_MIPS_PRN
    144         outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS);
    145         if (dsrlndev)
    146                 stdout_wire(dsrlndev);
    147 #endif
     132
     133        machine_init();
     134        machine_output_init();
    148135}
    149136
     
    158145void arch_post_smp_init(void)
    159146{
    160         static const char *platform;
    161 
    162147        /* Set platform name. */
    163 #ifdef MACHINE_msim
    164         platform = "msim";
    165 #endif
    166 #ifdef MACHINE_bgxemul
    167         platform = "gxemul";
    168 #endif
    169 #ifdef MACHINE_lgxemul
    170         platform = "gxemul";
    171 #endif
    172         sysinfo_set_item_data("platform", NULL, (void *) platform,
    173             str_size(platform));
    174 
    175 #ifdef CONFIG_MIPS_KBD
    176         /*
    177          * Initialize the msim/GXemul keyboard port. Then initialize the serial line
    178          * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts.
    179          */
    180         dsrlnin_instance_t *dsrlnin_instance
    181             = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ);
    182         if (dsrlnin_instance) {
    183                 srln_instance_t *srln_instance = srln_init();
    184                 if (srln_instance) {
    185                         indev_t *sink = stdin_wire();
    186                         indev_t *srln = srln_wire(srln_instance, sink);
    187                         dsrlnin_wire(dsrlnin_instance, srln);
    188                         cp0_unmask_int(MSIM_KBD_IRQ);
    189                 }
    190         }
    191        
    192         /*
    193          * This is the necessary evil until the userspace driver is entirely
    194          * self-sufficient.
    195          */
    196         sysinfo_set_item_val("kbd", NULL, true);
    197         sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ);
    198         sysinfo_set_item_val("kbd.address.physical", NULL,
    199             PA2KA(MSIM_KBD_ADDRESS));
    200 #endif
     148        sysinfo_set_item_data("platform", NULL,
     149            (void *) machine_get_platform_name(),
     150            str_size(machine_get_platform_name()));
     151
     152        machine_input_init();
    201153}
    202154
Note: See TracChangeset for help on using the changeset viewer.