Accessing Memory on Device Boards

The last chapter introduced every possible way to allocate memory from RAM; we’ll now deal with another kind of memory that can be present in the computer: memory on expansion boards. Peripherals do have memory on them. Display boards host a frame buffer, video grabbers hold grabbed data, and an Ethernet interface might host received packets in a memory region; additionally, most peripheral boards have some on-board ROM that must be executed by the processor at system boot. All such entities are ``memory,'' in that the processor accesses them through memory instructions. I am limiting the discussion here to the ISA and PCI devices, as they are the most used nowadays.

There are three common kinds of peripheral memory on standard x86 computers: ISA memory in the 640KB-1MB range, ISA memory in the 14MB-16MB range, and PCI memory above the end of physical memory. The addresses used above are physical addresses, the numbers that travel in the computer’s address bus, and they have nothing to do with the virtual addresses used by program code (see Section 7.3 in Chapter 7). The physical location where I/O memory lives is mainly an historical heritage, as explained later when the three memory ranges are introduced.

Unfortunately (or fortunately, if you prefer good architectural design to easy portability), not every Linux platform supports ISA and PCI; this section is limited to the discussion of those that do.

ISA Memory Below 1M

I’ve already introduced ...

Get Linux Device Drivers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.