Annotation of sys/arch/arm/arm/bus_space_notimpl.S, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: bus_space_notimpl.S,v 1.2 2007/05/27 16:10:39 drahn Exp $ */
! 2: /* $NetBSD: bus_space_notimpl.S,v 1.2 2001/09/10 02:20:19 reinoud Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1997 Mark Brinicombe.
! 6: * All rights reserved.
! 7: *
! 8: * Redistribution and use in source and binary forms, with or without
! 9: * modification, are permitted provided that the following conditions
! 10: * are met:
! 11: * 1. Redistributions of source code must retain the above copyright
! 12: * notice, this list of conditions and the following disclaimer.
! 13: * 2. Redistributions in binary form must reproduce the above copyright
! 14: * notice, this list of conditions and the following disclaimer in the
! 15: * documentation and/or other materials provided with the distribution.
! 16: * 3. All advertising materials mentioning features or use of this software
! 17: * must display the following acknowledgement:
! 18: * This product includes software developed by Mark Brinicombe.
! 19: * 4. The name of the company nor the name of the author may be used to
! 20: * endorse or promote products derived from this software without specific
! 21: * prior written permission.
! 22: *
! 23: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
! 24: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
! 25: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 26: * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
! 27: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
! 28: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! 29: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 30: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 31: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 32: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 33: * SUCH DAMAGE.
! 34: */
! 35:
! 36: #include <machine/asm.h>
! 37:
! 38: /*
! 39: * BUS_SPACE - name of this bus space
! 40: */
! 41:
! 42: #define BUS_SPACE bs_notimpl
! 43:
! 44: #define __C(x,y) __CONCAT(x,y)
! 45: #define __S(s) __STRING(s)
! 46: #define NAME(func) __C(BUS_SPACE,__C(_bs_,func))
! 47: #define LNAME(func) __C(L,NAME(func))
! 48:
! 49: #define __L(x) _C_LABEL(x)
! 50: #define GLOBAL(func) .global __L(NAME(func))
! 51: #define LABEL(func) __L(NAME(func)):
! 52: #define LLABEL(func) LNAME(func):
! 53:
! 54: #define FTEXT(func,text) __S(__C(NAME(func),text))
! 55:
! 56:
! 57: #define NOT_IMPL(func) \
! 58: GLOBAL(func) ; \
! 59: LABEL(func) ; \
! 60: adr r4, LNAME(__C(func,_text)) ; \
! 61: b bs_notimpl_panic ; \
! 62: ; \
! 63: LLABEL(__C(func,_text)) ; \
! 64: .asciz __S(func) ; \
! 65: .align 0 ;
! 66:
! 67: bs_notimpl_message:
! 68: .asciz __S(BUS_SPACE) "_%s: args at %p"
! 69:
! 70: .align 2
! 71: bs_notimpl_panic:
! 72: stmfd sp!, {r0-r3}
! 73: adr r0, bs_notimpl_message
! 74: mov r1, r4
! 75: mov r2, sp
! 76: b _C_LABEL(panic)
! 77:
! 78:
! 79:
! 80: /*
! 81: * misc functions
! 82: */
! 83:
! 84: NOT_IMPL(mmap)
! 85:
! 86:
! 87: /*
! 88: * Generic bus_space I/O functions
! 89: */
! 90:
! 91: /*
! 92: * read single
! 93: */
! 94:
! 95: NOT_IMPL(r_1)
! 96: NOT_IMPL(r_2)
! 97: NOT_IMPL(r_4)
! 98: NOT_IMPL(r_8)
! 99:
! 100: /*
! 101: * write single
! 102: */
! 103:
! 104: NOT_IMPL(w_1)
! 105: NOT_IMPL(w_2)
! 106: NOT_IMPL(w_4)
! 107: NOT_IMPL(w_8)
! 108:
! 109: /*
! 110: * read multiple
! 111: */
! 112:
! 113: NOT_IMPL(rm_1)
! 114: NOT_IMPL(rm_2)
! 115: NOT_IMPL(rm_4)
! 116: NOT_IMPL(rm_8)
! 117:
! 118: /*
! 119: * write multiple
! 120: */
! 121:
! 122: NOT_IMPL(wm_1)
! 123: NOT_IMPL(wm_2)
! 124: NOT_IMPL(wm_4)
! 125: NOT_IMPL(wm_8)
! 126:
! 127: /*
! 128: * read region
! 129: */
! 130:
! 131: NOT_IMPL(rr_1)
! 132: NOT_IMPL(rr_2)
! 133: NOT_IMPL(rr_4)
! 134: NOT_IMPL(rr_8)
! 135:
! 136: /*
! 137: * write region
! 138: */
! 139:
! 140: NOT_IMPL(wr_1)
! 141: NOT_IMPL(wr_2)
! 142: NOT_IMPL(wr_4)
! 143: NOT_IMPL(wr_8)
! 144:
! 145: /*
! 146: * set multiple
! 147: */
! 148:
! 149: NOT_IMPL(sm_1)
! 150: NOT_IMPL(sm_2)
! 151: NOT_IMPL(sm_4)
! 152: NOT_IMPL(sm_8)
! 153:
! 154: /*
! 155: * set region
! 156: */
! 157:
! 158: NOT_IMPL(sr_1)
! 159: NOT_IMPL(sr_2)
! 160: NOT_IMPL(sr_4)
! 161: NOT_IMPL(sr_8)
! 162:
! 163: /*
! 164: * copy
! 165: */
! 166:
! 167: NOT_IMPL(c_1)
! 168: NOT_IMPL(c_2)
! 169: NOT_IMPL(c_4)
! 170: NOT_IMPL(c_8)
CVSweb