Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help with cnmagic

On Thu, 8 Sep 2011, Johnny Billquist wrote:

On 2011-09-08 17.34, Eduardo Horvath wrote:
On Thu, 8 Sep 2011, Eduardo Horvath wrote:

On Wed, 7 Sep 2011, Paul Goyette wrote:

Looking at my system, I find

        {106} sysctl hw.cnmagic
        hw.cnmagic = \x27\x02

From the description in cnmagic(9) this would appear to mean that I need
to type a Nul character to enter the debugger.  I'm not at all sure how I
would type a Nul on my USB keyboard.

This is not the Nul character, it's been escaped.  You need to type a key
with the value "0x02", whatever that maps to, assuming the console driver
is wired into the cnmagic logic.

Sorry, looking more closely, it is the Nul character.

This means it has probably not been initialized.  Since drivers that use
this are responsible to initialize the magic sequence to sane values, it's
likely that the console device is not using the cn_magic code.

Ok. I don't get it. How would that be the NUL character? To my naive eyes, it looks like single quote, followed by a ^B would be what cnmagic says...
I must be missing something...

From man page:

         ... The escape sequence is character
         value 0x27 and can be used to encode special values:

                  0x27   The literal value 0x27.
                  0x01   Serial BREAK sequence.
                  0x02   Nul character.

So, \x217\x27 means that the magic sequence is a single Escape, and \x27\x01 is a "real" BREAK, and \x27\x02 is Nul

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index