Subject: Re: Continued problems with SMP on NetBSD/alpha
To: NetBSD/Alpha Discussion List <>
From: Greg A. Woods <>
List: port-alpha
Date: 12/20/2006 14:34:08
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Wed, 20 Dec 2006 11:17:11 -0700 (MST),
Michael L. Hitch wrote:
>    I had some problems with my CS20 getting into a deadlock with interrup=
> disabled, so I couldn't break into DDB from the console, and the only=20
> recourse I had was to cycle power.  Later, I finally located the halt=20
> switch, and using that was able to halt ot the SRM, which also displayed =

> the program counter of one of the CPUs.  From the SRM, I could use the=20
> 'continue' command to get back into the kernel and DDB and poke around=20
> from there.


So dropping to the SRM with a system halt effectively re-enables

Speaking of SRM and DDB and stuff, it sure would be nice if one could
halt to the SRM from DDB, and then get back to DDB again (and if this
was just an exploratory halt then also get back to a running system).
(Just as one can do something similar on a Sun or perhaps any open
firmware system)

Is something like this even possible on the Alpha with SRM though?  I
would think so, given that the SRM can continue execution again just as
you've described, but with my limited poling around I haven't found a
way to call the SRM without generating a halt and thus a panic().  I did
manage to hack the DDB code though to at least provide "machine halt"
and "machine prom" commands, but currently they're just calls to
cpu_halt() and prom_halt() respectively and specifically for the latter
I have the following commented out code and explanation.

db_prom_cmd(addr, have_addr, count, modif)
	db_expr_t addr;
	int have_addr;
	db_expr_t count;
	char *modif;
#if 0			/* prom_halt() always clears PCS_RC regardless */
	struct pcs *p;

	/* check the restart-capable flag */
	p =3D LOCATE_PCS(hwrpb, hwrpb->rpb_primary_cpu_id);
	if (p->pcs_flags & PCS_RC)
		db_printf("Halting system (type 'cont' to return to DDB)\n");
		db_printf("Returning to SRM (no restart possible).\n");


The former ("machine halt") is just:

db_halt_cmd(addr, have_addr, count, modif)
	db_expr_t addr;
	int have_addr;
	db_expr_t count;
	char *modif;

						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <>
Planix, Inc. <>       Secrets of the Weird <>

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: PGPfreeware 5.0i for non-commercial use
MessageID: hgkABWSAShzpnYdX95Ysci91q0VmCuJp