Subversion Repositories HelenOS

Rev

Rev 3386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 36... Line 36...
36
#include <stdio.h>
36
#include <stdio.h>
37
 
37
 
38
#include "fb.h"
38
#include "fb.h"
39
#include "ega.h"
39
#include "ega.h"
40
#include "msim.h"
40
#include "msim.h"
-
 
41
#include "ski.h"
-
 
42
#include "sgcn.h"
41
#include "main.h"
43
#include "main.h"
42
 
44
 
43
#define NAME "fb"
45
#define NAME "fb"
44
 
46
 
45
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area)
47
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area)
46
{
48
{
47
    void *dest;
49
    void *dest;
48
 
50
   
49
    dest = as_get_mappable_page(IPC_GET_ARG2(*call));
51
    dest = as_get_mappable_page(IPC_GET_ARG2(*call));
50
    if (ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) {
52
    if (ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) {
51
        if (*area)
53
        if (*area)
52
            as_area_destroy(*area);
54
            as_area_destroy(*area);
53
        *area = dest;
55
        *area = dest;
Line 58... Line 60...
58
{
60
{
59
    printf(NAME ": HelenOS Framebuffer service\n");
61
    printf(NAME ": HelenOS Framebuffer service\n");
60
   
62
   
61
    ipcarg_t phonead;
63
    ipcarg_t phonead;
62
    bool initialized = false;
64
    bool initialized = false;
63
 
65
   
64
#ifdef FB_ENABLED
66
#ifdef FB_ENABLED
65
    if (sysinfo_value("fb.kind") == 1) {
67
    if (sysinfo_value("fb.kind") == 1) {
66
        if (fb_init() == 0)
68
        if (fb_init() == 0)
67
            initialized = true;
69
            initialized = true;
68
    }
70
    }
69
#endif
71
#endif
70
#ifdef EGA_ENABLED
72
#ifdef EGA_ENABLED
71
    if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
73
    if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
72
        if (ega_init() == 0)
74
        if (ega_init() == 0)
73
            initialized = true;
75
            initialized = true;
Line 77... Line 79...
77
    if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
79
    if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
78
        if (msim_init() == 0)
80
        if (msim_init() == 0)
79
            initialized = true;
81
            initialized = true;
80
    }
82
    }
81
#endif
83
#endif
-
 
84
#ifdef SGCN_ENABLED
-
 
85
    if ((!initialized) && (sysinfo_value("fb.kind") == 4)) {
-
 
86
        if (sgcn_init() == 0)
-
 
87
            initialized = true;
-
 
88
    }
-
 
89
#endif
-
 
90
#ifdef SKI_ENABLED
-
 
91
    if ((!initialized) && (sysinfo_value("fb") != true)) {
-
 
92
        if (ski_init() == 0)
-
 
93
            initialized = true;
-
 
94
    }
-
 
95
#endif
82
 
96
 
83
    if (!initialized)
97
    if (!initialized)
84
        return -1;
98
        return -1;
85
 
99
   
86
    if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
100
    if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
87
        return -1;
101
        return -1;
88
   
102
   
89
    printf(NAME ": Accepting connections\n");
103
    printf(NAME ": Accepting connections\n");
90
    async_manager();
104
    async_manager();
-
 
105
   
91
    /* Never reached */
106
    /* Never reached */
92
    return 0;
107
    return 0;
93
}
108
}