The rest of the memory is above the original 1M of real-mode memory. In order to access that, you need to do two things.
First, you need to activate the A20 address line, which allows you to access the 21st addressing line. This allows you, in real mode, to access the High Memory Area, an area of 48K between 0x1000 and 0x1FFEF, or to access the whole 4G address space in protected mode. The reason you need to do this is an artifact of the segment:offset memory model in real mode and the design of the 8086 chip. You see, base:offset values greater than FFFF:000F are actually greater than 1M. However, the original 8086/8088 had only 20 physical address lines, enough to address 1M exactly, so on those chips, the memory above FFFF:000F would actually wrap around back to 0000:0000 through 0000:FFEF. When the IBM AT designed (using the 80286, which had 24 address lines), they didn't want programs that relied on this to break, so the redirected the 21st address line to a line in the jeyboard controller, in order to disable it. It as later determined that it could be re-enabled again by certain calls to the keyboard controller, allowing the system to access it's full memory.
However, in real mode, the software can still only access the memory which can be addressed through the base:offset pairs, meaning anything above 0x10FFEF is ureachable. To access the rest of memory, you have to switch the system into 32-bit protected mode (there is a 16-bit protected mode as well, which was first used in the 80286, but the 32-bit p-mode is much more useful). This uses a completely different mechanism for accessing and addressing memory, and allows for 32-bit (or 36-bit with PAE) segment offsets, which means that a single segment can address the whole of the physical memory. Note that real mode programs - such as the majority of the BIOS - wil not run in p-mode, so you will probably want to run certain BIOS dependent functions (e.g., memory checking) first. There is a sort of hybrid mode called 'unreal' mode which allows you to use the whole memory while still running real mode software, but it has serious limitations which make it less useful than you would hope, and it lacks the memory protection that gives protected mode it's name. You can also run real mode software in a V86 ("virtual 8086") task under p-mode, but it requires a good amount of work and has certain limits on what it can do.
You can do these two things in whatever order you choose, but it is better to do the A-20 line first, as you can try using the BIOS INT 0x15 functions to activate it while in real-mode (though not all motherboards support it). Doing it this way also means that you will have the whole memory available to you as soon as you switch modes.
See the
.:Quicklinks:. thread for pointers to tutorials explaining the a20 line and protected mode.