LCOV - code coverage report
Current view: top level - arch/arm/core/offsets - offsets_aarch32.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 25 0.0 %
Date: 2022-08-18 11:36:24 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (c) 2013-2014 Wind River Systems, Inc.
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: Apache-2.0
       5                 :            :  */
       6                 :            : 
       7                 :            : /**
       8                 :            :  * @file
       9                 :            :  * @brief ARM 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 ARM kernel structures.
      13                 :            :  *
      14                 :            :  * All of the absolute symbols defined by this module will be present in the
      15                 :            :  * final kernel ELF image (due to the linker's reference to the _OffsetAbsSyms
      16                 :            :  * symbol).
      17                 :            :  *
      18                 :            :  * INTERNAL
      19                 :            :  * It is NOT necessary to define the offset for every member of a structure.
      20                 :            :  * Typically, only those members that are accessed by assembly language routines
      21                 :            :  * are defined; however, it doesn't hurt to define all fields for the sake of
      22                 :            :  * completeness.
      23                 :            :  */
      24                 :            : 
      25                 :            : #ifndef _ARM_OFFSETS_INC_
      26                 :            : #define _ARM_OFFSETS_INC_
      27                 :            : 
      28                 :            : #include <kernel.h>
      29                 :            : #include <kernel_arch_data.h>
      30                 :            : #include <kernel_offsets.h>
      31                 :            : 
      32                 :          0 : GEN_OFFSET_SYM(_thread_arch_t, basepri);
      33                 :          0 : GEN_OFFSET_SYM(_thread_arch_t, swap_return_value);
      34                 :            : 
      35                 :            : #if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
      36                 :            : GEN_OFFSET_SYM(_thread_arch_t, mode);
      37                 :            : #endif
      38                 :            : #if defined(CONFIG_ARM_STORE_EXC_RETURN)
      39                 :            : GEN_OFFSET_SYM(_thread_arch_t, mode_exc_return);
      40                 :            : #endif
      41                 :            : #if defined(CONFIG_USERSPACE)
      42                 :            : GEN_OFFSET_SYM(_thread_arch_t, priv_stack_start);
      43                 :            : #if defined(CONFIG_CPU_AARCH32_CORTEX_R)
      44                 :            : GEN_OFFSET_SYM(_thread_arch_t, priv_stack_end);
      45                 :            : GEN_OFFSET_SYM(_thread_arch_t, sp_usr);
      46                 :            : #endif
      47                 :            : #endif
      48                 :            : 
      49                 :            : #if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
      50                 :            : GEN_OFFSET_SYM(_thread_arch_t, preempt_float);
      51                 :            : #endif
      52                 :            : 
      53                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, a1);
      54                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, a2);
      55                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, a3);
      56                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, a4);
      57                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, ip);
      58                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, lr);
      59                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, pc);
      60                 :          0 : GEN_OFFSET_SYM(_basic_sf_t, xpsr);
      61                 :          0 : GEN_ABSOLUTE_SYM(___basic_sf_t_SIZEOF, sizeof(_basic_sf_t));
      62                 :            : 
      63                 :            : #if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
      64                 :            : GEN_OFFSET_SYM(_esf_t, s);
      65                 :            : GEN_OFFSET_SYM(_esf_t, fpscr);
      66                 :            : #endif
      67                 :            : 
      68                 :          0 : GEN_ABSOLUTE_SYM(___esf_t_SIZEOF, sizeof(_esf_t));
      69                 :            : 
      70                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v1);
      71                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v2);
      72                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v3);
      73                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v4);
      74                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v5);
      75                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v6);
      76                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v7);
      77                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, v8);
      78                 :          0 : GEN_OFFSET_SYM(_callee_saved_t, psp);
      79                 :            : 
      80                 :            : /* size of the entire preempt registers structure */
      81                 :            : 
      82                 :          0 : GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved));
      83                 :            : 
      84                 :            : #if defined(CONFIG_EXTRA_EXCEPTION_INFO)
      85                 :            : GEN_ABSOLUTE_SYM(___extra_esf_info_t_SIZEOF, sizeof(struct __extra_esf_info));
      86                 :            : #endif
      87                 :            : 
      88                 :            : #if defined(CONFIG_THREAD_STACK_INFO)
      89                 :          0 : GEN_OFFSET_SYM(_thread_stack_info_t, start);
      90                 :            : 
      91                 :          0 : GEN_ABSOLUTE_SYM(___thread_stack_info_t_SIZEOF,
      92                 :            :          sizeof(struct _thread_stack_info));
      93                 :            : #endif
      94                 :            : 
      95                 :            : /*
      96                 :            :  * size of the struct k_thread structure sans save area for floating
      97                 :            :  * point registers.
      98                 :            :  */
      99                 :            : 
     100                 :            : #if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
     101                 :            : GEN_ABSOLUTE_SYM(_K_THREAD_NO_FLOAT_SIZEOF, sizeof(struct k_thread) -
     102                 :            :                                             sizeof(struct _preempt_float));
     103                 :            : #else
     104                 :          0 : GEN_ABSOLUTE_SYM(_K_THREAD_NO_FLOAT_SIZEOF, sizeof(struct k_thread));
     105                 :            : #endif
     106                 :            : 
     107                 :            : #endif /* _ARM_OFFSETS_INC_ */

Generated by: LCOV version 1.14