Mercurial > ecos
annotate packages/hal/arm/arch/current/src/hal_mk_defs.c @ 3292:7f8e529b4d82 default tip
Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF() so it works with negative offsets.
| author | vae |
|---|---|
| date | Wed, 29 Apr 2015 23:31:48 +0000 |
| parents | afb59e9b7339 |
| children |
| rev | line source |
|---|---|
| 2 | 1 /*========================================================================== |
| 2 // | |
| 3 // hal_mk_defs.c | |
| 4 // | |
| 5 // HAL (architecture) "make defs" program | |
| 6 // | |
| 7 //========================================================================== | |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
8 // ####ECOSGPLCOPYRIGHTBEGIN#### |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
9 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
10 // This file is part of eCos, the Embedded Configurable Operating System. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
12 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
13 // eCos is free software; you can redistribute it and/or modify it under |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
14 // the terms of the GNU General Public License as published by the Free |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
15 // Software Foundation; either version 2 or (at your option) any later |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
16 // version. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
17 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
18 // eCos is distributed in the hope that it will be useful, but WITHOUT |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
21 // for more details. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
22 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
23 // You should have received a copy of the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
24 // along with eCos; if not, write to the Free Software Foundation, Inc., |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
26 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
27 // As a special exception, if other files instantiate templates or use |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
28 // macros or inline functions from this file, or you compile this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
29 // and link it with other works to produce a work based on this file, |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
30 // this file does not by itself cause the resulting work to be covered by |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
31 // the GNU General Public License. However the source code for this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
32 // must still be made available in accordance with section (3) of the GNU |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
33 // General Public License v2. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
34 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
35 // This exception does not invalidate any other reasons why a work based |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
36 // on this file might be covered by the GNU General Public License. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
37 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2594
diff
changeset
|
38 // ####ECOSGPLCOPYRIGHTEND#### |
| 2 | 39 //========================================================================== |
| 40 //#####DESCRIPTIONBEGIN#### | |
| 41 // | |
| 42 // Author(s): gthomas | |
| 43 // Contributors: gthomas | |
| 44 // Date: 1999-02-20 | |
| 45 // Purpose: ARM architecture dependent definition generator | |
| 46 // Description: This file contains code that can be compiled by the target | |
| 47 // compiler and used to generate machine specific definitions | |
| 48 // suitable for use in assembly code. | |
| 49 // | |
| 50 //####DESCRIPTIONEND#### | |
| 51 // | |
| 52 //========================================================================*/ | |
| 53 | |
| 54 #include <pkgconf/hal.h> | |
| 55 | |
| 56 #include <cyg/hal/hal_arch.h> // HAL header | |
| 57 #include <cyg/hal/hal_intr.h> // HAL header | |
| 58 #ifdef CYGPKG_KERNEL | |
| 59 # include <pkgconf/kernel.h> | |
| 60 # include <cyg/kernel/instrmnt.h> | |
| 61 #endif | |
|
103
95f3e12a6327
Merge from eCos master repository on 2000-06-23-16:41:10-BST
jlarmour
parents:
76
diff
changeset
|
62 #include <cyg/hal/hal_if.h> |
| 2 | 63 |
| 64 /* | |
| 65 * This program is used to generate definitions needed by | |
| 66 * assembly language modules. | |
| 67 * | |
| 68 * This technique was first used in the OSF Mach kernel code: | |
| 69 * generate asm statements containing #defines, | |
| 70 * compile this file to assembler, and then extract the | |
| 71 * #defines from the assembly-language output. | |
| 72 */ | |
| 73 | |
| 74 #define DEFINE(sym, val) \ | |
| 75 asm volatile("\n\t.equ\t" #sym ",%0" : : "i" (val)) | |
| 76 | |
| 77 int | |
| 78 main(void) | |
| 79 { | |
| 80 DEFINE(armreg_r0, offsetof(HAL_SavedRegisters, d[HAL_THREAD_CONTEXT_R0])); | |
| 81 DEFINE(armreg_r4, offsetof(HAL_SavedRegisters, d[HAL_THREAD_CONTEXT_R4])); | |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
82 DEFINE(armreg_r8, offsetof(HAL_SavedRegisters, d[HAL_THREAD_CONTEXT_R8])); |
|
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
83 DEFINE(armreg_r9, offsetof(HAL_SavedRegisters, d[HAL_THREAD_CONTEXT_R9])); |
|
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
84 DEFINE(armreg_r10, offsetof(HAL_SavedRegisters, d[HAL_THREAD_CONTEXT_R10])); |
| 2 | 85 DEFINE(armreg_sp, offsetof(HAL_SavedRegisters, sp)); |
| 86 DEFINE(armreg_fp, offsetof(HAL_SavedRegisters, fp)); | |
| 87 DEFINE(armreg_ip, offsetof(HAL_SavedRegisters, ip)); | |
| 88 DEFINE(armreg_lr, offsetof(HAL_SavedRegisters, lr)); | |
| 89 DEFINE(armreg_pc, offsetof(HAL_SavedRegisters, pc)); | |
| 90 DEFINE(armreg_cpsr, offsetof(HAL_SavedRegisters, cpsr)); | |
| 91 DEFINE(armreg_vector, offsetof(HAL_SavedRegisters, vector)); | |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
92 DEFINE(armreg_svclr, offsetof(HAL_SavedRegisters, svc_lr)); |
|
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
172
diff
changeset
|
93 DEFINE(armreg_svcsp, offsetof(HAL_SavedRegisters, svc_sp)); |
| 2 | 94 DEFINE(ARMREG_SIZE, sizeof(HAL_SavedRegisters)); |
| 95 DEFINE(CYGNUM_HAL_ISR_COUNT, CYGNUM_HAL_ISR_COUNT); | |
| 96 DEFINE(CYGNUM_HAL_VSR_COUNT, CYGNUM_HAL_VSR_COUNT); | |
| 97 DEFINE(CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, | |
| 98 CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION); | |
| 99 DEFINE(CYGNUM_HAL_EXCEPTION_INTERRUPT, CYGNUM_HAL_EXCEPTION_INTERRUPT); | |
| 100 DEFINE(CYGNUM_HAL_EXCEPTION_CODE_ACCESS, | |
| 101 CYGNUM_HAL_EXCEPTION_CODE_ACCESS); | |
| 102 DEFINE(CYGNUM_HAL_EXCEPTION_DATA_ACCESS, | |
| 103 CYGNUM_HAL_EXCEPTION_DATA_ACCESS); | |
| 104 DEFINE(CYGNUM_HAL_VECTOR_IRQ, CYGNUM_HAL_VECTOR_IRQ); | |
| 105 #ifdef CYGPKG_KERNEL | |
| 106 DEFINE(RAISE_INTR, CYG_INSTRUMENT_CLASS_INTR|CYG_INSTRUMENT_EVENT_INTR_RAISE); | |
| 107 #endif | |
| 108 DEFINE(CPSR_IRQ_DISABLE, CPSR_IRQ_DISABLE); | |
| 109 DEFINE(CPSR_FIQ_DISABLE, CPSR_FIQ_DISABLE); | |
|
76
435cced73e2f
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents:
66
diff
changeset
|
110 DEFINE(CPSR_THUMB_ENABLE, CPSR_THUMB_ENABLE); |
| 1002 | 111 DEFINE(CPSR_USER_MODE, CPSR_USER_MODE); |
|
4
1d7f19c9e4d1
Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents:
2
diff
changeset
|
112 DEFINE(CPSR_IRQ_MODE, CPSR_IRQ_MODE); |
|
1d7f19c9e4d1
Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents:
2
diff
changeset
|
113 DEFINE(CPSR_FIQ_MODE, CPSR_FIQ_MODE); |
| 2 | 114 DEFINE(CPSR_SUPERVISOR_MODE, CPSR_SUPERVISOR_MODE); |
|
4
1d7f19c9e4d1
Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents:
2
diff
changeset
|
115 DEFINE(CPSR_UNDEF_MODE, CPSR_UNDEF_MODE); |
| 2 | 116 DEFINE(CPSR_MODE_BITS, CPSR_MODE_BITS); |
| 117 DEFINE(CPSR_INITIAL, CPSR_INITIAL); | |
| 118 DEFINE(CPSR_THREAD_INITIAL, CPSR_THREAD_INITIAL); | |
|
103
95f3e12a6327
Merge from eCos master repository on 2000-06-23-16:41:10-BST
jlarmour
parents:
76
diff
changeset
|
119 #if defined(CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT) |
|
95f3e12a6327
Merge from eCos master repository on 2000-06-23-16:41:10-BST
jlarmour
parents:
76
diff
changeset
|
120 DEFINE(CYGNUM_CALL_IF_TABLE_SIZE, CYGNUM_CALL_IF_TABLE_SIZE); |
|
95f3e12a6327
Merge from eCos master repository on 2000-06-23-16:41:10-BST
jlarmour
parents:
76
diff
changeset
|
121 #endif |
|
152
f935b880e96c
Merge from eCos master repository on 2001-02-14-01:27:14-GMT
jlarmour
parents:
105
diff
changeset
|
122 DEFINE(CYGNUM_HAL_INTERRUPT_NONE, CYGNUM_HAL_INTERRUPT_NONE); |
|
2594
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
123 DEFINE(HAL_ARM_RESET_VECTOR, HAL_ARM_RESET_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
124 DEFINE(HAL_ARM_UNDEFINED_VECTOR, HAL_ARM_UNDEFINED_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
125 DEFINE(HAL_ARM_SWI_VECTOR, HAL_ARM_SWI_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
126 DEFINE(HAL_ARM_PREFETCH_VECTOR, HAL_ARM_PREFETCH_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
127 DEFINE(HAL_ARM_ABORT_VECTOR, HAL_ARM_ABORT_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
128 DEFINE(HAL_ARM_RESERVED_VECTOR, HAL_ARM_RESERVED_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
129 DEFINE(HAL_ARM_IRQ_VECTOR, HAL_ARM_IRQ_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
130 DEFINE(HAL_ARM_FIQ_VECTOR, HAL_ARM_FIQ_VECTOR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
131 DEFINE(HAL_ARM_RESET_VECTOR_ADDR, HAL_ARM_RESET_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
132 DEFINE(HAL_ARM_UNDEFINED_VECTOR_ADDR, HAL_ARM_UNDEFINED_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
133 DEFINE(HAL_ARM_SWI_VECTOR_ADDR, HAL_ARM_SWI_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
134 DEFINE(HAL_ARM_PREFETCH_VECTOR_ADDR, HAL_ARM_PREFETCH_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
135 DEFINE(HAL_ARM_ABORT_VECTOR_ADDR, HAL_ARM_ABORT_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
136 DEFINE(HAL_ARM_RESERVED_VECTOR_ADDR, HAL_ARM_RESERVED_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
137 DEFINE(HAL_ARM_IRQ_VECTOR_ADDR, HAL_ARM_IRQ_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
138 DEFINE(HAL_ARM_FIQ_VECTOR_ADDR, HAL_ARM_FIQ_VECTOR_ADDR); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
139 |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
140 DEFINE(HAL_BREAKINST_THUMB, HAL_BREAKINST_THUMB); |
|
4ca9d5dac8b0
* src/arm.ld: Discard C++ EH-related sections when we can't
jlarmour
parents:
1002
diff
changeset
|
141 DEFINE(HAL_BREAKINST_ARM, HAL_BREAKINST_ARM); |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
103
diff
changeset
|
142 |
|
3173
afb59e9b7339
* cdl/hal_arm.cdl: Add CDL to control whether both IRQs and FIQs
nickg
parents:
2729
diff
changeset
|
143 DEFINE(CPSR_INTR_MASK, CPSR_INTR_MASK); |
|
afb59e9b7339
* cdl/hal_arm.cdl: Add CDL to control whether both IRQs and FIQs
nickg
parents:
2729
diff
changeset
|
144 |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
103
diff
changeset
|
145 return 0; |
| 2 | 146 } |
| 147 | |
| 148 | |
| 149 /*------------------------------------------------------------------------*/ | |
| 150 // EOF hal_mk_defs.c |
