Changeset 58775d30 in mainline for kernel/arch/amd64/src/amd64.c


Ignore:
Timestamp:
2015-03-16T16:07:21Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2003739
Parents:
6069061 (diff), 795e2bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes

File:
1 edited

Legend:

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

    r6069061 r58775d30  
    4949#include <genarch/drivers/ega/ega.h>
    5050#include <genarch/drivers/i8042/i8042.h>
     51#include <genarch/drivers/ns16550/ns16550.h>
    5152#include <genarch/drivers/legacy/ia32/io.h>
    5253#include <genarch/fb/bfb.h>
    5354#include <genarch/kbrd/kbrd.h>
     55#include <genarch/srln/srln.h>
    5456#include <genarch/multiboot/multiboot.h>
    5557#include <genarch/multiboot/multiboot2.h>
     
    168170}
    169171
    170 void arch_post_cpu_init()
     172void arch_post_cpu_init(void)
    171173{
    172174#ifdef CONFIG_SMP
     
    212214        }
    213215#endif
     216
     217#if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT))
     218        /*
     219         * Initialize the ns16550 controller.
     220         */
     221#ifdef CONFIG_NS16550_OUT
     222        outdev_t *ns16550_out;
     223        outdev_t **ns16550_out_ptr = &ns16550_out;
     224#else
     225        outdev_t **ns16550_out_ptr = NULL;
     226#endif
     227        ns16550_instance_t *ns16550_instance
     228            = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,
     229            ns16550_out_ptr);
     230        if (ns16550_instance) {
     231#ifdef CONFIG_NS16550
     232                srln_instance_t *srln_instance = srln_init();
     233                if (srln_instance) {
     234                        indev_t *sink = stdin_wire();
     235                        indev_t *srln = srln_wire(srln_instance, sink);
     236                        ns16550_wire(ns16550_instance, srln);
     237                        trap_virtual_enable_irqs(1 << IRQ_NS16550);
     238                }
     239#endif
     240#ifdef CONFIG_NS16550_OUT
     241                if (ns16550_out) {
     242                        stdout_wire(ns16550_out);
     243                }
     244#endif
     245        }
     246#endif
    214247       
    215248        if (irqs_info != NULL)
Note: See TracChangeset for help on using the changeset viewer.