[PATCH] Enable A20 gateThis is a patch to the a20.c file that fixes followingi) WARNING: please, no spaces at the start of a lineii) WARNING: suspect code indent for conditional statementsiii) ERROR: trailing whitespace
From: Syed Salman Mansoor
Date: Tue May 07 2013 - 03:49:24 EST
---
arch/x86/boot/a20.c | 46 +++++++++++++++++++++++-----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 64a31a6..911d729 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -129,37 +129,37 @@ static void enable_a20_fast(void)
int enable_a20(void)
{
- int loops = A20_ENABLE_LOOPS;
- int kbc_err;
+ int loops = A20_ENABLE_LOOPS;
+ int kbc_err;
- while (loops--) {
- /* First, check to see if A20 is already enabled
+ while (loops--) {
+ /* First, check to see if A20 is already enabled
(legacy free, etc.) */
- if (a20_test_short())
- return 0;
-
+ if (a20_test_short())
+ return 0;
+
/* Next, try the BIOS (INT 0x15, AX=0x2401) */
enable_a20_bios();
- if (a20_test_short())
- return 0;
-
+ if (a20_test_short())
+ return 0;
+
/* Try enabling A20 through the keyboard controller */
kbc_err = empty_8042();
- if (a20_test_short())
- return 0; /* BIOS worked, but with delayed reaction */
-
- if (!kbc_err) {
- enable_a20_kbc();
- if (a20_test_long())
- return 0;
+ if (a20_test_short())
+ return 0; /* BIOS worked, but with delayed reaction */
+
+ if (!kbc_err) {
+ enable_a20_kbc();
+ if (a20_test_long())
+ return 0;
}
-
+
/* Finally, try enabling the "fast A20 gate" */
enable_a20_fast();
- if (a20_test_long())
- return 0;
- }
-
- return -1;
+ if (a20_test_long())
+ return 0;
+ }
+
+ return -1;
}
--
1.7.2.5
--001a11c2b9ecce222704dc1cc83e
Content-Type: application/octet-stream; name="0001-Enable-A20-gate.patch"
Content-Disposition: attachment; filename="0001-Enable-A20-gate.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hgetq8v70
RnJvbSBhNWU0Y2Q2Y2IxOTU2ZD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dCB3aXRoIGRlbGF5ZWQgcmVhY3Rpb24gKi8KLQkKLQkg
ICAgICAgaWYgKCFrYmNfZXJyKSB7Ci0JCSAgICAgICBlbmFibGVfYTIwX2tiYygpOwotCQkgICAg
ICAgaWYgKGEyMF90ZXN0X2xvbmcoKSkKLQkJCSAgICAgICByZXR1cm4gMDsKKwkJaWYgKGEyMF90
ZXN0X3Nob3J0KCkpCisJCQlyZXR1cm4gMDsgLyogQklPUyB3b3JrZWQsIGJ1dCB3aXRoIGRlbGF5
ZWQgcmVhY3Rpb24gKi8KKworCQlpZiAoIWtiY19lcnIpIHsKKwkJCWVuYWJsZV9hMjBfa2JjKCk7
CisJCQlpZiAoYTIwX3Rlc3RfbG9uZygpKQorCQkJCXJldHVybiAwOwogCSAgICAgICB9Ci0JICAg
ICAgIAorCiAJICAgICAgIC8qIEZpbmFsbHksIHRyeSBlbmFibGluZyB0aGUgImZhc3QgQTIwIGdh
dGUiICovCiAJICAgICAgIGVuYWJsZV9hMjBfZmFzdCgpOwotCSAgICAgICBpZiAoYTIwX3Rlc3Rf
bG9uZygpKQotCQkgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgfQotICAgICAgIAotICAgICAgIHJl
dHVybiAtMTsKKwkJaWYgKGEyMF90ZXN0X2xvbmcoKSkKKwkJCXJldHVybiAwOworCX0KKworCXJl
dHVybiAtMTsKIH0KLS0gCjEuNy4yLjUKCg==
--001a11c2b9ecce222704dc1cc83e--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/