← All spotlightsPrograms / Features

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.

Task Manager, ROM in
The os8088 Task Manager on a CGA screen. Its memory line reads RAM 69 of 128K, HEAP 10 of 69K. The System row uses 59K.
Kernel-location memory report.
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

IBM 5150 physical address window / 8KB per socket

U28F4000-F5FFF.cold / ROM image
U29F6000-F7FFF.cold / ROM image
U30F8000-F9FFF.cold / ROM image
U31FA000-FBFFF.cold / ROM image
U32FC000-FDFFF.cold / ROM image
U33FE000-FFFFFBIOS
U28-U32: 40KB os8088 ROM imageU33: original BIOS

The 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 arena
0A0000-0FFFFFVideo and ROM address space
100000-10FFEFHMA: cold code, relocation support and driver poolFFFF:0010 is the first byte above 1MB

COLDHMA.SYS loads the relocated code from disk. Conventional RAM is reclaimed after the relocation checks pass.

Address ranges follow the ROM and HMA records. The HMA overview is not to scale; exact allocations depend on the build.

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.

Standard kernel, no ROM
The os8088 Task Manager on a CGA screen. Its memory line reads RAM 106 of 128K, HEAP 10 of 32K. The System row uses 96K.
128KB/CGA baseline in MartyPC.
Standard kernel, ROM in
The same Task Manager with the ROM installed. The memory line reads RAM 69 of 128K, HEAP 10 of 69K. The System row uses 59K.
Matching ROM image enabled.
Small kernel, no ROM
The os8088 Task Manager on the small kernel, on a CGA screen. Its memory line reads RAM 66 of 128K, HEAP 5 of 67K. The System row uses 61K.
Small-kernel baseline on the 128KB model.
Small kernel, ROM in
The small kernel's Task Manager with its ROM installed. The memory line reads RAM 45 of 128K, HEAP 5 of 88K. The System row uses 40K.
Matching small-kernel ROM enabled.
Above 1MB, HMA not used
The os8088 Task Manager on a VGA screen. Its memory line reads RAM 117 of 639K, HEAP 20 of 542K. The System row uses 105K.
QEMU configuration with HMA relocation and drivers.
Above 1MB, HMA in use
The same Task Manager booted from the stock system disk. The memory line reads RAM 72 of 639K, HEAP 12 of 579K. The System row uses 60K.
Same machine using the stock system disk.

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 socketrom
make rom