Skip to contentSkip to conversation

x86: restrict keyboard io ports reservation to make ipmi driver work

PATCH In review Thomas Gleixner 2 participants 3 messages Apr 29, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: restrict keyboard io ports reservation to make ipmi driver work

From: Helge Wagner <[email protected]>

On some of our (single board computer) boards (x86) we are using an IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard controller style) IPMI system interface.

Trying to load the openipmi driver fails, because the ports (0x62/0x66) are reserved for keyboard. keyboard reserves the full range 0x60-0x6F while it doesn't need to.

Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad controller instead of 0x60-0x6F to allow the openipmi driver to work.

---
 arch/x86/kernel/setup_32.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kernel/setup_32.c +6 -1
Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
@@ -127,7 +127,12 @@ static struct resource standard_io_resou
 }, {
 	.name	= "keyboard",
 	.start	= 0x0060,
-	.end	= 0x006f,
+	.end	= 0x0060,
+	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
+}, {
+	.name	= "keyboard",
+	.start	= 0x0064,
+	.end	= 0x0064,
 	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
 }, {
 	.name	= "dma page reg",
#1 lore raw
Quoted 33 lines · Thomas Gleixner

From: Helge Wagner <[email protected]>

On some of our (single board computer) boards (x86) we are using an IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard controller style) IPMI system interface.

Trying to load the openipmi driver fails, because the ports (0x62/0x66) are reserved for keyboard. keyboard reserves the full range 0x60-0x6F while it doesn't need to.

Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad controller instead of 0x60-0x6F to allow the openipmi driver to work.

---

  arch/x86/kernel/setup_32.c |    7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_32.c
+++ linux-2.6/arch/x86/kernel/setup_32.c
@@ -127,7 +127,12 @@ static struct resource standard_io_resou
}, {
.name = "keyboard",
.start = 0x0060,

 -       .end    = 0x006f,
 +       .end    = 0x0060,
 +       .flags  = IORESOURCE_BUSY | IORESOURCE_IO
 +}, {
 +       .name   = "keyboard",
 +       .start  = 0x0064,
 +       .end    = 0x0064,
Quoted 4 lines

.flags = IORESOURCE_BUSY | IORESOURCE_IO
}, {
.name = "dma page reg",
--

64 bit need to be fixed too...
{ .name = "keyboard", .start = 0x60, .end = 0x6f,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },

YH

#2 lore raw
Quoted 39 lines · Yinghai Lu
Quoted 33 lines · Thomas Gleixner

From: Helge Wagner <[email protected]>

On some of our (single board computer) boards (x86) we are using an IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard controller style) IPMI system interface.

Trying to load the openipmi driver fails, because the ports (0x62/0x66) are reserved for keyboard. keyboard reserves the full range 0x60-0x6F while it doesn't need to.

Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad controller instead of 0x60-0x6F to allow the openipmi driver to work.

---

  arch/x86/kernel/setup_32.c |    7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_32.c
+++ linux-2.6/arch/x86/kernel/setup_32.c
@@ -127,7 +127,12 @@ static struct resource standard_io_resou
}, {
.name = "keyboard",
.start = 0x0060,

 -       .end    = 0x006f,
 +       .end    = 0x0060,
 +       .flags  = IORESOURCE_BUSY | IORESOURCE_IO
 +}, {
 +       .name   = "keyboard",
 +       .start  = 0x0064,
 +       .end    = 0x0064,
Quoted 4 lines

.flags = IORESOURCE_BUSY | IORESOURCE_IO
}, {
.name = "dma page reg",
--

Quoted 3 lines

64 bit need to be fixed too...
{ .name = "keyboard", .start = 0x60, .end = 0x6f,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },

Doh, yes.

Thanks,
tglx