Annotation of prex/dev/arm/arm/start.S, Revision 1.1.1.1
1.1 nbrk 1: /*
2: * Copyright (c) 2005, Kohsuke Ohtani
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: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. Neither the name of the author nor the names of any co-contributors
14: * may be used to endorse or promote products derived from this software
15: * without specific prior written permission.
16: *
17: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20: * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27: * SUCH DAMAGE.
28: */
29:
30: /*
31: * start.S - driver start up routine
32: */
33: #define ENTRY(x) .global x; .align; x##:
34:
35: .data
36:
37: drv_serv: .word 0
38:
39:
40: .text
41:
42: /*
43: * Entry point which called by kernel
44: */
45: ENTRY(driver_start)
46: ldr r1, =drv_serv
47: str r0, [r1]
48: b driver_main
49:
50: /*
51: * Stub to call kernel device interface
52: */
53: #define STUB(index, func) .global func;\
54: ENTRY(func) \
55: ldr ip, =drv_serv ; \
56: ldr ip, [ip] ; \
57: ldr ip, [ip, #(index*4)] ; \
58: mov pc, ip
59:
60: STUB( 0, device_create)
61: STUB( 1, device_destroy)
62: STUB( 2, device_broadcast)
63: STUB( 3, umem_copyin)
64: STUB( 4, umem_copyout)
65: STUB( 5, umem_strnlen)
66: STUB( 6, kmem_alloc)
67: STUB( 7, kmem_free)
68: STUB( 8, kmem_map)
69: STUB( 9, page_alloc)
70: STUB(10, page_free)
71: STUB(11, page_reserve)
72: STUB(12, irq_attach)
73: STUB(13, irq_detach)
74: STUB(14, irq_lock)
75: STUB(15, irq_unlock)
76: STUB(16, timer_callout)
77: STUB(17, timer_stop)
78: STUB(18, timer_delay)
79: STUB(19, timer_count)
80: STUB(20, timer_hook)
81: STUB(21, sched_lock)
82: STUB(22, sched_unlock)
83: STUB(23, sched_tsleep)
84: STUB(24, sched_wakeup)
85: STUB(25, sched_dpc)
86: STUB(26, task_capable)
87: STUB(27, exception_post)
88: STUB(28, machine_bootinfo)
89: STUB(29, machine_reset)
90: STUB(30, machine_idle)
91: STUB(31, phys_to_virt)
92: STUB(32, virt_to_phys)
93: STUB(33, debug_attach)
94: STUB(34, debug_dump)
95: STUB(35, printf)
96: STUB(36, panic)
CVSweb