source: trunk/hal/x86_64/hal_arch.h @ 45

Last change on this file since 45 was 25, checked in by max@…, 7 years ago

First shot of the x86_64 port. It uses Multiboot V1. Most of the HAL functions
are empty, and several TSAR-specific files and comments remain; they will be
cleaned up later. The Makefile and LD script will come in another commit.

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