diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-27 15:29:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-27 15:29:18 +0000 |
commit | 702c5f5b42e975c35a94f1ae3d39a77815f36f70 (patch) | |
tree | 46a9caa5230280f7c51530aeeff50355f893083c /c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c | |
parent | First attempt at icluding Eric Valette and Emmanuel Raguet. (diff) | |
download | rtems-702c5f5b42e975c35a94f1ae3d39a77815f36f70.tar.bz2 |
The rxgen960 BSP and i960 RPM support was submitted by Mark Bronson
<mark@ramix.com> of RAMIX.
Diffstat (limited to 'c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c')
-rw-r--r-- | c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c b/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c new file mode 100644 index 0000000000..86d465c499 --- /dev/null +++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c @@ -0,0 +1,37 @@ +/* Shm_Convert_address + * + * This routine takes into account the peculiar short VME address + * of the CVME961 board. The CVME961 maps short address space + * 0xffffxxxx to 0xb400xxxx. + * + * Input parameters: + * address - address to convert + * + * Output parameters: + * returns - converted address + * + * COPYRIGHT (c) 1989-1997. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include <rtems.h> +#include <bsp.h> +#include "shm.h" + +void *Shm_Convert_address( + void *address +) +{ + rtems_unsigned32 workaddr = (rtems_unsigned32) address; + + if ( workaddr >= 0xffff0000 ) + workaddr = (workaddr & 0xffff) | 0xb4000000; + return ( (rtems_unsigned32 *)workaddr ); +} |