5

This is a question that has been puzzling me for a while.

What happens with devices like graphic cards that have their own memory chips? Do these cards read/write from their own internal memory to/from existing physical memory in the motherboard? Or do CPUs access directly to the card's memory? (in which case no physical memory will be necessary in the motherboard for video, for example)

  • 3
    Some comments on the question: 1Mb == 1 megabit == 128KB. I presume you mean 1MB, in which case what makes you believe that they did have that, rather than 640KB which would be cheaper and easy enough to achieve? – Jules Mar 23 '18 at 12:30
  • 1
    As lon as memory is visible in the CPU address space, it doesn't matter if it's on the main board, a memory card or a graphics card. Why should it? It's memory. – Raffzahn Mar 23 '18 at 13:32
  • 2
    Why the down votes? – cbmeeks Mar 23 '18 at 19:05
  • 1
    @cbmeeks Well some people feel this is an elite club and don't tolerate well those who show a certain degree of ignorance in their questions. That's why :) It's been always the same in SE. – Trap Mar 23 '18 at 20:38
  • 1
    @Trap you are 100% correct. I've been saying the same thing for quite a while now. – cbmeeks Mar 26 '18 at 12:44
11

No, there isn’t necessarily 1 MiB of memory on a PC XT or AT’s motherboard. In fact the original PC (5150) only officially supported up to 64 KiB of memory, 256 KiB in later models; the original XT (5160) only supported 256 KiB, later models supported up to 640 KiB. Additional memory could be installed using expansion cards.

Expansion cards, along with the system’s memory controller, sit on the system bus, which includes a number of address lines. When the CPU wants to read from or write to memory, it puts the address it’s interested in on the bus, and asserts the appropriate state using other pins; any interested party on the bus can respond appropriately to handle the read or write.

This means the address space can cover a variety of different hardware. On a typical XT, you’d have up to 640 KiB of real memory, responding to the first 640 KiB’s worth of addresses; then one or two graphics adapters, then expansion cards, then the system ROM. The fact that addresses map to something all the way up to 1 MiB on a standard PC or XT doesn’t mean that it has 1 MiB of physical memory. The AT added memory up to 16 MiB, but it would typically have a hole from 640 KiB to 1 MiB (to leave room for expansion cards and ROM).

See Who decides what is the memory address that the CGA video buffer will be mapped to? for some related information.

  • 2
    Erm ... no, (sorry for beeing tight :)) The original 5150 PC only supported (16-)64 KiB on board. Similar the original 5160 XT only supported (64-)256 KiB on board. Everything above had to be placed in with add on cards. Later 5150 where supplied with an upgraded mainboard for 64 Ki Chips makign it 256 KiB max. Similar with 5160 and up to 640KiB. The boards had label (or in etching) of the memory size: 16KB-64KB / 64KB-256KB for the 5150 and 64-256KB / 256-640KB for the 5160. In case of the 256 KiB Board the notation is a hint about being a PC or XT :)) – Raffzahn Mar 23 '18 at 13:42
  • @StephenKitt Nice answer. So, does this mean that upper memory made available for programs by HIMEM.SYS/EMM386.SYS actually reside in expansion cards or display memory? What about the 1st 64Kbs above 1MiB? where is that supposed to exist? – Trap Mar 26 '18 at 1:14
  • 1
    @Trap no. HIMEM.SYS doesn’t add any memory in the UMA itself; EMM386.EXE adds memory in the UMA by remapping extended memory. Other UMA providers such as UMBPCI work by enabling shadow memory; this is also effectively remapped extended memory, handled by the chipset. You can use display memory, but that’s all that’s guaranteed to be usable; anything else in the UMA is normally ROM or the EMS page frame. The HMA, above 1 MiB, is extended memory which is accessible thanks to the 8088’s segmentation model; is also corresponds to real physical memory. – Stephen Kitt Mar 26 '18 at 4:10
  • I've seen an XT compatible mainboard yesterday. It has 16x D41256 (256kbits dynamic RAM chip) + 16x D4164 (64kbits) = 640kB. All PC video board had their own RAM, it would have been quite difficult to provide adequate bandwidth for video using DMA on the 8 bits ISA bus. – TEMLIB Mar 26 '18 at 18:38
1

It is also a question of mother board BIOS as some areas are remapped by ROM/RAM memories of installed devices. Some motherboards can use the overlapped memory areas. For example you know the Shadow memory options in old BIOS SETUPs.

The native MS-DOS (real mode) see only the 1 MiB space but you can configure some areas to page in/out different areas of memory. This is how VGA paging works. The same goes for XMS/EMS with which you can access even more than 1MiB of memory if present in system.

So the main access route in real mode MS-DOS was to use specific memory range (usually 64 KiByte) and map part of normally not accessible memory into it. When you done with its use page in another part of memory and so on ...

How ever in MS-DOS you could switch to protected mode and have 32bit meory space available directly. But its a matter of perspective if you can consider such program still a MS-DOS as you virtually turn it of and use your own OS like code.

  • VGA paging (bank-switching) is dealt with by the VGA chipset itself, the (system) BIOS isn’t involved. The paging access you describe for DOS is EMS: a 64K area is reserved in the UMA, either by an expansion card or chipset providing EMS, or by a driver remapping memory, and the EMS services are used to page memory in and out of that area. – Stephen Kitt Mar 26 '18 at 15:04
  • @StephenKitt you mis understood MB BIOS can configure on-board memory to shadow predefined (usually) ROM areas and or use that part of memory for different purposes (has nothing to do with EMS/XMS/UMB nor paging but can affect the amount of usable memory), VGA paging is done the card itself and its BIOS (but that on board of VGA they got one too) but I never mention BIOS with VGA paging nor paging at all to make it clearer I should divide the things by empty line (done now).... – Spektre Mar 29 '18 at 6:28
  • 1
    I know what shadow RAM is ;-). My comment didn’t mention shadow RAM... You write “you can configure some areas to page in/out different areas of memory. This is how VGA paging works”, which gives the impression VGA uses some general paging mechanism; that’s what my first comment was about. My EMS comment concerned your third paragraph which basically describes EMS; I just thought it worth pointing out. – Stephen Kitt Mar 29 '18 at 14:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.