From: Truxton Fulton <trux@truxton.com>
To: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] : fix reboot via keyboard controller reset
Date: Mon, 22 Aug 2005 23:39:07 -0700 [thread overview]
Message-ID: <m21x4l9myc.fsf@truxton.com> (raw)
Hi,
I have a system (Biostar IDEQ210M mini-pc with a VIA chipset)
which will not reboot unless a keyboard is plugged in to it.
I have tried all combinations of the kernel "reboot=x,y"
flags to no avail. Rebooting by any method will leave the
system in a wedged state (at the "Restarting system" message).
I finally tracked the problem down to the machine's refusal to
fully reboot unless the keyboard controller status register
had bit 2 set. This is the "System flag" which when set,
indicates successful completion of the keyboard controller
self-test (Basic Assurance Test, BAT).
I suppose that something is trying to protect against sporadic
reboots unless the keyboard controller is in a good state
(a keyboard is present), but I need this machine to be
headless.
I found that setting the system flag (via the command byte)
before giving the "pulse reset line" command will allow the
reboot to proceed. The patch is simple, and I think it
should be fine for everybody whether they have this type
of machine or not. This affects the "hard" reboot (as done
when the kernel boot flags "reboot=c,h" are used).
Here is a patch against include/asm-i386/mach-default/mach_reboot.h :
--- mach_reboot.h.orig 2005-08-22 22:23:13.000000000 -0700
+++ mach_reboot.h 2005-08-22 23:18:36.000000000 -0700
@@ -22,6 +22,14 @@
for (i = 0; i < 100; i++) {
kb_wait();
udelay(50);
+ outb(0x60, 0x64); /* write Controller Command Byte */
+ udelay(50);
+ kb_wait();
+ udelay(50);
+ outb(0x14, 0x60); /* set "System flag" */
+ udelay(50);
+ kb_wait();
+ udelay(50);
outb(0xfe, 0x64); /* pulse reset low */
udelay(50);
}
Thanks,
-Truxton
reply other threads:[~2005-08-23 6:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m21x4l9myc.fsf@truxton.com \
--to=trux@truxton.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
/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
Powered by JetHome