Skip to content

Access to UMB memory

Gregory Haerr edited this page Sep 24, 2024 · 15 revisions

Intro

ELKS is able to use some of the 384kb UMB memory. The usual limitations of UMB still applies : memory needs to actually be here and must not conflict with anything else like bios or video memory. This should also work to add conventional memory that the bios can't see (if the bios is hard-coded for the specific amount of memory the computer comes with).

In version

Since ELKS 0.7 you can access the UMB. See PR.

Configuration

The configuration is done in a single line in /bootopts : umb=<start>,<length>[,...]. All numbers are in paragraphs, and can be preceded with 0x for hexidecimal.

For example, umb=0xC000:0x800,0xD000:0x1000. This will specify ELKS to use memory situated from 0xC0000 to 0xC8000 (32K bytes) and from 0xD0000 to 0xE0000 (64K bytes) in the main memory map. By default this example line is commented out. Note that this line is only a suggestion and may overwrite your video ROM for example, so you need to decide carefully which memory ranges to include based on your specific hardware configuration.

In 0xD000:0x1000 the second value 0x1000 is length and it is 4096 in decimal. This value is in paragraphs and is internally multiplied in the UMB manager by 16 to 65536 in bytes. So you need to decide how many bytes you need to reserve (to be used by ELKS) and divide this value by 16 in order to produce the number of paragraphs you need to set as a second value. The first value is also internally multiplied by 16 and from 0xD000 in paragraphs becomes 0xD0000 in bytes (note the 4th zero). In decimal this is 53248 x 16 = 851968 = 0xD0000.

More on conventional memory

Below is a typical memory layout:

image

This is a very good article on conventional memory: Conventional RAM aka that old foe. It looks like the tool MSD (Microsoft Diagnostics) for DOS would let you explore your memory. MSD can give you an idea which areas you could mark as free in /bootopts.