Subversion Repositories HelenOS

Rev

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

Rev 1994 Rev 2015
Line 43... Line 43...
43
#include <panic.h>
43
#include <panic.h>
44
#include <memstr.h>
44
#include <memstr.h>
45
#include <config.h>
45
#include <config.h>
46
#include <bitops.h>
46
#include <bitops.h>
47
#include <print.h>
47
#include <print.h>
-
 
48
#include <ddi/ddi.h>
48
 
49
 
49
#include "helenos.xbm"
50
#include "helenos.xbm"
50
 
51
 
-
 
52
static parea_t fb_parea;        /**< Physical memory area for fb. */
-
 
53
 
51
SPINLOCK_INITIALIZE(fb_lock);
54
SPINLOCK_INITIALIZE(fb_lock);
52
 
55
 
53
static uint8_t *fbaddress = NULL;
56
static uint8_t *fbaddress = NULL;
54
 
57
 
55
static uint8_t *blankline = NULL;
58
static uint8_t *blankline = NULL;
Line 432... Line 435...
432
    scanline = scan;
435
    scanline = scan;
433
   
436
   
434
    rows = y / FONT_SCANLINES;
437
    rows = y / FONT_SCANLINES;
435
    columns = x / COL_WIDTH;
438
    columns = x / COL_WIDTH;
436
 
439
 
-
 
440
    fb_parea.pbase = (uintptr_t) addr;
-
 
441
    fb_parea.vbase = (uintptr_t) fbaddress;
-
 
442
    fb_parea.frames = SIZE2FRAMES(fbsize);
-
 
443
    fb_parea.cacheable = false;
-
 
444
    ddi_parea_register(&fb_parea);
-
 
445
 
437
    sysinfo_set_item_val("fb", NULL, true);
446
    sysinfo_set_item_val("fb", NULL, true);
438
    sysinfo_set_item_val("fb.kind", NULL, 1);
447
    sysinfo_set_item_val("fb.kind", NULL, 1);
439
    sysinfo_set_item_val("fb.width", NULL, xres);
448
    sysinfo_set_item_val("fb.width", NULL, xres);
440
    sysinfo_set_item_val("fb.height", NULL, yres);
449
    sysinfo_set_item_val("fb.height", NULL, yres);
441
    sysinfo_set_item_val("fb.scanline", NULL, scan);
450
    sysinfo_set_item_val("fb.scanline", NULL, scan);
442
    sysinfo_set_item_val("fb.visual", NULL, visual);
451
    sysinfo_set_item_val("fb.visual", NULL, visual);
443
    sysinfo_set_item_val("fb.address.physical", NULL, addr);
452
    sysinfo_set_item_val("fb.address.physical", NULL, addr);
-
 
453
    sysinfo_set_item_val("fb.address.color", NULL, PAGE_COLOR((uintptr_t)
-
 
454
        fbaddress));
444
    sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors);
455
    sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors);
445
 
456
 
446
    /* Allocate double buffer */
457
    /* Allocate double buffer */
447
    unsigned int order = fnzb(SIZE2FRAMES(ALIGN_UP(fbsize, FRAME_SIZE))) + 1;
458
    unsigned int order = fnzb(SIZE2FRAMES(ALIGN_UP(fbsize, FRAME_SIZE))) + 1;
448
    dbbuffer = (uint8_t * ) frame_alloc(order, FRAME_ATOMIC | FRAME_KA);
459
    dbbuffer = (uint8_t * ) frame_alloc(order, FRAME_ATOMIC | FRAME_KA);