Changes in kernel/arch/amd64/src/amd64.c [af9dd1e:4a5ba372] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
raf9dd1e r4a5ba372 49 49 #include <genarch/drivers/ega/ega.h> 50 50 #include <genarch/drivers/i8042/i8042.h> 51 #include <genarch/drivers/ns16550/ns16550.h>52 51 #include <genarch/drivers/legacy/ia32/io.h> 53 52 #include <genarch/fb/bfb.h> 54 53 #include <genarch/kbrd/kbrd.h> 55 #include <genarch/srln/srln.h>56 54 #include <genarch/multiboot/multiboot.h> 57 55 #include <genarch/multiboot/multiboot2.h> 58 #include <arch/pm.h>59 #include <arch/vreg.h>60 #include <arch/kseg.h>61 56 62 57 #ifdef CONFIG_SMP … … 142 137 void arch_post_mm_init(void) 143 138 { 144 vreg_init();145 kseg_init();146 147 139 if (config.cpu_active == 1) { 148 140 /* Initialize IRQ routing */ … … 176 168 } 177 169 178 void arch_post_cpu_init( void)170 void arch_post_cpu_init() 179 171 { 180 172 #ifdef CONFIG_SMP … … 220 212 } 221 213 #endif 222 223 #if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT))224 /*225 * Initialize the ns16550 controller.226 */227 #ifdef CONFIG_NS16550_OUT228 outdev_t *ns16550_out;229 outdev_t **ns16550_out_ptr = &ns16550_out;230 #else231 outdev_t **ns16550_out_ptr = NULL;232 #endif233 ns16550_instance_t *ns16550_instance234 = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,235 ns16550_out_ptr);236 if (ns16550_instance) {237 #ifdef CONFIG_NS16550238 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 #endif246 #ifdef CONFIG_NS16550_OUT247 if (ns16550_out) {248 stdout_wire(ns16550_out);249 }250 #endif251 }252 #endif253 214 254 215 if (irqs_info != NULL) … … 268 229 } 269 230 231 /** Set thread-local-storage pointer 232 * 233 * TLS pointer is set in FS register. Unfortunately the 64-bit 234 * 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 270 247 /** Construct function pointer 271 248 *
Note:
See TracChangeset
for help on using the changeset viewer.