Upper Memory Area
The term Upper Memory Area (UMA) describes the reserved 384KB at the top of the first megabyte of system memory on a PC/XT and the first megabyte on an AT-type system. This memory has the addresses from A0000 through FFFFF. The way the 384KB of upper memory is used breaks down as follows:
-
The first 128KB after conventional memory is called video RAM. It is reserved for use by video adapters. When text and graphics are displayed onscreen, the data bits that make up those images reside in this space. Video RAM is allotted the address range A0000–BFFFF.
-
The next 128KB is reserved for the adapter BIOS that resides in read-only memory chips on some adapter boards plugged into the bus slots. Most VGA-compatible video adapters use the first 32KB of this area for their onboard BIOS. Any other adapters installed can use the rest.
Many network adapters also use this area for special-purpose RAM called shared memory. Adapter ROM and special-purpose RAM is allotted the address range C0000–DFFFF.
-
The last 128KB of memory is reserved for motherboard BIOS (the basic input/output system, which is stored in read-only RAM chips or ROM). The POST and bootstrap loader, which handles your system at boot-up until the operating system takes over, also reside in this space.
Most systems use only the last 64KB (or less) of this space, leaving the first 64KB or more free for remapping with memory managers. Some systems also include the CMOS Setup program in this area. The motherboard BIOS is allotted the address range E0000–FFFFF.
Not all the 384KB of reserved memory is fully used on most 16-bit and higher systems. For example, according to the PC standard, reserved video RAM begins at address A0000, which is right at the 640KB boundary.
Normally, it is used for VGA graphics modes, whereas the monochrome and color text modes use B0000–B7FFF and B8000–BFFFF, respectively. Older non-VGA adapters used memory only in the B0000 segment. Different video adapters use varying amounts of RAM for their operations, depending mainly on the mode they are in.
To the processor, however, it always appears as the same 128KB area, no matter how much RAM is really on the video card. This is managed by bank switching areas of memory on the card in and out of the A0000–BFFFF segments.
Although the top 384KB of the first megabyte was originally termed reserved memory, it is possible to use previously unused regions of this memory to load 16-bit device drivers (such as the ANSI.SYS screen driver that comes with DOS) and memory-resident programs (such as MOUSE.COM, the DOS mouse driver), which frees up the conventional memory they would otherwise require.
Note that this does not affect 32-bit device drivers such as those used with Windows 9x, NT/2000/XP, and so forth because they load into extended memory with no restrictions.
The amount of free UMA space varies from system to system, depending mostly on the adapter cards installed on the system. For example, most video adapters, SCSI adapters, and some network adapters require some of this area for built-in ROMs or special-purpose RAM use.
Video RAM Memory
A video adapter installed in your system uses a portion of your system's first megabyte of memory to hold graphics or character information for display, but this typically is used or active only when in basic VGA mode. Note that even though a modern video card can have 64MB or more of onboard memory, only 128KB of this memory appears available to the system in the video RAM area.
The rest of the memory is accessible only by the video processor (on the video card) directly, or by your system processor via a memory aperture positioned near the 4GB top of the system address space. Because this aperture can be configured differently by various cards, you should consult the technical documentation for your card or video chipset for more information.
Some motherboard ROM have BIOS Setup options for controlling the video card memory aperture, but unless you are experiencing some type of problem related to the video card, it is best to leave those options to their default settings.
When in basic VGA mode, such as when at a DOS prompt or when running in Windows safe mode, your processor can directly access up to 128KB of the video RAM from address A0000–BFFFFh. All modern video cards also have onboard BIOS normally addressed at C0000–C7FFFh, which is part of the memory space reserved for adapter card BIOS.
Generally, the higher the resolution and color capabilities of the video adapter, the more system memory the video adapter uses, but again, that additional memory (past 128KB) is not usually accessible by the processor. Instead, the system tells the video chip what should be displayed, and the video chip generates the picture by putting data directly into the video RAM on the card.
In the standard system-memory map, a total of 128KB is reserved for use by the video card to store currently displayed information when in basic VGA modes. The reserved video memory is located in segments A000 and B000.
The video adapter ROM uses additional upper memory space in segment C000. Even with the new multiple monitor feature in Windows 98 and later, only one video card (the primary video card) is in the memory map; all others use no low system memory.
Video Graphics Array Memory
All VGA-compatible cards, including those running in PCI or AGP slots, use all 128KB of the system allocated video RAM from A0000–BFFFF, but not all at once. This video RAM area is used depending on the mode the card is in. You can see that the typical VGA card uses a full 32KB of space for the onboard ROM containing driver code.
Some VGA cards might use slightly less, but this is rare. The video RAM areas are active only when the adapter is in the particular mode designated. In other words, when a VGA adapter is in graphics mode, only segment A000 is used; when it is in color text mode, only the last half of segment B000 is used.
Because the VGA adapter is almost never run in monochrome text mode, the first half of segment B000 remains unused (B0000–B7FFF). Some systems incorporate the video adapter into the motherboard or even directly in the motherboard chipset.
In these systems, even though the video BIOS and motherboard BIOS might be from the same manufacturer, they are always set up to emulate a standard VGA-type adapter card. In other words, the video BIOS appears in the first 32KB of segment C000 just as though a standalone VGA-type card were plugged into a slot.
The built-in video circuit in these systems can in many cases be disabled with a switch or jumper or sometimes by simply plugging in a video card. By having the built-in VGA act exactly as though it were a separate card, disabling it allows a new adapter to be installed with no compatibility problems that might arise if the video drivers had been incorporated into the motherboard BIOS.
Adapter ROM and Special-Purpose RAM Memory
The second 128KB of upper memory beginning at segment C000 is reserved for the software programs, or BIOS, on the adapter boards plugged into the system slots. These BIOS programs are stored on special chips known as ROM.
Most adapters today use EEPROM or Flash ROM, which can be erased and reprogrammed right in the system without removing the chip or card. Updating the Flash ROM is as simple as running the update program you get from the manufacturer and following the directions onscreen.
It pays to check periodically with your card manufacturers to see whether they have Flash ROM updates for their cards. ROM is useful for semipermanent programs that must always be present while the system is running, and especially for booting.
Graphics boards, hard disk controllers, communications boards, and expanded memory boards, for example, are adapter boards that might have adapter ROM. These adapter ROMs are in an area of memory separate from the VGA video RAM and motherboard ROM areas.
On systems based on the 386 CPU chip or higher, memory managers that are included with DOS 6 or third-party programs can load device drivers and memory-resident programs into unused regions in the UMA. To actually move the RAM usage on any given adapter requires that you consult the documentation for the card.
Most older cards require that specific switches or jumpers be changed, and the settings will probably not be obvious without the manual. Plug and Play cards allow these settings to be changed by software that comes with the card or the Device Manager program included in Windows.
Video Adapter BIOS
The video adapter ROM BIOS controls the video card during the boot sequence and anytime the system is in basic VGA modes (such as when running DOS). You also are using the video ROM BIOS code whenever you are running Windows in safe mode. All modern video adapters (even AGP cards) use 32KB for their onboard BIOS, from addresses C0000–C7FFF.
Depending on the basic VGA mode selected (color text, monochrome text, or VGA graphics), the video card uses some or all of the 128KB of upper memory beginning at segment C000. In addition, graphics cards can contain up to 64MB or more of onboard memory for use in their native high-resolution modes in which to store currently displayed data and more quickly fetch new screen data for display.
Hard Disk Controller and SCSI Host Adapter BIOS
The upper memory addresses C0000–DFFFF are also used for the built-in BIOS contained on many hard drive and SCSI controllers. The hard drive or SCSI adapter card used on a particular system might use a different amount of memory.
But it is most likely to use the memory segment beginning at C800 because this address is considered part of the IBM standard for personal computers. Virtually all the disk controller or SCSI adapters today that have an onboard BIOS allow the BIOS starting address to be easily moved in the C000 and D000 segments.
If the default address is already in use by another card, you have to consult the documentation for the new card to see how to change the BIOS starting address to avoid any conflicts.
Network Adapters
Network adapter cards can also use upper memory in segments C000 and D000. The exact amount of memory used and the starting address for each network card vary with the card's type and manufacturer. Some network cards do not use any memory at all. A network card might have two primary uses for memory. They are as follows:
-
IPL (Initial Program Load or Boot) ROM
-
Shared memory (RAM)
An IPL ROM is usually an 8KB ROM that contains a bootstrap loader program that enables the system to boot directly from a file server on the network. This enables the removal of all disk drives from the PC, creating a diskless workstation.
Because no floppy or hard disk is in the system to boot from, the IPL ROM gives the system the instructions necessary to locate an image of the operating system on the file server and load it as though it were on an internal drive.
Shared memory refers to a small portion of RAM contained on the network card that is mapped into the PC's upper memory area. This region is used as a memory window onto the network and offers rapid data transfer from the network card to the system.
IBM pioneered the use of shared memory for its first Token-Ring network adapters, and now shared memory is commonly used in other companies' network adapters. Shared memory first was devised by IBM because it found that transfers using the DMA channels were not fast enough in most systems.
This mainly had to do with some quirks in the DMA controller and bus design, which especially affected 16-bit ISA bus systems. Network adapters that do not use shared memory use DMA or Programmed I/O (PIO) transfers to move data to and from the network adapter.
Although shared memory is faster than either DMA or PIO for ISA systems, it does require 16KB of UMA space to work. Most standard performance network adapters use PIO because it makes them easier to configure, and they require no free UMA space. However, most high-performance adapters use shared memory.
The shared memory region on most network adapters that use one is usually 16KB in size and can be located at any user-selected 4KB increment of memory in segments C000 or D000.
Most other network adapters are similar in that they also have an IPL ROM and a shared memory address, although the sizes of these areas and the default addresses might be different. Most network adapters that incorporate an IPL ROM option can disable the ROM and socket so that those addresses are not needed at all.
This helps conserve UMA space and prevent possible future conflicts if you are never going to use the function. Note that the Plug and Play feature in Win9x, Me, and Windows 2000, XP does not attempt to optimize memory use, only to resolve conflicts.
Of course, with 32-bit drivers, the locations and sizes of free upper memory blocks don't really matter because 32-bit drivers are loaded into extended memory. If you are still occasionally running DOS-based programs, such as games, you could manually optimize the upper memory area configuration for maximum memory and performance, but for the most part it isn't worth the effort.
Motherboard BIOS Memory
The last 128KB of reserved memory is used by the motherboard BIOS. The BIOS programs in ROM control the system during the boot-up procedure and remain as drivers for various hardware in the system during normal operation. Because these programs must be available immediately, they can't be loaded from a device such as a disk drive.
Both segments E000 and F000 in the memory map are considered reserved for the motherboard BIOS, but only some systems actually use this entire area. Older 8-bit systems require only segment F000 and enable adapter card ROM or RAM to use segment E000.
Most 16-bit or greater systems use all F000 for the BIOS and might decode but not use any of segment E000. By decoding an area, the motherboard essentially grabs control of the addresses, which precludes installing any other hardware in this region. In other words, configuring adapter cards to use this area isn't possible.
That is why you will find that most adapters that use memory simply do not allow any choices for memory use in segment E000. Although this might seem like a waste of 64KB of memory space, any 386 or higher system can use the powerful MMU in the processor to map RAM from extended memory into segment E000 as an upper memory block.
The system can subsequently load 16-bit driver software in this UMB if necessary. This is a nice solution to what otherwise would be wasted memory, although it is not important if you use 32-bit drivers.