Rev 3672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3672 | Rev 3707 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #define NAME "fb" |
44 | #define NAME "fb" |
45 | 45 | ||
46 | void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area) |
46 | void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area) |
47 | { |
47 | { |
48 | void *dest; |
48 | void *dest; |
49 | 49 | ||
50 | dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
50 | dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
51 | if (ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) { |
51 | if (ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) { |
52 | if (*area) |
52 | if (*area) |
53 | as_area_destroy(*area); |
53 | as_area_destroy(*area); |
54 | *area = dest; |
54 | *area = dest; |
Line 59... | Line 59... | ||
59 | { |
59 | { |
60 | printf(NAME ": HelenOS Framebuffer service\n"); |
60 | printf(NAME ": HelenOS Framebuffer service\n"); |
61 | 61 | ||
62 | ipcarg_t phonead; |
62 | ipcarg_t phonead; |
63 | bool initialized = false; |
63 | bool initialized = false; |
64 | 64 | ||
65 | #ifdef FB_ENABLED |
65 | #ifdef FB_ENABLED |
66 | if (sysinfo_value("fb.kind") == 1) { |
66 | if (sysinfo_value("fb.kind") == 1) { |
67 | if (fb_init() == 0) |
67 | if (fb_init() == 0) |
68 | initialized = true; |
68 | initialized = true; |
69 | } |
69 | } |
70 | #endif |
70 | #endif |
71 | #ifdef EGA_ENABLED |
71 | #ifdef EGA_ENABLED |
72 | if ((!initialized) && (sysinfo_value("fb.kind") == 2)) { |
72 | if ((!initialized) && (sysinfo_value("fb.kind") == 2)) { |
73 | if (ega_init() == 0) |
73 | if (ega_init() == 0) |
74 | initialized = true; |
74 | initialized = true; |
Line 87... | Line 87... | ||
87 | } |
87 | } |
88 | #endif |
88 | #endif |
89 | 89 | ||
90 | if (!initialized) |
90 | if (!initialized) |
91 | return -1; |
91 | return -1; |
92 | 92 | ||
93 | if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) |
93 | if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) |
94 | return -1; |
94 | return -1; |
95 | 95 | ||
96 | printf(NAME ": Accepting connections\n"); |
96 | printf(NAME ": Accepting connections\n"); |
97 | async_manager(); |
97 | async_manager(); |
- | 98 | ||
98 | /* Never reached */ |
99 | /* Never reached */ |
99 | return 0; |
100 | return 0; |
100 | } |
101 | } |