Subversion Repositories HelenOS

Rev

Rev 2012 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2012 Rev 2015
Line 702... Line 702...
702
 
702
 
703
    switch (IPC_GET_METHOD(*call)) {
703
    switch (IPC_GET_METHOD(*call)) {
704
    case IPC_M_AS_AREA_SEND:
704
    case IPC_M_AS_AREA_SEND:
705
        /* We accept one area for data interchange */
705
        /* We accept one area for data interchange */
706
        if (IPC_GET_ARG1(*call) == shm_id) {
706
        if (IPC_GET_ARG1(*call) == shm_id) {
707
            void *dest = as_get_mappable_page(IPC_GET_ARG2(*call));
707
            void *dest = as_get_mappable_page(IPC_GET_ARG2(*call),
-
 
708
                PAGE_COLOR(IPC_GET_ARG1(*call)));
708
            shm_size = IPC_GET_ARG2(*call);
709
            shm_size = IPC_GET_ARG2(*call);
709
            if (!ipc_answer_fast(callid, 0, (sysarg_t)dest, 0))
710
            if (!ipc_answer_fast(callid, 0, (sysarg_t) dest, 0))
710
                shm = dest;
711
                shm = dest;
711
            else
712
            else
712
                shm_id = 0;
713
                shm_id = 0;
713
            if (shm[0] != 'P')
714
            if (shm[0] != 'P')
714
                while (1)
715
                while (1)
715
                    ;
716
                    ;
716
            return 1;
717
            return 1;
717
        } else {
718
        } else {
718
            intersize = IPC_GET_ARG2(*call);
719
            intersize = IPC_GET_ARG2(*call);
719
            receive_comm_area(callid,call,(void *)&interbuffer);
720
            receive_comm_area(callid, call, (void *) &interbuffer);
720
        }
721
        }
721
        return 1;
722
        return 1;
722
    case FB_PREPARE_SHM:
723
    case FB_PREPARE_SHM:
723
        if (shm_id)
724
        if (shm_id)
724
            retval = EBUSY;
725
            retval = EBUSY;
Line 1280... Line 1281...
1280
    fb_scanline = sysinfo_value("fb.scanline");
1281
    fb_scanline = sysinfo_value("fb.scanline");
1281
    fb_visual = sysinfo_value("fb.visual");
1282
    fb_visual = sysinfo_value("fb.visual");
1282
    fb_invert_colors = sysinfo_value("fb.invert-colors");
1283
    fb_invert_colors = sysinfo_value("fb.invert-colors");
1283
 
1284
 
1284
    asz = fb_scanline * fb_height;
1285
    asz = fb_scanline * fb_height;
1285
    fb_addr = as_get_mappable_page(asz);
1286
    fb_addr = as_get_mappable_page(asz, (int) sysinfo_value("fb.address.color"));
1286
   
1287
   
1287
    physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >> PAGE_WIDTH,
1288
    physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >> PAGE_WIDTH,
1288
            AS_AREA_READ | AS_AREA_WRITE);
1289
            AS_AREA_READ | AS_AREA_WRITE);
1289
 
1290
 
1290
    if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual, fb_invert_colors))
1291
    if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual,
-
 
1292
        fb_invert_colors))
1291
        return 0;
1293
        return 0;
1292
   
1294
   
1293
    return -1;
1295
    return -1;
1294
}
1296
}
1295
 
1297