[U-Boot] [RFC][PATCH 05/21] [x86] Fix do_go_exec()

Graeme Russ graeme.russ at gmail.com
Thu Mar 25 12:22:47 CET 2010


This was broken a long time ago by a49864593e083a5d0779fb9ca98e5a0f2053183d
which munged the NIOS and x86 do_go_exec()
---
PS - I think NIOS is still broken (can someone please check)

 lib_i386/board.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib_i386/board.c b/lib_i386/board.c
index af81cd5..5e28c6f 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -422,10 +422,10 @@ void hang (void)
 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[])
 {
 	/*
-	 * TODO: Test this function - changed to fix compiler error.
-	 * Original code was:
-	 *   return (entry >> 1) (argc, argv);
-	 * with a comment about Nios function pointers are address >> 1
+	 * x86 does not use a dedicated register to pass the pointer
+	 * to the global_data
 	 */
+	argv[-1] = (char *)gd;
+
 	return (entry) (argc, argv);
 }
-- 
1.7.0.2.182.ge007



More information about the U-Boot mailing list