Changeset d9fae235 in mainline for uspace/srv/hid/fb/ega.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/ega.c

    r9256ad29 rd9fae235  
    415415        void *ega_ph_addr;
    416416        size_t sz;
    417 
    418         ega_ph_addr = (void *) sysinfo_value("fb.address.physical");
    419         scr_width = sysinfo_value("fb.width");
    420         scr_height = sysinfo_value("fb.height");
    421 
    422         if (sysinfo_value("fb.blinking")) {
     417       
     418        sysarg_t paddr;
     419        if (sysinfo_get_value("fb.address.physical", &paddr) != EOK)
     420                return -1;
     421       
     422        sysarg_t width;
     423        if (sysinfo_get_value("fb.width", &width) != EOK)
     424                return -1;
     425       
     426        sysarg_t height;
     427        if (sysinfo_get_value("fb.width", &height) != EOK)
     428                return -1;
     429       
     430        sysarg_t blinking;
     431        if (sysinfo_get_value("fb.blinking", &blinking) != EOK)
     432                blinking = false;
     433       
     434        ega_ph_addr = (void *) paddr;
     435        scr_width = width;
     436        scr_height = height;
     437        if (blinking) {
    423438                ega_normal_color &= 0x77;
    424439                ega_inverted_color &= 0x77;
    425440        }
    426 
     441       
    427442        style = NORMAL_COLOR;
    428 
     443       
    429444        iospace_enable(task_get_id(), (void *) EGA_IO_BASE, 2);
    430 
     445       
    431446        sz = scr_width * scr_height * 2;
    432447        scr_addr = as_get_mappable_page(sz);
    433 
     448       
    434449        if (physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >>
    435450            PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE) != 0)
Note: See TracChangeset for help on using the changeset viewer.