[25] | 1 | /* |
---|
| 2 | * hal_arch.h - Generic Inter-Processor-Interrupt API definition. |
---|
| 3 | * |
---|
| 4 | * Authors 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 <soclib_xicu.h> |
---|
[48] | 26 | #include <hal_internal.h> |
---|
[25] | 27 | |
---|
| 28 | /***************************************************************************************** |
---|
| 29 | * This enum defines the various Inter Processor Interrupt types. |
---|
| 30 | ****************************************************************************************/ |
---|
| 31 | |
---|
| 32 | enum ipi_types |
---|
| 33 | { |
---|
| 34 | TODO |
---|
| 35 | }; |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | /***************************************************************************************** |
---|
| 39 | ****************************************************************************************/ |
---|
| 40 | static void cpu_default_irq_handler(struct irq_action_s *action) |
---|
| 41 | { |
---|
[48] | 42 | x86_panic((char *)__func__); |
---|
[25] | 43 | } |
---|
| 44 | |
---|
| 45 | error_t hal_arch_init(struct cpu_s *cpu) |
---|
| 46 | { |
---|
[48] | 47 | x86_panic((char *)__func__); |
---|
[25] | 48 | return 0; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | error_t arch_cpu_set_irq_entry(struct cpu_s *cpu, int irq_nr, struct irq_action_s *action) |
---|
| 52 | { |
---|
[48] | 53 | x86_panic((char *)__func__); |
---|
[25] | 54 | return 0; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | error_t arch_cpu_get_irq_entry(struct cpu_s *cpu, int irq_nr, struct irq_action_s **action) |
---|
| 58 | { |
---|
[48] | 59 | x86_panic((char *)__func__); |
---|
[25] | 60 | return 0; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | error_t arch_set_power_state(struct cpu_s *cpu, arch_power_state_t state) |
---|
| 64 | { |
---|
[48] | 65 | x86_panic((char *)__func__); |
---|
[25] | 66 | return 0; |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | sint_t arch_barrier_init(struct cluster_s *cluster, struct event_s *event, uint_t count) |
---|
| 70 | { |
---|
[48] | 71 | x86_panic((char *)__func__); |
---|
[25] | 72 | return 0; |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | sint_t arch_barrier_wait(struct cluster_s *cluster, uint_t barrier_id) |
---|
| 76 | { |
---|
[48] | 77 | x86_panic((char *)__func__); |
---|
[25] | 78 | return 0; |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | error_t arch_barrier_destroy(struct cluster_s *cluster, uint_t barrier_id) |
---|
| 82 | { |
---|
[48] | 83 | x86_panic((char *)__func__); |
---|
[25] | 84 | return 0; |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | /***************************************************************************************** |
---|
| 88 | * This function send an IPI (Inter Processor Interrupt) to a core identified by |
---|
| 89 | * its cluster identifier and local index. A 32 bits value defining the IPI type |
---|
| 90 | * is transmited with the IPI and can be analysed by the associated ISR. |
---|
| 91 | ***************************************************************************************** |
---|
| 92 | * @ cxy : destination cluster identifier. |
---|
| 93 | * @ lid : destination core local index. |
---|
| 94 | * @ type : to be transmitted in IPI. |
---|
| 95 | * @ return 0 if success (IPI registered) / returns EINVAL if illegal cxy or lid. |
---|
| 96 | ****************************************************************************************/ |
---|
| 97 | error_t hal_send_ipi( cxy_t cxy, |
---|
| 98 | lid_t lid, |
---|
| 99 | uint32_t type ); |
---|