Changeset d9fae235 in mainline for uspace/srv/hid/fb/sgcn.c


Ignore:
Timestamp:
2010-04-17T01:28:38Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9d6bfa5
Parents:
9256ad29
Message:

sysinfo overhaul

  • cleanup (nicer data structures, use of SLAB allocator)
  • add support for storing arbitrary binary data
  • properly reimplement non-constant values (generated by functions)
  • add support for non-constant subtrees (generated by functions)
  • syscall ABI change, libc API change
  • reflect changes in user code

libc: task_spawn() can now return error code

  • reflect change in user code, print error strings after failed task_spawn()

uspace cleanup

  • more use of string and other constants
  • more use of str_error()
  • unify error reporting in init
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/sgcn.c

    r9256ad29 rd9fae235  
    122122int sgcn_init(void)
    123123{
    124         sram_virt_addr = (uintptr_t) as_get_mappable_page(sysinfo_value("sram.area.size"));
     124        sysarg_t sram_paddr;
     125        if (sysinfo_get_value("sram.address.physical", &sram_paddr) != EOK)
     126                return -1;
    125127       
    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)
     128        sysarg_t sram_size;
     129        if (sysinfo_get_value("sram.area.size", &sram_size) != EOK)
     130                return -1;
     131       
     132        if (sysinfo_get_value("sram.buffer.offset", &sram_buffer_offset) != EOK)
     133                sram_buffer_offset = 0;
     134       
     135        sram_virt_addr = (uintptr_t) as_get_mappable_page(sram_size);
     136       
     137        if (physmem_map((void *) sram_paddr, (void *) sram_virt_addr,
     138            sram_size / PAGE_SIZE, AS_AREA_READ | AS_AREA_WRITE) != 0)
    129139                return -1;
    130140       
    131141        serial_console_init(sgcn_putc, WIDTH, HEIGHT);
    132        
    133         sram_buffer_offset = sysinfo_value("sram.buffer.offset");
    134142       
    135143        async_set_client_connection(serial_client_connection);
Note: See TracChangeset for help on using the changeset viewer.