Changeset f8ddd17 in mainline for kernel/generic/src/console/klog.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
  • kernel/generic/src/console/klog.c

    r9ab9c2ec rf8ddd17  
    3939#include <ddi/device.h>
    4040#include <ddi/irq.h>
     41#include <ddi/ddi.h>
    4142#include <ipc/irq.h>
    4243
     44/** Physical memory area used for klog. */
     45static parea_t klog_parea;
     46       
    4347/*
    4448 * For now, we use 0 as INR.
    45  * However, on some architectures 0 is the clock interrupt (e.g. amd64 and ia32).
    46  * It is therefore desirable to have architecture specific definition of KLOG_VIRT_INR
    47  * in the future.
     49 * However, on some architectures 0 is the clock interrupt (e.g. amd64 and
     50 * ia32). It is therefore desirable to have architecture specific definition of
     51 * KLOG_VIRT_INR in the future.
    4852 */
    4953#define KLOG_VIRT_INR   0
     
    7680        if (!faddr)
    7781                panic("Cannot allocate page for klog");
    78         klog = (char *)PA2KA(faddr);
     82        klog = (char *) PA2KA(faddr);
    7983       
    8084        devno_t devno = device_assign_devno();
    8185       
    82         sysinfo_set_item_val("klog.faddr", NULL, (unative_t)faddr);
     86        klog_parea.pbase = (uintptr_t) faddr;
     87        klog_parea.vbase = (uintptr_t) klog;
     88        klog_parea.frames = 1 << KLOG_ORDER;
     89        klog_parea.cacheable = true;
     90        ddi_parea_register(&klog_parea);
     91
     92        sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr);
     93        sysinfo_set_item_val("klog.fcolor", NULL, (unative_t)
     94                PAGE_COLOR((uintptr_t) klog));
    8395        sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER);
    8496        sysinfo_set_item_val("klog.devno", NULL, devno);
Note: See TracChangeset for help on using the changeset viewer.