Changeset f8ddd17 in mainline for uspace/ns/ns.c


Ignore:
Timestamp:
2006-12-09T20:20:50Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b82a13c
Parents:
9ab9c2ec
Message:

Rework support for virtually indexed cache.
Instead of repeatedly flushing the data cache, which was a huge overkill, refuse to create an illegal address alias
in the kernel (again) and allocate appropriate page color in userspace instead. Extend the detection also to
SYS_PHYSMEM_MAP syscall.

Add support for tracking physical memory areas mappable by SYS_PHYSMEM_MAP.

Lots of coding style changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/ns/ns.c

    r9ab9c2ec rf8ddd17  
    8484static void *klogaddr = NULL;
    8585
    86 static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr)
     86static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, char *colstr, void **addr)
    8787{
    8888        void *ph_addr;
     89        int ph_color;
    8990
    9091        if (!*addr) {
    91                 ph_addr = (void *)sysinfo_value(name);
     92                ph_addr = (void *) sysinfo_value(name);
    9293                if (!ph_addr) {
    9394                        ipc_answer_fast(callid, ENOENT, 0, 0);
    9495                        return;
    9596                }
    96                 *addr = as_get_mappable_page(PAGE_SIZE);
     97                ph_color = (int) sysinfo_value(colstr);
     98                *addr = as_get_mappable_page(PAGE_SIZE, ph_color);
    9799                physmem_map(ph_addr, *addr, 1, AS_AREA_READ | AS_AREA_CACHEABLE);
    98100        }
     
    117119                        switch (IPC_GET_ARG3(call)) {
    118120                        case SERVICE_MEM_REALTIME:
    119                                 get_as_area(callid, &call, "clock.faddr", &clockaddr);
     121                                get_as_area(callid, &call, "clock.faddr",
     122                                        "clock.fcolor", &clockaddr);
    120123                                break;
    121124                        case SERVICE_MEM_KLOG:
    122                                 get_as_area(callid, &call, "klog.faddr", &klogaddr);
     125                                get_as_area(callid, &call, "klog.faddr",
     126                                        "klog.fcolor", &klogaddr);
    123127                                break;
    124128                        default:
Note: See TracChangeset for help on using the changeset viewer.