1 /* 2 * Copyright (c) 2016 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief Nios II kernel structure member offset definition file 10 * 11 * This module is responsible for the generation of the absolute symbols whose 12 * value represents the member offsets for various Nios II kernel 13 * structures. 14 * 15 * All of the absolute symbols defined by this module will be present in the 16 * final kernel ELF image (due to the linker's reference to the _OffsetAbsSyms 17 * symbol). 18 * 19 * INTERNAL 20 * It is NOT necessary to define the offset for every member of a structure. 21 * Typically, only those members that are accessed by assembly language routines 22 * are defined; however, it doesn't hurt to define all fields for the sake of 23 * completeness. 24 */ 25 26 27 #include <zephyr/kernel.h> 28 #include <kernel_arch_data.h> 29 #include <gen_offset.h> 30 #include <kernel_offsets.h> 31 32 /* struct coop member offsets */ 33 GEN_OFFSET_SYM(_callee_saved_t, r16); 34 GEN_OFFSET_SYM(_callee_saved_t, r17); 35 GEN_OFFSET_SYM(_callee_saved_t, r18); 36 GEN_OFFSET_SYM(_callee_saved_t, r19); 37 GEN_OFFSET_SYM(_callee_saved_t, r20); 38 GEN_OFFSET_SYM(_callee_saved_t, r21); 39 GEN_OFFSET_SYM(_callee_saved_t, r22); 40 GEN_OFFSET_SYM(_callee_saved_t, r23); 41 GEN_OFFSET_SYM(_callee_saved_t, r28); 42 GEN_OFFSET_SYM(_callee_saved_t, ra); 43 GEN_OFFSET_SYM(_callee_saved_t, sp); 44 GEN_OFFSET_SYM(_callee_saved_t, key); 45 GEN_OFFSET_SYM(_callee_saved_t, retval); 46 47 GEN_OFFSET_SYM(z_arch_esf_t, ra); 48 GEN_OFFSET_SYM(z_arch_esf_t, r1); 49 GEN_OFFSET_SYM(z_arch_esf_t, r2); 50 GEN_OFFSET_SYM(z_arch_esf_t, r3); 51 GEN_OFFSET_SYM(z_arch_esf_t, r4); 52 GEN_OFFSET_SYM(z_arch_esf_t, r5); 53 GEN_OFFSET_SYM(z_arch_esf_t, r6); 54 GEN_OFFSET_SYM(z_arch_esf_t, r7); 55 GEN_OFFSET_SYM(z_arch_esf_t, r8); 56 GEN_OFFSET_SYM(z_arch_esf_t, r9); 57 GEN_OFFSET_SYM(z_arch_esf_t, r10); 58 GEN_OFFSET_SYM(z_arch_esf_t, r11); 59 GEN_OFFSET_SYM(z_arch_esf_t, r12); 60 GEN_OFFSET_SYM(z_arch_esf_t, r13); 61 GEN_OFFSET_SYM(z_arch_esf_t, r14); 62 GEN_OFFSET_SYM(z_arch_esf_t, r15); 63 GEN_OFFSET_SYM(z_arch_esf_t, estatus); 64 GEN_OFFSET_SYM(z_arch_esf_t, instr); 65 GEN_ABSOLUTE_SYM(__z_arch_esf_t_SIZEOF, sizeof(z_arch_esf_t)); 66 67 GEN_ABS_SYM_END 68