Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 2014 20:38:23 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        arm@FreeBSD.org
Subject:   arm alignment faults...
Message-ID:  <20140629033823.GN1560@funkthat.com>

next in thread | raw e-mail | index | archive | help
So, one of the little projects I'd like to see is the removal of
ETHER_ALIGN from the tree..  This bogosity can (and does) cause the use
of bouncing durning DMA ops on all ethernet frames...

In investigating this issue, I found CPU_CONTROL_AFLT_ENABLE... The
interesting part is that it looks like most of the code in arm/cpufunc.c
has dead code:
        cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
                 | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE
                 | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
                 | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE
                 | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
                 | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_VECRELOC
                 | CPU_CONTROL_ROUNDROBIN;

#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
        cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
#endif

If you define ARM32_DISABLE_ALIGNMENT_FAULTS, you'll still get alignment
faults since that is what is specified above...  If anything, the code
needs to be changed to:
#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
        cpuctrl &= ~CPU_CONTROL_AFLT_ENABLE;
#endif

Though mv_pj4b is the only one to get this correct...

It looks like it was this way when the original code was imported..

Shall we just delete the ifndef ARM32_DISABLE_ALIGNMENT_FAULTS sections
then?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140629033823.GN1560>