[25] | 1 | /* |
---|
| 2 | * hal_context.c - implementation of Thread Context API for TSAR-MIPS32 |
---|
| 3 | * |
---|
| 4 | * Author Alain Greiner (2016) |
---|
| 5 | * |
---|
| 6 | * Copyright (c) UPMC Sorbonne Universites |
---|
| 7 | * |
---|
| 8 | * This file is part of ALMOS-MKH. |
---|
| 9 | * |
---|
| 10 | * ALMOS-MKH.is free software; you can redistribute it and/or modify it |
---|
| 11 | * under the terms of the GNU General Public License as published by |
---|
| 12 | * the Free Software Foundation; version 2.0 of the License. |
---|
| 13 | * |
---|
| 14 | * ALMOS-MKH.is distributed in the hope that it will be useful, but |
---|
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 17 | * General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with ALMOS-MKH.; if not, write to the Free Software Foundation, |
---|
| 21 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 22 | */ |
---|
| 23 | |
---|
| 24 | #include <hal_types.h> |
---|
| 25 | #include <memcpy.h> |
---|
| 26 | #include <thread.h> |
---|
| 27 | #include <string.h> |
---|
| 28 | #include <process.h> |
---|
| 29 | #include <printk.h> |
---|
| 30 | #include <vmm.h> |
---|
| 31 | #include <core.h> |
---|
| 32 | #include <cluster.h> |
---|
| 33 | |
---|
| 34 | #include <hal_context.h> |
---|
| 35 | |
---|
[48] | 36 | #include <hal_internal.h> |
---|
| 37 | |
---|
[25] | 38 | error_t hal_cpu_context_create( struct thread_s * thread ) |
---|
| 39 | { |
---|
[48] | 40 | x86_panic((char *)__func__); |
---|
| 41 | return 0; |
---|
[25] | 42 | } |
---|
| 43 | |
---|
| 44 | error_t hal_cpu_context_copy( thread_t * dst, |
---|
| 45 | thread_t * src ) |
---|
| 46 | { |
---|
[48] | 47 | x86_panic((char *)__func__); |
---|
| 48 | return 0; |
---|
[25] | 49 | } |
---|
| 50 | |
---|
| 51 | void hal_cpu_context_destroy( thread_t * thread ) |
---|
| 52 | { |
---|
[48] | 53 | x86_panic((char *)__func__); |
---|
[25] | 54 | } |
---|
| 55 | |
---|
| 56 | error_t hal_fpu_context_create( thread_t * thread ) |
---|
| 57 | { |
---|
[48] | 58 | x86_panic((char *)__func__); |
---|
| 59 | return 0; |
---|
[25] | 60 | } |
---|
| 61 | |
---|
| 62 | error_t hal_fpu_context_copy( thread_t * dst, |
---|
| 63 | thread_t * src ) |
---|
| 64 | { |
---|
[48] | 65 | x86_panic((char *)__func__); |
---|
| 66 | return 0; |
---|
[25] | 67 | } |
---|
| 68 | |
---|
| 69 | void hal_fpu_context_destroy( thread_t * thread ) |
---|
| 70 | { |
---|
[48] | 71 | x86_panic((char *)__func__); |
---|
[25] | 72 | } |
---|
| 73 | |
---|
| 74 | void hal_cpu_context_save( thread_t * thread ) |
---|
| 75 | { |
---|
[48] | 76 | x86_panic((char *)__func__); |
---|
| 77 | } |
---|
[25] | 78 | |
---|
| 79 | void hal_cpu_context_restore( thread_t * thread ) |
---|
| 80 | { |
---|
[48] | 81 | x86_panic((char *)__func__); |
---|
[25] | 82 | } |
---|
| 83 | |
---|
| 84 | void hal_cpu_context_load( thread_t * thread ) |
---|
| 85 | { |
---|
[48] | 86 | x86_panic((char *)__func__); |
---|
[25] | 87 | } |
---|
| 88 | |
---|
| 89 | void hal_fpu_context_save( thread_t * thread ) |
---|
| 90 | { |
---|
[48] | 91 | x86_panic((char *)__func__); |
---|
[25] | 92 | } |
---|
| 93 | |
---|
| 94 | void hal_fpu_context_restore( thread_t * thread ) |
---|
| 95 | { |
---|
[48] | 96 | x86_panic((char *)__func__); |
---|
[25] | 97 | } |
---|
| 98 | |
---|
| 99 | void hal_fpu_context_dup( xptr_t dst, |
---|
| 100 | xptr_t src ) |
---|
| 101 | { |
---|
[48] | 102 | x86_panic((char *)__func__); |
---|
[25] | 103 | } |
---|
| 104 | |
---|