Changeset 68d8736 in mainline
- Timestamp:
- 2019-03-31T13:30:01Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f5dd4a1
- Parents:
- bbb99f82
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rbbb99f82 r68d8736 407 407 408 408 % Support for Intel i8259 PIC 409 ! [PLATFORM=ia32|PLATFORM=amd64 ] CONFIG_I8259 (y)409 ! [PLATFORM=ia32|PLATFORM=amd64|(PLATFORM=mips32&MACHINE=bmalta)|(PLATFORM=mips32&MACHINE=lmalta)] CONFIG_I8259 (y) 410 410 411 411 % Virtually indexed D-cache support … … 489 489 ! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=serial)&PLATFORM=ia64&MACHINE=i460GX] CONFIG_NS16550 (y/n) 490 490 491 % Support for NS16550 controller 492 ! [CONFIG_HID_IN=generic&PLATFORM=mips32&(MACHINE=lmalta|MACHINE=bmalta)] CONFIG_NS16550 (y) 493 491 494 % Support for PL011 UART 492 495 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&(MACHINE=integratorcp|MACHINE=raspberrypi)] CONFIG_PL011_UART (y/n) … … 501 504 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_NS16550_KCON=y] CONFIG_NS16550_OUT (y) 502 505 506 % Use NS16550 controller as dummy serial output (kernel console) 507 ! [CONFIG_HID_OUT=generic&PLATFORM=mips32&(MACHINE=lmalta|MACHINE=bmalta)] CONFIG_NS16550_OUT (y) 508 503 509 % Support for Samsung S3C24XX on-chip UART 504 510 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=gta02] CONFIG_S3C24XX_UART (y/n) … … 535 541 536 542 % Serial line input module 537 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_PL011_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_PL011_UART=y)|(PLATFORM=ia32&CONFIG_NS16550=y)|(PLATFORM=amd64&CONFIG_NS16550=y) ] CONFIG_SRLN (y)543 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_PL011_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_PL011_UART=y)|(PLATFORM=ia32&CONFIG_NS16550=y)|(PLATFORM=amd64&CONFIG_NS16550=y)|(PLATFORM=mips32&CONFIG_NS16550=y)] CONFIG_SRLN (y) 538 544 539 545 % EGA support -
kernel/arch/mips32/include/arch/mach/malta/malta.h
rbbb99f82 r68d8736 38 38 39 39 #include <arch/machine_func.h> 40 #include <arch/mm/page.h> 41 42 #define MALTA_PCI_BASE PA2KSEG1(0x18000000UL) 43 #define MALTA_GT64120_BASE PA2KSEG1(0x1be00000UL) 44 45 #define PIC0_BASE (MALTA_PCI_BASE + 0x20) 46 #define PIC1_BASE (MALTA_PCI_BASE + 0xa0) 47 48 #define TTY_BASE (MALTA_PCI_BASE + 0x3f8) 49 #define TTY_CPU_INT 2 50 #define TTY_ISA_IRQ 4 51 52 #define GT64120_PCI0_INTACK (MALTA_GT64120_BASE + 0xc34) 40 53 41 54 extern struct mips32_machine_ops malta_machine_ops; -
kernel/arch/mips32/include/arch/mm/page.h
rbbb99f82 r68d8736 43 43 44 44 #ifndef __ASSEMBLER__ 45 # define PA2KSEG1(x) (((uintptr_t) (x)) + 0xa0000000) 45 46 # define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 46 47 # define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) -
kernel/arch/mips32/src/exception.c
rbbb99f82 r68d8736 189 189 */ 190 190 irq->handler(irq); 191 if (irq->cir) 192 irq->cir(irq->cir_arg, i); 191 193 irq_spinlock_unlock(&irq->lock, false); 192 194 } else { -
kernel/arch/mips32/src/mach/malta/malta.c
rbbb99f82 r68d8736 38 38 #include <console/chardev.h> 39 39 #include <arch/mm/page.h> 40 #include <genarch/drivers/i8259/i8259.h> 41 #include <genarch/drivers/ns16550/ns16550.h> 42 #include <genarch/srln/srln.h> 43 #include <arch/interrupt.h> 40 44 41 45 static void malta_init(void); … … 57 61 }; 58 62 63 #ifdef CONFIG_NS16550 64 static ns16550_instance_t *tty_instance; 65 #endif 66 #ifdef CONFIG_NS16550_OUT 67 static outdev_t *tty_out; 68 #endif 69 70 #ifdef CONFIG_NS16550 71 static void tty_clear_interrupt(void *arg, inr_t inr) 72 { 73 (void) pio_read_8((ioport8_t *) GT64120_PCI0_INTACK); 74 pic_eoi(); 75 } 76 #endif 77 59 78 void malta_init(void) 60 79 { 80 i8259_init((i8259_t *) PIC0_BASE, (i8259_t *) PIC1_BASE, 2, 0, 8); 81 82 #if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT)) 83 #ifdef CONFIG_NS16550_OUT 84 outdev_t **tty_out_ptr = &tty_out; 85 #else 86 outdev_t **tty_out_ptr = NULL; 87 #endif 88 tty_instance = ns16550_init((ioport8_t *) TTY_BASE, 0, TTY_CPU_INT, 89 tty_clear_interrupt, NULL, tty_out_ptr); 90 #endif 61 91 } 62 92 … … 73 103 } 74 104 75 #define YAMON_SUBR_BASE PA2KA(0x1fc00500)76 #define YAMON_SUBR_PRINT_COUNT (YAMON_SUBR_BASE + 0x4)77 78 typedef void (**yamon_print_count_ptr_t)(uint32_t, const char *, uint32_t);79 80 yamon_print_count_ptr_t yamon_print_count =81 (yamon_print_count_ptr_t) YAMON_SUBR_PRINT_COUNT;82 83 static void yamon_putwchar(outdev_t *dev, const wchar_t wch)84 {85 86 const char ch = (char) wch;87 88 (*yamon_print_count)(0, &ch, 1);89 }90 91 static outdev_t yamon_outdev;92 static outdev_operations_t yamon_outdev_ops = {93 .write = yamon_putwchar,94 .redraw = NULL,95 .scroll_up = NULL,96 .scroll_down = NULL97 };98 99 105 void malta_output_init(void) 100 106 { 101 outdev_initialize("yamon", &yamon_outdev, &yamon_outdev_ops); 102 stdout_wire(&yamon_outdev); 107 #ifdef CONFIG_NS16550_OUT 108 if (tty_out) 109 stdout_wire(tty_out); 110 #endif 103 111 } 104 112 105 113 void malta_input_init(void) 106 114 { 107 (void) stdin_wire(); 115 #ifdef CONFIG_NS16550 116 if (tty_instance) { 117 srln_instance_t *srln_instance = srln_init(); 118 if (srln_instance) { 119 indev_t *sink = stdin_wire(); 120 indev_t *srln = srln_wire(srln_instance, sink); 121 ns16550_wire(tty_instance, srln); 122 pic_enable_irqs(1 << TTY_ISA_IRQ); 123 cp0_unmask_int(TTY_CPU_INT); 124 } 125 } 126 #endif 108 127 } 109 128
Note:
See TracChangeset
for help on using the changeset viewer.