source: mainline/kernel/arch/arm32/src/machine_func.c@ 86018c1

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 86018c1 was a71c158, checked in by Martin Decky <martin@…>, 16 years ago

kernel output devices now suport multiple instances (except ski and sgcn, which respect the same interface, but behave as singletons)
if more than one output device gets initialized, the output is cloned to all of them
get rid of arch_grab_console() and arch_release_console() (output devices can implement a generic "redraw" method, input devices respect the "silent" global variable)
related cleanups and modifications

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*
2 * Copyright (c) 2009 Vineeth Pillai
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup arm32
30 * @{
31 */
32/** @file
33 * @brief Definitions of machine specific functions.
34 *
35 * These functions enable to differentiate more kinds of ARM emulators
36 * or CPUs. It's the same concept as "arch" functions on the architecture
37 * level.
38 */
39
40#include <arch/machine_func.h>
41
42
43/** Maps HW devices to the kernel address space using #hw_map. */
44void machine_init(void)
45{
46 (machine_ops.machine_init)();
47}
48
49
50/** Starts timer. */
51void machine_timer_irq_start(void)
52{
53 (machine_ops.machine_timer_irq_start)();
54}
55
56
57/** Halts CPU. */
58void machine_cpu_halt(void)
59{
60 (machine_ops.machine_cpu_halt)();
61}
62
63
64/** Returns size of available memory.
65 *
66 * @return Size of available memory.
67 */
68uintptr_t machine_get_memory_size(void)
69{
70 return (machine_ops.machine_get_memory_size)();
71}
72
73/** Interrupt exception handler.
74 *
75 * @param exc_no Interrupt exception number.
76 * @param istate Saved processor state.
77 */
78void machine_irq_exception(int exc_no, istate_t *istate)
79{
80 (machine_ops.machine_irq_exception)(exc_no, istate);
81}
82
83
84/*
85 * Machine specific frame initialization
86 */
87void machine_frame_init(void)
88{
89 (machine_ops.machine_frame_init)();
90}
91
92/*
93 * configure the output device.
94 */
95void machine_output_init(void)
96{
97 (machine_ops.machine_output_init)();
98}
99
100/*
101 * configure the input device.
102 */
103void machine_input_init(void)
104{
105 (machine_ops.machine_input_init)();
106}
107
108/*
109 * Generic function to use, if sepcific function doesn't define any of the above functions.
110 */
111void machine_genfunc()
112{
113}
114
115/** @}
116 */
Note: See TracBrowser for help on using the repository browser.