Changeset 3ad953c in mainline for kernel/generic/src
- Timestamp:
- 2008-12-30T19:55:10Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f58321c4
- Parents:
- 6b21292
- Location:
- kernel/generic/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r6b21292 r3ad953c 977 977 { 978 978 printf("The kernel will now relinquish the console.\n"); 979 printf("Use userspace controls to redraw the screen.\n");980 979 arch_release_console(); 980 981 if ((kconsole_notify) && (kconsole_irq.notif_cfg.notify)) 982 ipc_irq_send_msg_0(&kconsole_irq); 983 981 984 return 1; 982 985 } -
kernel/generic/src/console/kconsole.c
r6b21292 r3ad953c 52 52 #include <symtab.h> 53 53 #include <macros.h> 54 #include <sysinfo/sysinfo.h> 55 #include <ddi/device.h> 54 56 55 57 /** Simple kernel console. … … 84 86 static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; 85 87 86 /** Initialize kconsole data structures. */ 88 /* 89 * For now, we use 0 as INR. 90 * However, it is therefore desirable to have architecture specific 91 * definition of KCONSOLE_VIRT_INR in the future. 92 */ 93 #define KCONSOLE_VIRT_INR 0 94 95 bool kconsole_notify = false; 96 irq_t kconsole_irq; 97 98 99 /** Allways refuse IRQ ownership. 100 * 101 * This is not a real IRQ, so we always decline. 102 * 103 * @return Always returns IRQ_DECLINE. 104 * 105 */ 106 static irq_ownership_t kconsole_claim(void) 107 { 108 return IRQ_DECLINE; 109 } 110 111 112 /** Initialize kconsole data structures 113 * 114 * This is the most basic initialization, almost no 115 * other kernel subsystem is ready yet. 116 * 117 */ 87 118 void kconsole_init(void) 88 119 { 89 int i;120 unsigned int i; 90 121 91 122 cmd_init(); 92 123 for (i = 0; i < KCONSOLE_HISTORY; i++) 93 124 history[i][0] = '\0'; 125 } 126 127 128 /** Initialize kconsole notification mechanism 129 * 130 * Initialize the virtual IRQ notification mechanism. 131 * 132 */ 133 void kconsole_notify_init(void) 134 { 135 devno_t devno = device_assign_devno(); 136 137 sysinfo_set_item_val("kconsole.present", NULL, true); 138 sysinfo_set_item_val("kconsole.devno", NULL, devno); 139 sysinfo_set_item_val("kconsole.inr", NULL, KCONSOLE_VIRT_INR); 140 141 irq_initialize(&kconsole_irq); 142 kconsole_irq.devno = devno; 143 kconsole_irq.inr = KCONSOLE_VIRT_INR; 144 kconsole_irq.claim = kconsole_claim; 145 irq_register(&kconsole_irq); 146 147 kconsole_notify = true; 94 148 } 95 149 -
kernel/generic/src/main/main.c
r6b21292 r3ad953c 199 199 config.base, config.kernel_size, config.stack_base, 200 200 config.stack_size); 201 201 202 202 #ifdef CONFIG_KCONSOLE 203 203 /* … … 214 214 */ 215 215 LOG_EXEC(exc_init()); 216 216 217 217 /* 218 218 * Memory management subsystems initialization. … … 260 260 LOG_EXEC(ipc_init()); 261 261 LOG_EXEC(klog_init()); 262 262 263 #ifdef CONFIG_KCONSOLE 264 LOG_EXEC(kconsole_notify_init()); 265 #endif 266 263 267 /* 264 268 * Create kernel task.
Note:
See TracChangeset
for help on using the changeset viewer.