From 86446d3a5d9d3ca81e85d1ccd3accaaae6f8e3c9 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Fri, 18 Jul 2008 11:03:35 +0200 Subject: POST: Add disable interrupts in some of the missing CPU POST tests Some CPU POST tests did not disable the interrupts while running. This seems to be necessary to protect this self modifying code. Signed-off-by: Stefan Roese --- post/lib_ppc/string.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'post/lib_ppc/string.c') diff --git a/post/lib_ppc/string.c b/post/lib_ppc/string.c index b2daa88..3683ac9 100644 --- a/post/lib_ppc/string.c +++ b/post/lib_ppc/string.c @@ -47,6 +47,7 @@ int cpu_post_test_string (void) { int ret = 0; unsigned int i; + int flag = disable_interrupts(); if (ret == 0) { @@ -97,6 +98,9 @@ int cpu_post_test_string (void) post_log ("Error at string test !\n"); } + if (flag) + enable_interrupts(); + return ret; } -- cgit v1.1