2 FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 This file is part of the FreeRTOS distribution.
\r
9 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
10 the terms of the GNU General Public License (version 2) as published by the
\r
11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
\r
13 ***************************************************************************
\r
14 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
15 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
16 >>! obliged to provide the source code for proprietary components !<<
\r
17 >>! outside of the FreeRTOS kernel. !<<
\r
18 ***************************************************************************
\r
20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
23 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * FreeRTOS provides completely free yet professionally developed, *
\r
28 * robust, strictly quality controlled, supported, and cross *
\r
29 * platform software that is more than just the market leader, it *
\r
30 * is the industry's de facto standard. *
\r
32 * Help yourself get started quickly while simultaneously helping *
\r
33 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
34 * tutorial book, reference manual, or both: *
\r
35 * http://www.FreeRTOS.org/Documentation *
\r
37 ***************************************************************************
\r
39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
\r
40 the FAQ page "My application does not run, what could be wrong?". Have you
\r
41 defined configASSERT()?
\r
43 http://www.FreeRTOS.org/support - In return for receiving this top quality
\r
44 embedded software for free we request you assist our global community by
\r
45 participating in the support forum.
\r
47 http://www.FreeRTOS.org/training - Investing in training allows your team to
\r
48 be as productive as possible as early as possible. Now you can receive
\r
49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
\r
50 Ltd, and the world's leading authority on the world's leading RTOS.
\r
52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
\r
60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
61 licenses offer ticketed support, indemnification and commercial middleware.
\r
63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
64 engineered and independently SIL3 certified version for use in safety and
\r
65 mission critical applications that require provable dependability.
\r
71 #include "FreeRTOSConfig.h"
\r
72 #include "ISR_Support.h"
\r
74 .extern ulRegTest1Counter
\r
75 .extern ulRegTest2Counter
\r
76 .extern dRegTest1_st7
\r
77 .extern dRegTest1_st6
\r
78 .extern dRegTest1_st5
\r
79 .extern dRegTest1_st4
\r
80 .extern dRegTest1_st3
\r
81 .extern dRegTest1_st2
\r
82 .extern dRegTest1_st1
\r
83 .extern dRegTest2_st7
\r
84 .extern dRegTest2_st6
\r
85 .extern dRegTest2_st5
\r
86 .extern dRegTest2_st4
\r
87 .extern dRegTest2_st3
\r
88 .extern dRegTest2_st2
\r
89 .extern dRegTest2_st1
\r
90 .extern vGenerateYieldInterrupt
\r
91 .extern vHPETIRQHandler1
\r
95 .global vApplicationHPETTimer1Wrapper
\r
97 .section .text.last /* Push up the memory to check executing from higher memory addresses. */
\r
103 /* Set initial values into the general purpose registers. */
\r
104 movl $0x11111111, %eax
\r
105 movl $0x22222222, %ebx
\r
106 movl $0x33333333, %ecx
\r
107 movl $0x44444444, %edx
\r
108 movl $0x55555555, %esi
\r
109 movl $0x66666666, %edi
\r
111 /* Set initial values into the floating point registers. */
\r
112 .if configSUPPORT_FPU == 1
\r
120 .endif /* configSUPPORT_FPU */
\r
124 /* Loop checking the values originally loaded into the general purpose
\r
125 registers remain through the life of the task. */
\r
126 cmp $0x11111111, %eax
\r
128 cmp $0x22222222, %ebx
\r
130 cmp $0x33333333, %ecx
\r
132 cmp $0x44444444, %edx
\r
134 cmp $0x55555555, %esi
\r
136 cmp $0x66666666, %edi
\r
140 .if configSUPPORT_FPU == 1
\r
141 /* Loop checking the values originally loaded into the floating point
\r
142 registers remain through the life of the task. */
\r
143 push %eax /* push clobbered register. */
\r
144 fldl dRegTest1_st7 /* st( 0 ) set to st( 7 ) value. */
\r
145 fucomp %st( 7 ) /* Compare st( 0 ) with st( 7 ) and pop. */
\r
146 fnstsw %ax /* Copy status word to ax. */
\r
147 and $0x45, %ah /* Mask bits. */
\r
148 xor $0x40, %ah /* test bits. */
\r
187 /* Restore clobbered register. */
\r
189 .endif /* configSUPPORT_FPU */
\r
191 /* Incrememnt the loop counter to prove this task has not gone into the
\r
192 error null loop. */
\r
193 add $1, ulRegTest1Counter
\r
201 /*-----------------------------------------------------------*/
\r
206 /* Set initial values into the general purpose registers. */
\r
207 movl $0x10101010, %eax
\r
208 movl $0x20202020, %ebx
\r
209 movl $0x30303030, %ecx
\r
210 movl $0x40404040, %edx
\r
211 movl $0x50505050, %esi
\r
212 movl $0x60606060, %edi
\r
214 /* Set initial values into the floating point registers. */
\r
215 .if configSUPPORT_FPU == 1
\r
227 /* Loop checking the values originally loaded into the general purpose
\r
228 registers remain through the life of the task. */
\r
229 cmp $0x10101010, %eax
\r
231 cmp $0x20202020, %ebx
\r
233 cmp $0x30303030, %ecx
\r
235 cmp $0x40404040, %edx
\r
237 cmp $0x50505050, %esi
\r
239 cmp $0x60606060, %edi
\r
242 .if configSUPPORT_FPU == 1
\r
243 /* Loop checking the values originally loaded into the floating point
\r
244 registers remain through the life of the task. */
\r
245 /* Loop checking the values originally loaded into the floating point
\r
246 registers remain through the life of the task. */
\r
247 push %eax /* push clobbered register. */
\r
248 fldl dRegTest2_st7 /* st( 0 ) set to st( 7 ) value. */
\r
249 fucomp %st( 7 ) /* Compare st( 0 ) with st( 7 ) and pop. */
\r
250 fnstsw %ax /* Copy status word to ax. */
\r
251 and $0x45, %ah /* Mask bits. */
\r
252 xor $0x40, %ah /* test bits. */
\r
291 /* Restore clobbered register. */
\r
294 .endif /* configSUPPORT_FPU */
\r
296 /* Force a yield from one of the reg test tasks to increase coverage. */
\r
297 call vGenerateYieldInterrupt
\r
299 /* Increment the loop counter to prove this task has not entered the error
\r
301 add $1, ulRegTest2Counter
\r
309 /*-----------------------------------------------------------*/
\r
311 /* Purely for demonstration purposes, two of the HPET timers used by the
\r
312 IntQueue test use the central interrupt handler, and timer 1 uses its own
\r
313 assembly wrapper - which is defined below. See
\r
314 http://www.freertos.org/RTOS_Intel_Quark_Galileo_GCC.html#interrupts for more
\r
316 .func vApplicationHPETTimer1Wrapper
\r
317 vApplicationHPETTimer1Wrapper:
\r
319 portFREERTOS_INTERRUPT_ENTRY
\r
320 call vHPETIRQHandler1
\r
321 portFREERTOS_INTERRUPT_EXIT
\r