Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1610 → Rev 1609

/uspace/trunk/kbd/generic/kbd.c
38,67 → 38,9
#include <kbd.h>
#include <libadt/fifo.h>
#include <key_buffer.h>
#include <async.h>
 
#define NAME "KBD"
 
int cons_connected = 0;
int phone2cons = -1;
keybuffer_t keybuffer;
 
static void irq_handler(ipc_callid_t iid, ipc_call_t *call)
{
int chr;
if (cons_connected && phone2cons != -1) {
/* recode to ASCII - one interrupt can produce more than one code so result is stored in fifo */
kbd_arch_process(&keybuffer, IPC_GET_ARG2(*call));
while (!keybuffer_empty(&keybuffer)) {
if (!keybuffer_pop(&keybuffer, (int *)&chr))
break;
 
async_msg(phone2cons, KBD_PUSHCHAR, chr);
}
}
}
 
static void console_connection(ipc_callid_t iid, ipc_call_t *icall)
{
ipc_callid_t callid;
ipc_call_t call;
int retval;
 
if (cons_connected) {
ipc_answer_fast(iid, ELIMIT, 0, 0);
return;
}
cons_connected = 1;
ipc_answer_fast(iid, 0, 0, 0);
 
while (1) {
callid = async_get_call(&call);
switch (IPC_GET_METHOD(call)) {
case IPC_M_PHONE_HUNGUP:
cons_connected = 0;
ipc_hangup(phone2cons);
phone2cons = -1;
ipc_answer_fast(callid, 0,0,0);
return;
case IPC_M_CONNECT_TO_ME:
if (phone2cons != -1) {
retval = ELIMIT;
break;
}
phone2cons = IPC_GET_ARG3(call);
retval = 0;
break;
}
ipc_answer_fast(callid, retval, 0, 0);
}
}
 
 
int main(int argc, char **argv)
{
ipc_call_t call;
107,8 → 49,12
ipcarg_t phonead;
ipcarg_t phoneid;
char connected = 0;
keybuffer_t keybuffer;
ipcarg_t retval, arg1, arg2;
//open("null",0);
//open("stdout",0);
/* Initialize arch dependent parts */
if (!(res = kbd_arch_init())) {
return -1;
121,10 → 67,57
if ((res = ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, &phonead)) != 0) {
return -1;
}
};
while (1) {
callid = ipc_wait_for_call(&call);
switch (IPC_GET_METHOD(call)) {
case IPC_M_PHONE_HUNGUP:
connected = 0;
retval = 0;
break;
case IPC_M_CONNECT_ME_TO:
/* Only one connected client allowed */
if (connected) {
retval = ELIMIT;
} else {
retval = 0;
connected = 1;
}
break;
case IPC_M_CONNECT_TO_ME:
phoneid = IPC_GET_ARG3(call);
retval = 0;
break;
 
async_set_client_connection(console_connection);
async_set_interrupt_received(irq_handler);
async_manager();
case IPC_M_INTERRUPT:
if (connected) {
int chr;
/* recode to ASCII - one interrupt can produce more than one code so result is stored in fifo */
kbd_arch_process(&keybuffer, IPC_GET_ARG2(call));
 
retval = 0;
 
while (!keybuffer_empty(&keybuffer)) {
if (!keybuffer_pop(&keybuffer, (int *)&chr)) {
break;
}
{
arg1=chr;
send_call(phoneid, KBD_PUSHCHAR, arg1);
}
}
 
}
break;
default:
retval = ENOENT;
break;
}
 
if (! (callid & IPC_CALLID_NOTIFICATION)) {
ipc_answer_fast(callid, retval, arg1, arg2);
}
}
}
 
/uspace/trunk/klog/klog.c
40,12 → 40,12
{
int i;
async_serialize_start();
// psthread_serialize_start();
/* TODO: remove workaround around non-functional vsnprintf */
for (i=0; klog[i + IPC_GET_ARG2(*call)] && i < IPC_GET_ARG3(*call); i++)
putchar(klog[i + IPC_GET_ARG2(*call)]);
putchar('\n');
async_serialize_end();
// psthread_serialize_done();
}
 
int main(int argc, char *argv[])
/uspace/trunk/libc/include/async.h
37,11 → 37,7
typedef ipc_callid_t aid_t;
typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call);
 
static inline void async_manager(void)
{
psthread_schedule_next_adv(PS_TO_MANAGER);
}
 
int async_manager(void);
ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
static inline ipc_callid_t async_get_call(ipc_call_t *data)
{
61,7 → 57,7
*
* @return Return code of message
*/
static inline ipcarg_t async_req_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2)
static inline ipcarg_t sync_send_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2)
{
ipc_call_t result;
ipcarg_t rc;
74,9 → 70,9
*r2 = IPC_GET_ARG2(result);
return rc;
}
#define async_req(phoneid, method, arg1, r1) async_req_2(phoneid, method, arg1, 0, r1, 0)
#define sync_send(phoneid, method, arg1, r1) sync_send_2(phoneid, method, arg1, 0, r1, 0)
 
static inline ipcarg_t async_req_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
static inline ipcarg_t sync_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1,
ipcarg_t *r2, ipcarg_t *r3)
{
106,20 → 102,6
int _async_init(void);
 
 
/* Primitve functions for IPC communication */
void async_msg_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
ipcarg_t arg3);
void async_msg_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2);
#define async_msg(ph,m,a1) async_msg_2(ph,m,a1,0)
extern atomic_t async_futex;
 
static inline void async_serialize_start(void)
{
psthread_inc_sercount();
}
static inline void async_serialize_end(void)
{
psthread_dec_sercount();
}
 
extern atomic_t async_futex;
#endif
/uspace/trunk/libc/include/ipc/ipc.h
81,4 → 81,16
extern int ipc_unregister_irq(int irq);
extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, ipcarg_t arg1);
 
 
/* Primitve functions for IPC communication */
void send_call_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
ipcarg_t arg3);
void send_call_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2);
#define send_call(ph,m,a1) send_call_2(ph,m,a1,0)
/* These functions never preempt */
void nsend_call_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, ipcarg_t arg3);
void nsend_call_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2);
#define nsend_call(ph,m,a1) nsend_call_2(ph,m,a1,0)
 
#endif
/uspace/trunk/libc/include/psthread.h
40,13 → 40,10
(c)->tls = (sysarg_t) (ptls);
#endif /* context_set */
 
#define PSTHREAD_SERIALIZED 1
 
typedef enum {
PS_TO_MANAGER,
PS_FROM_MANAGER,
PS_PREEMPT,
PS_FROM_DEAD
PS_PREEMPT
} pschange_type;
 
typedef sysarg_t pstid_t;
78,8 → 75,6
void psthread_add_manager(pstid_t psthrid);
void psthread_remove_manager(void);
pstid_t psthread_get_id(void);
void psthread_inc_sercount(void);
void psthread_dec_sercount(void);
 
static inline int psthread_schedule_next() {
return psthread_schedule_next_adv(PS_PREEMPT);
/uspace/trunk/libc/generic/async.c
134,11 → 134,8
void (*cthread)(ipc_callid_t,ipc_call_t *);
} connection_t;
 
/** Identifier of incoming connection handled by current thread */
 
__thread connection_t *PS_connection;
/** If true, it is forbidden to use async_req functions and
* all preemption is disabled */
__thread int in_interrupt_handler;
 
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call);
228,7 → 225,6
awaiter_t *cur;
 
wd->timedout = 0;
wd->inlist = 1;
 
tmp = timeout_list.next;
while (tmp != &timeout_list) {
298,6 → 294,9
*/
conn = PS_connection;
 
if (usecs < 0) /* TODO: let it get through the ipc_call once */
return 0;
 
futex_down(&async_futex);
 
if (usecs) {
308,9 → 307,10
}
/* If nothing in queue, wait until something appears */
while (list_empty(&conn->msg_queue)) {
if (usecs)
if (usecs) {
conn->wdata.inlist = 1;
insert_timeout(&conn->wdata);
 
}
conn->wdata.active = 0;
psthread_schedule_next_adv(PS_TO_MANAGER);
/* Futex is up after getting back from async_manager
362,6 → 362,7
/* Setup thread local connection pointer */
PS_connection = (connection_t *)arg;
PS_connection->cthread(PS_connection->callid, &PS_connection->call);
 
/* Remove myself from connection hash table */
futex_down(&async_futex);
key = PS_connection->in_phone_hash;
434,9 → 435,7
/* Unrouted call - do some default behaviour */
switch (IPC_GET_METHOD(*call)) {
case IPC_M_INTERRUPT:
in_interrupt_handler = 1;
(*interrupt_received)(callid,call);
in_interrupt_handler = 0;
return;
case IPC_M_CONNECT_ME_TO:
/* Open new connection with thread etc. */
486,7 → 485,7
}
 
/** Endless loop dispatching incoming calls and answers */
static int async_manager_worker(void)
int async_manager(void)
{
ipc_call_t call;
ipc_callid_t callid;
522,9 → 521,8
continue;
}
 
if (callid & IPC_CALLID_ANSWERED) {
if (callid & IPC_CALLID_ANSWERED)
continue;
}
 
handle_call(callid, &call);
}
539,10 → 537,9
*/
static int async_manager_thread(void *arg)
{
in_interrupt_handler = 0; // TODO: Handle TLS better
futex_up(&async_futex); /* async_futex is always locked when entering
* manager */
async_manager_worker();
async_manager();
}
 
/** Add one manager to manager list */
610,11 → 607,6
{
amsg_t *msg;
 
if (in_interrupt_handler) {
printf("Cannot send asynchronou request in interrupt handler.\n");
_exit(1);
}
 
msg = malloc(sizeof(*msg));
msg->done = 0;
msg->dataptr = dataptr;
636,11 → 628,6
{
amsg_t *msg;
 
if (in_interrupt_handler) {
printf("Cannot send asynchronou request in interrupt handler.\n");
_exit(1);
}
 
msg = malloc(sizeof(*msg));
msg->done = 0;
msg->dataptr = dataptr;
711,6 → 698,8
 
msg->wdata.ptid = psthread_get_id();
msg->wdata.active = 0;
msg->wdata.inlist = 1;
 
insert_timeout(&msg->wdata);
 
/* Leave locked async_futex when entering this function */
736,16 → 725,12
{
amsg_t *msg;
if (in_interrupt_handler) {
printf("Cannot call async_usleep in interrupt handler.\n");
_exit(1);
}
 
msg = malloc(sizeof(*msg));
if (!msg)
return;
 
msg->wdata.ptid = psthread_get_id();
msg->wdata.inlist = 1;
msg->wdata.active = 0;
 
gettimeofday(&msg->wdata.expires, NULL);
771,15 → 756,3
{
interrupt_received = conn;
}
 
/* Primitive functions for simple communication */
void async_msg_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, ipcarg_t arg3)
{
ipc_call_async_3(phoneid, method, arg1, arg2, arg3, NULL, NULL, !in_interrupt_handler);
}
 
void async_msg_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2)
{
ipc_call_async_2(phoneid, method, arg1, arg2, NULL, NULL, !in_interrupt_handler);
}
/uspace/trunk/libc/generic/io/stream.c
64,7 → 64,7
size_t i = 0;
 
while (i < count) {
if (async_req_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, &r1) < 0) {
if (sync_send_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, &r1) < 0) {
return -1;
}
((char *)buf)[i++] = r0;
78,7 → 78,7
ipcarg_t r0,r1;
 
for (i = 0; i < count; i++)
async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
send_call(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
return count;
}
130,7 → 130,7
fd_t open(const char *fname, int flags)
{
int c = 0;
 
while (((streams[c].w) || (streams[c].r)) && (c < FDS))
c++;
if (c == FDS)
159,8 → 159,6
 
ssize_t write(int fd, const void *buf, size_t count)
{
// __SYSCALL3(SYS_IO, 1, (sysarg_t)buf, (sysarg_t) count);
// return count;
if (fd < FDS)
return streams[fd].w(streams[fd].param, buf, count);
/uspace/trunk/libc/generic/ipc.c
437,3 → 437,26
return __SYSCALL4(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1);
}
 
/* Primitive functions for simple communication */
void send_call_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, ipcarg_t arg3)
{
ipc_call_async_3(phoneid, method, arg1, arg2, arg3, NULL, NULL, 1);
}
 
void send_call_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2)
{
ipc_call_async_2(phoneid, method, arg1, arg2, NULL, NULL, 1);
}
 
void nsend_call_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
ipcarg_t arg2, ipcarg_t arg3)
{
ipc_call_async_3(phoneid, method, arg1, arg2, arg3, NULL, NULL, 0);
}
 
void nsend_call_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2)
{
ipc_call_async_2(phoneid, method, arg1, arg2, NULL, NULL, 0);
}
 
/uspace/trunk/libc/generic/psthread.c
42,7 → 42,6
#endif
 
static LIST_INITIALIZE(ready_list);
static LIST_INITIALIZE(serialized_list);
static LIST_INITIALIZE(manager_list);
 
static void psthread_exit(void) __attribute__ ((noinline));
49,12 → 48,6
static void psthread_main(void);
 
static atomic_t psthread_futex = FUTEX_INITIALIZER;
/** Count of real threads that are in async_serialized mode */
static int serialized_threads; /* Protected by async_futex */
/** Thread-local count of serialization. If >0, we must not preempt */
static __thread serialization_count;
/** Counter of threads residing in async_manager */
static int threads_in_manager;
 
/** Setup PSthread information into TCB structure */
psthread_data_t * psthread_setup()
84,12 → 77,35
free(pt);
}
 
/** Function to preempt to other pseudo thread without adding
* currently running pseudo thread to ready_list.
*/
void psthread_exit(void)
{
psthread_data_t *pt;
 
futex_down(&psthread_futex);
 
if (!list_empty(&ready_list))
pt = list_get_instance(ready_list.next, psthread_data_t, link);
else if (!list_empty(&manager_list))
pt = list_get_instance(manager_list.next, psthread_data_t, link);
else {
printf("Cannot find suitable psthread to run.\n");
_exit(0);
}
list_remove(&pt->link);
futex_up(&psthread_futex);
 
context_restore(&pt->ctx);
/* Never reached */
}
 
/** Function that is called on entry to new uspace thread */
void psthread_main(void)
{
psthread_data_t *pt = __tcb_get()->pst_data;
 
serialization_count = 0; // TODO: WHY HERE?
pt->retval = pt->func(pt->arg);
 
pt->finished = 1;
96,7 → 112,7
if (pt->waiter)
list_append(&pt->waiter->link, &ready_list);
 
psthread_schedule_next_adv(PS_FROM_DEAD);
psthread_exit();
}
 
/** Schedule next userspace pseudo thread.
111,7 → 127,7
*/
int psthread_schedule_next_adv(pschange_type ctype)
{
psthread_data_t *srcpt, *dstpt;
psthread_data_t *pt;
int retval = 0;
futex_down(&psthread_futex);
119,61 → 135,33
if (ctype == PS_PREEMPT && list_empty(&ready_list))
goto ret_0;
 
if (ctype == PS_FROM_MANAGER) {
if (list_empty(&ready_list) && list_empty(&serialized_list))
goto ret_0;
/* Do not preempt if there is not sufficient count of thread managers */
if (list_empty(&serialized_list) && threads_in_manager <= serialized_threads) {
goto ret_0;
}
if (ctype == PS_FROM_MANAGER && list_empty(&ready_list)) {
goto ret_0;
}
/* If we are going to manager and none exists, create it */
if (ctype == PS_TO_MANAGER || ctype == PS_FROM_DEAD) {
while (list_empty(&manager_list)) {
futex_up(&psthread_futex);
async_create_manager();
futex_down(&psthread_futex);
}
while (ctype == PS_TO_MANAGER && list_empty(&manager_list)) {
futex_up(&psthread_futex);
async_create_manager();
futex_down(&psthread_futex);
}
if (ctype != PS_FROM_DEAD) {
/* Save current state */
srcpt = __tcb_get()->pst_data;
if (!context_save(&srcpt->ctx)) {
if (serialization_count)
srcpt->flags &= ~PSTHREAD_SERIALIZED;
return 1; // futex_up already done here
}
 
/* Save myself to correct run list */
if (ctype == PS_PREEMPT)
list_append(&srcpt->link, &ready_list);
else if (ctype == PS_FROM_MANAGER) {
list_append(&srcpt->link, &manager_list);
threads_in_manager--;
} /* If ctype == PS_TO_MANAGER, don't save ourselves to any list, we should
* already be somewhere, or we will be lost */
}
pt = __tcb_get()->pst_data;
if (!context_save(&pt->ctx))
return 1; // futex_up already done here
 
/* Choose new thread to run */
if (ctype == PS_TO_MANAGER || ctype == PS_FROM_DEAD) {
dstpt = list_get_instance(manager_list.next,psthread_data_t, link);
if (serialization_count && ctype == PS_TO_MANAGER) {
serialized_threads++;
srcpt->flags |= PSTHREAD_SERIALIZED;
}
threads_in_manager++;
} else {
if (!list_empty(&serialized_list)) {
dstpt = list_get_instance(serialized_list.next, psthread_data_t, link);
serialized_threads--;
} else
dstpt = list_get_instance(ready_list.next, psthread_data_t, link);
}
list_remove(&dstpt->link);
if (ctype == PS_PREEMPT)
list_append(&pt->link, &ready_list);
else if (ctype == PS_FROM_MANAGER)
list_append(&pt->link, &manager_list);
if (ctype == PS_TO_MANAGER)
pt = list_get_instance(manager_list.next,psthread_data_t, link);
else
pt = list_get_instance(ready_list.next, psthread_data_t, link);
list_remove(&pt->link);
 
futex_up(&psthread_futex);
context_restore(&dstpt->ctx);
context_restore(&pt->ctx);
 
ret_0:
futex_up(&psthread_futex);
194,10 → 182,13
/* Handle psthrid = Kernel address -> it is wait for call */
pt = (psthread_data_t *) psthrid;
 
/* TODO */
printf("join unsupported\n");
_exit(1);
 
if (!pt->finished) {
mypt = __tcb_get()->pst_data;
if (context_save(&((psthread_data_t *) mypt)->ctx)) {
pt->waiter = (psthread_data_t *) mypt;
psthread_exit();
}
}
retval = pt->retval;
 
free(pt->stack);
232,7 → 223,6
pt->func = func;
pt->finished = 0;
pt->waiter = NULL;
pt->flags = 0;
 
context_save(&pt->ctx);
context_set(&pt->ctx, FADDR(psthread_main), pt->stack, PSTHREAD_INITIAL_STACK_PAGES_NO*getpagesize(),
248,10 → 238,7
 
pt = (psthread_data_t *) psthrid;
futex_down(&psthread_futex);
if ((pt->flags & PSTHREAD_SERIALIZED))
list_append(&pt->link, &serialized_list);
else
list_append(&pt->link, &ready_list);
list_append(&pt->link, &ready_list);
futex_up(&psthread_futex);
}
 
284,21 → 271,3
{
return (pstid_t)__tcb_get()->pst_data;
}
 
/** Disable preemption
*
* If the thread wants to send several message in row and does not want
* to be preempted, it should start async_serialize_start() in the beginning
* of communication and async_serialize_end() in the end. If it is a
* true multithreaded application, it should protect the communication channel
* by a futex as well. Interrupt messages will can still be preempted.
*/
void psthread_inc_sercount(void)
{
serialization_count++;
}
 
void psthread_dec_sercount(void)
{
serialization_count--;
}
/uspace/trunk/console/console.c
25,8 → 25,6
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* TODO: remove */
#include <stdio.h>
 
 
#include <kbd.h>
93,33 → 91,33
 
static void clrscr(void)
{
async_msg(fb_info.phone, FB_CLEAR, 0);
nsend_call(fb_info.phone, FB_CLEAR, 0);
}
 
static void curs_visibility(int v)
{
async_msg(fb_info.phone, FB_CURSOR_VISIBILITY, v);
send_call(fb_info.phone, FB_CURSOR_VISIBILITY, v);
}
 
static void curs_goto(int row, int col)
{
async_msg_2(fb_info.phone, FB_CURSOR_GOTO, row, col);
nsend_call_2(fb_info.phone, FB_CURSOR_GOTO, row, col);
}
 
static void set_style(style_t *style)
{
async_msg_2(fb_info.phone, FB_SET_STYLE, style->fg_color, style->bg_color);
nsend_call_2(fb_info.phone, FB_SET_STYLE, style->fg_color, style->bg_color);
}
 
static void set_style_col(int fgcolor, int bgcolor)
{
async_msg_2(fb_info.phone, FB_SET_STYLE, fgcolor, bgcolor);
nsend_call_2(fb_info.phone, FB_SET_STYLE, fgcolor, bgcolor);
}
 
static void prtchr(char c, int row, int col)
{
async_msg_3(fb_info.phone, FB_PUTCHAR, c, row, col);
nsend_call_3(fb_info.phone, FB_PUTCHAR, c, row, col);
}
 
167,7 → 165,7
scr->position_y = scr->size_y - 1;
screenbuffer_clear_line(scr, scr->top_line++);
if (console == active_console)
async_msg(fb_info.phone, FB_SCROLL, 1);
nsend_call(fb_info.phone, FB_SCROLL, 1);
}
scr->position_x = scr->position_x % scr->size_x;
187,15 → 185,15
int newpmap;
/* Save screen */
newpmap = async_req(fb_info.phone, FB_VP2PIXMAP, 0, NULL);
newpmap = sync_send(fb_info.phone, FB_VP2PIXMAP, 0, NULL);
if (newpmap < 0)
return -1;
 
if (oldpixmap != -1) {
/* Show old screen */
async_msg_2(fb_info.phone, FB_VP_DRAW_PIXMAP, 0, oldpixmap);
nsend_call_2(fb_info.phone, FB_VP_DRAW_PIXMAP, 0, oldpixmap);
/* Drop old pixmap */
async_msg(fb_info.phone, FB_DROP_PIXMAP, oldpixmap);
nsend_call(fb_info.phone, FB_DROP_PIXMAP, oldpixmap);
}
return newpmap;
238,6 → 236,7
kernel_pixmap = switch_screens(console_pixmap);
console_pixmap = -1;
}
active_console = newcons;
gcons_change_console(newcons);
conn = &connections[active_console];
245,12 → 244,13
set_style(&conn->screenbuffer.style);
curs_goto(conn->screenbuffer.position_y, conn->screenbuffer.position_x);
curs_visibility(0);
if (interbuffer) {
for (i = 0; i < conn->screenbuffer.size_x; i++)
for (j = 0; j < conn->screenbuffer.size_y; j++)
interbuffer[i + j*conn->screenbuffer.size_x] = *get_field_at(&(conn->screenbuffer),i, j);
/* This call can preempt, but we are already at the end */
j = async_req_2(fb_info.phone, FB_DRAW_TEXT_DATA, 0, 0, NULL, NULL);
j = sync_send_2(fb_info.phone, FB_DRAW_TEXT_DATA, 0, 0, NULL, NULL);
};
if ((!interbuffer) || (j != 0)){
301,12 → 301,10
conn = &connections[active_console];
// if ((c >= KBD_KEY_F1) && (c < KBD_KEY_F1 + CONSOLE_COUNT)) {
if ((c >= 0x101) && (c < 0x101 + CONSOLE_COUNT)) {
async_serialize_start();
if (c == 0x112)
change_console(KERNEL_CONSOLE);
else
change_console(c - 0x101);
async_serialize_end();
break;
}
323,7 → 321,7
break;
default:
retval = ENOENT;
}
}
ipc_answer_fast(callid, retval, 0, 0);
}
}
342,26 → 340,21
return;
}
conn = &connections[consnum];
conn->used = 1;
async_serialize_start();
gcons_notify_connect(consnum);
conn->used = 1;
conn->client_phone = IPC_GET_ARG3(call);
screenbuffer_clear(&conn->screenbuffer);
/* Accept the connection */
ipc_answer_fast(iid,0,0,0);
 
while (1) {
async_serialize_end();
callid = async_get_call(&call);
async_serialize_start();
 
arg1 = arg2 = 0;
switch (IPC_GET_METHOD(call)) {
case IPC_M_PHONE_HUNGUP:
gcons_notify_disconnect(consnum);
/* Answer all pending requests */
while (conn->keyrequest_counter > 0) {
conn->keyrequest_counter--;
371,7 → 364,6
/* Commit hangup */
ipc_answer_fast(callid, 0,0,0);
async_serialize_end();
return;
case CONSOLE_PUTCHAR:
write_char(consnum, IPC_GET_ARG1(call));
380,7 → 372,7
case CONSOLE_CLEAR:
/* Send message to fb */
if (consnum == active_console) {
async_msg(fb_info.phone, FB_CLEAR, 0);
send_call(fb_info.phone, FB_CLEAR, 0);
}
screenbuffer_clear(&conn->screenbuffer);
399,7 → 391,7
arg2 = fb_info.cols;
break;
case CONSOLE_FLUSH:
async_req_2(fb_info.phone, FB_FLUSH, 0, 0, NULL, NULL);
sync_send_2(fb_info.phone, FB_FLUSH, 0, 0, NULL, NULL);
break;
case CONSOLE_SET_STYLE:
467,7 → 459,7
/* Initialize gcons */
gcons_init(fb_info.phone);
/* Synchronize, the gcons can have something in queue */
async_req(fb_info.phone, FB_FLUSH, 0, NULL);
sync_send(fb_info.phone, FB_FLUSH, 0, NULL);
 
ipc_call_sync_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols));
/uspace/trunk/console/gcons.c
75,7 → 75,7
 
static void vp_switch(int vp)
{
async_msg(fbphone,FB_VIEWPORT_SWITCH, vp);
nsend_call(fbphone,FB_VIEWPORT_SWITCH, vp);
}
 
/** Create view port */
90,19 → 90,19
 
static void clear(void)
{
async_msg(fbphone, FB_CLEAR, 0);
nsend_call(fbphone, FB_CLEAR, 0);
}
 
static void set_style(int fgcolor, int bgcolor)
{
async_msg_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor);
nsend_call_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor);
}
 
/** Transparent putchar */
static void tran_putch(char c, int row, int col)
{
async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
nsend_call_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
}
 
/** Redraw the button showing state of a given console */
114,7 → 114,7
 
vp_switch(cstatus_vp[consnum]);
if (ic_pixmaps[state] != -1)
async_msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[consnum], ic_pixmaps[state]);
nsend_call_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[consnum], ic_pixmaps[state]);
 
if (state != CONS_DISCONNECTED && state != CONS_KERNEL && state != CONS_DISCONNECTED_SEL) {
snprintf(data, 5, "%d", consnum+1);
238,17 → 238,17
 
memcpy(shm, logo, size);
/* Send area */
rc = async_req_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
rc = sync_send_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
if (rc)
goto exit;
rc = async_req_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
rc = sync_send_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
if (rc)
goto drop;
/* Draw logo */
async_msg_2(fbphone, FB_DRAW_PPM, x, y);
nsend_call_2(fbphone, FB_DRAW_PPM, x, y);
drop:
/* Drop area */
async_msg(fbphone, FB_DROP_SHM, 0);
nsend_call(fbphone, FB_DROP_SHM, 0);
exit:
/* Remove area */
munmap(shm, size);
297,21 → 297,21
 
memcpy(shm, data, size);
/* Send area */
rc = async_req_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
rc = sync_send_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
if (rc)
goto exit;
rc = async_req_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
rc = sync_send_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
if (rc)
goto drop;
 
/* Obtain pixmap */
rc = async_req(fbphone, FB_SHM2PIXMAP, 0, NULL);
rc = sync_send(fbphone, FB_SHM2PIXMAP, 0, NULL);
if (rc < 0)
goto drop;
pxid = rc;
drop:
/* Drop area */
async_msg(fbphone, FB_DROP_SHM, 0);
nsend_call(fbphone, FB_DROP_SHM, 0);
exit:
/* Remove area */
munmap(shm, size);
/uspace/trunk/tetris/screen.c
80,7 → 80,7
 
static void set_style(int fgcolor, int bgcolor)
{
async_msg_2(con_phone, CONSOLE_SET_STYLE, fgcolor, bgcolor);
send_call_2(con_phone, CONSOLE_SET_STYLE, fgcolor, bgcolor);
}
 
static void start_standout(void)
96,7 → 96,7
 
void clear_screen(void)
{
async_msg(con_phone, CONSOLE_CLEAR, 0);
send_call(con_phone, CONSOLE_CLEAR, 0);
moveto(0,0);
}
 
108,7 → 108,7
{
 
resume_normal();
async_msg(con_phone, CONSOLE_CLEAR, 0);
send_call(con_phone, CONSOLE_CLEAR, 0);
curscore = -1;
memset((char *)curscreen, 0, sizeof(curscreen));
}
120,7 → 120,7
scr_init(void)
{
con_phone = get_fd_phone(1);
async_msg(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
send_call(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
resume_normal();
scr_clear();
}
127,12 → 127,12
 
void moveto(int r, int c)
{
async_msg_2(con_phone, CONSOLE_GOTO, r, c);
send_call_2(con_phone, CONSOLE_GOTO, r, c);
}
 
static void fflush(void)
{
async_msg(con_phone, CONSOLE_FLUSH, 0);
send_call(con_phone, CONSOLE_FLUSH, 0);
}
 
winsize_t winsize;
139,7 → 139,7
 
static int get_display_size(winsize_t *ws)
{
return async_req_2(con_phone, CONSOLE_GETSIZE, 0, 0, &ws->ws_row, &ws->ws_col);
return sync_send_2(con_phone, CONSOLE_GETSIZE, 0, 0, &ws->ws_row, &ws->ws_col);
}
 
static void
/uspace/trunk/fb/fb.c
42,6 → 42,7
#include <async.h>
 
#include "font-8x16.h"
#include "helenos.xbm"
#include "fb.h"
#include "main.h"
#include "../console/screenbuffer.h"
/uspace/trunk/fb/helenos.xbm
0,0 → 1,163
#define helenos_width 127
#define helenos_height 120
static unsigned char helenos_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x0f, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x80, 0x81,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x06,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07,
0x00, 0x00, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0c,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0xc1, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x80,
0xc1, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfe, 0x01, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
0x03, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00,
0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
0x0c, 0x02, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x0f, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00,
0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00,
0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
0xfc, 0x1f, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00,
0x80, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00,
0x18, 0x02, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00,
0x30, 0x18, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00,
0xf8, 0x3f, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00,
0xe0, 0x7f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00,
0x38, 0x0c, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00,
0xf0, 0x7f, 0x00, 0x00, 0xc0, 0x78, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00,
0xe0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xc0, 0x7c, 0x00, 0x00,
0x70, 0x18, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x00, 0x00,
0x80, 0xfd, 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00,
0xfc, 0xff, 0x01, 0x00, 0x80, 0xf9, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,
0xc0, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x80, 0xfb, 0x00, 0x00,
0xc0, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, 0x00,
0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0xfc,
0xff, 0xff, 0x03, 0x00, 0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00,
0x80, 0xff, 0x07, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf6, 0x03, 0x00,
0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xe7, 0xff, 0xff, 0xff, 0x07, 0x00,
0x00, 0xe6, 0x03, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0x07, 0x00, 0x00, 0xec, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xcc, 0x07, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0x0f, 0x00,
0x00, 0xdc, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff,
0x1f, 0xfe, 0x0f, 0x00, 0x00, 0xd8, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00,
0x00, 0xfc, 0xff, 0xff, 0x03, 0xfe, 0x1f, 0x00, 0x00, 0x98, 0x0f, 0x00,
0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfc, 0x1f, 0x00,
0x00, 0xb0, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x1f,
0x00, 0xfc, 0x3f, 0x00, 0x00, 0x30, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x70, 0x1f, 0x00,
0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00,
0x00, 0x60, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x7f, 0x00,
0x00, 0xf8, 0x7f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00,
0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x7e, 0x00,
0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00,
0x00, 0xfc, 0x7c, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0x00,
0x00, 0xf0, 0xff, 0x00, 0x00, 0xfe, 0xfd, 0x00, 0x00, 0xf0, 0x1f, 0x00,
0x00, 0xe0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xff, 0xf9, 0x00,
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00,
0xc0, 0xff, 0xfb, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x03,
0x00, 0xc0, 0x7f, 0x00, 0xe0, 0xff, 0xfb, 0x01, 0x00, 0xc0, 0x7f, 0x00,
0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0xf8, 0xff, 0xf7, 0x01,
0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x80, 0x3f, 0x00,
0xfc, 0xff, 0xf7, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x07,
0x00, 0x00, 0x00, 0x00, 0xfe, 0xef, 0xe7, 0x03, 0x00, 0x80, 0xff, 0x00,
0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, 0xdf, 0xef, 0x07,
0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0,
0xff, 0xdf, 0xef, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x0f,
0x00, 0x00, 0x00, 0xe0, 0xff, 0xcf, 0xcf, 0x07, 0x00, 0x00, 0xff, 0x01,
0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xc3, 0xcf, 0x0f,
0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xfc,
0xff, 0xe0, 0xcf, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0x1f,
0x00, 0x00, 0x00, 0xfe, 0xff, 0xf9, 0xc7, 0x0f, 0x00, 0x00, 0xfe, 0x03,
0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0x0f,
0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0xff,
0xff, 0xff, 0xe7, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x07,
0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xe3, 0x0f, 0x00, 0x00, 0xfc, 0x0f,
0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xf1, 0x0f,
0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
0xff, 0xff, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0x0f, 0x00, 0x00, 0xf0, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0xfe, 0x0f,
0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
0xff, 0x81, 0xff, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0xfc, 0xff, 0x07,
0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff,
0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x00, 0xfe, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x7f,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x00,
0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xc0,
0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00,
0xe0, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xdf,
0x00, 0x3c, 0x00, 0x00, 0xf0, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x0f, 0x00,
0x00, 0x00, 0x00, 0xcf, 0x00, 0x7e, 0x00, 0x00, 0xfc, 0x7f, 0xc0, 0xff,
0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x01, 0x7e, 0x00, 0x00,
0xfe, 0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97,
0x01, 0x3e, 0x00, 0x00, 0xff, 0x03, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0xc0, 0xff, 0xff,
0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x03, 0x00, 0x00, 0xe0,
0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
0x03, 0x00, 0x00, 0xf8, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7c, 0x06, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0xff, 0xff,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0xe0, 0x0f,
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0x3c, 0x00, 0xfc, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf8, 0x78, 0x80, 0x3f, 0xe0, 0xff, 0xff, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe1, 0xff, 0x07, 0xfc,
0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x81, 0xff, 0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0xfe, 0xff,
0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
0x0f, 0x00, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xc0, 0x3f, 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };