aboutsummaryrefslogtreecommitdiff
path: root/mubios/core/bda.c
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-10 01:16:40 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-10 01:16:40 +0800
commit4a9624da0c7cf0c27a00e1ff497d13f2e4a0d03e (patch)
tree91b95e736fa08a071e7814872fc822c2d3fcd682 /mubios/core/bda.c
parent9f45c30789b6133d4b5fb4ef07f0818a3ea4de48 (diff)
downloadrcc-project-4a9624da0c7cf0c27a00e1ff497d13f2e4a0d03e.tar.gz
rcc-project-4a9624da0c7cf0c27a00e1ff497d13f2e4a0d03e.tar.xz
[mubios] Implement serial input and BIOS console key handling
Implement UART receive, transmit timeouts, configuration and status reporting for INT 14h functions 00h-03h. Initialize the BDA serial timeout and expose the driver interfaces. Translate terminal characters and CSI/SS3 escape sequences into BIOS keyboard events for INT 16h. Add blocking reads, non-consuming status queries, enhanced key reads and keyboard buffer insertion.
Diffstat (limited to 'mubios/core/bda.c')
-rw-r--r--mubios/core/bda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mubios/core/bda.c b/mubios/core/bda.c
index 5aad85c..ddcedb7 100644
--- a/mubios/core/bda.c
+++ b/mubios/core/bda.c
@@ -24,6 +24,8 @@
extern u8 __ebda_start[];
#define BDA_COM1_OFFSET 0x0000u
+#define BDA_COM_TIMEOUT_OFFSET 0x007Cu
+#define BIOS_COM_TIMEOUT 0x0Au
#define BDA_LPT1_OFFSET 0x0008u
static void
@@ -47,6 +49,7 @@ bda_init (void)
store_u16 (bda + BDA_EQUIPMENT_OFFSET, 0x4227u);
store_u16 (bda + BDA_COM1_OFFSET, 0x03F8u);
+ bda[BDA_COM_TIMEOUT_OFFSET] = BIOS_COM_TIMEOUT;
store_u16 (bda + BDA_LPT1_OFFSET, 0x0378u);
store_u16 (bda + BDA_CONVENTIONAL_MEMORY_OFFSET, (u16)(ebda_base >> 10));