SPARC port passes all tests

This commit is contained in:
Joel Sherrill
1995-10-30 21:54:45 +00:00
parent ea744828ad
commit 97005786d8
112 changed files with 4355 additions and 1359 deletions

View File

@@ -31,30 +31,18 @@ rtems_unsigned32 Clock_driver_vector;
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
void
Install_clock(rtems_isr_entry clock_isr)
void Install_clock(rtems_isr_entry clock_isr)
{
Clock_driver_ticks = 0;
(void)set_vector(clock_isr, Clock_driver_vector, 1);
(void) set_vector( clock_isr, Clock_driver_vector, 1 );
_CPU_Start_clock( BSP_Configuration.microseconds_per_tick );
atexit(Clock_exit);
}
void
ReInstall_clock(rtems_isr_entry new_clock_isr)
{
rtems_unsigned32 isrlevel = 0;
rtems_interrupt_disable(isrlevel);
(void)set_vector(new_clock_isr, Clock_driver_vector, 1);
rtems_interrupt_enable(isrlevel);
}
void
Clock_isr(int vector)
void Clock_isr(int vector)
{
Clock_driver_ticks++;
rtems_clock_tick();
@@ -65,16 +53,14 @@ Clock_isr(int vector)
* Remove the clock signal
*/
void
Clock_exit(void)
void Clock_exit(void)
{
_CPU_Stop_clock();
(void)set_vector(0, Clock_driver_vector, 1);
(void) set_vector( 0, Clock_driver_vector, 1 );
}
rtems_device_driver
Clock_initialize(
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
@@ -99,6 +85,7 @@ rtems_device_driver Clock_control(
void *pargp
)
{
rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
@@ -115,7 +102,9 @@ rtems_device_driver Clock_control(
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
ReInstall_clock(args->buffer);
rtems_interrupt_disable( isrlevel );
(void) set_vector( args->buffer, Clock_driver_vector, 1 );
rtems_interrupt_enable( isrlevel );
}
done:

View File

@@ -182,18 +182,21 @@ bsp_postdriver_hook(void)
{
#if 0
int stdin_fd, stdout_fd, stderr_fd;
int error_code;
error_code = 'S' << 24 | 'T' << 16;
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
rtems_fatal_error_occurred('STD0');
rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred('STD1');
rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred('STD2');
rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
rtems_fatal_error_occurred('STIO');
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
#endif
#if defined(MALLOC_STATS)