Changeset 05641a9e in mainline for kernel/generic/src/console
- Timestamp:
- 2009-03-23T21:46:40Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c3ebc47
- Parents:
- a5e5030
- Location:
- kernel/generic/src/console
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
ra5e5030 r05641a9e 65 65 #include <ipc/ipc.h> 66 66 #include <ipc/irq.h> 67 #include <event/event.h> 67 68 #include <symtab.h> 68 69 #include <errno.h> … … 955 956 release_console(); 956 957 957 if ((kconsole_notify) && (kconsole_irq.notif_cfg.notify)) 958 ipc_irq_send_msg_0(&kconsole_irq); 958 event_notify_0(EVENT_KCONSOLE); 959 959 960 960 return 1; -
kernel/generic/src/console/console.c
ra5e5030 r05641a9e 42 42 #include <ddi/irq.h> 43 43 #include <ddi/ddi.h> 44 #include <event/event.h> 44 45 #include <ipc/irq.h> 45 46 #include <arch.h> … … 100 101 sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr); 101 102 sysinfo_set_item_val("klog.pages", NULL, SIZE2FRAMES(KLOG_SIZE)); 102 103 //irq_initialize(&klog_irq);104 //klog_irq.devno = devno;105 //klog_irq.inr = KLOG_VIRT_INR;106 //klog_irq.claim = klog_claim;107 //irq_register(&klog_irq);108 103 109 104 spinlock_lock(&klog_lock); … … 243 238 spinlock_lock(&klog_lock); 244 239 245 // if ((klog_inited) && (klog_irq.notif_cfg.notify) && (klog_uspace > 0)) {246 // ipc_irq_send_msg_3(&klog_irq, klog_start, klog_len, klog_uspace);247 //klog_uspace = 0;248 //}240 if (klog_inited && event_is_subscribed(EVENT_KLOG) && klog_uspace > 0) { 241 event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace); 242 klog_uspace = 0; 243 } 249 244 250 245 spinlock_unlock(&klog_lock); -
kernel/generic/src/console/kconsole.c
ra5e5030 r05641a9e 88 88 static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; 89 89 90 /*91 * For now, we use 0 as INR.92 * However, it is therefore desirable to have architecture specific93 * definition of KCONSOLE_VIRT_INR in the future.94 */95 #define KCONSOLE_VIRT_INR 096 97 bool kconsole_notify = false;98 irq_t kconsole_irq;99 100 101 /** Allways refuse IRQ ownership.102 *103 * This is not a real IRQ, so we always decline.104 *105 * @return Always returns IRQ_DECLINE.106 *107 */108 static irq_ownership_t kconsole_claim(irq_t *irq)109 {110 return IRQ_DECLINE;111 }112 113 114 90 /** Initialize kconsole data structures 115 91 * … … 126 102 history[i][0] = '\0'; 127 103 } 128 129 130 /** Initialize kconsole notification mechanism131 *132 * Initialize the virtual IRQ notification mechanism.133 *134 */135 void kconsole_notify_init(void)136 {137 sysinfo_set_item_val("kconsole.present", NULL, true);138 sysinfo_set_item_val("kconsole.inr", NULL, KCONSOLE_VIRT_INR);139 140 irq_initialize(&kconsole_irq);141 kconsole_irq.devno = device_assign_devno();142 kconsole_irq.inr = KCONSOLE_VIRT_INR;143 kconsole_irq.claim = kconsole_claim;144 irq_register(&kconsole_irq);145 146 kconsole_notify = true;147 }148 149 104 150 105 /** Register kconsole command.
Note:
See TracChangeset
for help on using the changeset viewer.
