U-Boot POST Memory Test

Brownlie, Lewis Lewis.Brownlie at Honeywell.com
Tue Aug 4 21:46:11 CEST 2020


Thank you for your helpful response Heinrich.  I have a question to further clarify the purpose of post_bootmode_get().

You wrote,
> post_bootmode_get() tells you which type of tests should be executed.
> For tests after a watchdog reset it also returns the last executed test."

This makes sense.  So, looking at the following code in post_run (post/post.c):

	if (post_bootmode_get(&last) & POST_POWERTEST) {
			.....
		if (last < post_list_size &&
			(flags & test_flags[last] & POST_ALWAYS) &&
			(flags & test_flags[last] & POST_MEM)) { 
		....

last is initialized to 62 in the first line shown above; thus, the second if-branch shown is not entered because 62 is not less than post_list_size (which is 1).  last returns the last executed test; however, I am confused because this is the first call of post_run(), so I don't know what the "last executed test" would be referring to.

Thus, my question is, what "last executed test" is last (and its value of 62) representing in this case, and why is it preventing the code from entering the shown if-branch?

Thank you again,
-Lewis



More information about the U-Boot mailing list