Skip to contentSkip to conversation

Keyboard I/O port reservation

PATCH New Markus Armbruster 2 participants 3 messages Jul 23, 2008 – Jul 24, 2008

lore
Share & tools
lore
#0 lore raw

arch/{i386,x86_64}/kernel/setup*.c reserve ports 0x60 to 0x6f for the i8042 keyboard controller. That critter actually uses just 0x60 and 0x64. Apparently, there's hardware out there (IPMI controller on some single board computer) that uses other ports in the reserved range. Upstream narrowed the I/O port reservation to make that hardware work[*].

I figure simply aping upstream's change in the two setup-xen.c should do for Xen. Right?

Do we want that in linux-2.6.18-xen.hg?

[*] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9096bd7a66efbe406910365c5206a32eed3875af

#1 lore raw
Quoted 9 lines · Markus Armbruster

arch/{i386,x86_64}/kernel/setup*.c reserve ports 0x60 to 0x6f for the i8042 keyboard controller. That critter actually uses just 0x60 and 0x64. Apparently, there's hardware out there (IPMI controller on some single board computer) that uses other ports in the reserved range. Upstream narrowed the I/O port reservation to make that hardware work[*].

I figure simply aping upstream's change in the two setup-xen.c should do for Xen. Right?

Almost certainly.

Quoted 1 line

Do we want that in linux-2.6.18-xen.hg?

Happy to have it.

Thanks,
Keir

Quoted 8 lines

[*]
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90
96bd7a66efbe406910365c5206a32eed3875af

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

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

Straightforward port of http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9096bd7a66efbe406910365c5206a32eed3875af

Quoting its commit message:

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

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.

[ tglx: added 64bit fixup ]

arch/i386/kernel/setup-xen.c +6 -1
diff -r d25b46565529 arch/i386/kernel/setup-xen.c
@@ -283,7 +283,12 @@
 }, {
 	.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",
arch/i386/kernel/setup.c +6 -1
diff -r d25b46565529 arch/i386/kernel/setup.c
@@ -261,7 +261,12 @@
 }, {
 	.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",
arch/x86_64/kernel/setup-xen.c +3 -1
diff -r d25b46565529 arch/x86_64/kernel/setup-xen.c
@@ -169,7 +169,9 @@
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
 	{ .name = "timer1", .start = 0x50, .end = 0x53,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
-	{ .name = "keyboard", .start = 0x60, .end = 0x6f,
+	{ .name = "keyboard", .start = 0x60, .end = 0x60,
+		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
+	{ .name = "keyboard", .start = 0x64, .end = 0x64,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
 	{ .name = "dma page reg", .start = 0x80, .end = 0x8f,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
arch/x86_64/kernel/setup.c +3 -1
diff -r d25b46565529 arch/x86_64/kernel/setup.c
@@ -122,7 +122,9 @@
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
 	{ .name = "timer1", .start = 0x50, .end = 0x53,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
-	{ .name = "keyboard", .start = 0x60, .end = 0x6f,
+	{ .name = "keyboard", .start = 0x60, .end = 0x60,
+		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
+	{ .name = "keyboard", .start = 0x64, .end = 0x64,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },
 	{ .name = "dma page reg", .start = 0x80, .end = 0x8f,
 		.flags = IORESOURCE_BUSY | IORESOURCE_IO },