DragonFly BSD
DragonFly kernel List (threaded) for 2003-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Tentitive (untested) ISA DMA space allocation fix.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Sep 2003 11:36:45 -0700 (PDT)

:    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




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]