1 | /* |
---|
2 | * soclib_xcu.c - soclib XCU driver API implementation. |
---|
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-kernel; if not, write to the Free Software Foundation, |
---|
21 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
22 | */ |
---|
23 | |
---|
24 | #include <soclib_xcu.h> |
---|
25 | #include <hal_types.h> |
---|
26 | #include <core.h> |
---|
27 | #include <chdev.h> |
---|
28 | |
---|
29 | #include <hal_apic.h> |
---|
30 | #include <hal_internal.h> |
---|
31 | |
---|
32 | extern size_t ioapic_pins; |
---|
33 | |
---|
34 | void soclib_xcu_init(chdev_t *icu, lid_t lid) |
---|
35 | { |
---|
36 | size_t i; |
---|
37 | |
---|
38 | /* disable all IRQs */ |
---|
39 | for (i = 0; i < ioapic_pins; i++) { |
---|
40 | hal_ioapic_set_entry(i, IOENTRY_DISABLE); |
---|
41 | } |
---|
42 | |
---|
43 | x86_panic((char *)__func__); |
---|
44 | } |
---|
45 | |
---|
46 | void soclib_xcu_disable_irq( chdev_t * icu, |
---|
47 | uint32_t mask, |
---|
48 | uint32_t type, |
---|
49 | lid_t lid ) |
---|
50 | { |
---|
51 | x86_panic((char *)__func__); |
---|
52 | } |
---|
53 | |
---|
54 | void soclib_xcu_enable_irq( chdev_t * icu, |
---|
55 | uint32_t mask, |
---|
56 | uint32_t type, |
---|
57 | lid_t lid ) |
---|
58 | { |
---|
59 | x86_panic((char *)__func__); |
---|
60 | } |
---|
61 | |
---|
62 | void soclib_xcu_get_masks( chdev_t * icu, |
---|
63 | lid_t lid, |
---|
64 | uint32_t * hwi_mask, |
---|
65 | uint32_t * wti_mask, |
---|
66 | uint32_t * pti_mask ) |
---|
67 | { |
---|
68 | x86_panic((char *)__func__); |
---|
69 | } |
---|
70 | |
---|
71 | void soclib_xcu_set_period( chdev_t * icu, |
---|
72 | uint32_t index, |
---|
73 | uint32_t period ) |
---|
74 | { |
---|
75 | x86_panic((char *)__func__); |
---|
76 | } |
---|
77 | |
---|
78 | uint32_t soclib_xcu_ack_timer( chdev_t * icu, |
---|
79 | uint32_t index ) |
---|
80 | { |
---|
81 | x86_panic((char *)__func__); |
---|
82 | return 0; |
---|
83 | } |
---|
84 | |
---|
85 | void soclib_xcu_get_status( chdev_t * icu, |
---|
86 | lid_t lid, |
---|
87 | uint32_t * hwi_status, |
---|
88 | uint32_t * wti_status, |
---|
89 | uint32_t * pti_status ) |
---|
90 | { |
---|
91 | x86_panic((char *)__func__); |
---|
92 | } |
---|
93 | |
---|
94 | void soclib_xcu_send_ipi( xptr_t icu_xp, |
---|
95 | lid_t lid ) |
---|
96 | { |
---|
97 | x86_panic((char *)__func__); |
---|
98 | } |
---|
99 | |
---|
100 | uint32_t * soclib_xcu_wti_ptr( chdev_t * icu, |
---|
101 | uint32_t index ) |
---|
102 | { |
---|
103 | x86_panic((char *)__func__); |
---|
104 | return NULL; |
---|
105 | } |
---|