Memory mapped Vs IO mapped I/O

Discussion in 'Windows Vista Drivers' started by rajesh, Oct 16, 2003.

  1. rajesh

    rajesh Guest

    Dear All,

    Can some one explain the advantage and disadvantage of
    Memory mapped and IO mapped I/O. We know that the address
    space of Memory mapped IO is much bigger than IO mapped
    I/O in Intel. Is there any other advantage.


    Thanks
    Rajesh
     
    rajesh, Oct 16, 2003
    #1
    1. Advertisements

  2. For all new devices, memory-mapped IO is strongly recommended.
     
    Maxim S. Shatskih, Oct 16, 2003
    #2
    1. Advertisements

  3. Rajesh,

    (If you're designing a new PCI device)
    In addition to the significant difference in available ranges (simplified,
    it's typically 64K vs. 4GB), there's more problems with IO/port mapped space
    on PCs. One significant issue is that MOST ISA devices don't decode all of
    the 16 address lines, and therefore 'alias' themselves in many many
    locations throughout port space. Some BIOSs figure some of this out, and
    the OS/bus drivers do their best to get around this when setting up the
    other PnP devices, but the fact is that there's a ton of legacy hardware out
    there that the BIOS/OS may not even know about.

    My recommendation is that port I/O in PCI devices should die a horrible
    bloody screaming death. Don't do it, don't do it, don't do it. Make your
    PCI devices memory mapped, and DON'T require below 1MB mapping for the
    memory addresses. This gives the BIOS and the OS the best chance of getting
    it configured without a conflict. Don't worry about not being able to get
    to the registers from DOS - you can buy a driver toolkit and use Windows to
    test/debug.

    (If you're designing a new PC Card/PCMCIA/CompactFlash device)
    Just to make things more complicated, for these devices, there's two
    different types of memory-mapped, attribute and common. There's not much
    room to map your device's addresses into the limited memory space most PC
    Card controllers allow. There's also a whole ton of settings in the card's
    CIS that have to be 100% compatible with the host adapter/controller, the
    BIOSs and OS/drivers, to get the memory mapped correctly. Most importantly,
    your driver will typically have to do some extra work to configure the
    memory at run-time. If you're building a PC Card/PCMCIA/CompactFlash
    device, you'll save yourself some troubleshooting time and avoid some
    strange behavior on many systems if you use a very small Port I/O range to
    access your device's registers.

    (If you're designing a new ISA board)
    Don't.

    -Tim

    Timothy A. Johns

    Driver Development Corporation



    425.697.5521 x4458
     
    Timothy A. Johns, Oct 16, 2003
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.