linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* rebooting with the FADS
@ 2000-09-14 15:36 Paolo Scaffardi
  2000-09-19 22:14 ` Pete Popov
  2000-09-21  6:11 ` Yannis Plevrakis
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Scaffardi @ 2000-09-14 15:36 UTC (permalink / raw)
  To: linuxppc-embedded


on my FADS, i see that it is not possible to reboot from software: you must
press the reset buttons to do this.

But, i sometimes have reboot problems. I see BCSRx registers have strange
values and the bootrom seems to stop downloading the kernel randomly. This
of because of erroneous values into memory configuration registers.

how can i make a soft-reboot?
how can i resolve this problem with strange register-values on reboot?

=-> MAY THE PINGUIN B WITH U! <-=

Best regards,
Paolo Scaffardi (arsenio@tin.it - pscaffardi@supereva.it)
AIRVENT SAM s.p.a. - RIMINI (ITALY)
Tel. 0541 383294 - Fax 0541 387086


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rebooting with the FADS
  2000-09-14 15:36 rebooting with the FADS Paolo Scaffardi
@ 2000-09-19 22:14 ` Pete Popov
  2000-09-20 11:37   ` Jerry Van Baren
  2000-09-21  6:11 ` Yannis Plevrakis
  1 sibling, 1 reply; 5+ messages in thread
From: Pete Popov @ 2000-09-19 22:14 UTC (permalink / raw)
  To: Paolo Scaffardi; +Cc: linuxppc-embedded


Paolo Scaffardi wrote:
>
> on my FADS, i see that it is not possible to reboot from software: you must
> press the reset buttons to do this.
>
> But, i sometimes have reboot problems. I see BCSRx registers have strange
> values and the bootrom seems to stop downloading the kernel randomly. This
> of because of erroneous values into memory configuration registers.
>
> how can i make a soft-reboot?
> how can i resolve this problem with strange register-values on reboot?

I've had soft reboot problems with the 850 on a custom board, where the
firmware would crash shortly after the reboot.  I had to modify the boot
code to not reinitialize the UPMs (I don't remember if I had to do
anything else) after a soft reboot.  You might have to modify your boot
code to get this to work correctly.  If you'll be developing a custom
board, I suggest you wait and fix the problem on your custom board,
instead of worrying about the FADS.

Keep in mind also that the FADS board is not the best hardware design
out there.  There's a number of signals left floating which shouldn't be
floating.  If you replace the cpu that comes with the board with a
different mask cpu, chances are the bdm port might not work at all
(unless you freeze it with some spray).

Pete

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rebooting with the FADS
  2000-09-19 22:14 ` Pete Popov
@ 2000-09-20 11:37   ` Jerry Van Baren
  0 siblings, 0 replies; 5+ messages in thread
From: Jerry Van Baren @ 2000-09-20 11:37 UTC (permalink / raw)
  To: linuxppc-embedded


There currently is no formal convention for restarts (i.e. it isn't
defined in the EABI :-), but PPC implementations that I've been
associated with use the convention of 0xFFF00104 being the restart
location.  The first instruction executed is at 0xFFF00100 and is set
to be a jump to the cold start location.  The next instruction is then
a jump to the restart location.  Many (all?) PPCs and/or their
associated hardware require different handling based on whether they
have been initialized before or not.

I strongly advocate adopting this convention.  It is much cleaner than
the alternative of trying to leave flags laying around in RAM.

gvb


At 03:14 PM 9/19/00 -0700, Pete Popov wrote:

>Paolo Scaffardi wrote:
> >
> > on my FADS, i see that it is not possible to reboot from software:
> you must
> > press the reset buttons to do this.
> >
> > But, i sometimes have reboot problems. I see BCSRx registers have
> strange
> > values and the bootrom seems to stop downloading the kernel
> randomly. This
> > of because of erroneous values into memory configuration registers.
> >
> > how can i make a soft-reboot?
> > how can i resolve this problem with strange register-values on reboot?
>
>I've had soft reboot problems with the 850 on a custom board, where the
>firmware would crash shortly after the reboot.  I had to modify the boot
>code to not reinitialize the UPMs (I don't remember if I had to do
>anything else) after a soft reboot.  You might have to modify your boot
>code to get this to work correctly.  If you'll be developing a custom
>board, I suggest you wait and fix the problem on your custom board,
>instead of worrying about the FADS.
>
>Keep in mind also that the FADS board is not the best hardware design
>out there.  There's a number of signals left floating which shouldn't be
>floating.  If you replace the cpu that comes with the board with a
>different mask cpu, chances are the bdm port might not work at all
>(unless you freeze it with some spray).
>
>Pete
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rebooting with the FADS
  2000-09-14 15:36 rebooting with the FADS Paolo Scaffardi
  2000-09-19 22:14 ` Pete Popov
@ 2000-09-21  6:11 ` Yannis Plevrakis
  2000-10-24 17:13   ` Marcus Sundberg
  1 sibling, 1 reply; 5+ messages in thread
From: Yannis Plevrakis @ 2000-09-21  6:11 UTC (permalink / raw)
  To: LinuxPPC, Paolo Scaffardi


>
> on my FADS, i see that it is not possible to reboot from software: you
must
> press the reset buttons to do this.
>

Just a "brute force" alternative:
In case you don't mind having a latency of tens/hundrends of miliseconds
before rebooting
and you want a soft reboot very similar to a hardware one, generating a
HRESET signal,
a very simple approach could be to use the software watchdog timer.

Yannis.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rebooting with the FADS
  2000-09-21  6:11 ` Yannis Plevrakis
@ 2000-10-24 17:13   ` Marcus Sundberg
  0 siblings, 0 replies; 5+ messages in thread
From: Marcus Sundberg @ 2000-10-24 17:13 UTC (permalink / raw)
  To: LinuxPPC; +Cc: Paolo Scaffardi


"Yannis Plevrakis" <iple@intracom.gr> writes:

> >
> > on my FADS, i see that it is not possible to reboot from software: you
> must
> > press the reset buttons to do this.
> >
>
> Just a "brute force" alternative:
> In case you don't mind having a latency of tens/hundrends of miliseconds
> before rebooting
> and you want a soft reboot very similar to a hardware one, generating a
> HRESET signal,
> a very simple approach could be to use the software watchdog timer.

No need to use the watchdog for that, just do a checkstop reset.

in m8xx_setup.c:

extern void m8xx_cs_reset(void);

void
m8xx_restart(char *cmd)
{
        /* Wait for serial console message. */
        mdelay(20);
        /* Turn off interrupts and do a checkstop reset */
        cli();
        m8xx_cs_reset();
        for(;;);
}


and in head.S:


/*
 * Perform a checkstop reset of the CPU
 */
#define KAPWR_KEY       0x55ccaa33

_GLOBAL(m8xx_cs_reset)
	mfmsr   r3                      /* Read MSR */
	rlwinm  r3,r3,0,20,18           /* Mask ME bit, and... */
	sync
	mtmsr   r3                      /* ...write back MSR. */
	sync
	mfspr   r4,149                  /* Read DER */
	rlwinm  r4,r4,0,3,1             /* Mask CHSTPE bit, and... */
	sync
	mtspr   149,r4                  /* ...write back DER. */
	sync
	mfspr   r3,638                  /* Load r3 with immr, and... */
	rlwinm  r3,r3,0,0,15            /* ...mask lower 16 bits */
	lwz     r4,644(r3)              /* Read PLPRCR */
	lis     r5,KAPWR_KEY@l
	ori     r5,r5,KAPWR_KEY@h       /* Make sure PLPRCR is ready for */
	stw     r5,900(r3)              /* unlocking. */
	lis     r6,KAPWR_KEY@h
	ori     r6,r6,KAPWR_KEY@l
	stw     r6,900(r3)              /* Unlock PLPRCR */
	ori     r4,r4,128               /* Set CSR bit, and... */
	stw     r4,644(r3)              /* write back PLPRCR. */

	addis   r3,r3,1         /* Add IMAP_SIZE to immr, and... */
	lwz     r4,-4(r3)       /* ...read from a non-existant address! */
	blr                     /* Return if we fail for some reason... */


//Marcus
--
-------------------------------+-----------------------------------
        Marcus Sundberg        |       Phone: +46 707 452062
  Embedded Systems Consultant  |      Email: marcus@cendio.se
       Cendio Systems AB       |       http://www.cendio.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-10-24 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-14 15:36 rebooting with the FADS Paolo Scaffardi
2000-09-19 22:14 ` Pete Popov
2000-09-20 11:37   ` Jerry Van Baren
2000-09-21  6:11 ` Yannis Plevrakis
2000-10-24 17:13   ` Marcus Sundberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).