Spotlight › Kernel in ROM and the HMA
Kernel code in ROM or HMA
Move the build-matched cold kernel out of conventional RAM, with validation before redirection.
- 128KB PC free RAM
- 32KB to 69KB
- ROM footprint
- 40KB / 5 sockets
- HMA relocation
- 37KB on 286+
01 / Two relocation paths
Two relocation paths
The ROM path uses the IBM 5150's BASIC-ROM socket area for a kernel-specific image. The HMA path relocates the same cold code above the 1MB boundary on a suitable 286-or-later system. Both recover conventional RAM for applications.
These are os8088 implementation choices, not a generic ROM replacement for PC-compatible systems. Intel's processor manuals document the address-generation differences underlying the HMA path.
Memory placement
Where the cold code moves
Choose a relocation path below to switch between the ROM socket map and the HMA memory map.
IBM 5150 physical address window / 8KB per socket
F4000-F5FFF.cold / ROM imageF6000-F7FFF.cold / ROM imageF8000-F9FFF.cold / ROM imageFA000-FBFFF.cold / ROM imageFC000-FDFFF.cold / ROM imageFE000-FFFFFBIOSThe matched image supplies cold code in place. Optional modules are copied from ROM into RAM when requested.
286 or later / A20 enabled / physical addresses
000000-09FFFFConventional RAMResident kernel and application arena0A0000-0FFFFFVideo and ROM address space100000-10FFEFHMA: cold code, relocation support and driver poolFFFF:0010 is the first byte above 1MBCOLDHMA.SYS loads the relocated code from disk. Conventional RAM is reclaimed after the relocation checks pass.
02 / Memory-allocation captures
Memory-allocation captures
The 128KB/CGA captures use MartyPC with GLaBIOS and a mapped ROM image; the HMA captures use QEMU. None is a photograph of physical ROM execution.
03 / Validate before redirecting
Validate before redirecting
The ROM path checks the cold-code bytes against the disk-loaded kernel, validates the remaining kernel checksum and confirms the redirection sites. Failure leaves the ordinary RAM boot path active. The ROM does not remove the initial disk load.
Unused ROM capacity can hold load-on-demand parts. Those parts are copied into RAM when used; they do not execute in place. COLDHMA.SYS performs the corresponding checked relocation on an eligible system, and supported drivers can occupy the remaining HMA space.
Resume records whether cold code ran in RAM, ROM or HMA and requires the same placement. The linked ROM/HMA design records define the exact build and allocation contracts.
04 / Machine and build requirements
Machine and build requirements
A ROM must match the kernel build exactly. On IBM 5150 hardware, use the supported 10/27/82 BIOS or GLaBIOS; earlier IBM BIOS revisions lack the required option-ROM scan. The 5160 layout is not an equivalent target.
The motherboard sockets are 24-pin 2364 footprints; common 28-pin EPROMs need adapters. Replacing the BASIC ROMs removes Cassette BASIC. The HMA path requires an A20-capable 286-or-later configuration; the 8088 has no corresponding address line.
05 / Build matched images
Build matched images
HMA relocation is automatic on eligible standard-kernel boots. ROM images are built from the same release as the disks, not distributed as interchangeable firmware. Test socket mapping with make socketrom before installing an os8088 ROM; make rom emits the combined image and per-socket files.
make socketrommake rom