Changes in kernel/arch/amd64/src/amd64.c [4a5ba372:af9dd1e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
r4a5ba372 raf9dd1e 49 49 #include <genarch/drivers/ega/ega.h> 50 50 #include <genarch/drivers/i8042/i8042.h> 51 #include <genarch/drivers/ns16550/ns16550.h> 51 52 #include <genarch/drivers/legacy/ia32/io.h> 52 53 #include <genarch/fb/bfb.h> 53 54 #include <genarch/kbrd/kbrd.h> 55 #include <genarch/srln/srln.h> 54 56 #include <genarch/multiboot/multiboot.h> 55 57 #include <genarch/multiboot/multiboot2.h> 58 #include <arch/pm.h> 59 #include <arch/vreg.h> 60 #include <arch/kseg.h> 56 61 57 62 #ifdef CONFIG_SMP … … 137 142 void arch_post_mm_init(void) 138 143 { 144 vreg_init(); 145 kseg_init(); 146 139 147 if (config.cpu_active == 1) { 140 148 /* Initialize IRQ routing */ … … 168 176 } 169 177 170 void arch_post_cpu_init( )178 void arch_post_cpu_init(void) 171 179 { 172 180 #ifdef CONFIG_SMP … … 212 220 } 213 221 #endif 222 223 #if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT)) 224 /* 225 * Initialize the ns16550 controller. 226 */ 227 #ifdef CONFIG_NS16550_OUT 228 outdev_t *ns16550_out; 229 outdev_t **ns16550_out_ptr = &ns16550_out; 230 #else 231 outdev_t **ns16550_out_ptr = NULL; 232 #endif 233 ns16550_instance_t *ns16550_instance 234 = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL, 235 ns16550_out_ptr); 236 if (ns16550_instance) { 237 #ifdef CONFIG_NS16550 238 srln_instance_t *srln_instance = srln_init(); 239 if (srln_instance) { 240 indev_t *sink = stdin_wire(); 241 indev_t *srln = srln_wire(srln_instance, sink); 242 ns16550_wire(ns16550_instance, srln); 243 trap_virtual_enable_irqs(1 << IRQ_NS16550); 244 } 245 #endif 246 #ifdef CONFIG_NS16550_OUT 247 if (ns16550_out) { 248 stdout_wire(ns16550_out); 249 } 250 #endif 251 } 252 #endif 214 253 215 254 if (irqs_info != NULL) … … 229 268 } 230 269 231 /** Set thread-local-storage pointer232 *233 * TLS pointer is set in FS register. Unfortunately the 64-bit234 * part can be set only in CPL0 mode.235 *236 * The specs say, that on %fs:0 there is stored contents of %fs register,237 * we need not to go to CPL0 to read it.238 */239 sysarg_t sys_tls_set(uintptr_t addr)240 {241 THREAD->arch.tls = addr;242 write_msr(AMD_MSR_FS, addr);243 244 return EOK;245 }246 247 270 /** Construct function pointer 248 271 *
Note:
See TracChangeset
for help on using the changeset viewer.