[BACK]Return to start.S CVS log [TXT][DIR] Up to [local] / prex / dev / i386 / i386

Annotation of prex/dev/i386/i386/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:
                     34: #include <machine/asm.h>
                     35:
                     36: .data
                     37:
                     38: drv_serv:
                     39: .long  0
                     40:
                     41:
                     42: .text
                     43:
                     44: /*
                     45:  * Entry point which called by kernel
                     46:  */
                     47: ENTRY(driver_start)
                     48:        movl    0x04(%esp), %eax
                     49:        movl    %eax, drv_serv
                     50:        jmp     driver_main
                     51:
                     52: /*
                     53:  * Stub to call kernel device interface
                     54:  */
                     55: #define STUB(index, func) .global func;\
                     56: ENTRY(func) \
                     57:        movl    drv_serv, %eax; \
                     58:        add     $(index * 4), %eax; \
                     59:        jmp     *(%eax);
                     60:
                     61: STUB( 0, device_create)
                     62: STUB( 1, device_destroy)
                     63: STUB( 2, device_broadcast)
                     64: STUB( 3, umem_copyin)
                     65: STUB( 4, umem_copyout)
                     66: STUB( 5, umem_strnlen)
                     67: STUB( 6, kmem_alloc)
                     68: STUB( 7, kmem_free)
                     69: STUB( 8, kmem_map)
                     70: STUB( 9, page_alloc)
                     71: STUB(10, page_free)
                     72: STUB(11, page_reserve)
                     73: STUB(12, irq_attach)
                     74: STUB(13, irq_detach)
                     75: STUB(14, irq_lock)
                     76: STUB(15, irq_unlock)
                     77: STUB(16, timer_callout)
                     78: STUB(17, timer_stop)
                     79: STUB(18, timer_delay)
                     80: STUB(19, timer_count)
                     81: STUB(20, timer_hook)
                     82: STUB(21, sched_lock)
                     83: STUB(22, sched_unlock)
                     84: STUB(23, sched_tsleep)
                     85: STUB(24, sched_wakeup)
                     86: STUB(25, sched_dpc)
                     87: STUB(26, task_capable)
                     88: STUB(27, exception_post)
                     89: STUB(28, machine_bootinfo)
                     90: STUB(29, machine_reset)
                     91: STUB(30, machine_idle)
                     92: STUB(31, phys_to_virt)
                     93: STUB(32, virt_to_phys)
                     94: STUB(33, debug_attach)
                     95: STUB(34, debug_dump)
                     96: STUB(35, printf)
                     97: STUB(36, panic)

CVSweb