From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 12 Aug 2011 11:50:13 +0200 Subject: [U-Boot] [PATCH] mmc: dcache: Replace ext_csd buffer with cache aligned one In-Reply-To: <20110812113506.5b734746@lmajewski.digital.local> References: <1313137527-8744-1-git-send-email-l.majewski@samsung.com> <4E44ED6D.9040909@aribaud.net> <20110812113506.5b734746@lmajewski.digital.local> Message-ID: <4E44F755.3020907@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Lukasz, On 12/08/2011 11:35, Lukasz Majewski wrote: > Hi Albert, > > On Fri, 12 Aug 2011 11:07:57 +0200 > Albert ARIBAUD wrote: > >> I know it is in GNU LIBC; I also know it is not (yet...) in U-Boot's >> own C library. What about the most common toolchains used on U-Boot? > > The memalign is already defined in the u-boot tree (common/dlmalloc.c). Apologies: seems like I missed it. > The dlmalloc.o is also built during compilation and it is linked to the > final u-boot binary. > > I'm using the CodeSourgery's ARM toolchain (gcc version 4.4.1 (Sourcery > G++ Lite 2009q3-68)). > I can test it with (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)) as > well. > > Moreover I can try to install OSELAS.Toolchain (PTXdist ones) and test > this as well with those toolchains. There are several one available for > armv5/armv6/armv7. > > Initially I was planning to use calloc/malloc from ./common/dlmalloc.c > but it is clearly stated, that it is using 8 bytes alignment (which is > hardwired in this implementation). > > I will keep you informed about the tests results. Thanks a lot! If no toolchain gives issues, then I guess the use of memalign() for dynamic buffers can be considered the way to go. Amicalement, -- Albert.