Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reboot vs. power cycle

758 views
Skip to first unread message

Matthieu Bec

unread,
Aug 24, 1998, 3:00:00 AM8/24/98
to
vxworks

Hi,
I'm using a standard VME crate/ 68k motorolla CPU / 8Meg off-board
memory and DR11 board.

Question:
does a power-cycle of the whole crate 'does more' than a simple reboot
from the shell ?
Is there any definite answer or this depends on the boards I got in my
rack ?

Cheers,

--
Matthieu Bec Isaac Newton Group
tel : +34 922 425427 Apartado de Correos 321
fax : +34 922 425401 38780 Santa Cruz de La Palma
email: md...@ing.iac.es Canary Islands, Spain

Carl C. Chesbrough

unread,
Aug 24, 1998, 3:00:00 AM8/24/98
to
Matthieu,

By doing a "reboot" VxWorks goes through a "warm restart" vector and
does not execute the same code as a power-cycle. If you do a
"reboot 2" command, then VxWorks goes through a "cold restart" vector
and does execute the same code as a power-cycle. One thing that
you may need to be aware of is that the state of the hardware will
not be the same on a "cold restart" vs. a power-cycle.

HTH,
-Carl.

********************************************************************
* *
* Carl C. Chesbrough Telephone: (510) 252-0870 x 126 *
* Themis Computer Facsimile: (510) 490-5529 *
* 3185 Laurelview Court E-Mail : ca...@themis.com *
* Fremont, California 94538 *
* *
********************************************************************

Mike Stimpson

unread,
Aug 25, 1998, 3:00:00 AM8/25/98
to
Matthieu Bec wrote:
>
> vxworks
>
> Hi,
> I'm using a standard VME crate/ 68k motorolla CPU / 8Meg off-board
> memory and DR11 board.
>
> Question:
> does a power-cycle of the whole crate 'does more' than a simple reboot
> from the shell ?
> Is there any definite answer or this depends on the boards I got in my
> rack ?
>
> Cheers,
>
> --
> Matthieu Bec Isaac Newton Group
> tel : +34 922 425427 Apartado de Correos 321
> fax : +34 922 425401 38780 Santa Cruz de La Palma
> email: md...@ing.iac.es Canary Islands, Spain

Reboot doesn't do the same thing as a power cycle, even on your own
board. What you need to do is a RESET instruction, and then the reboot.
RESET drives the CPU's reset line low as an output, resetting the rest
of the board (but not the CPU).

In the case of the VME crate, you will have to test whether the reset
line of the CPU board is driven to the other boards and resets them.

RESET plus reboot is still not quite the same as a power cycle, if there
are any chips where the reset line does not initialize them to the same
state as power off does. Such differences *should* be minor, but you
still might have trouble.

If memory serves, the vxWorks 68k assemblers don't understand the RESET
mnemonic, so you have to put it in as 2 bytes of data in-line with the
code.
--
Mike Stimpson (mst...@utsci.com)

Opinions expressed are not necessarily those of the management...

The more I work as an engineer, the more I disbelieve the theory of
evolution.

Nick Rees

unread,
Aug 25, 1998, 3:00:00 AM8/25/98
to
--Herd_of_Buffalo_104_000
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: e+tBYx18jYL56YHcaJFZAw==

Matthieu,

Hi from the JAC. I am not sure how many answers you got to your question - I
have only seen one and it doesn't mention the problem I find most often.

When a crate is power cycled all boards in the crate are reset (naturally). When
you use the VxWorks reboot command you only reboot that particular CPU board.

Hence you can have a number of CPU's in a crate and can reboot them
independently (we are currently doing this so we can work on two systems
simultaneously, with minimal interference). This is irrespective of the
parameter you pass to the reboot command - the reboot command only resets one
board.

To reset the entire VME crate you need access to the VMEbus SYSRESET line. I
have attached a routine called syslocalSysReset that does this for mv167,
hkbaja60, hkbaja47 and hknitro60 architectures. You attach this routine to the
reboot sequence using rebootHookAdd, and you get the effect I think you want. I
wish vendors would supply such a routine in their BSP since it is a common
enough problem.

Nick Rees

Joint Astronomy Centre Ph: +1 (808) 961-3756
660 N. Aohoku Place Fax: +1 (808) 961-6516
Hilo, HI. 96720 Internet: n.r...@jach.hawaii.edu

--Herd_of_Buffalo_104_000
Content-Type: TEXT/x-sun-c-file; name="syslocalSysReset.c"; charset=us-ascii; x-unix-mode=0644
Content-Description: syslocalSysReset.c
Content-MD5: n0R45AeI38l1Bt1t/ucA5Q==

/*******************************************************************************
* syslocalSysReset
*
* who when what
* --------- -------- --------------------------------------------------------
* N.Rees 25/04/97 first release for mv167 - based on a routine from
* Gordon Uchenick <uche...@tis4000.com>
* N.Rees 16/04/98 Added Heurikon Baja and Nitro architectures.
* N.Rees 14/08/98 Cleaned up comments for ROE
*/
/*******************************************************************************
* NAME
* syslocalSysReset - Generate a VMEbus SYSRESET on various architectures.
*
* SYNOPSIS
* syslocalSysReset( int startType )
*
* DESCRIPTION
* This routine is generates a VMEbus SYSRESET on various architectures. This
* should reset every board in the VME crate, not just the current CPU board.
* For example, this is required to ensure the b016 is reset properly on boot.
*
* To compile you must define the vxWorks target architecture for the current
* target binary (e.g. currentlu mv167, hknitro60, hkbaja60 and hkbaja47 are
* supported.
*
* For the mv167 it sets the mv167 watchdog timer, disables interrupts,
* and then hogs the CPU. This ensures the watchdog timer goes off, thereby
* resetting the CPU and also generating a SYSRESET on the VMEbus. The original
* comes from Gordon Uchenick <uche...@tis4000.com>.
*
* For the Heurikon architectures, it just pokes the correct register in the
* VIC064 chip. Thanks to Stephen B. Johnson, <stephen....@heurikon.com>,
* of Heurikon for the original code (i.e. vital one line).
*
* For other architectures, this is a null routine.
*
* <startType> IN VxWorks start type (not used)
*
* RETURN VALUES
* the routine never returns.
*
* EXAMPLE
* syslocalSysReset
*
* SEE ALSO
* b016Drv
*
*------------------------------------------------------------------------------
*/

#if defined(mv167)
#include <intLib.h>

void syslocalSysReset()
{
volatile unsigned int * dogToCtlReg = (unsigned int *) 0xfff4004c;
volatile unsigned int * dogCtlReg = (unsigned int *) 0xfff40060;
volatile int scratch;

/* Get the Watchdog Timeout Control Register. */
scratch = *dogToCtlReg;

/* Wipe out the watch dog timeout, set it to 1 second, and put it back. */
scratch &= 0xfffff0ff;
scratch |= 0x00000b00;
*dogToCtlReg = scratch;

/* Get the Watchdog timer control register. */
scratch = *dogCtlReg;

/* Now enable the dog. */
scratch |= 0x000f0000;
*dogCtlReg = scratch;

/* Now sit here until the dog reboots the system. */
intLock();
for ( scratch=0; ; scratch++ );
}

#elif defined(hkbaja60) || defined(hknitro60) || defined(hkbaja47)

#if defined(hkbaja60)
#define VIC_BASE_ADRS 0xff000000
#elif defined(hknitro60)
#define VIC_BASE_ADRS 0xff000000
#elif defined(hkbaja47)
#define VIC_BASE_ADRS 0x1f000000
#endif

#include "drv/vme/vic068.h"

void syslocalSysReset()
{
*VIC_SRR = 0xf0;
}
#else

void syslocalSysReset()
{
}
#endif


--Herd_of_Buffalo_104_000--

0 new messages