Information Technology Reference
In-Depth Information
= 2 32 -1
0xFFFFFFFF
Audio Controller
Keyboard Controller
Disk Controller
0xC0003000
0xC0002000
0xC0001000
Physical
Address
Ranges
0x7FFFFFFF
DRAM
0x00000000
Figure11.9: Physical address map for a system with 2 GB of DRAM and 3
memory mapped I/O devices.
go to registers on the I/O devices's controllers. Thus, the operating system's
keyboard device driver might learn the value of the last key pressed by reading
from physical address, say, 0xC00002000.
The hardware maps different devices to different physical address ranges.
Figure 11.9 shows the physical address map for a hypothetical system with a
32 bit physical address space capable of addressing 4 GB of physical memory.
This system has 2 GB of DRAM in it, consuming physical addresses 0x00000000
(0) to 0x7FFFFFFF (2 31 - 1). Controllers for each of its three I/O devices
are mapped to ranges of addresses in the first few kilobytes above 3 GB. For
example, physical addresses from 0xC0001000 to 0xC0001FFF access registers
in the disk controller.
DMA. Many I/O devices, including most storage devices, transfer data in
bulk. For example, operating systems don't read a word or two from disk,
they usually do transfers of at least a few kilobytes at a time. Rather than
requiring the CPU to read or write each word of a large transfer, I/O devices
can use direct memory access. When using direct memory access (DMA), the
Denition: direct memory
access (DMA)
I/O device copies a block of data between its own internal memory and the
system's main memory.
To set up a DMA transfer, a simple operating system could use memory
mapped I/O to provide a target physical address, transfer length, and operation
code to the device. Then, the device copies data to or from the target address
Search WWH ::




Custom Search