2 FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
\r
4 This file is part of the FreeRTOS.org distribution.
\r
6 FreeRTOS.org is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 FreeRTOS.org is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with FreeRTOS.org; if not, write to the Free Software
\r
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
20 A special exception to the GPL can be applied should you wish to distribute
\r
21 a combined work that includes FreeRTOS.org, without being obliged to provide
\r
22 the source code for any proprietary components. See the licensing section
\r
23 of http://www.FreeRTOS.org for full details of how and when the exception
\r
26 ***************************************************************************
\r
27 ***************************************************************************
\r
29 * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
\r
30 * and even write all or part of your application on your behalf. *
\r
31 * See http://www.OpenRTOS.com for details of the services we provide to *
\r
32 * expedite your project. *
\r
34 ***************************************************************************
\r
35 ***************************************************************************
\r
37 Please ensure to read the configuration and relevant port sections of the
\r
38 online documentation.
\r
40 http://www.FreeRTOS.org - Documentation, latest information, license and
\r
43 http://www.SafeRTOS.com - A version that is certified for use in safety
\r
46 http://www.OpenRTOS.com - Commercial support, development, porting,
\r
47 licensing and training services.
\r
51 * Creates all the demo application tasks, then starts the scheduler. The WEB
\r
52 * documentation provides more details of the demo application tasks.
\r
54 * In addition to the standard demo tasks, the follow demo specific tasks are
\r
57 * The "Check" task. This only executes every three seconds but has the highest
\r
58 * priority so is guaranteed to get processor time. Its main function is to
\r
59 * check that all the other tasks are still operational. Most tasks maintain
\r
60 * a unique count that is incremented each time the task successfully completes
\r
61 * its function. Should any error occur within such a task the count is
\r
62 * permanently halted. The check task inspects the count of each task to ensure
\r
63 * it has changed since the last time the check task executed. If all the count
\r
64 * variables have changed all the tasks are still executing error free, and the
\r
65 * check task toggles the onboard LED. Should any task contain an error at any time
\r
66 * the LED toggle rate will change from 3 seconds to 500ms.
\r
68 * The "Register Check" tasks. These tasks fill the CPU registers with known
\r
69 * values, then check that each register still contains the expected value, the
\r
70 * discovery of an unexpected value being indicative of an error in the RTOS
\r
71 * context switch mechanism. The register check tasks operate at low priority
\r
72 * so are switched in and out frequently.
\r
76 /* Scheduler includes. */
\r
77 #include "FreeRTOS.h"
\r
80 /* Xilinx library includes. */
\r
81 #include "xcache_l.h"
\r
84 /* Demo application includes. */
\r
86 #include "integer.h"
\r
87 #include "comtest2.h"
\r
88 #include "semtest.h"
\r
90 #include "dynamic.h"
\r
91 #include "GenQTest.h"
\r
93 #include "blocktim.h"
\r
95 #include "partest.h"
\r
96 #include "countsem.h"
\r
97 #include "recmutex.h"
\r
99 #include "flop-reg-test.h"
\r
101 /* Priorities assigned to the demo tasks. */
\r
102 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
\r
103 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
104 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
105 #define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
106 #define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
107 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
108 #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
\r
109 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
111 /* The first LED used by the COM test and check tasks respectively. */
\r
112 #define mainCOM_TEST_LED ( 4 )
\r
113 #define mainCHECK_TEST_LED ( 3 )
\r
115 /* The baud rate used by the comtest tasks is set by the hardware, so the
\r
116 baud rate parameters passed into the comtest initialisation has no effect. */
\r
117 #define mainBAUD_SET_IN_HARDWARE ( 0 )
\r
119 /* Delay periods used by the check task. If no errors have been found then
\r
120 the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an
\r
121 error has been found at any time then the toggle rate will increase to
\r
122 mainERROR_CHECK_DELAY milliseconds. */
\r
123 #define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )
\r
124 #define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
\r
128 * The tasks defined within this file - described within the comments at the
\r
129 * head of this page.
\r
131 static void prvRegTestTask1( void *pvParameters );
\r
132 static void prvRegTestTask2( void *pvParameters );
\r
133 static void prvErrorChecks( void *pvParameters );
\r
136 * Called by the 'check' task to inspect all the standard demo tasks within
\r
137 * the system, as described within the comments at the head of this page.
\r
139 static portSHORT prvCheckOtherTasksAreStillRunning( void );
\r
142 * Perform any hardware initialisation required by the demo application.
\r
144 static void prvSetupHardware( void );
\r
146 /*-----------------------------------------------------------*/
\r
148 /* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
\r
149 discover an unexpected value. */
\r
150 static unsigned portBASE_TYPE xRegTestStatus = pdPASS;
\r
152 /* Counters used to ensure the regtest tasks are still running. */
\r
153 static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
\r
155 /*-----------------------------------------------------------*/
\r
159 /* Must be called prior to installing any interrupt handlers! */
\r
160 vPortSetupInterruptController();
\r
162 /* In this case prvSetupHardware() just enables the caches and and
\r
163 configures the IO ports for the LED outputs. */
\r
164 prvSetupHardware();
\r
166 /* Start the standard demo application tasks. Note that the baud rate used
\r
167 by the comtest tasks is set by the hardware, so the baud rate parameter
\r
168 passed has no effect. */
\r
169 vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
\r
170 vStartIntegerMathTasks( tskIDLE_PRIORITY );
\r
171 vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );
\r
172 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
173 vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );
\r
174 vStartDynamicPriorityTasks();
\r
175 vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
\r
176 vStartQueuePeekTasks();
\r
177 vCreateBlockTimeTasks();
\r
178 vStartCountingSemaphoreTasks();
\r
179 vStartRecursiveMutexTasks();
\r
181 #if ( configUSE_FPU == 1 )
\r
183 /* A different project is provided that has configUSE_FPU set to 1
\r
184 in order to demonstrate all the settings required to use the floating
\r
185 point unit. If you wish to use the floating point unit do not start
\r
186 with this project. */
\r
187 vStartMathTasks( mainFLOP_PRIORITY );
\r
188 vStartFlopRegTests();
\r
192 /* Create the tasks defined within this file. */
\r
193 xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
\r
194 xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
\r
195 xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
\r
197 /* The suicide tasks must be started last as they record the number of other
\r
198 tasks that exist within the system. The value is then used to ensure at run
\r
199 time the number of tasks that exists is within expected bounds. */
\r
200 vCreateSuicidalTasks( mainDEATH_PRIORITY );
\r
202 /* Now start the scheduler. Following this call the created tasks should
\r
204 vTaskStartScheduler( );
\r
206 /* vTaskStartScheduler() will only return if an error occurs while the
\r
207 idle task is being created. */
\r
212 /*-----------------------------------------------------------*/
\r
214 static portSHORT prvCheckOtherTasksAreStillRunning( void )
\r
216 portBASE_TYPE lReturn = pdPASS;
\r
217 static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
\r
219 /* The demo tasks maintain a count that increments every cycle of the task
\r
220 provided that the task has never encountered an error. This function
\r
221 checks the counts maintained by the tasks to ensure they are still being
\r
222 incremented. A count remaining at the same value between calls therefore
\r
223 indicates that an error has been detected. */
\r
225 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
230 if( xAreComTestTasksStillRunning() != pdTRUE )
\r
235 if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
240 if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
245 if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
250 if( xIsCreateTaskStillRunning() != pdTRUE )
\r
255 if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
260 if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
265 if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
270 if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
\r
275 if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
280 #if ( configUSE_FPU == 1 )
\r
281 if( xAreMathsTaskStillRunning() != pdTRUE )
\r
286 if( xAreFlopRegisterTestsStillRunning() != pdTRUE )
\r
292 /* Have the register test tasks found any errors? */
\r
293 if( xRegTestStatus != pdPASS )
\r
298 /* Are the register test tasks still looping? */
\r
299 if( ulLastRegTest1Counter == ulRegTest1Counter )
\r
305 ulLastRegTest1Counter = ulRegTest1Counter;
\r
308 if( ulLastRegTest2Counter == ulRegTest2Counter )
\r
314 ulLastRegTest2Counter = ulRegTest2Counter;
\r
319 /*-----------------------------------------------------------*/
\r
322 static void prvErrorChecks( void *pvParameters )
\r
324 portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
\r
325 volatile unsigned portBASE_TYPE uxFreeStack;
\r
327 /* This call is just to demonstrate the use of the function - nothing is
\r
328 done with the value. You would expect the stack high water mark to be
\r
329 lower (the function to return a larger value) here at function entry than
\r
330 later following calls to other functions. */
\r
331 uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
\r
333 /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
\r
334 works correctly. */
\r
335 xLastExecutionTime = xTaskGetTickCount();
\r
337 /* Cycle for ever, delaying then checking all the other tasks are still
\r
338 operating without error. */
\r
341 /* Again just for demo purposes - uxFreeStack should have a lower value
\r
342 here than following the call to uxTaskGetStackHighWaterMark() on the
\r
344 uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
\r
346 /* Wait until it is time to check again. The time we wait here depends
\r
347 on whether an error has been detected or not. When an error is
\r
348 detected the time is shortened resulting in a faster LED flash rate. */
\r
349 vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
\r
351 /* See if the other tasks are all ok. */
\r
352 if( prvCheckOtherTasksAreStillRunning() != pdPASS )
\r
354 /* An error occurred in one of the tasks so shorten the delay
\r
355 period - which has the effect of increasing the frequency of the
\r
357 xDelayPeriod = mainERROR_CHECK_DELAY;
\r
361 vParTestToggleLED( mainCHECK_TEST_LED );
\r
364 /*-----------------------------------------------------------*/
\r
366 static void prvSetupHardware( void )
\r
368 XCache_EnableICache( 0x80000000 );
\r
369 XCache_EnableDCache( 0x80000000 );
\r
371 /* Setup the IO port for use with the LED outputs. */
\r
372 vParTestInitialise();
\r
374 /*-----------------------------------------------------------*/
\r
376 void prvRegTest1Pass( void )
\r
378 /* Called from the inline assembler - this cannot be static
\r
379 otherwise it can get optimised away. */
\r
380 ulRegTest1Counter++;
\r
382 /*-----------------------------------------------------------*/
\r
384 void prvRegTest2Pass( void )
\r
386 /* Called from the inline assembler - this cannot be static
\r
387 otherwise it can get optimised away. */
\r
388 ulRegTest2Counter++;
\r
390 /*-----------------------------------------------------------*/
\r
392 void prvRegTestFail( void )
\r
394 /* Called from the inline assembler - this cannot be static
\r
395 otherwise it can get optimised away. */
\r
396 xRegTestStatus = pdFAIL;
\r
398 /*-----------------------------------------------------------*/
\r
400 static void prvRegTestTask1( void *pvParameters )
\r
402 /* The first register test task as described at the top of this file. The
\r
403 values used in the registers are different to those use in the second
\r
404 register test task. Also, unlike the second register test task, this task
\r
405 yields between setting the register values and subsequently checking the
\r
406 register values. */
\r
409 "RegTest1Start: \n\t" \
\r
411 " li 0, 301 \n\t" \
\r
412 " mtspr 256, 0 #USPRG0 \n\t" \
\r
413 " li 0, 501 \n\t" \
\r
414 " mtspr 8, 0 #LR \n\t" \
\r
416 " mtspr 1, 0 #XER \n\t" \
\r
427 " li 10, 10 \n\t" \
\r
428 " li 11, 11 \n\t" \
\r
429 " li 12, 12 \n\t" \
\r
430 " li 13, 13 \n\t" \
\r
431 " li 14, 14 \n\t" \
\r
432 " li 15, 15 \n\t" \
\r
433 " li 16, 16 \n\t" \
\r
434 " li 17, 17 \n\t" \
\r
435 " li 18, 18 \n\t" \
\r
436 " li 19, 19 \n\t" \
\r
437 " li 20, 20 \n\t" \
\r
438 " li 21, 21 \n\t" \
\r
439 " li 22, 22 \n\t" \
\r
440 " li 23, 23 \n\t" \
\r
441 " li 24, 24 \n\t" \
\r
442 " li 25, 25 \n\t" \
\r
443 " li 26, 26 \n\t" \
\r
444 " li 27, 27 \n\t" \
\r
445 " li 28, 28 \n\t" \
\r
446 " li 29, 29 \n\t" \
\r
447 " li 30, 30 \n\t" \
\r
448 " li 31, 31 \n\t" \
\r
453 " cmpwi 0, 1 \n\t" \
\r
454 " bne RegTest1Fail \n\t" \
\r
455 " cmpwi 2, 2 \n\t" \
\r
456 " bne RegTest1Fail \n\t" \
\r
457 " cmpwi 3, 3 \n\t" \
\r
458 " bne RegTest1Fail \n\t" \
\r
459 " cmpwi 4, 4 \n\t" \
\r
460 " bne RegTest1Fail \n\t" \
\r
461 " cmpwi 5, 5 \n\t" \
\r
462 " bne RegTest1Fail \n\t" \
\r
463 " cmpwi 6, 6 \n\t" \
\r
464 " bne RegTest1Fail \n\t" \
\r
465 " cmpwi 7, 7 \n\t" \
\r
466 " bne RegTest1Fail \n\t" \
\r
467 " cmpwi 8, 8 \n\t" \
\r
468 " bne RegTest1Fail \n\t" \
\r
469 " cmpwi 9, 9 \n\t" \
\r
470 " bne RegTest1Fail \n\t" \
\r
471 " cmpwi 10, 10 \n\t" \
\r
472 " bne RegTest1Fail \n\t" \
\r
473 " cmpwi 11, 11 \n\t" \
\r
474 " bne RegTest1Fail \n\t" \
\r
475 " cmpwi 12, 12 \n\t" \
\r
476 " bne RegTest1Fail \n\t" \
\r
477 " cmpwi 13, 13 \n\t" \
\r
478 " bne RegTest1Fail \n\t" \
\r
479 " cmpwi 14, 14 \n\t" \
\r
480 " bne RegTest1Fail \n\t" \
\r
481 " cmpwi 15, 15 \n\t" \
\r
482 " bne RegTest1Fail \n\t" \
\r
483 " cmpwi 16, 16 \n\t" \
\r
484 " bne RegTest1Fail \n\t" \
\r
485 " cmpwi 17, 17 \n\t" \
\r
486 " bne RegTest1Fail \n\t" \
\r
487 " cmpwi 18, 18 \n\t" \
\r
488 " bne RegTest1Fail \n\t" \
\r
489 " cmpwi 19, 19 \n\t" \
\r
490 " bne RegTest1Fail \n\t" \
\r
491 " cmpwi 20, 20 \n\t" \
\r
492 " bne RegTest1Fail \n\t" \
\r
493 " cmpwi 21, 21 \n\t" \
\r
494 " bne RegTest1Fail \n\t" \
\r
495 " cmpwi 22, 22 \n\t" \
\r
496 " bne RegTest1Fail \n\t" \
\r
497 " cmpwi 23, 23 \n\t" \
\r
498 " bne RegTest1Fail \n\t" \
\r
499 " cmpwi 24, 24 \n\t" \
\r
500 " bne RegTest1Fail \n\t" \
\r
501 " cmpwi 25, 25 \n\t" \
\r
502 " bne RegTest1Fail \n\t" \
\r
503 " cmpwi 26, 26 \n\t" \
\r
504 " bne RegTest1Fail \n\t" \
\r
505 " cmpwi 27, 27 \n\t" \
\r
506 " bne RegTest1Fail \n\t" \
\r
507 " cmpwi 28, 28 \n\t" \
\r
508 " bne RegTest1Fail \n\t" \
\r
509 " cmpwi 29, 29 \n\t" \
\r
510 " bne RegTest1Fail \n\t" \
\r
511 " cmpwi 30, 30 \n\t" \
\r
512 " bne RegTest1Fail \n\t" \
\r
513 " cmpwi 31, 31 \n\t" \
\r
514 " bne RegTest1Fail \n\t" \
\r
516 " mfspr 0, 256 #USPRG0 \n\t" \
\r
517 " cmpwi 0, 301 \n\t" \
\r
518 " bne RegTest1Fail \n\t" \
\r
519 " mfspr 0, 8 #LR \n\t" \
\r
520 " cmpwi 0, 501 \n\t" \
\r
521 " bne RegTest1Fail \n\t" \
\r
522 " mfspr 0, 1 #XER \n\t" \
\r
523 " cmpwi 0, 4 \n\t" \
\r
524 " bne RegTest1Fail \n\t" \
\r
526 " bl prvRegTest1Pass \n\t" \
\r
527 " b RegTest1Start \n\t" \
\r
529 "RegTest1Fail: \n\t" \
\r
532 " bl prvRegTestFail \n\t" \
\r
533 " b RegTest1Start \n\t" \
\r
536 /*-----------------------------------------------------------*/
\r
538 static void prvRegTestTask2( void *pvParameters )
\r
540 /* The second register test task as described at the top of this file.
\r
541 Note that this task fills the registers with different values to the
\r
542 first register test task. */
\r
545 "RegTest2Start: \n\t" \
\r
547 " li 0, 300 \n\t" \
\r
548 " mtspr 256, 0 #USPRG0 \n\t" \
\r
549 " li 0, 500 \n\t" \
\r
550 " mtspr 8, 0 #LR \n\t" \
\r
552 " mtspr 1, 0 #XER \n\t" \
\r
563 " li 10, 110 \n\t" \
\r
564 " li 11, 111 \n\t" \
\r
565 " li 12, 112 \n\t" \
\r
566 " li 13, 113 \n\t" \
\r
567 " li 14, 114 \n\t" \
\r
568 " li 15, 115 \n\t" \
\r
569 " li 16, 116 \n\t" \
\r
570 " li 17, 117 \n\t" \
\r
571 " li 18, 118 \n\t" \
\r
572 " li 19, 119 \n\t" \
\r
573 " li 20, 120 \n\t" \
\r
574 " li 21, 121 \n\t" \
\r
575 " li 22, 122 \n\t" \
\r
576 " li 23, 123 \n\t" \
\r
577 " li 24, 124 \n\t" \
\r
578 " li 25, 125 \n\t" \
\r
579 " li 26, 126 \n\t" \
\r
580 " li 27, 127 \n\t" \
\r
581 " li 28, 128 \n\t" \
\r
582 " li 29, 129 \n\t" \
\r
583 " li 30, 130 \n\t" \
\r
584 " li 31, 131 \n\t" \
\r
586 " cmpwi 0, 11 \n\t" \
\r
587 " bne RegTest2Fail \n\t" \
\r
588 " cmpwi 2, 12 \n\t" \
\r
589 " bne RegTest2Fail \n\t" \
\r
590 " cmpwi 3, 13 \n\t" \
\r
591 " bne RegTest2Fail \n\t" \
\r
592 " cmpwi 4, 14 \n\t" \
\r
593 " bne RegTest2Fail \n\t" \
\r
594 " cmpwi 5, 15 \n\t" \
\r
595 " bne RegTest2Fail \n\t" \
\r
596 " cmpwi 6, 16 \n\t" \
\r
597 " bne RegTest2Fail \n\t" \
\r
598 " cmpwi 7, 17 \n\t" \
\r
599 " bne RegTest2Fail \n\t" \
\r
600 " cmpwi 8, 18 \n\t" \
\r
601 " bne RegTest2Fail \n\t" \
\r
602 " cmpwi 9, 19 \n\t" \
\r
603 " bne RegTest2Fail \n\t" \
\r
604 " cmpwi 10, 110 \n\t" \
\r
605 " bne RegTest2Fail \n\t" \
\r
606 " cmpwi 11, 111 \n\t" \
\r
607 " bne RegTest2Fail \n\t" \
\r
608 " cmpwi 12, 112 \n\t" \
\r
609 " bne RegTest2Fail \n\t" \
\r
610 " cmpwi 13, 113 \n\t" \
\r
611 " bne RegTest2Fail \n\t" \
\r
612 " cmpwi 14, 114 \n\t" \
\r
613 " bne RegTest2Fail \n\t" \
\r
614 " cmpwi 15, 115 \n\t" \
\r
615 " bne RegTest2Fail \n\t" \
\r
616 " cmpwi 16, 116 \n\t" \
\r
617 " bne RegTest2Fail \n\t" \
\r
618 " cmpwi 17, 117 \n\t" \
\r
619 " bne RegTest2Fail \n\t" \
\r
620 " cmpwi 18, 118 \n\t" \
\r
621 " bne RegTest2Fail \n\t" \
\r
622 " cmpwi 19, 119 \n\t" \
\r
623 " bne RegTest2Fail \n\t" \
\r
624 " cmpwi 20, 120 \n\t" \
\r
625 " bne RegTest2Fail \n\t" \
\r
626 " cmpwi 21, 121 \n\t" \
\r
627 " bne RegTest2Fail \n\t" \
\r
628 " cmpwi 22, 122 \n\t" \
\r
629 " bne RegTest2Fail \n\t" \
\r
630 " cmpwi 23, 123 \n\t" \
\r
631 " bne RegTest2Fail \n\t" \
\r
632 " cmpwi 24, 124 \n\t" \
\r
633 " bne RegTest2Fail \n\t" \
\r
634 " cmpwi 25, 125 \n\t" \
\r
635 " bne RegTest2Fail \n\t" \
\r
636 " cmpwi 26, 126 \n\t" \
\r
637 " bne RegTest2Fail \n\t" \
\r
638 " cmpwi 27, 127 \n\t" \
\r
639 " bne RegTest2Fail \n\t" \
\r
640 " cmpwi 28, 128 \n\t" \
\r
641 " bne RegTest2Fail \n\t" \
\r
642 " cmpwi 29, 129 \n\t" \
\r
643 " bne RegTest2Fail \n\t" \
\r
644 " cmpwi 30, 130 \n\t" \
\r
645 " bne RegTest2Fail \n\t" \
\r
646 " cmpwi 31, 131 \n\t" \
\r
647 " bne RegTest2Fail \n\t" \
\r
649 " mfspr 0, 256 #USPRG0 \n\t" \
\r
650 " cmpwi 0, 300 \n\t" \
\r
651 " bne RegTest2Fail \n\t" \
\r
652 " mfspr 0, 8 #LR \n\t" \
\r
653 " cmpwi 0, 500 \n\t" \
\r
654 " bne RegTest2Fail \n\t" \
\r
655 " mfspr 0, 1 #XER \n\t" \
\r
656 " cmpwi 0, 4 \n\t" \
\r
657 " bne RegTest2Fail \n\t" \
\r
659 " bl prvRegTest2Pass \n\t" \
\r
660 " b RegTest2Start \n\t" \
\r
662 "RegTest2Fail: \n\t" \
\r
665 " bl prvRegTestFail \n\t" \
\r
666 " b RegTest2Start \n\t" \
\r
669 /*-----------------------------------------------------------*/
\r
671 /* This hook function will get called if there is a suspected stack overflow.
\r
672 An overflow can cause the task name to be corrupted, in which case the task
\r
673 handle needs to be used to determine the offending task. */
\r
674 void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
\r
675 void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
\r
677 /* The following three calls are simply to stop compiler warnings about the
\r
678 functions not being used - they are called from the inline assembly. */
\r