Commit Graph

8207 Commits

Author SHA1 Message Date
Sebastian Huber
58f665583e networking: socket to/from file descriptor
o Move rtems_bsdnet_fdToSocket() and rtems_bsdnet_makeFdForSocket() to
   "cpukit/libnetworking/rtems/rtems_syscall.c".
 o The rtems_bsdnet_makeFdForSocket() function is now static.
 o Check in rtems_bsdnet_fdToSocket() function that the file descriptor
   uses the socket handlers, otherwise an error status will be returned
   and errno set to ENOTSOCK.
 o New test libtests/syscall01.
2012-04-03 16:21:23 +02:00
Sebastian Huber
5b045eb6f8 Filesystem: Change type of ioctl_return
Change the ioctl_return type of rtems_libio_ioctl_args_t to match the
ioctl() return value type.
2012-04-03 15:03:18 +02:00
Ric Claus
4648adea97 PR 2021 - mdump address problem with volatile 2012-03-30 10:19:18 -05:00
Ric Claus
16a86162a2 Add Virtex4 and Virtex5 BSPs
This commit covers at least PR2020, 2022, and 2023. This
patch adds all of the code for both BSPs, modifications
to libcpu/powerpc for the ppc440, and some updates to the
BSPs from follow up review and testing.

These BSPs should be good baselines for future development.
The configurations used by Ric are custom and have a non-standard
NIC. They also do not have a UART.  Thus the current console
driver just prints to a RAM buffer.

The NIC and UART support are left for future work. When the UART
support is added, moving the existing "to RAM" console driver to
a shared location is likely desirable because boards with no debug
UART port are commonly deployed. This would let printk() go to RAM.
2012-03-30 10:03:43 -05:00
Sebastian Huber
40b8f63a10 NIOS2: Add MPU support functions 2012-03-30 15:03:26 +02:00
Sebastian Huber
64d2c8adf9 NIOS2: Fix outermost interrupt check
This fix is critical.  The previous implementation leads to system
corruption.
2012-03-30 15:03:15 +02:00
Sebastian Huber
9fc284cfde score/rbtree: Add const qualifier 2012-03-30 11:40:31 +02:00
Sebastian Huber
c6dbcd6910 score/rbtree: C++ compatibility 2012-03-30 11:40:20 +02:00
Sebastian Huber
c6218c2407 score/scheduleredf: Simplify and fix warning 2012-03-30 11:07:31 +02:00
Gedare Bloom
890358f4f7 PR1994: RBTree Compare Result Change
Change the meaning of the compare result to simplify comparison of
integer keys.
2012-03-29 20:42:36 -04:00
Gedare Bloom
e53aae2676 confdefs: Add declaration for unlimited objects.
Adds to confdefs a way to specify rtems_resource_unlimited for classic and
posix objects using a new macro CONFIGURE_OBJECTS_UNLIMITED.
Use CONFIGURE_OBJECTS_ALLOCATION_SIZE to declare the allocation size for
extending the set of objects at runtime. Updates the unlimited sample
to demonstrate how to use the new macros. Also adds new documentation in
the C User's Manual regarding configuring with unlimited objects.
2012-03-27 19:51:31 -04:00
Sebastian Huber
f442e6b45c ARM: PR2042: Provide stub for ARMv6-M 2012-03-27 17:41:05 +02:00
Sebastian Huber
f9ec60046b ARM: New define ARMV7M_EXCEPTION_PRIORITY_LOWEST 2012-03-24 20:31:10 +01:00
Gedare Bloom
67baf6071d PR2041: sparc64: vector number not included in CPU_Interrupt_frame
Add the trap vector to the interrupt frame. Also rename the assembly
macro that accesses the field to be consistent with similar macros.
2012-03-14 13:06:13 -04:00
Sebastian Huber
9f808d1f53 PR2040: libblock: Flash disk starvations statistic 2012-03-14 10:49:49 +01:00
Sebastian Huber
a757d0f80a PR2040: libblock: Flash disk documentation 2012-03-14 10:49:49 +01:00
Sebastian Huber
a309a7941e PR2040: libblock: Fix return status 2012-03-14 10:49:07 +01:00
Sebastian Huber
c08072ce31 PR2040: libblock: Avoid erased blocks starvation
The compaction process needs erased blocks.  It is only possible to
erase an entire segment.  Thus in order to make a progress we always
need enough erased blocks to empty a used or available segment which can
be erased in turn.  A (possibly the worst case) lower bound of erased
blocks is the block count of the largest segment.  The number of
unavailable blocks specified by the configuration will be used to
determine the erase blocks starvation situation.  The number of
unavailable blocks must be greater than or equal to the number of blocks
in the largest segment.
2012-03-14 10:48:54 +01:00
Sebastian Huber
f9fd0c203e PR2040: libblock: Track number of erased blocks 2012-03-14 10:48:39 +01:00
Sebastian Huber
12806cd02f PR2040: libblock: Use segment control as parameter 2012-03-14 10:48:17 +01:00
Sebastian Huber
790f04ddbb PR2039: Fix NULL pointer access
In case rtems_bdbuf_read() returns an error status, the block device
buffer pointer will be set to NULL.  In RFS the chain node of the block
device buffer will be used for RFS purposes.  We must not do this after
an erroneous read.
2012-03-14 09:11:13 +01:00
Sebastian Huber
3ab9c76d3f libblock: Use new API for disk media 2012-03-13 12:24:19 +01:00
Sebastian Huber
01211720ec libblock: Add generic IMFS block device nodes
New functions
 o rtems_blkdev_create(), and
 o rtems_blkdev_create_partition().

New test libtests/block11.
2012-03-13 12:24:18 +01:00
Sebastian Huber
291c926449 libblock: Split file and simplify 2012-03-13 12:24:18 +01:00
Sebastian Huber
3ee7b84394 libblock: New support functions
Add
 o rtems_disk_get_block_size(),
 o rtems_disk_get_block_begin(), and
 o rtems_disk_get_block_count().
2012-03-13 12:24:18 +01:00
Sebastian Huber
796967c3df libblock: Change bdbuf API
The functions
 o rtems_bdbuf_get(),
 o rtems_bdbuf_read(),
 o rtems_bdbuf_syncdev(), and
 o rtems_bdbuf_purge_dev(),
use now the disk device instead of the device identifier.  This makes
bdbuf independent of rtems_disk_obtain() and rtems_disk_release().  It
is the responsiblity of the file system to obtain the disk device.  This
also reduces the overhead to get a buffer.

The key for the AVL tree uses now the disk device instead of the device
identifier.  The pointer is interpreted as an unsigned integer.  This
reduces the memory overhead and makes the comparison operation a bit
faster.

Removed function rtems_bdbuf_purge_major().  This function was too
destructive and could have unpredictable side effects.
2012-03-13 12:24:18 +01:00
Sebastian Huber
1024561f19 libblock: Documentation 2012-03-13 12:24:18 +01:00
Sebastian Huber
c42b03f498 libblock: Remove superfluous volatile qualifier
All these variables are protected by the bdbuf cache mutex.
2012-03-13 12:24:18 +01:00
Sebastian Huber
a3170f70b6 libblock: Discard extended partitions
Discard the extended partitions after evaluation.  This prevents logical
disks that contain other logical disks.
2012-03-13 12:24:17 +01:00
Sebastian Huber
c93fc2b36b libblock: rtems_ide_part_table_initialize() API 2012-03-13 12:24:17 +01:00
Sebastian Huber
c649976859 libblock: New block IO control support functions 2012-03-13 12:24:17 +01:00
Sebastian Huber
4f3cbd9240 libblock: New IO control RTEMS_BLKIO_GETDISKDEV 2012-03-13 12:24:17 +01:00
Sebastian Huber
03ad6b1d85 libblock: Avoid bdbuf API 2012-03-13 12:24:17 +01:00
Sebastian Huber
5e88538f97 libblock: Split file 2012-03-13 12:24:17 +01:00
Sebastian Huber
beea58072d libblock: Add optional free at delete request 2012-03-13 12:24:16 +01:00
Sebastian Huber
e998c98518 IMFS: Node specific stat handlers 2012-03-13 12:24:16 +01:00
Sebastian Huber
04ca77e31d IMFS: Generic device identifier 2012-03-13 12:24:16 +01:00
Sebastian Huber
c5392ef924 IMFS: Add make generic node support
Generic nodes are an alternative to standard drivers in RTEMS.  The
handlers of a generic node are called with less overhead compared to the
standard driver operations.  The usage of file system node handlers
enable more features like support for fsync() and fdatasync().  The
generic nodes use the reference counting of the IMFS.  This provides
automatic node destruction when the last reference vanishes.

Extend type IMFS_types_union by new type IMFS_generic_t.

Extend enum IMFS_jnode_types_t by IMFS_GENERIC.

Add functions
 o IMFS_make_generic_node(),
 o IMFS_is_imfs_instance(),
 o IMFS_generic_get_context_by_node(),
 o IMFS_generic_get_context_by_location(), and
 o IMFS_generic_get_context_by_iop().

New test fstests/fsimfsgeneric01.
2012-03-13 12:24:16 +01:00
Sebastian Huber
699ac7c08f IMFS: Add and use node control
Add and use structure IMFS_node_control with support functions.  This
helps to make high level functions independent of the node type and
reduces the number of branches in the code.
2012-03-13 12:24:16 +01:00
Sebastian Huber
70927458b7 IMFS: New support functions
Add and use IMFS_type() and IMFS_is_directory().
2012-03-13 12:24:16 +01:00
Sebastian Huber
6661435f84 IMFS: Removed superfluous imfs_dir_open() 2012-03-13 12:24:16 +01:00
Sebastian Huber
1bdff036ac IMFS: Reference counting for nodes
The introduction of reference counting of nodes avoids the removal of
open nodes and potential usage of freed memory.
2012-03-13 12:24:15 +01:00
Sebastian Huber
2e0ce55bf0 IMFS: Use unprotected chain operations
Directory entry add or removal operations are protected by the file
system instance lock.  There is no need for protected chain operations.
2012-03-13 12:24:15 +01:00
Sebastian Huber
316507ab91 IMFS: Lock the file system during directory reads
Other threads may add or remove directory entries during a read of the
directory.  Use the file system instance lock for protection.
2012-03-13 12:24:15 +01:00
Sebastian Huber
e00cca9b74 IMFS: Do not check for unsupported types
Allow creation of nodes with an unsupported type.  Later the usage of
such nodes will return an error status.
2012-03-13 12:24:15 +01:00
Sebastian Huber
2563410019 Filesystem: Rename defines
o Removed RTEMS_LIBIO_PERMS_SEARCH.
 o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ.
 o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE.
 o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC.
 o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK.
 o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK.
 o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE.
 o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE.
 o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in
   RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS.
 o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in
 RTEMS_FS_REJECT_TERMINAL_DOT.
2012-03-13 12:24:10 +01:00
Sebastian Huber
4116fce629 Filesystem: New defaults fsync_h and fdatasync_h
New defaults rtems_filesystem_default_fsync_or_fdatasync() and
rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and
fdatasync_h.  The rtems_filesystem_default_fsync_or_fdatasync() sets now
errno to EINVAL according to POSIX.
2012-03-13 12:23:45 +01:00
Sebastian Huber
bea7043c80 Filesystem: Change node type enum values
Move the RTEMS_FILESYSTEM_INVALID_NODE_TYPE to the end.  This makes it
possible to use this enum easily as an array index.  Most comparisons
are made against RTEMS_FILESYSTEM_DIRECTORY.  A value of zero allows on
some architectures simpler branch operations.
2012-03-13 12:23:45 +01:00
Sebastian Huber
a76c23738b Filesystem: Change error indication
Change error indication to ESPIPE in rtems_filesystem_default_lseek().
2012-03-13 12:23:45 +01:00
Sebastian Huber
adef4e4696 Filesystem: New function
New function rtems_filesystem_default_lseek_success().
2012-03-13 12:23:45 +01:00