Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/ia32.c

    raf9dd1e r4a5ba372  
    5050#include <genarch/drivers/ega/ega.h>
    5151#include <genarch/drivers/i8042/i8042.h>
    52 #include <genarch/drivers/ns16550/ns16550.h>
    5352#include <genarch/drivers/legacy/ia32/io.h>
    5453#include <genarch/fb/bfb.h>
    5554#include <genarch/kbrd/kbrd.h>
    56 #include <genarch/srln/srln.h>
    5755#include <genarch/multiboot/multiboot.h>
    5856#include <genarch/multiboot/multiboot2.h>
    59 #include <arch/pm.h>
    60 #include <arch/vreg.h>
    6157
    6258#ifdef CONFIG_SMP
     
    9894void arch_post_mm_init(void)
    9995{
    100         vreg_init();
    101 
    10296        if (config.cpu_active == 1) {
    10397                /* Initialize IRQ routing */
     
    126120                zone_merge_all();
    127121        }
    128 
    129 }
    130 
    131 void arch_post_cpu_init(void)
     122}
     123
     124void arch_post_cpu_init()
    132125{
    133126#ifdef CONFIG_SMP
     
    173166        }
    174167#endif
    175 
    176 #if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT))
    177         /*
    178          * Initialize the ns16550 controller.
    179          */
    180 #ifdef CONFIG_NS16550_OUT
    181         outdev_t *ns16550_out;
    182         outdev_t **ns16550_out_ptr = &ns16550_out;
    183 #else
    184         outdev_t **ns16550_out_ptr = NULL;
    185 #endif
    186         ns16550_instance_t *ns16550_instance
    187             = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,
    188             ns16550_out_ptr);
    189         if (ns16550_instance) {
    190 #ifdef CONFIG_NS16550
    191                 srln_instance_t *srln_instance = srln_init();
    192                 if (srln_instance) {
    193                         indev_t *sink = stdin_wire();
    194                         indev_t *srln = srln_wire(srln_instance, sink);
    195                         ns16550_wire(ns16550_instance, srln);
    196                         trap_virtual_enable_irqs(1 << IRQ_NS16550);
    197                 }
    198 #endif
    199 #ifdef CONFIG_NS16550_OUT
    200                 if (ns16550_out) {
    201                         stdout_wire(ns16550_out);
    202                 }
    203 #endif
    204         }
    205 #endif
    206168       
    207169        if (irqs_info != NULL)
     
    221183}
    222184
     185/** Set thread-local-storage pointer
     186 *
     187 * TLS pointer is set in GS register. That means, the GS contains
     188 * selector, and the descriptor->base is the correct address.
     189 */
     190sysarg_t sys_tls_set(uintptr_t addr)
     191{
     192        THREAD->arch.tls = addr;
     193        set_tls_desc(addr);
     194       
     195        return EOK;
     196}
     197
    223198/** Construct function pointer
    224199 *
Note: See TracChangeset for help on using the changeset viewer.