U-Boot Tests for ARM Architecture

Brownlie, Lewis Lewis.Brownlie at Honeywell.com
Wed Jul 22 00:28:54 CEST 2020


Hello all,

I am fairly new to U-Boot, and I want to perform memory and UART tests on the ARM-based NXP LX2160A Reference Design Board using U-Boot.  In doing research I discovered the POST tests, but it seems that these are intended for MPC823E-based boards.  Is it possible/feasible to use POST to perform my tests, or is there a better way?  (I am aware of the mtest command for memory but I would like to find something better, plus this doesn't help with UART.)


I have done a little work on the POST code, so if using POST is a viable option, here are some questions I have regarding it:

If I #define CONFIG_POST in include/configs/lx2160ardb.h and build U-Boot, I receive errors that _POST_WORD_ADDR is not defined.  In looking at include/post.h, it appears that to fix this I must have CONFIG_SYS_POST_WORD_ADDR defined in lx2160ardb.h with some value.  If I #define CONFIG_SYS_POST_WORD_ADDR 0x10 in lx2160ardb.h, where 0x10 is just some dummy value, U-Boot builds with no errors, but like I said it's just a dummy value and I know it can't be used.  I don't know what exactly _POST_WORD_ADDR and CONFIG_SYS_POST_WORD_ADDR do or what value I should use.  Am I going about this in the right way, and if so where should I get the value to use for CONFIG_SYS_POST_WORD_ADDR?

FWIW, this piece of code found in include/post.h is what I'm mainly looking at:

#ifndef CONFIG_POST_EXTERNAL_WORD_FUNCS
#ifdef CONFIG_SYS_POST_WORD_ADDR
#define _POST_WORD_ADDR      CONFIG_SYS_POST_WORD_ADDR
#else

#if defined(CONFIG_ARCH_MPC8360)
#include <linux/immap_qe.h>
#define _POST_WORD_ADDR      (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)

#elif defined (CONFIG_MPC85xx)
#include <asm/immap_85xx.h>
#define _POST_WORD_ADDR      (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_PIC_OFFSET + \
                                                            offsetof(ccsr_pic_t, tfrr))

#elif defined (CONFIG_MPC86xx)
#include <asm/immap_86xx.h>
#define _POST_WORD_ADDR      (CONFIG_SYS_IMMR + CONFIG_SYS_MPC86xx_PIC_OFFSET + \
                                                            offsetof(ccsr_pic_t, tfrr))
#endif

#ifndef _POST_WORD_ADDR
#error "_POST_WORD_ADDR currently not implemented for this platform!"
#endif
#endif /* CONFIG_SYS_POST_WORD_ADDR */


Thank you :)

-Lewis



More information about the U-Boot mailing list