aboutsummaryrefslogtreecommitdiff
path: root/src/hw/serialio.h
blob: 2fef437ae3963cabffeb682a416e127eaaf9f0ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __SERIALIO_H
#define __SERIALIO_H

#include "types.h" // u16

#if CONFIG_X86
#define PORT_LPT2              0x0278
#define PORT_SERIAL4           0x02e8
#define PORT_SERIAL2           0x02f8
#define PORT_LPT1              0x0378
#define PORT_SERIAL3           0x03e8
#define PORT_SERIAL1           0x03f8
#elif CONFIG_PARISC
#include "parisc/hppa_hardware.h"
#define PORT_LPT2              0
#define PORT_SERIAL4           0
#define PORT_LPT1              0
#define PORT_SERIAL3           0
#endif

// Serial port offsets
#define SEROFF_DATA    0
#define SEROFF_DLL     0
#define SEROFF_IER     1
#define SEROFF_DLH     1
#define SEROFF_IIR     2
#define SEROFF_LCR     3
#define SEROFF_LSR     5
#define SEROFF_MSR     6

void serial_debug_preinit(void);
void serial_debug_putc(char c);
void serial_debug_flush(void);
extern portaddr_t DebugOutputPort;
void qemu_debug_preinit(void);
void qemu_debug_putc(char c);

#endif // serialio.h