psim start code patch for environp / ncurses

Joel Sherrill joel.sherrill at OARcorp.com
Tue Aug 1 23:30:02 UTC 2000


I think the attached patch is enough to fix psim's 
startup problem (i.e. lacking an environp).
boot_card is now invoked as boot_card(0,0,&environ)
which should be correct.

This patch probably should be applied to the start
code for all PowerPC BSPs.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
-------------- next part --------------
Index: start.S
===================================================================
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/powerpc/psim/start/start.S,v
retrieving revision 1.2
diff -c -r1.2 start.S
*** start.S	1999/11/19 16:40:40	1.2
--- start.S	2000/08/01 23:31:17
***************
*** 96,101 ****
--- 96,105 ----
  	stw	r0,0(sp)		/* clear back chain */
  	stwu	sp,-56(sp)		/* push another stack frame */
  
+         lis 5,environ at ha
+         la 5,environ at l(5)		/* environp */
+         li 3,0
+         li 4,0
  	/* Let her rip */
  	bl	FUNC_NAME(boot_card)
  
***************
*** 104,106 ****
--- 108,113 ----
  	trap
  .Lstart:
  	.size	_start,.Lstart-_start
+ 
+ 	.comm	environ,4,4
+ 


More information about the users mailing list