ofw_copy.c revision 38764
138712Smsmith/*-
238712Smsmith * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
338712Smsmith * All rights reserved.
438712Smsmith *
538712Smsmith * Redistribution and use in source and binary forms, with or without
638712Smsmith * modification, are permitted provided that the following conditions
738712Smsmith * are met:
838712Smsmith * 1. Redistributions of source code must retain the above copyright
938712Smsmith *    notice, this list of conditions and the following disclaimer.
1038712Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1138712Smsmith *    notice, this list of conditions and the following disclaimer in the
1238712Smsmith *    documentation and/or other materials provided with the distribution.
1338712Smsmith *
1438712Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1538712Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1638712Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1738712Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1838712Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1938712Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2038712Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2138712Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2238712Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2338712Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2438712Smsmith * SUCH DAMAGE.
2538712Smsmith *
2638764Smsmith *	$Id: alpha_copy.c,v 1.1 1998/08/31 21:10:40 msmith Exp $
2738712Smsmith */
2838712Smsmith/*
2938712Smsmith * MD primitives supporting placement of module data
3038712Smsmith *
3138712Smsmith * XXX should check load address/size against memory top.
3238712Smsmith */
3338712Smsmith#include <stand.h>
3438712Smsmith
3538712Smsmith#include "libalpha.h"
3638712Smsmith
3738712Smsmithint
3838712Smsmithalpha_copyin(void *src, vm_offset_t dest, size_t len)
3938712Smsmith{
4038712Smsmith    bcopy(src, dest, len);
4138712Smsmith    return(len);
4238712Smsmith}
4338712Smsmith
4438712Smsmithint
4538764Smsmithalpha_copyout(void *src, vm_offset_t dest, size_t len)
4638764Smsmith{
4738764Smsmith    bcopy(src, dest, len);
4838764Smsmith    return(len);
4938764Smsmith}
5038764Smsmith
5138764Smsmithint
5238712Smsmithalpha_readin(int fd, vm_offset_t dest, size_t len)
5338712Smsmith{
5438712Smsmith    return(read(fd, dest, len));
5538712Smsmith}
5638712Smsmith
5738712Smsmith
58