public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: linux-os@analogic.com
Cc: krishna <krishna.c@globaledgesoft.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: How to debug kernel before there is no printk mechanism?
Date: Wed, 30 Mar 2005 15:31:08 -0800	[thread overview]
Message-ID: <424B36BC.2000005@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0503301134240.28049@chaos.analogic.com>

linux-os wrote:
> On Wed, 30 Mar 2005, krishna wrote:
> 
>> Hi all,
>>
>> How can one debug kernel before there is no printk mechanism in kernel.
>>
>> Regards,
>> Krishna Chaitanya

Here's an implementation by Keith Owens:
http://kernelnewbies.org/documents/videochar.txt

The patch there is to Linux 2.4.18, but should be workable
on many versions.

> Write directly to screen memory at 0x000b8000, or write to the
> RS-232C UART while polling the TX buf empty bit, or just write
> bits that mean something to you out the printer port.
> 
> Screen - memory is 16-bit words with the high-word being
> an attibute byte. FYI 0x07 is a good B&W byte. You can
> initialize a pointer to it as:
> 
> unsigned short *screen = 0xc00b8000; Since low memory
> is always mapped, the above cheat will work. The 0xc0000000
> is PAGE_OFFSET.
> 
> An early '486 was brought up into a 32-bit protected-mode
> (non linux) operating system using these debugging methods.
> The first time I got to see some symbol written to the
> screen in protected-mode marked the start of a week-end-
> long party. Have fun!


-- 
~Randy

  parent reply	other threads:[~2005-03-30 23:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-30 16:22 How to debug kernel before there is no printk mechanism? krishna
2005-03-30 16:47 ` linux-os
2005-03-30 14:54   ` Vicente Feito
2005-03-30 18:09     ` linux-os
2005-03-30 16:16       ` Vicente Feito
2005-03-30 20:11         ` linux-os
2005-03-30 23:31   ` Randy.Dunlap [this message]
2005-03-30 18:33 ` Jon Smirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=424B36BC.2000005@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=krishna.c@globaledgesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox