Changeset ae318d3 in mainline for uspace/srv/fb


Ignore:
Timestamp:
2009-02-16T18:50:48Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06da55b
Parents:
17f168e
Message:

overhaul pareas: use one single physical area for the physical address space not belonging to physical memory

Location:
uspace/srv/fb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fb/ega.c

    r17f168e rae318d3  
    374374        scr_height = sysinfo_value("fb.height");
    375375
    376         if(sysinfo_value("fb.blinking")) {
     376        if (sysinfo_value("fb.blinking")) {
    377377                ega_normal_color &= 0x77;
    378378                ega_inverted_color &= 0x77;
     
    386386        scr_addr = as_get_mappable_page(sz);
    387387
    388         physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >>
    389             PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
     388        if (physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >>
     389            PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE) != 0)
     390                return -1;
    390391
    391392        async_set_client_connection(ega_client_connection);
  • uspace/srv/fb/fb.c

    r17f168e rae318d3  
    16721672        void *fb_addr = as_get_mappable_page(fbsize);
    16731673       
    1674         physmem_map(fb_ph_addr + fb_offset, fb_addr,
    1675             ALIGN_UP(fbsize, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
     1674        if (physmem_map(fb_ph_addr + fb_offset, fb_addr,
     1675            ALIGN_UP(fbsize, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE) != 0)
     1676                return -1;
    16761677       
    16771678        if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual))
  • uspace/srv/fb/msim.c

    r17f168e rae318d3  
    6060        virt_addr = (char *) as_get_mappable_page(1);
    6161       
    62         physmem_map(phys_addr, virt_addr, 1, AS_AREA_READ | AS_AREA_WRITE);
     62        if (physmem_map(phys_addr, virt_addr, 1, AS_AREA_READ | AS_AREA_WRITE) != 0)
     63                return -1;
    6364       
    6465        serial_console_init(msim_putc, WIDTH, HEIGHT);
  • uspace/srv/fb/sgcn.c

    r17f168e rae318d3  
    122122int sgcn_init(void)
    123123{
    124         sram_virt_addr = (uintptr_t) as_get_mappable_page(
    125                 sysinfo_value("sram.area.size"));
    126         int result = physmem_map(
    127                 (void *) sysinfo_value("sram.address.physical"),
    128                 (void *) sram_virt_addr,
    129                 sysinfo_value("sram.area.size") / PAGE_SIZE,
    130                 AS_AREA_READ | AS_AREA_WRITE
    131                 );
    132         if (result != 0) {
    133                 printf("SGCN: uspace driver couldn't map physical memory: %d\n",
    134                         result);
    135         }
     124        sram_virt_addr = (uintptr_t) as_get_mappable_page(sysinfo_value("sram.area.size"));
     125       
     126        if (physmem_map((void *) sysinfo_value("sram.address.physical"),
     127            (void *) sram_virt_addr, sysinfo_value("sram.area.size") / PAGE_SIZE,
     128            AS_AREA_READ | AS_AREA_WRITE) != 0)
     129                return -1;
    136130       
    137131        serial_console_init(sgcn_putc, WIDTH, HEIGHT);
Note: See TracChangeset for help on using the changeset viewer.