Subject: Re: PR 12547 (console break signal ignored if DDB not defined)
To: None <chuq@chuq.com, tech-kern@netbsd.org>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 03/10/2002 04:30:04
| to fix PR 12547, I propose to add an extra "cookie" argument to
| cn_check_magic() and cn_trap().  on platforms that have a firmware
| monitor such as the sparc, this cookie can be used to pass the
| console driver's softc pointer to (eg.) zs_abort(), which will
| drop into the monitor like before the cnmagic changes.
| (currently zs_abort() is defined on several platforms but is unused).
|
| I've tested the attached changes on sparc and sparc64 (an ultra2).
| the "com" parts are untested but should be harmless.
| comments?

Since cn_trap() is specified to be a macro you can simply redefine
it to make use of the appropriate parameter in the MD bus-specific
attachment header file.  This prevents you from needing to change
the signatures of the macros for every weird parameter that the
low-level trap routine may need.  

Eduardo