summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi/include/rtems')
-rw-r--r--cpukit/sapi/include/rtems/config.h63
-rw-r--r--cpukit/sapi/include/rtems/io.h98
2 files changed, 84 insertions, 77 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index b5080b6133..c2001c8074 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -32,14 +32,14 @@ extern "C" {
*/
typedef struct {
- Objects_Name name; /* task name */
- unsigned32 stack_size; /* task stack size */
+ Objects_Name name; /* task name */
+ unsigned32 stack_size; /* task stack size */
rtems_task_priority initial_priority; /* task priority */
- rtems_attribute attribute_set; /* task attributes */
- rtems_task_entry entry_point; /* task entry point */
- rtems_mode mode_set; /* task initial mode */
- unsigned32 argument; /* task argument */
-} rtems_initialization_tasks_table;
+ rtems_attribute attribute_set; /* task attributes */
+ rtems_task_entry entry_point; /* task entry point */
+ rtems_mode mode_set; /* task initial mode */
+ unsigned32 argument; /* task argument */
+} rtems_initialization_tasks_table;
/*
*
@@ -56,14 +56,12 @@ typedef struct {
typedef unsigned32 rtems_device_major_number;
typedef unsigned32 rtems_device_minor_number;
-typedef void rtems_device_driver;
+typedef rtems_status_code rtems_device_driver;
typedef rtems_device_driver ( *rtems_device_driver_entry )(
rtems_device_major_number,
rtems_device_minor_number,
- void *,
- Objects_Id,
- unsigned32 *
+ void *
);
typedef struct {
@@ -173,12 +171,13 @@ typedef rtems_mpci_entry ( *rtems_mpci_receive_entry )(
typedef struct {
unsigned32 default_timeout; /* in ticks */
+ unsigned32 maximum_packet_size;
rtems_mpci_initialization_entry initialization;
rtems_mpci_get_packet_entry get_packet;
rtems_mpci_return_packet_entry return_packet;
rtems_mpci_send_entry send_packet;
rtems_mpci_receive_entry receive_packet;
-} rtems_mpci_table;
+} rtems_mpci_table;
/*
* The following records define the Multiprocessor Configuration
@@ -192,8 +191,7 @@ struct Configuration_Table_MP {
unsigned32 maximum_nodes; /* maximum # nodes in system */
unsigned32 maximum_global_objects; /* maximum # global objects */
unsigned32 maximum_proxies; /* maximum # proxies */
- rtems_mpci_table *User_mpci_table;
- /* pointer to MPCI table */
+ rtems_mpci_table *User_mpci_table; /* pointer to MPCI table */
};
/*
@@ -209,25 +207,24 @@ struct Configuration_Table_MP {
*/
struct Configuration_Table {
- void *work_space_start;
- unsigned32 work_space_size;
- unsigned32 maximum_tasks;
- unsigned32 maximum_timers;
- unsigned32 maximum_semaphores;
- unsigned32 maximum_message_queues;
- unsigned32 maximum_messages;
- unsigned32 maximum_partitions;
- unsigned32 maximum_regions;
- unsigned32 maximum_ports;
- unsigned32 maximum_periods;
- unsigned32 maximum_extensions;
- unsigned32 microseconds_per_tick;
- unsigned32 ticks_per_timeslice;
- unsigned32 number_of_initialization_tasks;
+ void *work_space_start;
+ unsigned32 work_space_size;
+ unsigned32 maximum_tasks;
+ unsigned32 maximum_timers;
+ unsigned32 maximum_semaphores;
+ unsigned32 maximum_message_queues;
+ unsigned32 maximum_partitions;
+ unsigned32 maximum_regions;
+ unsigned32 maximum_ports;
+ unsigned32 maximum_periods;
+ unsigned32 maximum_extensions;
+ unsigned32 microseconds_per_tick;
+ unsigned32 ticks_per_timeslice;
+ unsigned32 number_of_initialization_tasks;
rtems_initialization_tasks_table *User_initialization_tasks_table;
- unsigned32 number_of_device_drivers;
+ unsigned32 number_of_device_drivers;
rtems_driver_address_table *Device_driver_table;
- rtems_extensions_table *User_extension_table;
+ rtems_extensions_table *User_extension_table;
rtems_multiprocessing_table *User_multiprocessing_table;
};
@@ -244,7 +241,7 @@ extern const rtems_multiprocessing_table
* configuration information.
*/
-EXTERN rtems_configuration_table *_Configuration_Table;
+EXTERN rtems_configuration_table *_Configuration_Table;
EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
EXTERN rtems_mpci_table *_Configuration_MPCI_table;
@@ -258,7 +255,7 @@ EXTERN rtems_mpci_table *_Configuration_MPCI_table;
*/
STATIC INLINE void _Configuration_Handler_initialization(
- rtems_configuration_table *configuration_table,
+ rtems_configuration_table *configuration_table,
rtems_multiprocessing_table *multiprocessing_table,
rtems_mpci_table *users_mpci_table
);
diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h
index 43c52cd35d..ef9fc69d03 100644
--- a/cpukit/sapi/include/rtems/io.h
+++ b/cpukit/sapi/include/rtems/io.h
@@ -35,27 +35,30 @@ extern "C" {
#include <rtems/config.h>
/*
- * The following type defines the set of IO operations which are
- * recognized by _IO_Handler and can be supported by a RTEMS
- * device driver.
+ * The following declare the data required to manage the Device Driver
+ * Address Table.
*/
-typedef enum {
- IO_INITIALIZE_OPERATION = 0,
- IO_OPEN_OPERATION = 1,
- IO_CLOSE_OPERATION = 2,
- IO_READ_OPERATION = 3,
- IO_WRITE_OPERATION = 4,
- IO_CONTROL_OPERATION = 5
-} IO_operations;
+EXTERN unsigned32 _IO_Number_of_drivers;
+EXTERN rtems_driver_address_table *_IO_Driver_address_table;
/*
- * The following declare the data required to manage the Device Driver
- * Address Table.
+ * Table for the io device names
*/
-EXTERN unsigned32 _IO_Number_of_drivers;
-EXTERN rtems_driver_address_table *_IO_Driver_address_table;
+typedef struct {
+ char *device_name;
+ unsigned32 device_name_length;
+ rtems_device_major_number major;
+ rtems_device_minor_number minor;
+} rtems_driver_name_t;
+
+/*XXX this really should be allocated some better way... */
+/*XXX it should probably be a chain and use a 'maximum' drivers field
+ * in config table */
+#define RTEMS_MAX_DRIVER_NAMES 20
+EXTERN rtems_driver_name_t rtems_driver_name_table[RTEMS_MAX_DRIVER_NAMES];
+
/*
* _IO_Manager_initialization
@@ -71,6 +74,36 @@ STATIC INLINE void _IO_Manager_initialization(
);
/*
+ * rtems_io_register_name
+ *
+ * DESCRIPTION:
+ *
+ * Associate a name with a driver.
+ *
+ */
+
+rtems_status_code rtems_io_register_name(
+ char *device_name,
+ rtems_device_major_number major,
+ rtems_device_minor_number minor
+);
+
+
+/*
+ * rtems_io_lookup_name
+ *
+ * DESCRIPTION:
+ *
+ * Find what driver "owns" this name
+ */
+
+rtems_status_code rtems_io_lookup_name(
+ const char *pathname,
+ rtems_driver_name_t **rnp
+);
+
+
+/*
* rtems_io_initialize
*
* DESCRIPTION:
@@ -82,8 +115,7 @@ STATIC INLINE void _IO_Manager_initialization(
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -98,8 +130,7 @@ rtems_status_code rtems_io_initialize(
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -114,8 +145,7 @@ rtems_status_code rtems_io_open(
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -130,8 +160,7 @@ rtems_status_code rtems_io_close(
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -146,8 +175,7 @@ rtems_status_code rtems_io_read(
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -162,8 +190,7 @@ rtems_status_code rtems_io_write(
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
+ void *argument
);
/*
@@ -177,23 +204,6 @@ rtems_status_code rtems_io_control(
void _IO_Initialize_all_drivers( void );
-/*
- * _IO_Handler_routine
- *
- * DESCRIPTION:
- *
- * This routine provides the common foundation for all of the IO
- * Manager's directives.
- */
-
-rtems_status_code _IO_Handler_routine(
- IO_operations operation,
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument,
- unsigned32 *return_value
-);
-
#include <rtems/io.inl>
#ifdef __cplusplus