1 /* Remote serial interface for local (hardwired) serial ports for GO32.
2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
4 Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
6 This version uses DPMI interrupts to handle buffered i/o
7 without the separate "asynctsr" program.
9 This file is part of GDB.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include "cli/cli-cmds.h"
27 * NS16550 UART registers
30 #define COM1ADDR 0x3f8
31 #define COM2ADDR 0x2f8
32 #define COM3ADDR 0x3e8
33 #define COM4ADDR 0x3e0
35 #define com_data 0 /* data register (R/W) */
36 #define com_dlbl 0 /* divisor latch low (W) */
37 #define com_ier 1 /* interrupt enable (W) */
38 #define com_dlbh 1 /* divisor latch high (W) */
39 #define com_iir 2 /* interrupt identification (R) */
40 #define com_fifo 2 /* FIFO control (W) */
41 #define com_lctl 3 /* line control register (R/W) */
42 #define com_cfcr 3 /* line control register (R/W) */
43 #define com_mcr 4 /* modem control register (R/W) */
44 #define com_lsr 5 /* line status register (R/W) */
45 #define com_msr 6 /* modem status register (R/W) */
48 * Constants for computing 16 bit baud rate divisor (lower byte
49 * in com_dlbl, upper in com_dlbh) from 1.8432MHz crystal. Divisor is
50 * 1.8432 MHz / (16 * X) for X bps. If the baud rate can't be set
51 * to within +- (desired_rate*SPEED_TOLERANCE/1000) bps, we fail.
53 #define COMTICK (1843200/16)
54 #define SPEED_TOLERANCE 30 /* thousandths; real == desired +- 3.0% */
56 /* interrupt enable register */
57 #define IER_ERXRDY 0x1 /* int on rx ready */
58 #define IER_ETXRDY 0x2 /* int on tx ready */
59 #define IER_ERLS 0x4 /* int on line status change */
60 #define IER_EMSC 0x8 /* int on modem status change */
62 /* interrupt identification register */
63 #define IIR_FIFO_MASK 0xc0 /* set if FIFOs are enabled */
64 #define IIR_IMASK 0xf /* interrupt cause mask */
65 #define IIR_NOPEND 0x1 /* nothing pending */
66 #define IIR_RLS 0x6 /* receive line status */
67 #define IIR_RXRDY 0x4 /* receive ready */
68 #define IIR_RXTOUT 0xc /* receive timeout */
69 #define IIR_TXRDY 0x2 /* transmit ready */
70 #define IIR_MLSC 0x0 /* modem status */
73 /* fifo control register */
74 #define FIFO_ENABLE 0x01 /* enable fifo */
75 #define FIFO_RCV_RST 0x02 /* reset receive fifo */
76 #define FIFO_XMT_RST 0x04 /* reset transmit fifo */
77 #define FIFO_DMA_MODE 0x08 /* enable dma mode */
78 #define FIFO_TRIGGER_1 0x00 /* trigger at 1 char */
79 #define FIFO_TRIGGER_4 0x40 /* trigger at 4 chars */
80 #define FIFO_TRIGGER_8 0x80 /* trigger at 8 chars */
81 #define FIFO_TRIGGER_14 0xc0 /* trigger at 14 chars */
83 /* character format control register */
84 #define CFCR_DLAB 0x80 /* divisor latch */
85 #define CFCR_SBREAK 0x40 /* send break */
86 #define CFCR_PZERO 0x30 /* zero parity */
87 #define CFCR_PONE 0x20 /* one parity */
88 #define CFCR_PEVEN 0x10 /* even parity */
89 #define CFCR_PODD 0x00 /* odd parity */
90 #define CFCR_PENAB 0x08 /* parity enable */
91 #define CFCR_STOPB 0x04 /* 2 stop bits */
92 #define CFCR_8BITS 0x03 /* 8 data bits */
93 #define CFCR_7BITS 0x02 /* 7 data bits */
94 #define CFCR_6BITS 0x01 /* 6 data bits */
95 #define CFCR_5BITS 0x00 /* 5 data bits */
97 /* modem control register */
98 #define MCR_LOOPBACK 0x10 /* loopback */
99 #define MCR_IENABLE 0x08 /* output 2 = int enable */
100 #define MCR_DRS 0x04 /* output 1 = xxx */
101 #define MCR_RTS 0x02 /* enable RTS */
102 #define MCR_DTR 0x01 /* enable DTR */
104 /* line status register */
105 #define LSR_RCV_FIFO 0x80 /* error in receive fifo */
106 #define LSR_TSRE 0x40 /* transmitter empty */
107 #define LSR_TXRDY 0x20 /* transmitter ready */
108 #define LSR_BI 0x10 /* break detected */
109 #define LSR_FE 0x08 /* framing error */
110 #define LSR_PE 0x04 /* parity error */
111 #define LSR_OE 0x02 /* overrun error */
112 #define LSR_RXRDY 0x01 /* receiver ready */
113 #define LSR_RCV_MASK 0x1f
115 /* modem status register */
120 #define MSR_DDCD 0x08
121 #define MSR_TERI 0x04
122 #define MSR_DDSR 0x02
123 #define MSR_DCTS 0x01
129 typedef unsigned long u_long
;
131 /* 16550 rx fifo trigger point */
132 #define FIFO_TRIGGER FIFO_TRIGGER_4
134 /* input buffer size */
147 static size_t cnts
[NCNT
];
148 static char *cntnames
[NCNT
] =
150 /* h/w interrupt counts. */
151 "mlsc", "nopend", "txrdy", "?3",
152 "rxrdy", "?5", "rls", "?7",
153 "?8", "?9", "?a", "?b",
154 "rxtout", "?d", "?e", "?f",
156 "rxcnt", "txcnt", "stray", "swoflo"
159 #define COUNT(x) cnts[x]++
164 /* Main interrupt controller port addresses. */
165 #define ICU_BASE 0x20
166 #define ICU_OCW2 (ICU_BASE + 0)
167 #define ICU_MASK (ICU_BASE + 1)
169 /* Original interrupt controller mask register. */
170 unsigned char icu_oldmask
;
172 /* Maximum of 8 interrupts (we don't handle the slave icu yet). */
175 static struct intrupt
178 struct dos_ttystate
*port
;
179 _go32_dpmi_seginfo old_rmhandler
;
180 _go32_dpmi_seginfo old_pmhandler
;
181 _go32_dpmi_seginfo new_rmhandler
;
182 _go32_dpmi_seginfo new_pmhandler
;
183 _go32_dpmi_registers regs
;
188 static struct dos_ttystate
193 struct intrupt
*intrupt
;
196 unsigned char cbuf
[CBSIZE
];
200 unsigned char old_mcr
;
209 COM1ADDR
, 4, 0, NULL
, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
213 COM2ADDR
, 3, 0, NULL
, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
217 COM3ADDR
, 4, 0, NULL
, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
221 COM4ADDR
, 3, 0, NULL
, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
225 static int dos_open (struct serial
*scb
, const char *name
);
226 static void dos_raw (struct serial
*scb
);
227 static int dos_readchar (struct serial
*scb
, int timeout
);
228 static int dos_setbaudrate (struct serial
*scb
, int rate
);
229 static int dos_write (struct serial
*scb
, const void *buf
, size_t count
);
230 static void dos_close (struct serial
*scb
);
231 static serial_ttystate
dos_get_tty_state (struct serial
*scb
);
232 static int dos_set_tty_state (struct serial
*scb
, serial_ttystate state
);
233 static int dos_baudconv (int rate
);
235 #define inb(p,a) inportb((p)->base + (a))
236 #define outb(p,a,v) outportb((p)->base + (a), (v))
237 #define disable() asm volatile ("cli");
238 #define enable() asm volatile ("sti");
242 dos_getc (volatile struct dos_ttystate
*port
)
246 if (port
->count
== 0)
249 c
= port
->cbuf
[port
->first
];
251 port
->first
= (port
->first
+ 1) & (CBSIZE
- 1);
259 dos_putc (int c
, struct dos_ttystate
*port
)
261 if (port
->count
>= CBSIZE
- 1)
263 port
->cbuf
[(port
->first
+ port
->count
) & (CBSIZE
- 1)] = c
;
273 struct dos_ttystate
*port
;
274 unsigned char iir
, lsr
, c
;
276 disable (); /* Paranoia */
277 outportb (ICU_OCW2
, 0x20); /* End-Of-Interrupt */
282 port
= intrupts
[irq
].port
;
286 return; /* not open */
291 iir
= inb (port
, com_iir
) & IIR_IMASK
;
296 lsr
= inb (port
, com_lsr
);
306 c
= inb (port
, com_data
);
307 if (lsr
& (LSR_BI
| LSR_FE
| LSR_PE
| LSR_OE
))
309 if (lsr
& (LSR_BI
| LSR_FE
))
311 else if (lsr
& LSR_PE
)
317 if (dos_putc (c
, port
) < 0)
326 while ((lsr
= inb (port
, com_lsr
)) & LSR_RXRDY
);
330 /* could be used to flowcontrol Tx */
331 port
->msr
= inb (port
, com_msr
);
339 /* No more pending interrupts, all done. */
343 /* Unexpected interrupt, ignore. */
350 #define ISRNAME(x) dos_comisr##x
351 #define ISR(x) static void ISRNAME(x)(void) {dos_comisr(x);}
353 ISR (0) ISR (1) ISR (2) ISR (3) /* OK */
354 ISR (4) ISR (5) ISR (6) ISR (7) /* OK */
356 typedef void (*isr_t
) (void);
358 static isr_t isrs
[NINTR
] =
360 ISRNAME (0), ISRNAME (1), ISRNAME (2), ISRNAME (3),
361 ISRNAME (4), ISRNAME (5), ISRNAME (6), ISRNAME (7)
366 static struct intrupt
*
367 dos_hookirq (unsigned int irq
)
369 struct intrupt
*intr
;
376 intr
= &intrupts
[irq
];
383 /* Setup real mode handler. */
384 _go32_dpmi_get_real_mode_interrupt_vector (vec
, &intr
->old_rmhandler
);
386 intr
->new_rmhandler
.pm_selector
= _go32_my_cs ();
387 intr
->new_rmhandler
.pm_offset
= (u_long
) isr
;
388 if (_go32_dpmi_allocate_real_mode_callback_iret (&intr
->new_rmhandler
,
394 if (_go32_dpmi_set_real_mode_interrupt_vector (vec
, &intr
->new_rmhandler
))
399 /* Setup protected mode handler. */
400 _go32_dpmi_get_protected_mode_interrupt_vector (vec
, &intr
->old_pmhandler
);
402 intr
->new_pmhandler
.pm_selector
= _go32_my_cs ();
403 intr
->new_pmhandler
.pm_offset
= (u_long
) isr
;
404 _go32_dpmi_allocate_iret_wrapper (&intr
->new_pmhandler
);
406 if (_go32_dpmi_set_protected_mode_interrupt_vector (vec
,
407 &intr
->new_pmhandler
))
412 /* Setup interrupt controller mask. */
414 outportb (ICU_MASK
, inportb (ICU_MASK
) & ~(1 << irq
));
423 dos_unhookirq (struct intrupt
*intr
)
425 unsigned int irq
, vec
;
428 irq
= intr
- intrupts
;
431 /* Restore old interrupt mask bit. */
434 outportb (ICU_MASK
, inportb (ICU_MASK
) | (mask
& icu_oldmask
));
437 /* Remove real mode handler. */
438 _go32_dpmi_set_real_mode_interrupt_vector (vec
, &intr
->old_rmhandler
);
439 _go32_dpmi_free_real_mode_callback (&intr
->new_rmhandler
);
441 /* Remove protected mode handler. */
442 _go32_dpmi_set_protected_mode_interrupt_vector (vec
, &intr
->old_pmhandler
);
443 _go32_dpmi_free_iret_wrapper (&intr
->new_pmhandler
);
450 dos_open (struct serial
*scb
, const char *name
)
452 struct dos_ttystate
*port
;
455 if (strncasecmp (name
, "/dev/", 5) == 0)
457 else if (strncasecmp (name
, "\\dev\\", 5) == 0)
460 if (strlen (name
) != 4 || strncasecmp (name
, "com", 3) != 0)
466 if (name
[3] < '1' || name
[3] > '4')
472 /* FIXME: this is a Bad Idea (tm)! One should *never* invent file
473 handles, since they might be already used by other files/devices.
474 The Right Way to do this is to create a real handle by dup()'ing
475 some existing one. */
478 if (port
->refcnt
++ > 0)
480 /* Device already opened another user. Just point at it. */
485 /* Force access to ID reg. */
486 outb (port
, com_cfcr
, 0);
487 outb (port
, com_iir
, 0);
488 for (i
= 0; i
< 17; i
++)
490 if ((inb (port
, com_iir
) & 0x38) == 0)
492 (void) inb (port
, com_data
); /* clear recv */
498 /* Disable all interrupts in chip. */
499 outb (port
, com_ier
, 0);
501 /* Tentatively enable 16550 fifo, and see if it responds. */
502 outb (port
, com_fifo
,
503 FIFO_ENABLE
| FIFO_RCV_RST
| FIFO_XMT_RST
| FIFO_TRIGGER
);
505 port
->fifo
= ((inb (port
, com_iir
) & IIR_FIFO_MASK
) == IIR_FIFO_MASK
);
507 /* clear pending status reports. */
508 (void) inb (port
, com_lsr
);
509 (void) inb (port
, com_msr
);
511 /* Enable external interrupt gate (to avoid floating IRQ). */
512 outb (port
, com_mcr
, MCR_IENABLE
);
514 /* Hook up interrupt handler and initialise icu. */
515 port
->intrupt
= dos_hookirq (port
->irq
);
518 outb (port
, com_mcr
, 0);
519 outb (port
, com_fifo
, 0);
527 port
->intrupt
->port
= port
;
530 /* Clear rx buffer, tx busy flag and overflow count. */
531 port
->first
= port
->count
= 0;
535 /* Set default baud rate and mode: 9600,8,n,1 */
536 i
= dos_baudconv (port
->baudrate
= 9600);
537 outb (port
, com_cfcr
, CFCR_DLAB
);
538 outb (port
, com_dlbl
, i
& 0xff);
539 outb (port
, com_dlbh
, i
>> 8);
540 outb (port
, com_cfcr
, CFCR_8BITS
);
542 /* Enable all interrupts. */
543 outb (port
, com_ier
, IER_ETXRDY
| IER_ERXRDY
| IER_ERLS
| IER_EMSC
);
545 /* Enable DTR & RTS. */
546 outb (port
, com_mcr
, MCR_DTR
| MCR_RTS
| MCR_IENABLE
);
555 dos_close (struct serial
*scb
)
557 struct dos_ttystate
*port
;
558 struct intrupt
*intrupt
;
563 port
= &ports
[scb
->fd
];
565 if (port
->refcnt
-- > 1)
568 if (!(intrupt
= port
->intrupt
))
571 /* Disable interrupts, fifo, flow control. */
575 outb (port
, com_fifo
, 0);
576 outb (port
, com_ier
, 0);
579 /* Unhook handler, and disable interrupt gate. */
580 dos_unhookirq (intrupt
);
581 outb (port
, com_mcr
, 0);
583 /* Check for overflow errors. */
586 gdb_printf (gdb_stderr
,
587 "Serial input overruns occurred.\n");
588 gdb_printf (gdb_stderr
, "This system %s handle %d baud.\n",
589 port
->fifo
? "cannot" : "needs a 16550 to",
595 /* Implementation of the serial_ops flush_output method. */
598 dos_flush_output (struct serial
*scb
)
603 /* Implementation of the serial_ops setparity method. */
606 dos_setparity (struct serial
*scb
, int parity
)
611 /* Implementation of the serial_ops drain_output method. */
614 dos_drain_output (struct serial
*scb
)
620 dos_raw (struct serial
*scb
)
622 /* Always in raw mode. */
626 dos_readchar (struct serial
*scb
, int timeout
)
628 struct dos_ttystate
*port
= &ports
[scb
->fd
];
632 then
= rawclock () + (timeout
* RAWHZ
);
633 while ((c
= dos_getc (port
)) < 0)
637 if (timeout
>= 0 && (rawclock () - then
) >= 0)
638 return SERIAL_TIMEOUT
;
645 static serial_ttystate
646 dos_get_tty_state (struct serial
*scb
)
648 struct dos_ttystate
*port
= &ports
[scb
->fd
];
649 struct dos_ttystate
*state
;
651 /* Are they asking about a port we opened? */
652 if (port
->refcnt
<= 0)
654 /* We've never heard about this port. We should fail this call,
655 unless they are asking about one of the 3 standard handles,
656 in which case we pretend the handle was open by us if it is
657 connected to a terminal device. This is because Unix
658 terminals use the serial interface, so GDB expects the
659 standard handles to go through here. */
660 if (scb
->fd
>= 3 || !isatty (scb
->fd
))
664 state
= XNEW (struct dos_ttystate
);
666 return (serial_ttystate
) state
;
669 static serial_ttystate
670 dos_copy_tty_state (struct serial
*scb
, serial_ttystate ttystate
)
672 struct dos_ttystate
*state
;
674 state
= XNEW (struct dos_ttystate
);
675 *state
= *(struct dos_ttystate
*) ttystate
;
677 return (serial_ttystate
) state
;
681 dos_set_tty_state (struct serial
*scb
, serial_ttystate ttystate
)
683 struct dos_ttystate
*state
;
685 state
= (struct dos_ttystate
*) ttystate
;
686 dos_setbaudrate (scb
, state
->baudrate
);
691 dos_flush_input (struct serial
*scb
)
693 struct dos_ttystate
*port
= &ports
[scb
->fd
];
696 port
->first
= port
->count
= 0;
698 outb (port
, com_fifo
, FIFO_ENABLE
| FIFO_RCV_RST
| FIFO_TRIGGER
);
704 dos_print_tty_state (struct serial
*scb
, serial_ttystate ttystate
,
705 struct ui_file
*stream
)
707 /* Nothing to print. */
712 dos_baudconv (int rate
)
719 #define divrnd(n, q) (((n) * 2 / (q) + 1) / 2) /* Divide and round off. */
720 x
= divrnd (COMTICK
, rate
);
724 err
= divrnd (1000 * COMTICK
, x
* rate
) - 1000;
727 if (err
> SPEED_TOLERANCE
)
735 dos_setbaudrate (struct serial
*scb
, int rate
)
737 struct dos_ttystate
*port
= &ports
[scb
->fd
];
739 if (port
->baudrate
!= rate
)
744 x
= dos_baudconv (rate
);
747 gdb_printf (gdb_stderr
, "%d: impossible baudrate\n", rate
);
753 cfcr
= inb (port
, com_cfcr
);
755 outb (port
, com_cfcr
, CFCR_DLAB
);
756 outb (port
, com_dlbl
, x
& 0xff);
757 outb (port
, com_dlbh
, x
>> 8);
758 outb (port
, com_cfcr
, cfcr
);
759 port
->baudrate
= rate
;
767 dos_setstopbits (struct serial
*scb
, int num
)
769 struct dos_ttystate
*port
= &ports
[scb
->fd
];
773 cfcr
= inb (port
, com_cfcr
);
777 case SERIAL_1_STOPBITS
:
778 outb (port
, com_cfcr
, cfcr
& ~CFCR_STOPB
);
780 case SERIAL_1_AND_A_HALF_STOPBITS
:
781 case SERIAL_2_STOPBITS
:
782 outb (port
, com_cfcr
, cfcr
| CFCR_STOPB
);
794 dos_write (struct serial
*scb
, const void *buf
, size_t count
)
796 volatile struct dos_ttystate
*port
= &ports
[scb
->fd
];
797 size_t fifosize
= port
->fifo
? 16 : 1;
800 const char *str
= (const char *) buf
;
806 /* Send the data, fifosize bytes at a time. */
807 cnt
= fifosize
> count
? count
: fifosize
;
809 /* Francisco Pastor <fpastor.etra-id@etra.es> says OUTSB messes
810 up the communications with UARTs with FIFOs. */
811 #ifdef UART_FIFO_WORKS
812 outportsb (port
->base
+ com_data
, str
, cnt
);
816 for ( ; cnt
> 0; cnt
--, count
--)
817 outportb (port
->base
+ com_data
, *str
++);
822 /* Wait for transmission to complete (max 1 sec). */
823 then
= rawclock () + RAWHZ
;
826 if ((rawclock () - then
) >= 0)
838 dos_sendbreak (struct serial
*scb
)
840 volatile struct dos_ttystate
*port
= &ports
[scb
->fd
];
844 cfcr
= inb (port
, com_cfcr
);
845 outb (port
, com_cfcr
, cfcr
| CFCR_SBREAK
);
848 then
= rawclock () + RAWHZ
/ 4;
849 while ((rawclock () - then
) < 0)
852 outb (port
, com_cfcr
, cfcr
);
857 static const struct serial_ops dos_ops
=
862 NULL
, /* fdopen, not implemented */
877 (void (*)(struct serial
*, int))NULL
/* Change into async mode. */
881 gdb_pipe (int pdes
[2])
883 /* No support for pipes. */
889 info_serial_command (const char *arg
, int from_tty
)
891 struct dos_ttystate
*port
;
896 for (port
= ports
; port
< &ports
[4]; port
++)
898 if (port
->baudrate
== 0)
900 gdb_printf ("Port:\tCOM%ld (%sactive)\n", (long)(port
- ports
) + 1,
901 port
->intrupt
? "" : "not ");
902 gdb_printf ("Addr:\t0x%03x (irq %d)\n", port
->base
, port
->irq
);
903 gdb_printf ("16550:\t%s\n", port
->fifo
? "yes" : "no");
904 gdb_printf ("Speed:\t%d baud\n", port
->baudrate
);
905 gdb_printf ("Errs:\tframing %d parity %d overflow %d\n\n",
906 port
->ferr
, port
->perr
, port
->oflo
);
910 gdb_printf ("\nTotal interrupts: %d\n", intrcnt
);
911 for (i
= 0; i
< NCNT
; i
++)
913 gdb_printf ("%s:\t%lu\n", cntnames
[i
], (unsigned long) cnts
[i
]);
917 void _initialize_ser_dos ();
919 _initialize_ser_dos ()
921 serial_add_interface (&dos_ops
);
923 /* Save original interrupt mask register. */
924 icu_oldmask
= inportb (ICU_MASK
);
926 /* Mark fixed motherboard irqs as inuse. */
927 intrupts
[0].inuse
= /* timer tick */
928 intrupts
[1].inuse
= /* keyboard */
929 intrupts
[2].inuse
= 1; /* slave icu */
931 add_setshow_zinteger_cmd ("com1base", class_obscure
, &ports
[0].base
, _("\
932 Set COM1 base i/o port address."), _("\
933 Show COM1 base i/o port address."), NULL
,
935 NULL
, /* FIXME: i18n: */
936 &setlist
, &showlist
);
938 add_setshow_zinteger_cmd ("com1irq", class_obscure
, &ports
[0].irq
, _("\
939 Set COM1 interrupt request."), _("\
940 Show COM1 interrupt request."), NULL
,
942 NULL
, /* FIXME: i18n: */
943 &setlist
, &showlist
);
945 add_setshow_zinteger_cmd ("com2base", class_obscure
, &ports
[1].base
, _("\
946 Set COM2 base i/o port address."), _("\
947 Show COM2 base i/o port address."), NULL
,
949 NULL
, /* FIXME: i18n: */
950 &setlist
, &showlist
);
952 add_setshow_zinteger_cmd ("com2irq", class_obscure
, &ports
[1].irq
, _("\
953 Set COM2 interrupt request."), _("\
954 Show COM2 interrupt request."), NULL
,
956 NULL
, /* FIXME: i18n: */
957 &setlist
, &showlist
);
959 add_setshow_zinteger_cmd ("com3base", class_obscure
, &ports
[2].base
, _("\
960 Set COM3 base i/o port address."), _("\
961 Show COM3 base i/o port address."), NULL
,
963 NULL
, /* FIXME: i18n: */
964 &setlist
, &showlist
);
966 add_setshow_zinteger_cmd ("com3irq", class_obscure
, &ports
[2].irq
, _("\
967 Set COM3 interrupt request."), _("\
968 Show COM3 interrupt request."), NULL
,
970 NULL
, /* FIXME: i18n: */
971 &setlist
, &showlist
);
973 add_setshow_zinteger_cmd ("com4base", class_obscure
, &ports
[3].base
, _("\
974 Set COM4 base i/o port address."), _("\
975 Show COM4 base i/o port address."), NULL
,
977 NULL
, /* FIXME: i18n: */
978 &setlist
, &showlist
);
980 add_setshow_zinteger_cmd ("com4irq", class_obscure
, &ports
[3].irq
, _("\
981 Set COM4 interrupt request."), _("\
982 Show COM4 interrupt request."), NULL
,
984 NULL
, /* FIXME: i18n: */
985 &setlist
, &showlist
);
987 add_info ("serial", info_serial_command
,
988 _("Print DOS serial port status."));