The general solution to test memory is to write a specific pattern like
0xFFFFFFFF to your memory and read it afterwards and compare the result. You can and should of course alter the pattern to discover problems. Some solutions like
memtest86+ also generate random patterns and change the direction they use to write to the memory. For more detailed information about the used algorithms in memtest86 have a look at their tech page. All solutions provided in this post are using basically the same underlying idea.
If you want to run your test from within Linux (you mentioned Linux in your post) have a look at memtester and the memtest suite which both should work with arm. To get started you should use memtester as it basically does exactly what you want.
Testing your memory from within Linux has some disadvantages like you can't really test all of your physical memory as the kernel also needs memory. To test the memory with uboot (it is much smaller than the linux kernel) have a look at the integrated mtest command. It allows you to specify the address range, pattern and iteration. With mtest you should be able to do pretty extensive testing without relying on a operating system. You just have to make sure you are using valid memory ranges otherwise it may be possible that you overwrite the
uboot memory region.
If the testing provided by mtest is not enough you can of course just extend uboot and integrate additional memory testing features into uboot.