Changeset 2b017ba in mainline for kernel/generic/src/console/klog.c
- Timestamp:
- 2006-10-16T20:51:55Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5f9b4d9a
- Parents:
- e3890b3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/klog.c
re3890b3f r2b017ba 37 37 #include <console/klog.h> 38 38 #include <print.h> 39 #include <ddi/device.h> 40 #include <ddi/irq.h> 39 41 #include <ipc/irq.h> 40 42 41 43 /* Order of frame to be allocated for klog communication */ 42 #define KLOG_ORDER 44 #define KLOG_ORDER 0 43 45 44 46 static char *klog; … … 47 49 48 50 SPINLOCK_INITIALIZE(klog_lock); 51 52 static irq_t klog_irq; 53 54 static irq_ownership_t klog_claim(void); 49 55 50 56 /** Initialize kernel logging facility … … 64 70 klog = (char *)PA2KA(faddr); 65 71 72 devno_t devno = device_assign_devno(); 73 66 74 sysinfo_set_item_val("klog.faddr", NULL, (unative_t)faddr); 67 75 sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER); 76 sysinfo_set_item_val("klog.devno", NULL, devno); 77 sysinfo_set_item_val("klog.inr", NULL, VIRT_INR_KLOG); 78 79 irq_initialize(&klog_irq); 80 klog_irq.devno = devno; 81 klog_irq.inr = VIRT_INR_KLOG; 82 klog_irq.claim = klog_claim; 83 irq_register(&klog_irq); 68 84 69 85 klogsize = PAGE_SIZE << KLOG_ORDER; 70 86 klogpos = 0; 87 } 88 89 /** Allways refuse IRQ ownership. 90 * 91 * This is not a real IRQ, so we always decline. 92 * 93 * @return Always returns IRQ_DECLINE. 94 */ 95 irq_ownership_t klog_claim(void) 96 { 97 return IRQ_DECLINE; 71 98 } 72 99 … … 85 112 goto out; 86 113 } 87 ipc_irq_send_msg( IPC_IRQ_KLOG, klogpos, ret, 0);114 ipc_irq_send_msg(&klog_irq, klogpos, ret, 0); 88 115 klogpos += ret; 89 116 if (klogpos >= klogsize)
Note:
See TracChangeset
for help on using the changeset viewer.