CF adapters, DMA, and detection.

  • I've got a gigabyte G41M-P33 motherboard (G41+ICH7 combo) in my new setup and I wanted to share my experiences in installing and using pfsense 1.2.3 release on this motherboard, with a CF-IDE adapter.

    System is probably totally overkill but it was mostly parts I had laying around. It's is running a 1.6ghz pentium dual-core CPU (Amazingly cool running and low power CPU. Could probably cool it passively), 2GB of DDR3 ram running in dual channel, an older PCI Intel PRO/100 S Desktop Adapter, and a newer PCIe Intel Gigabit CT Desktop Adapter. Not using the onboard realtek based NIC.

    Link to motherboard manafacture product page:

    I'm using this CF-IDE adapter:

    With the 4GB version of this CF card (SDCFH-004G-A11):

    I booted the install CD from an SATA cdrom drive and did a quick full install on the CF card without indecent. (Yeah, I know full install isn't recommended for CF. But I'm pretty sure I'll have replaced the router machine before the CF card wears out. I'm not going to run squid or anything. I found the embedded version to limited for my taste.)

    As some of the reviewers on the newegg product page say, this CF-IDE adapter does /not/ support DMA (Or at least doesn't support DMA modes that would ordinarily require an 80 conductor 'udma' cable). The CF card, however, does. Unfortunately when used together the motherboard happily detects DMA mode and tries to use it that way - Which does not work when you try to boot from it. Even tried to use the latest bios, but no go. Fortunately i was able to manually tell the motherboard to not use DMA mode, or downgrade DMA to a level that would work. The setting in the bios that worked was "Single word DMA mode 3" That let me boot from the card. Why could I install to the card, but not boot from it? My guess is that the freebsd installer was not initializing the IDE adapter with DMA mode, or was correctly detecting the lower DMA mode.

    Anway, boot started.. But did not finish, throwing errors about DMA and unable to read the filesystem. (I wish I'd wrote them down as the system's not in front of me right now)
    Booting in "Safe mode" from the menu worked.

    I found this doc

    Which told me how to disable DMA at boot. At the boot selection menu I dropped down to the bootloader prompt and entered:

    set hw.ata.ata_dma=0

    To disable DMA, then typed```

    Then, per the document, I added the following line to /boot/loader.conf:


    To ensure that DMA would be disabled on every boot. I used the web interface's text editor to edit /boot/loader.conf since it was easier than using the console.

Log in to reply