Browse Source

[a20] Send a null command to the KBC after changing A20

Send a null command, specifically "pulse outputs" with no outputs
selected, to the KBC after changing A20.  This was apparently done by DOS,
presumably as a synchronization hack, and the authors of the UHCI spec
thought it was inherent.  Therefore, there are systems out there (e.g. HP
DL360 G5) which will stop responsing to "legacy USB" unless they see the
null command, 0xFF, written to port 0x64 at the end of the A20 toggling
sequence.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
tags/v0.9.4
H. Peter Anvin 16 years ago
parent
commit
b7882065f5
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/arch/i386/firmware/pcbios/gateA20.c

+ 3
- 0
src/arch/i386/firmware/pcbios/gateA20.c View File

12
 
12
 
13
 #define KC_CMD_WIN	0xd0		/* read  output port */
13
 #define KC_CMD_WIN	0xd0		/* read  output port */
14
 #define KC_CMD_WOUT	0xd1		/* write output port */
14
 #define KC_CMD_WOUT	0xd1		/* write output port */
15
+#define KC_CMD_NULL	0xff		/* null command ("pulse nothing") */
15
 #define KB_SET_A20	0xdf		/* enable A20,
16
 #define KB_SET_A20	0xdf		/* enable A20,
16
 					   enable output buffer full interrupt
17
 					   enable output buffer full interrupt
17
 					   enable data line
18
 					   enable data line
130
 			empty_8042();
131
 			empty_8042();
131
 			outb ( KB_SET_A20, K_RDWR );
132
 			outb ( KB_SET_A20, K_RDWR );
132
 			empty_8042();
133
 			empty_8042();
134
+			outb ( KC_CMD_NULL, K_CMD );
135
+			empty_8042();
133
 			if ( gateA20_is_set ( A20_KBC_RETRIES ) ) {
136
 			if ( gateA20_is_set ( A20_KBC_RETRIES ) ) {
134
 				DBG ( "Enabled gate A20 using "
137
 				DBG ( "Enabled gate A20 using "
135
 				      "keyboard controller\n" );
138
 				      "keyboard controller\n" );

Loading…
Cancel
Save