diff options
author | Anup Patel <anup@brainfault.org> | 2021-12-14 19:18:32 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-04-20 11:24:35 +0530 |
commit | 191634d2854dfed448fc323195f9b65c305e2d77 (patch) | |
tree | 47193b8ed63049f264211a87e9402c82660c7f85 /riscv/platform.h | |
parent | 5a433081f4ce1a49ee83d1a81cf4922e7542a20c (diff) | |
download | riscv-isa-sim-191634d2854dfed448fc323195f9b65c305e2d77.zip riscv-isa-sim-191634d2854dfed448fc323195f9b65c305e2d77.tar.gz riscv-isa-sim-191634d2854dfed448fc323195f9b65c305e2d77.tar.bz2 |
Add ns16550 serial device emulation
The ns16550 is a widely use serial device so we add a simplified
ns16550 device emulation which is good enough for Linux, OpenSBI,
and hypervisors to use as console.
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'riscv/platform.h')
-rw-r--r-- | riscv/platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/riscv/platform.h b/riscv/platform.h index 4321e84..2bafa68 100644 --- a/riscv/platform.h +++ b/riscv/platform.h @@ -9,6 +9,11 @@ #define PLIC_SIZE 0x01000000 #define PLIC_NDEV 31 #define PLIC_PRIO_BITS 4 +#define NS16550_BASE 0x10000000 +#define NS16550_SIZE 0x100 +#define NS16550_REG_SHIFT 0 +#define NS16550_REG_IO_WIDTH 1 +#define NS16550_INTERRUPT_ID 1 #define EXT_IO_BASE 0x40000000 #define DRAM_BASE 0x80000000 |