aboutsummaryrefslogtreecommitdiff
path: root/mubios/include/bios.h
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-09 23:49:35 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-09 23:49:35 +0800
commit9f45c30789b6133d4b5fb4ef07f0818a3ea4de48 (patch)
treef51bffeff6206ff37bb1589c58e1a9a282b44685 /mubios/include/bios.h
parent2bc8a824fd424aa3e21bc394fd0be3191b830888 (diff)
downloadrcc-project-9f45c30789b6133d4b5fb4ef07f0818a3ea4de48.tar.gz
rcc-project-9f45c30789b6133d4b5fb4ef07f0818a3ea4de48.tar.xz
[mubios] Derive the E820 map from the CMOS memory size
The E820 map ended the usable region at a hardcoded 0x08000000, so a guest with more RAM had the extra memory reported as reserved and ran out of memory during initramfs unpacking. Add cmos_read8() and size the extended memory entry from CMOS registers 0x34 and 0x35, falling back to the 16 MiB units in 0x30 and 0x31 and then to the previous 128 MiB end when neither is programmed.
Diffstat (limited to 'mubios/include/bios.h')
-rw-r--r--mubios/include/bios.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mubios/include/bios.h b/mubios/include/bios.h
index c1c70d8..3c8b0dc 100644
--- a/mubios/include/bios.h
+++ b/mubios/include/bios.h
@@ -44,6 +44,8 @@ void serial_init (void);
void serial_putc (u8 value);
void serial_write (const char *text);
+u8 cmos_read8 (u8 index);
+
void kbd_init (void);
void pic_init (void);
void pit_init (void);