From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 18 Aug 2011 14:56:07 +0200 Subject: [U-Boot] [PATCH 2/8] POST: add post_log_res field for post results in global data In-Reply-To: <4E4CF0C5.2060607@keymile.com> References: <1312375027-27693-1-git-send-email-valentin.longchamp@keymile.com> <201108181239.21410.marek.vasut@gmail.com> <4E4CF0C5.2060607@keymile.com> Message-ID: <201108181456.07209.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, August 18, 2011 01:00:21 PM Valentin Longchamp wrote: > On 08/18/2011 12:39 PM, Marek Vasut wrote: > > On Wednesday, August 03, 2011 02:37:01 PM Valentin Longchamp wrote: > >> The current post_log_word in global data is currently split into 2x > >> 16 bits: half for the test start, half for the test success. > >> Since we alredy have more than 16 POST tests defined and more could > >> be defined, this may result in an overflow and the post_output_backlog > >> would not work for the tests defined further of these 16 positions. > >> > >> An additional field is added to global data so that we can now support > >> up to 32 (depending of architecture) tests. The post_log_word is only > >> used to record the start of the test and the new field post_log_res for > >> the test success (or failure). The post_output_backlog is for this > >> change also adapted. > >> > >> Signed-off-by: Valentin Longchamp > > > > [...] > > > >> @@ -144,12 +145,12 @@ int post_bootmode_get (unsigned int *last_test) > >> > >> /* POST tests run before relocation only mark status bits .... */ > >> static void post_log_mark_start ( unsigned long testid ) > >> { > >> > >> - gd->post_log_word |= (testid)<<16; > >> + gd->post_log_word |= testid; > > > > I think you can just assign it if you changed the meaning. Still, what if > > we will have more than 32 tests? > > Yes, this will not work anymore when we have more than 32 tests. But we > already have more than 16 tests so there was already a flaw. This at least > corrects this flaw. > > The problem is that this has to stay in the global_data that has to remain > small, so a u32 for bit setting has the great advantage of being small. I'd love to see a more competent test framework which would run in later stages of boot. That'll remove the huge load of tests that's on the POST framework. Detlev, any suggestions ? ;-)