Subversion Repositories HelenOS

Rev

Rev 1923 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1923 Rev 1924
Line 38... Line 38...
38
#include <print.h>
38
#include <print.h>
39
#include <ddi/device.h>
39
#include <ddi/device.h>
40
#include <ddi/irq.h>
40
#include <ddi/irq.h>
41
#include <ipc/irq.h>
41
#include <ipc/irq.h>
42
 
42
 
-
 
43
/*
-
 
44
 * 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.
-
 
48
 */
-
 
49
#define KLOG_VIRT_INR   0
-
 
50
 
43
/* Order of frame to be allocated for klog communication */
51
/* Order of frame to be allocated for klog communication */
44
#define KLOG_ORDER  0
52
#define KLOG_ORDER  0
45
 
53
 
46
static char *klog;
54
static char *klog;
47
static int klogsize;
55
static int klogsize;
Line 72... Line 80...
72
    devno_t devno = device_assign_devno();
80
    devno_t devno = device_assign_devno();
73
   
81
   
74
    sysinfo_set_item_val("klog.faddr", NULL, (unative_t)faddr);
82
    sysinfo_set_item_val("klog.faddr", NULL, (unative_t)faddr);
75
    sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER);
83
    sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER);
76
    sysinfo_set_item_val("klog.devno", NULL, devno);
84
    sysinfo_set_item_val("klog.devno", NULL, devno);
77
    sysinfo_set_item_val("klog.inr", NULL, VIRT_INR_KLOG);
85
    sysinfo_set_item_val("klog.inr", NULL, KLOG_VIRT_INR);
78
 
86
 
79
    irq_initialize(&klog_irq);
87
    irq_initialize(&klog_irq);
80
    klog_irq.devno = devno;
88
    klog_irq.devno = devno;
81
    klog_irq.inr = VIRT_INR_KLOG;
89
    klog_irq.inr = KLOG_VIRT_INR;
82
    klog_irq.claim = klog_claim;
90
    klog_irq.claim = klog_claim;
83
    irq_register(&klog_irq);
91
    irq_register(&klog_irq);
84
 
92
 
85
    klogsize = PAGE_SIZE << KLOG_ORDER;
93
    klogsize = PAGE_SIZE << KLOG_ORDER;
86
    klogpos = 0;
94
    klogpos = 0;