Changeset ae318d3 in mainline for uspace/srv/fb/sgcn.c


Ignore:
Timestamp:
2009-02-16T18:50:48Z (16 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.