Memory-Mapped IO and the BIOS
Posted: Wed Nov 09, 2011 3:14 pm
Hello there,
I had a quick question about memory-mapped input/output (MMIO), particularly concerning its function in the early BIOS startup routines.
I'm unsure of how MMIO is implemented. I was originally under the impression that various hardware devices (including what we perceive to be main memory) are allocated a certain predetermined address space that consumes a portion of DRAM. However, I recently stumbled upon an article that stated that the bios/extended bios code as well as the reset vector are memory-mapped on start-up-- before the POST and before the BIOS is even able to determine the amount/type of memory installed in the chipset. How can things (i.e. BIOS code) be mapped into memory before the amount of memory installed on the system is detected? So I went back to the wikipedia article and read something that I had apparently missed before: "[T]he address decoding circuitry... establishes the memory map of the system." The quote seems to indicate that the physical addresses sent by the processor over the system bus are somewhat "logical" in the sense that they are being used to determine whether the information being sent will be routed to DRAM (the actual DIMM chips) or external device memory (the ROM chip on which the BIOS is stored in the context of this question). Is this correct or do IO devices simply use the DRAM for storage as well?
I had a quick question about memory-mapped input/output (MMIO), particularly concerning its function in the early BIOS startup routines.
I'm unsure of how MMIO is implemented. I was originally under the impression that various hardware devices (including what we perceive to be main memory) are allocated a certain predetermined address space that consumes a portion of DRAM. However, I recently stumbled upon an article that stated that the bios/extended bios code as well as the reset vector are memory-mapped on start-up-- before the POST and before the BIOS is even able to determine the amount/type of memory installed in the chipset. How can things (i.e. BIOS code) be mapped into memory before the amount of memory installed on the system is detected? So I went back to the wikipedia article and read something that I had apparently missed before: "[T]he address decoding circuitry... establishes the memory map of the system." The quote seems to indicate that the physical addresses sent by the processor over the system bus are somewhat "logical" in the sense that they are being used to determine whether the information being sent will be routed to DRAM (the actual DIMM chips) or external device memory (the ROM chip on which the BIOS is stored in the context of this question). Is this correct or do IO devices simply use the DRAM for storage as well?