summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/machine
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-09 22:52:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 09:08:23 +0200
commite599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch)
tree1172b8b830a1c3236e45c834c2b80e01325ea144 /rtemsbsd/include/machine
parentMove files to match FreeBSD layout (diff)
downloadrtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
Diffstat (limited to 'rtemsbsd/include/machine')
-rw-r--r--rtemsbsd/include/machine/_bus.h2
-rw-r--r--rtemsbsd/include/machine/_limits.h35
-rw-r--r--rtemsbsd/include/machine/bus.h8
-rw-r--r--rtemsbsd/include/machine/bus_dma.h2
-rw-r--r--rtemsbsd/include/machine/bus_space-i386.h6
-rw-r--r--rtemsbsd/include/machine/elf.h1
-rw-r--r--rtemsbsd/include/machine/mutex.h31
-rw-r--r--rtemsbsd/include/machine/pcb.h1
-rw-r--r--rtemsbsd/include/machine/resource.h38
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-bus-dma.h12
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-config.h.in137
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-devicet.h2
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-endian.h107
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-param.h59
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-symbols.h1
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-syscall-api.h59
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-sysinit.h6
-rw-r--r--rtemsbsd/include/machine/smp.h1
-rw-r--r--rtemsbsd/include/machine/vm.h1
19 files changed, 327 insertions, 182 deletions
diff --git a/rtemsbsd/include/machine/_bus.h b/rtemsbsd/include/machine/_bus.h
index 436fb584..3891cb15 100644
--- a/rtemsbsd/include/machine/_bus.h
+++ b/rtemsbsd/include/machine/_bus.h
@@ -1 +1 @@
-#include <freebsd/machine/bus.h>
+#include <machine/bus.h>
diff --git a/rtemsbsd/include/machine/_limits.h b/rtemsbsd/include/machine/_limits.h
index 46cac302..c7187c60 100644
--- a/rtemsbsd/include/machine/_limits.h
+++ b/rtemsbsd/include/machine/_limits.h
@@ -7,24 +7,43 @@
*/
/*
- * Copyright (c) 2009, 2010 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#ifndef _RTEMS_BSD_MACHINE__LIMITS_H_
#define _RTEMS_BSD_MACHINE__LIMITS_H_
-#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
-#error "the header file <freebsd/machine/rtems-bsd-config.h> must be included first"
-#endif
+#include <limits.h>
+
+#define __CHAR_BIT CHAR_BIT
+
+#define __INT_MAX INT_MAX
#endif /* _RTEMS_BSD_MACHINE__LIMITS_H_ */
diff --git a/rtemsbsd/include/machine/bus.h b/rtemsbsd/include/machine/bus.h
index 18689dec..28558905 100644
--- a/rtemsbsd/include/machine/bus.h
+++ b/rtemsbsd/include/machine/bus.h
@@ -213,15 +213,15 @@ bus_space_free(bus_space_tag_t bst __unused, bus_space_handle_t bsh, bus_size_t
#if defined(__i386__)
- #include <freebsd/machine/bus_space-i386.h>
+ #include <machine/bus_space-i386.h>
#elif defined(__ppc__)
- #include <freebsd/machine/bus_space-simple_memory.h>
+ #include <machine/bus_space-simple_memory.h>
#else
#warning "Bus space routines not implemented for this architecture!!"
#warning "Defaulting to simple-memory Bus space routines!!"
- #include <freebsd/machine/bus_space-simple_memory.h>
+ #include <machine/bus_space-simple_memory.h>
#endif
-#include <freebsd/machine/bus_dma.h>
+#include <machine/bus_dma.h>
#endif /* _RTEMS_BSD_MACHINE_BUS_H_ */
diff --git a/rtemsbsd/include/machine/bus_dma.h b/rtemsbsd/include/machine/bus_dma.h
index 44ed7762..d4a1cfb8 100644
--- a/rtemsbsd/include/machine/bus_dma.h
+++ b/rtemsbsd/include/machine/bus_dma.h
@@ -27,6 +27,6 @@
#error "the header file <freebsd/machine/rtems-bsd-config.h> must be included first"
#endif
-#include <freebsd/sys/bus_dma.h>
+#include <sys/bus_dma.h>
#endif /* _RTEMS_BSD_MACHINE_BUS_DMA_H_ */
diff --git a/rtemsbsd/include/machine/bus_space-i386.h b/rtemsbsd/include/machine/bus_space-i386.h
index 748d883d..67868001 100644
--- a/rtemsbsd/include/machine/bus_space-i386.h
+++ b/rtemsbsd/include/machine/bus_space-i386.h
@@ -114,9 +114,9 @@
#ifndef _RTEMS_BSD_MACHINE_BUS_I386_H_
#define _RTEMS_BSD_MACHINE_BUS_I386_H_
-#include <freebsd/machine/_bus.h>
-#include <freebsd/machine/cpufunc.h>
-#include <freebsd/machine/resource.h>
+#include <machine/_bus.h>
+#include <machine/cpufunc.h>
+#include <machine/resource.h>
#if 0
#define I386_BUS_SPACE_IO SYS_RES_IOPORT
diff --git a/rtemsbsd/include/machine/elf.h b/rtemsbsd/include/machine/elf.h
index 936ffd88..e69de29b 100644
--- a/rtemsbsd/include/machine/elf.h
+++ b/rtemsbsd/include/machine/elf.h
@@ -1 +0,0 @@
-/* EMPTY */
diff --git a/rtemsbsd/include/machine/mutex.h b/rtemsbsd/include/machine/mutex.h
index 8ab14405..7b36e6b9 100644
--- a/rtemsbsd/include/machine/mutex.h
+++ b/rtemsbsd/include/machine/mutex.h
@@ -7,24 +7,39 @@
*/
/*
- * Copyright (c) 2009, 2010 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#ifndef _RTEMS_BSD_MACHINE_MUTEX_H_
#define _RTEMS_BSD_MACHINE_MUTEX_H_
-#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
-#error "the header file <freebsd/machine/rtems-bsd-config.h> must be included first"
-#endif
+/* Empty */
#endif /* _RTEMS_BSD_MACHINE_MUTEX_H_ */
diff --git a/rtemsbsd/include/machine/pcb.h b/rtemsbsd/include/machine/pcb.h
index 936ffd88..e69de29b 100644
--- a/rtemsbsd/include/machine/pcb.h
+++ b/rtemsbsd/include/machine/pcb.h
@@ -1 +0,0 @@
-/* EMPTY */
diff --git a/rtemsbsd/include/machine/resource.h b/rtemsbsd/include/machine/resource.h
index 9b143810..35ad0924 100644
--- a/rtemsbsd/include/machine/resource.h
+++ b/rtemsbsd/include/machine/resource.h
@@ -1,10 +1,32 @@
-#ifndef _MACHINE_RESOURCE_H_
-#define _MACHINE_RESOURCE_H_ 1
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_machine
+ *
+ * @brief TODO.
+ */
-#define SYS_RES_IRQ 1 /* interrupt lines */
-#define SYS_RES_DRQ 2 /* isa dma lines */
-#define SYS_RES_MEMORY 3 /* i/o memory */
-#define SYS_RES_IOPORT 4 /* i/o ports */
-#define SYS_RES_GPIO 5 /* general purpose i/o */
+/*
+ * Copyright (c) 2009, 2010 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
-#endif /* !_MACHINE_RESOURCE_H_ */
+#ifndef _RTEMS_BSD_MACHINE_RESOURCE_H_
+#define _RTEMS_BSD_MACHINE_RESOURCE_H_
+
+#define SYS_RES_IRQ 1
+#define SYS_RES_DRQ 2
+#define SYS_RES_MEMORY 3
+#define SYS_RES_IOPORT 4
+#define SYS_RES_GPIO 5
+
+#endif /* _RTEMS_BSD_MACHINE_RESOURCE_H_ */
diff --git a/rtemsbsd/include/machine/rtems-bsd-bus-dma.h b/rtemsbsd/include/machine/rtems-bsd-bus-dma.h
index e9115e42..5cff23b1 100644
--- a/rtemsbsd/include/machine/rtems-bsd-bus-dma.h
+++ b/rtemsbsd/include/machine/rtems-bsd-bus-dma.h
@@ -47,12 +47,12 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_BUS_DMA_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_BUS_DMA_H_
-#include <freebsd/sys/param.h>
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/lock.h>
-#include <freebsd/sys/mutex.h>
-#include <freebsd/sys/systm.h>
-#include <freebsd/machine/bus.h>
+#include <rtems/bsd/sys/param.h>
+#include <rtems/bsd/sys/types.h>
+#include <rtems/bsd/sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/systm.h>
+#include <machine/bus.h>
struct bus_dma_tag {
bus_dma_tag_t parent;
diff --git a/rtemsbsd/include/machine/rtems-bsd-config.h.in b/rtemsbsd/include/machine/rtems-bsd-config.h.in
index 655d319a..64dce1cc 100644
--- a/rtemsbsd/include/machine/rtems-bsd-config.h.in
+++ b/rtemsbsd/include/machine/rtems-bsd-config.h.in
@@ -23,33 +23,14 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
-/* We compile for RTEMS and FreeBSD */
-#define __rtems__ 1
-#define __FreeBSD__ 1
-#define __BSD_VISIBLE 1
-
/* XXX hack so /opt.../machine/param.h can disable MSIZE and use this one */
#define __NEW_RTEMS_BSD__
-#include <sys/cdefs.h>
-
-#ifndef _RTEMS_BSD_BSD_HH_
/* General defines to activate BSD kernel parts */
#define _KERNEL 1
-/* Disable standard system headers */
-#undef _SYS_UNISTD_H
-#define _SYS_UNISTD_H 1
-#undef _SYS_TTYCOM_H_
-#define _SYS_TTYCOM_H_ 1
-
-/* Disable some quirks in the standard headers */
-#define _POSIX_SOURCE 1
-
-/* We need POSIX threads */
-#define _POSIX_THREADS 1
-
-#endif /* !_RTEMS_BSD_BSD_HH_ */
+#include <sys/cdefs.h>
+#include <sys/types.h>
/* Type set from the C standard */
#include <stdarg.h>
@@ -59,8 +40,6 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
/* Ensure that we are RTEMS compatible and can use RTEMS */
#include <rtems.h>
@@ -68,7 +47,6 @@
#include <rtems/chain.h>
#include <rtems/libio.h>
-#ifndef _RTEMS_BSD_BSD_HH_
/* Ensure that we can use POSIX threads */
#include <pthread.h>
@@ -78,8 +56,6 @@
/* Symbol undefines */
#undef MAXPATHLEN
-#endif /* !_RTEMS_BSD_BSD_HH_ */
-
/* Networking */
#define IPSEC 1
#define INET 1
@@ -88,131 +64,26 @@
/* Integer type definitions */
-#define __INT_MAX INT_MAX
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-
-#define __int8_t int8_t
-#define __int16_t int16_t
-#define __int32_t int32_t
-#define __int64_t int64_t
-
-#define __int_least8_t int_least8_t
-#define __int_least16_t int_least16_t
-#define __int_least32_t int_least32_t
-#define __int_least64_t int_least64_t
-
-#define __int_fast8_t int_fast8_t
-#define __int_fast16_t int_fast16_t
-#define __int_fast32_t int_fast32_t
-#define __int_fast64_t int_fast64_t
-
-#define __uint8_t uint8_t
-#define __uint16_t uint16_t
-#define __uint32_t uint32_t
-#define __uint64_t uint64_t
-
-#define __uint_least8_t uint_least8_t
-#define __uint_least16_t uint_least16_t
-#define __uint_least32_t uint_least32_t
-#define __uint_least64_t uint_least64_t
-
-#define __uint_fast8_t uint_fast8_t
-#define __uint_fast16_t uint_fast16_t
-#define __uint_fast32_t uint_fast32_t
-#define __uint_fast64_t uint_fast64_t
-
-#define __intfptr_t intptr_t
-#define __uintfptr_t uintptr_t
-
-#define __intptr_t intptr_t
-#define __uintptr_t uintptr_t
-
-#define __intmax_t intmax_t
-#define __uintmax_t uintmax_t
-
-#define __register_t int
-#define __u_register_t unsigned int
-
#define __float_t float
#define __double_t double
-#define __vm_offset_t uintptr_t
-#define __vm_ooffset_t uint64_t
-#define __vm_paddr_t uintptr_t
-#define __vm_pindex_t uint64_t
-#define __vm_size_t uintptr_t
-
#define __clock_t clock_t
#define __cpumask_t unsigned int
#define __critical_t intptr_t
#define __ptrdiff_t ptrdiff_t
-#define __segsz_t intptr_t
#define __time_t time_t
-#define __va_list va_list
-
-#undef __size_t
-#define __size_t size_t
-
#define _CLOCKID_T_DECLARED 1
-#define _DEV_T_DECLARED 1
-#define _GID_T_DECLARED 1
-#define _MODE_T_DECLARED 1
-#define _OFF_T_DECLARED 1
-#define _PID_T_DECLARED 1
-#define _SSIZE_T_DECLARED 1
#define _TIMER_T_DECLARED 1
#define _TIME_T_DECLARED 1
-#define _UID_T_DECLARED 1
#define _USECONDS_T_DECLARED 1
#define _FSBLKCNT_T_DECLARED 1
#define _BLKSIZE_T_DECLARED 1
#define _BLKCNT_T_DECLARED 1
-#define __dev_t _bsd_dev_t
-#define __gid_t _bsd_gid_t
-#define __off_t _bsd_off_t
-#define __pid_t _bsd_pid_t
-#define __uid_t _bsd_uid_t
-
-/* Missing error number */
-//#define ENOIOCTL EINVAL
-
-/* multiple user space methods and commands use this */
-#ifndef _PATH_DEVNULL
-#define _PATH_DEVNULL "/dev/null"
-#endif
-
-/* used by some user space code */
-#ifndef SIZE_T_MAX
-#define SIZE_T_MAX SIZE_MAX
-#endif
-
-/* used by some user space code */
-#ifndef O_EXLOCK
-#define O_EXLOCK O_EXCL
-#endif
-
-/* used by some user space code */
-#if !defined O_NOFOLLOW
-#define O_NOFOLLOW 0
-#endif
-
-/* used by some user space code */
-#ifndef O_SHLOCK
-#define O_SHLOCK 0
-#endif
-
-/* from limits.h on FreeBSD */
-#ifndef _POSIX_HOST_NAME_MAX
-#define _POSIX_HOST_NAME_MAX 255
-#endif
-
-#ifndef _RTEMS_BSD_BSD_HH_
/* Symbol rename */
-#include <freebsd/machine/rtems-bsd-symbols.h>
+#include <machine/rtems-bsd-symbols.h>
#define gets _bsd_gets
#define realloc _bsd_realloc
@@ -276,6 +147,4 @@ extern rtems_chain_control rtems_bsd_malloc_chain;
/* CPU definitions */
#define cpu_spinwait() /* nothing */
-#endif /* !_RTEMS_BSD_BSD_HH_ */
-
#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_ */
diff --git a/rtemsbsd/include/machine/rtems-bsd-devicet.h b/rtemsbsd/include/machine/rtems-bsd-devicet.h
index 2db95850..9c59577b 100644
--- a/rtemsbsd/include/machine/rtems-bsd-devicet.h
+++ b/rtemsbsd/include/machine/rtems-bsd-devicet.h
@@ -41,7 +41,7 @@
#include <stdarg.h>
#include <stdio.h>
-#include <freebsd/sys/queue.h>
+#include <sys/queue.h>
typedef struct device *device_t;
diff --git a/rtemsbsd/include/machine/rtems-bsd-endian.h b/rtemsbsd/include/machine/rtems-bsd-endian.h
new file mode 100644
index 00000000..006a9f37
--- /dev/null
+++ b/rtemsbsd/include/machine/rtems-bsd-endian.h
@@ -0,0 +1,107 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_machine
+ *
+ * @brief TODO.
+ */
+
+/*
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RTEMS_BSD_MACHINE_ENDIAN_H
+#define _RTEMS_BSD_MACHINE_ENDIAN_H
+
+#include <machine/endian.h>
+#include <stdint.h>
+
+#if __BSD_VISIBLE
+
+#define _BYTE_ORDER BYTE_ORDER
+#define _BIG_ENDIAN BIG_ENDIAN
+#define _LITTLE_ENDIAN LITTLE_ENDIAN
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define __ntohl(x) ((uint32_t) (x))
+#define __ntohs(x) ((uint16_t) (x))
+#define __htonl(x) ((uint32_t) (x))
+#define __htons(x) ((uint16_t) (x))
+#else
+#define __ntohl(x) (__bswap32(x))
+#define __ntohs(x) (__bswap16(x))
+#define __htonl(x) (__bswap32(x))
+#define __htons(x) (__bswap16(x))
+#endif
+
+static inline uint16_t
+__bswap16(uint16_t v)
+{
+#ifdef __GNUC__
+ return __builtin_bswap16(v);
+#else
+ return (uint16_t) ((v >> 8)
+ | ((v & 0xffU) << 8));
+#endif
+}
+
+static inline uint32_t
+__bswap32(uint32_t v)
+{
+#ifdef __GNUC__
+ return __builtin_bswap32(v);
+#else
+ return (uint32_t) ((v >> 24)
+ | ((v >> 8) && 0xff00U)
+ | ((v & 0xff00U) << 8)
+ | ((v & 0xffU) << 24));
+#endif
+}
+
+static inline uint64_t
+__bswap64(uint64_t v)
+{
+#ifdef __GNUC__
+ return __builtin_bswap64(v);
+#else
+ return (uint64_t) ((v >> 56)
+ | ((v >> 40) && 0xff00U)
+ | ((v >> 24) && 0xff0000U)
+ | ((v >> 8) && 0xff000000U)
+ | ((v & 0xff000000U) << 8)
+ | ((v & 0xff0000U) << 24)
+ | ((v & 0xff00U) << 40)
+ | ((v & 0xffU) << 56));
+#endif
+}
+
+#endif /* __BSD_VISIBLE */
+
+#endif /* _RTEMS_BSD_MACHINE_ENDIAN_H */
diff --git a/rtemsbsd/include/machine/rtems-bsd-param.h b/rtemsbsd/include/machine/rtems-bsd-param.h
new file mode 100644
index 00000000..ffcbf926
--- /dev/null
+++ b/rtemsbsd/include/machine/rtems-bsd-param.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_machine
+ *
+ * @brief TODO.
+ */
+
+/*
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RTEMS_BSD_MACHINE_PARAM_H_
+#define _RTEMS_BSD_MACHINE_PARAM_H_
+
+#include <machine/param.h>
+
+#define _ALIGNBYTES ALIGNBYTES
+
+#define _ALIGN(p) ALIGN(p)
+
+#define MAXCPU 1
+
+#define CACHE_LINE_SHIFT 7
+
+#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
+
+#define MAXPAGESIZES 1 /* maximum number of supported page sizes */
+
+#define MACHINE_ARCH "rtems"
+
+#endif /* _RTEMS_BSD_MACHINE_PARAM_H_ */
diff --git a/rtemsbsd/include/machine/rtems-bsd-symbols.h b/rtemsbsd/include/machine/rtems-bsd-symbols.h
index 4c3be853..5ab4a756 100644
--- a/rtemsbsd/include/machine/rtems-bsd-symbols.h
+++ b/rtemsbsd/include/machine/rtems-bsd-symbols.h
@@ -23,7 +23,6 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_SYMBOLS_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_SYMBOLS_H_
-#define bootverbose _bsd_bootverbose
#define bus_activate_resource _bsd_bus_activate_resource
#define bus_activate_resource _bsd_bus_activate_resource
#define bus_activate_resource_desc _bsd_bus_activate_resource_desc
diff --git a/rtemsbsd/include/machine/rtems-bsd-syscall-api.h b/rtemsbsd/include/machine/rtems-bsd-syscall-api.h
new file mode 100644
index 00000000..7d53606b
--- /dev/null
+++ b/rtemsbsd/include/machine/rtems-bsd-syscall-api.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_machine
+ *
+ * @brief TODO.
+ *
+ * This file helps to ensure that the system calls match the user space
+ * declaration. The user space declaration is normally not visible to the
+ * kernel space due to the _KERNEL guard.
+ */
+
+/*
+ * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSCALL_API_H_
+#define _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSCALL_API_H_
+
+#include <sys/cdefs.h>
+#include <sys/select.h>
+
+__BEGIN_DECLS
+
+int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict,
+ const struct timespec *__restrict, const sigset_t *__restrict);
+
+int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+
+__END_DECLS
+
+#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSCALL_API_H_ */
diff --git a/rtemsbsd/include/machine/rtems-bsd-sysinit.h b/rtemsbsd/include/machine/rtems-bsd-sysinit.h
index 0e31d3ec..6242d790 100644
--- a/rtemsbsd/include/machine/rtems-bsd-sysinit.h
+++ b/rtemsbsd/include/machine/rtems-bsd-sysinit.h
@@ -23,9 +23,9 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSINIT_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSINIT_H_
-#include <freebsd/sys/cdefs.h>
-#include <freebsd/sys/queue.h>
-#include <freebsd/sys/kernel.h>
+#include <sys/cdefs.h>
+#include <sys/queue.h>
+#include <sys/kernel.h>
#define SYSINIT_NEED_FREEBSD_CORE \
SYSINIT_REFERENCE(configure1); \
diff --git a/rtemsbsd/include/machine/smp.h b/rtemsbsd/include/machine/smp.h
index 936ffd88..e69de29b 100644
--- a/rtemsbsd/include/machine/smp.h
+++ b/rtemsbsd/include/machine/smp.h
@@ -1 +0,0 @@
-/* EMPTY */
diff --git a/rtemsbsd/include/machine/vm.h b/rtemsbsd/include/machine/vm.h
index 936ffd88..e69de29b 100644
--- a/rtemsbsd/include/machine/vm.h
+++ b/rtemsbsd/include/machine/vm.h
@@ -1 +0,0 @@
-/* EMPTY */