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 <sr@denx.de>
diff --git a/post/lib_ppc/cmpi.c b/post/lib_ppc/cmpi.c
index 92b4d57..5ecfe87 100644
--- a/post/lib_ppc/cmpi.c
+++ b/post/lib_ppc/cmpi.c
@@ -102,6 +102,7 @@
{
int ret = 0;
unsigned int i;
+ int flag = disable_interrupts();
for (i = 0; i < cpu_post_cmpi_size && ret == 0; i++)
{
@@ -124,6 +125,9 @@
}
}
+ if (flag)
+ enable_interrupts();
+
return ret;
}