Michael Akey
2026-Jan-28 06:11 UTC
[syslinux] [PATCH] Use AX instead of CX for extended memory size using int15, 88
When booting using syslinux (extlinux) on an older computer that only reports its extended memory size with BIOS interrupt 15h AH=88h, only the base memory is detected. This appears to be because of a change introduced in version 5 of syslinux such that it now uses CX as the length of extended memory rather than AX. On the systems I have that are affected, CX is always zero so no extended memory is added to the memory map list. This appears to be a bug, as v4 and below uses AX and the current meminfo module (com32/modules/meminfo.c) also uses AX.>From 44d030ae5f52d973231baec34652d8dcfc2caca4 Mon Sep 17 00:00:00 2001From: Mike Akey <mike.akey at gmail.com> Date: Tue, 27 Jan 2026 21:44:20 -0800 Subject: [PATCH] Use AX instead of CX for extended memory size using int15,88 --- com32/mboot/mem.c | 2 +- core/bios/bios.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com32/mboot/mem.c b/com32/mboot/mem.c index 738291e5..885c49d6 100644 --- a/com32/mboot/mem.c +++ b/com32/mboot/mem.c @@ -154,7 +154,7 @@ static int mboot_scan_memory(struct AddrRangeDesc **ardp, uint32_t * dosmem) if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) { ard[1].size = 20; ard[1].BaseAddr = 1 << 20; - ard[1].Length = oreg.ecx.w[0] << 10; + ard[1].Length = oreg.eax.w[0] << 10; ard[1].Type = 1; rv = 2; goto out; diff --git a/core/bios/bios.c b/core/bios/bios.c index 7fb37fec..fbaa16cb 100644 --- a/core/bios/bios.c +++ b/core/bios/bios.c @@ -627,7 +627,7 @@ static int bios_scan_memory(scan_memory_callback_t callback, void *data) ireg.eax.w[0] = 0x8800; __intcall(0x15, &ireg, &oreg); if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) { - rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE); + rv = callback(data, (addr_t) 1 << 20, oreg.eax.w[0] << 10, SMT_FREE); if (rv) return rv; } -- 2.43.0
Adam Goldman
2026-Jan-28 06:40 UTC
[syslinux] [PATCH] Use AX instead of CX for extended memory size using int15, 88
On Tue, Jan 27, 2026 at 10:11:45PM -0800, Michael Akey via Syslinux wrote:> When booting using syslinux (extlinux) on an older computer that only reports > its extended memory size with BIOS interrupt 15h AH=88h, only the base memory > is detected. This appears to be because of a change introduced in version 5 > of syslinux such that it now uses CX as the length of extended memory rather > than AX. On the systems I have that are affected, CX is always zero so no > extended memory is added to the memory map list. This appears to be a bug, > as v4 and below uses AX and the current meminfo module > (com32/modules/meminfo.c) also uses AX.I agree it's a bug, Ralf Brown's interrupt list says INT 15/88 returns the extended memory size in AX, Phoenix Technologies "System BIOS for IBM PCs, Compatibles, and EISA Computers" 2nd edition says the same thing, so does Michael Tischer "PC Intern System Programming". No mention of CX in any of those sources. -- Adam