From: "Frantisek Rysanek" <Frantisek.Rysanek@post.cz>
To: linux-kernel@vger.kernel.org
Subject: Re: What pokes the ISA IO port of 0x211 ?
Date: Wed, 23 Apr 2008 14:19:25 +0200 [thread overview]
Message-ID: <480F456D.3680.ACD58B03@localhost> (raw)
In-Reply-To: <480CFA42.20408@keyaccess.nl>
On 21 Apr 2008 at 19:40, H. Peter Anvin wrote:
> It might be easiest to put in a hack in the kernel by hacking
> outb/outw/outl and print stack trace when called when trying to poke
> this port.
On 21 Apr 2008 at 22:34, Rene Herman wrote:
> Ah, it's the old analog gameport: ns558_init.
Well my immediate initial idea was indeed the game port,
IO port 0x201 immediately started jumping up and down
in the dark recesses of my memory from teenage years,
when I was trying this and that in Borland C in DOS...
So even before I wrote to LKML, I went into "make menuconfig"
and made sure that any entries related to the game port
were disabled:
Device Drivers -->
Input device support -->
Joystick interface = disabled
Joysticks/Gamepads = disabled
I've been having all of that disabled in my kernel for ages,
I haven't met a game port since I abandoned my 486+SB16.
So, after Rene's response and HPA's responses, I resorted to
the suggested hacking on include/asm/io.h .
After some grepping through the kernel sources, I could come up
with a simple call to dump_stack(). I added
if (port == 0x211) dump_stack();\
into <asm/io.h>, on a second line below
#define BUILDIO(bwl,bw,type)
into the definition of
static inline void out##bwl##_local()
That gave me a linker error in the final stages of "make bzImage".
Clearly arch/i386/boot/compressed/misc.c doesn't get linked
directly to the rest of the kernel binary image, so it doesn't
have access to the kernel's symbols.
I solved that by making a clipboard copy of the whole huge BUILDIO
"template" macro definition and wrapping the first copy in an
#ifndef SKIP_STACK_DUMP
and I only defined SKIP_STACK_DUMP in compressed/misc.c
to avoid the linking problem...
Much to my amazement, this time it worked,
and I was even more amazed to find out, that in fact
Rene Herman was right :-)))
The poke is indeed performed by a function called ns558_init
and it's indeed related to the generic game port.
What I missed in the menuconfig was this entry:
Device Drivers -->
Input device support -->
Hardware I/O ports -->
Gameport support -->
Classic ISA and PnP gameport support
Also known as CONFIG_GAMEPORT_NS558, which enables compilation of
drivers/input/gameport/ns558.c
It's always fun to learn about multiple menuconfig entries
for the same piece hardware or functionality in general :-)
Thanks to all those who replied, thanks for your time,
and have a nice, productive day :-)
Frank Rysanek
next prev parent reply other threads:[~2008-04-23 12:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 11:12 What pokes the ISA IO port of 0x211 ? Frantisek Rysanek
2008-04-21 15:51 ` Bart Van Assche
2008-04-21 17:40 ` H. Peter Anvin
2008-04-21 20:05 ` Rene Herman
2008-04-21 20:34 ` Rene Herman
2008-04-23 12:19 ` Frantisek Rysanek [this message]
2008-04-23 13:56 ` Rene Herman
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=480F456D.3680.ACD58B03@localhost \
--to=frantisek.rysanek@post.cz \
--cc=linux-kernel@vger.kernel.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