Line data Source code
1 1 : /* 2 : * Copyright (c) 2019-2020 Cobham Gaisler AB 3 : * 4 : * SPDX-License-Identifier: Apache-2.0 5 : */ 6 : 7 : /** 8 : * @file 9 : * @brief Per-arch thread definition 10 : * 11 : * This file contains definitions for 12 : * 13 : * struct _thread_arch 14 : * struct _callee_saved 15 : * 16 : * necessary to instantiate instances of struct k_thread. 17 : */ 18 : 19 : #ifndef ZEPHYR_INCLUDE_ARCH_SPARC_THREAD_H_ 20 : #define ZEPHYR_INCLUDE_ARCH_SPARC_THREAD_H_ 21 : 22 : #ifndef _ASMLANGUAGE 23 : #include <zephyr/types.h> 24 : 25 : /* 26 : * The following structure defines the list of registers that need to be 27 : * saved/restored when a cooperative context switch occurs. 28 : */ 29 : struct _callee_saved { 30 : /* y register used by mul/div */ 31 : uint32_t y; 32 : 33 : /* processor status register */ 34 : uint32_t psr; 35 : 36 : /* 37 : * local registers 38 : * 39 : * Using uint64_t l0_and_l1 will put everything in this structure on a 40 : * double word boundary which allows us to use double word loads and 41 : * stores safely in the context switch. 42 : */ 43 : uint64_t l0_and_l1; 44 : uint32_t l2; 45 : uint32_t l3; 46 : uint32_t l4; 47 : uint32_t l5; 48 : uint32_t l6; 49 : uint32_t l7; 50 : 51 : /* input registers */ 52 : uint32_t i0; 53 : uint32_t i1; 54 : uint32_t i2; 55 : uint32_t i3; 56 : uint32_t i4; 57 : uint32_t i5; 58 : uint32_t i6; /* frame pointer */ 59 : uint32_t i7; 60 : 61 : /* output registers */ 62 : uint32_t o6; /* stack pointer */ 63 : uint32_t o7; 64 : 65 : }; 66 : typedef struct _callee_saved _callee_saved_t; 67 : 68 : struct _thread_arch { 69 : /* empty */ 70 : }; 71 : 72 : typedef struct _thread_arch _thread_arch_t; 73 : 74 : #endif /* _ASMLANGUAGE */ 75 : 76 : #endif /* ZEPHYR_INCLUDE_ARCH_SPARC_THREAD_H_ */