I am using ARM926EJS. I get 20% faster memory speed in a memory test, without Linux (just like the Getting Started executable). But on Linux, the same code runs 20% slower.
Code
/// Below code just performs burst mode memcopy test.
void asmcpy (void * a, void * b, int iSize)
{
do
{
asm volatile (
"ldmia% 0 !, {r3-r10} \ n \ t"
"stmia% 0 !, {r3-r10} \ n \ t"
: "+ r" (a), "+ r" (b)
:
: "r" (r3), "r" (r4), "r" (r5), "r" (r6), "r" (r7), "r" (r8), "r" (r9), "r" (r10)
);
} while (size--)
}
, Linux. ( , , usr time)
, , Linux?
.
:
int main()
{
int a[320 * 120], b[320 * 120];
for(int i=0; i != 10000; i++)
{
/// Size is divided by 8 because our memcpy function performs 8 integer load stores in the iteration
asmcpy(a, b, (320 * 120) / 8);
}
}
- bin, , . ( )
ADDED.
. SD RAM, DDR Ram. ?
. , Data Cache - Linux. - . Linux 20% .
: LPC3250. DDR.