Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | /* * Copyright (c) 2010-2014 Wind River Systems, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @brief Nanokernel structure member offset definition file * * This module is responsible for the generation of the absolute symbols whose * value represents the member offsets for various IA-32 nanokernel structures. * * All of the absolute symbols defined by this module will be present in the * final microkernel or nanokernel ELF image (due to the linker's reference to * the _OffsetAbsSyms symbol). * * INTERNAL * It is NOT necessary to define the offset for every member of a structure. * Typically, only those members that are accessed by assembly language routines * are defined; however, it doesn't hurt to define all fields for the sake of * completeness. */ #include <gen_offset.h> /* located in kernel/arch/common/include */ /* list of headers that define whose structure offsets will be generated */ #include <nano_private.h> #include <swapstk.h> #include <nano_offsets.h> /* Intel-specific tNANO structure member offsets */ GEN_OFFSET_SYM(tNANO, nested); GEN_OFFSET_SYM(tNANO, common_isp); #ifdef CONFIG_DEBUG_INFO GEN_OFFSET_SYM(tNANO, isf); #endif #ifdef CONFIG_SYS_POWER_MANAGEMENT GEN_OFFSET_SYM(tNANO, idle); #endif /* Intel-specific struct tcs structure member offsets */ #ifdef CONFIG_GDB_INFO GEN_OFFSET_SYM(tTCS, esfPtr); #endif /* CONFIG_GDB_INFO */ #if (defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO)) GEN_OFFSET_SYM(tTCS, excNestCount); #endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */ #ifdef CONFIG_THREAD_CUSTOM_DATA GEN_OFFSET_SYM(tTCS, custom_data); /* available for custom use */ #endif GEN_OFFSET_SYM(tTCS, coopFloatReg); /* start of coop FP register set */ GEN_OFFSET_SYM(tTCS, preempFloatReg); /* start of prempt FP register set */ /* size of the struct tcs structure sans save area for floating point regs */ GEN_ABSOLUTE_SYM(__tTCS_NOFLOAT_SIZEOF, sizeof(tTCS) - sizeof(tCoopFloatReg) - sizeof(tPreempFloatReg)); /* tCoopReg structure member offsets: tTCS->coopReg is of type tCoopReg */ GEN_OFFSET_SYM(tCoopReg, esp); /* tSwapStk structure member offsets */ GEN_OFFSET_SYM(tSwapStk, eax); GEN_OFFSET_SYM(tSwapStk, ebp); GEN_OFFSET_SYM(tSwapStk, ebx); GEN_OFFSET_SYM(tSwapStk, esi); GEN_OFFSET_SYM(tSwapStk, edi); GEN_OFFSET_SYM(tSwapStk, retAddr); GEN_OFFSET_SYM(tSwapStk, param); /* size of the entire tSwapStk structure */ GEN_ABSOLUTE_SYM(__tSwapStk_SIZEOF, sizeof(tSwapStk)); /* NANO_ESF structure member offsets */ GEN_OFFSET_SYM(NANO_ESF, esp); GEN_OFFSET_SYM(NANO_ESF, ebp); GEN_OFFSET_SYM(NANO_ESF, ebx); GEN_OFFSET_SYM(NANO_ESF, esi); GEN_OFFSET_SYM(NANO_ESF, edi); GEN_OFFSET_SYM(NANO_ESF, edx); GEN_OFFSET_SYM(NANO_ESF, ecx); GEN_OFFSET_SYM(NANO_ESF, eax); GEN_OFFSET_SYM(NANO_ESF, errorCode); GEN_OFFSET_SYM(NANO_ESF, eip); GEN_OFFSET_SYM(NANO_ESF, cs); GEN_OFFSET_SYM(NANO_ESF, eflags); /* tTaskStateSegment structure member offsets */ /* size of the ISR_LIST structure. Used by linker scripts */ GEN_ABSOLUTE_SYM(__ISR_LIST_SIZEOF, sizeof(ISR_LIST)); GEN_ABS_SYM_END |