Changeset d9fae235 in mainline for uspace/srv/hw/cir/fhc/fhc.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/hw/cir/fhc/fhc.c

    r9256ad29 rd9fae235  
    109109static bool fhc_init(void)
    110110{
    111         ipcarg_t phonead;
     111        sysarg_t paddr;
    112112
    113         fhc_uart_size = sysinfo_value("fhc.uart.size");
    114         fhc_uart_phys = (void *) sysinfo_value("fhc.uart.physical");
    115        
    116         if (!fhc_uart_size) {
     113        if ((sysinfo_get_value("fhc.uart.physical", &paddr) != EOK)
     114            || (sysinfo_get_value("fhc.uart.size", &fhc_uart_size) != EOK)) {
    117115                printf(NAME ": no FHC UART registers found\n");
    118116                return false;
    119117        }
    120 
     118       
     119        fhc_uart_phys = (void *) paddr;
    121120        fhc_uart_virt = as_get_mappable_page(fhc_uart_size);
    122121       
     
    132131        printf(NAME ": FHC UART registers at %p, %d bytes\n", fhc_uart_phys,
    133132            fhc_uart_size);
    134 
     133       
    135134        async_set_client_connection(fhc_connection);
     135        ipcarg_t phonead;
    136136        ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, &phonead);
    137137       
Note: See TracChangeset for help on using the changeset viewer.