Index: sys/dev/bge/if_bgereg.h =================================================================== --- sys/dev/bge/if_bgereg.h +++ sys/dev/bge/if_bgereg.h @@ -3067,3 +3067,11 @@ #define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED) #define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx) #define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx) + +#ifdef BUS_SPACE_MAXADDR +#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) +#define BGE_DMA_BOUNDARY (0x100000000) +#else +#define BGE_DMA_BOUNDARY 0 +#endif +#endif Index: sys/dev/pci/pcivar.h =================================================================== --- sys/dev/pci/pcivar.h +++ sys/dev/pci/pcivar.h @@ -693,13 +693,7 @@ void pci_print_faulted_dev(void); -#ifdef BUS_SPACE_MAXADDR -#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) -#define PCI_DMA_BOUNDARY 0x100000000 -#else #define PCI_DMA_BOUNDARY 0 -#endif -#endif #endif /* _SYS_BUS_H_ */ Index: sys/dev/twa/tw_osl.h =================================================================== --- sys/dev/twa/tw_osl.h +++ sys/dev/twa/tw_osl.h @@ -57,6 +57,12 @@ #define TW_OSLI_MAX_NUM_IOS (TW_OSLI_MAX_NUM_REQUESTS - 2) #define TW_OSLI_MAX_NUM_AENS 0x100 +#ifdef PAE +#define TW_OSLI_DMA_BOUNDARY (1u << 31) +#else +#define TW_OSLI_DMA_BOUNDARY ((bus_size_t)((uint64_t)1 << 32)) +#endif + /* Possible values of req->state. */ #define TW_OSLI_REQ_STATE_INIT 0x0 /* being initialized */ #define TW_OSLI_REQ_STATE_BUSY 0x1 /* submitted to CL */ Index: sys/dev/twa/tw_osl_freebsd.c =================================================================== --- sys/dev/twa/tw_osl_freebsd.c +++ sys/dev/twa/tw_osl_freebsd.c @@ -549,9 +549,9 @@ } /* Create the parent dma tag. */ - if (bus_dma_tag_create(bus_get_dma_tag(sc->bus_dev), /* parent */ + if (bus_dma_tag_create(NULL, /* parent */ sc->alignment, /* alignment */ - 0, /* boundary */ + TW_OSLI_DMA_BOUNDARY, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */