Tentitive (untested) ISA DMA space allocation fix.

Matthew Dillon dillon at apollo.backplane.com
Sun Sep 14 11:38:44 PDT 2003


:    It could be this line in twe_freebsd.c:
:
:        /*
:         * Data must be 64-byte aligned; allocate a fixup buffer if it's not.
:         */
:        if (((vm_offset_t)tr->tr_data % TWE_ALIGNMENT) != 0) {
:            tr->tr_realdata = tr->tr_data;                              /* save
:pointer to 'real' data */   
:            tr->tr_flags |= TWE_CMD_ALIGNBUF;
:            tr->tr_data = malloc(tr->tr_length, TWE_MALLOC_CLASS, M_NOWAIT);
:/* XXX check result here */
:        }
:
:    It is assuming that malloc returns 64-byte aligned data.  I'm not sure
:    if this is going to be true in all cases, it depends on the actual

    Hmm.  Followup.  The comment says 64-bit aligned but TWE_ALIGNMENT
    is 0x200 (512).  I don't know what the actual hardware alignment 
    requirement is.

						-Matt






More information about the Kernel mailing list