kdb224: QNX2 Warm Boot Fix

Title: QNX2 Warm Boot Fix
Date: July 17, 1998
KDB: KDB-224
Revision: 0.00
Author: Support
Distribution: External

Problem:

A customer has a DFlex board in operation under the QNX 2 operating system. They say that when they does a warm re-boot (ctrl+alt+shift+del), then wait for the system to boot up the DFlex no longer functions. However when they do a full reset (power down and up again, or reset switch) there is no problem, the system boots and the DFlex works fine.

Is this known to be the case? Is there anything he can do about it? It appears that after the warm boot, the board is still recognized in the system but the communication does not work anymore.

Solution:

The problem is, if during the warm boot, data is still coming in to the DFlex ports, the DFlex will generate an interrupt. This interrupt will never get serviced because the QNX2 serial device driver is not loaded (the system is still rebooting). When the serial device driver does load, it will wait for an Interrupt to occur from the UART’s. Since the interrupts are edge triggered, the device driver has no way of knowing that a DFlex interrupt has already occurred. To solve this problem, we have written a program that will disable or clear all the UARTs interrupts and then enable them. This forces the DFlex to generate a new interrupt, thus re-priming the QNX2 serial device driver.

This is accomplished using a simple C program io_out.c and a series of commands placed into the sys.init.# files to execute the C program based on the I/O address settings of the DFlex.

Enclosed is a program that the customer must compile in their machine.

1.) You can compile the C program (shown below) by typing it in and then executing the following line at the prompt:

cc io_out.c c=io_out

2.) You will need to copy the file, io_out, into their /cmds directory so the program is in the executable path.

3.) You will need to type the following into your sys.init.# file the following so that the DFlex will be corectly setup at system boot up time:

io_out 281 00
io_out 289 00
io_out 291 00
io_out 299 00
io_out 281 0f
io_out 289 0f
io_out 291 0f
io_out 299 0f

(In this example the customer was using a DFlex4 with I/O addresses of 280, 288, 290 and 298, you will need to type in the I/O addresses of your DFlex serial board. Please note that this problem can also occur with the stnadard serial ports on your motherboard, so you may also want to add the I/O addresses for those ports as well. The I/O addesses for standard serial ports is using 3F8 ( Port 1, $mdm ) and 2F8 ( Port 2, $term1 ) ).

********************************************************************
io_out.c

#include

main ( argc, argv)

int argc;
char *argv[ ];

{
int i;
io_out ( atoh( argv[1] ), atoh( argv[2] ));
}

End of KDB-224

Go to Top