From 9f45c30789b6133d4b5fb4ef07f0818a3ea4de48 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Mon, 9 Nov 2026 23:49:35 +0800 Subject: [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. --- mubios/include/bios.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mubios/include/bios.h') 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); -- cgit v1.2.3