* [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
@ 2012-10-26 8:56 Ondrej Zary
2012-11-05 20:35 ` Ondrej Zary
0 siblings, 1 reply; 10+ messages in thread
From: Ondrej Zary @ 2012-10-26 8:56 UTC (permalink / raw)
To: hpa; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable A20
line but resume code assumes that KBC was used.
The laptop will not resume from S3 otherwise but powers off after a while
and then powers on again stuck with a blank screen.
Fix it by enabling A20 using KBC. Affected laptop list and DMI data are from
bug reports at Ubuntu Launchpad.
Also add kernel parameter to easily activate this quirk on any system.
Only compile tested. The original patch was tested with EX600 and PR200.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
Documentation/kernel-parameters.txt | 6 ++
arch/x86/kernel/acpi/boot.c | 122 +++++++++++++++++++++++++++++++++++
2 files changed, 128 insertions(+), 0 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 9776f06..eb3d6a4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -153,6 +153,12 @@ multipliers 'Kilo', 'Mega', and 'Giga', equalling 2^10, 2^20, and 2^30
bytes respectively. Such letter suffixes can also be entirely omitted.
+ a20_enable_kbc [ACPI,X86]
+ Enable A20 line using KBC even if it's already
+ enabled using other method.
+ This is needed for some MSI laptops to resume from
+ S3.
+
acpi= [HW,ACPI,X86]
Advanced Configuration and Power Interface
Format: { force | off | strict | noirq | rsdt }
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index e651f7a..64169ca 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1349,6 +1349,67 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
}
/*
+ * Copied from arch/x86/boot/a20.c. Direct port writes (and no locking) are safe
+ * here because this is executed very early, before any drivers (like i8042).
+ */
+#define MAX_8042_LOOPS 100000
+#define MAX_8042_FF 32
+
+static int empty_8042(void)
+{
+ u8 status;
+ int loops = MAX_8042_LOOPS;
+ int ffs = MAX_8042_FF;
+
+ while (loops--) {
+ outb(0, 0x80); /* delay */
+
+ status = inb(0x64);
+ if (status == 0xff) {
+ /* FF is a plausible, but very unlikely status */
+ if (!--ffs)
+ return -1; /* Assume no KBC present */
+ }
+ if (status & 1) {
+ /* Read and discard input data */
+ outb(0, 0x80); /* delay */
+ (void)inb(0x60);
+ } else if (!(status & 2)) {
+ /* Buffers empty, finished! */
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+static void enable_a20_kbc(void)
+{
+ empty_8042();
+
+ outb(0xd1, 0x64); /* Command write */
+ empty_8042();
+
+ outb(0xdf, 0x60); /* A20 on */
+ empty_8042();
+
+ outb(0xff, 0x64); /* Null command, but UHCI wants it */
+ empty_8042();
+}
+
+/*
+ * Enable A20 line using KBC even if it's already enabled using other method.
+ * This is needed for some MSI laptops to resume from S3.
+ */
+static int __init a20_enable_kbc(const struct dmi_system_id *d)
+{
+ printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n", d->ident);
+ enable_a20_kbc();
+
+ return 0;
+}
+
+/*
* If your system is blacklisted here, but you find that acpi=force
* works for you, please contact linux-acpi@vger.kernel.org
*/
@@ -1423,6 +1484,60 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
},
},
+ /*
+ * Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
+ * enable A20 line but resume code assumes that KBC was used.
+ * The laptop will not resume from S3 otherwise but powers off
+ * after a while and then powers on again stuck with a blank screen.
+ */
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI EX600 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
+ },
+ },
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI EX700 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
+ },
+ },
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI GX700 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
+ },
+ },
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI VR201 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
+ },
+ },
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI VR601 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
+ },
+ },
+ {
+ .callback = a20_enable_kbc,
+ .ident = "MSI PR200 Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
+ },
+ },
{}
};
@@ -1679,6 +1794,13 @@ static int __init setup_acpi_sci(char *s)
}
early_param("acpi_sci", setup_acpi_sci);
+static int __init parse_a20_enable_kbc(char *arg)
+{
+ enable_a20_kbc();
+ return 0;
+}
+early_param("a20_enable_kbc", parse_a20_enable_kbc);
+
int __acpi_acquire_global_lock(unsigned int *lock)
{
unsigned int old, new, val;
--
Ondrej Zary
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-10-26 8:56 [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume Ondrej Zary
@ 2012-11-05 20:35 ` Ondrej Zary
2012-12-10 21:26 ` H. Peter Anvin
0 siblings, 1 reply; 10+ messages in thread
From: Ondrej Zary @ 2012-11-05 20:35 UTC (permalink / raw)
To: hpa; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On Friday 26 October 2012 10:56:44 Ondrej Zary wrote:
> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable
> A20 line but resume code assumes that KBC was used.
> The laptop will not resume from S3 otherwise but powers off after a while
> and then powers on again stuck with a blank screen.
>
> Fix it by enabling A20 using KBC. Affected laptop list and DMI data are
> from bug reports at Ubuntu Launchpad.
>
> Also add kernel parameter to easily activate this quirk on any system.
>
> Only compile tested. The original patch was tested with EX600 and PR200.
>
> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
The bug was marked as RESOLVED CODE_FIX but I wonder what happened to this
patch. Was it applied? Or is someone working on a better way to fix this
problem?
--
Ondrej Zary
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-11-05 20:35 ` Ondrej Zary
@ 2012-12-10 21:26 ` H. Peter Anvin
2012-12-10 22:51 ` Ondrej Zary
2012-12-11 18:59 ` Ondrej Zary
0 siblings, 2 replies; 10+ messages in thread
From: H. Peter Anvin @ 2012-12-10 21:26 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
On 11/05/2012 12:35 PM, Ondrej Zary wrote:
> On Friday 26 October 2012 10:56:44 Ondrej Zary wrote:
>> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable
>> A20 line but resume code assumes that KBC was used.
>> The laptop will not resume from S3 otherwise but powers off after a while
>> and then powers on again stuck with a blank screen.
>>
>> Fix it by enabling A20 using KBC. Affected laptop list and DMI data are
>> from bug reports at Ubuntu Launchpad.
>>
>> Also add kernel parameter to easily activate this quirk on any system.
>>
>> Only compile tested. The original patch was tested with EX600 and PR200.
>>
>> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
>
> The bug was marked as RESOLVED CODE_FIX but I wonder what happened to this
> patch. Was it applied? Or is someone working on a better way to fix this
> problem?
>
Sorry, I managed to forget about this.
Is there any way you could test this patch by any chance?
I would be a lot happier if this works as a general solution rather than
relying on a quirk...
-hpa
[-- Attachment #2: 0001-x86-suspend-Run-A20-test-on-resume.patch --]
[-- Type: text/x-patch, Size: 2155 bytes --]
>From 5513340abd845eaa28fe2394f7e0296599f2d9e7 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@linux.intel.com>
Date: Mon, 10 Dec 2012 13:17:48 -0800
Subject: [PATCH] x86, suspend: Run A20 test on resume
If A20 is disabled on resume, we may have to explicitly enable it.
Rather than creating a bunch of ad hoc code, use the same code we
would on system startup.
Note: the startup code implicitly assumes BIOS, specifically that int
$0x15 is enabled. However, for non-BIOS platforms to have A20 closed
on resume seems extremely unlikely, since pretty much all non-BIOS
firmware run in 32- or 64-bit mode.
Reported-by: Ondrej Zary <linux@rainbow-software.org>
Link: http://lkml.kernel.org/r/201210240847.52417.linux@rainbow-software.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/realmode/rm/Makefile | 2 +-
arch/x86/realmode/rm/a20.c | 1 +
arch/x86/realmode/rm/wakemain.c | 3 +++
3 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 arch/x86/realmode/rm/a20.c
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
index 8869287..7e2ff68 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
@@ -10,7 +10,7 @@
always := realmode.bin realmode.relocs
wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
-wakeup-objs += copy.o bioscall.o regs.o
+wakeup-objs += copy.o bioscall.o regs.o a20.o
# The link order of the video-*.o modules can matter. In particular,
# video-vga.o *must* be listed first, followed by video-vesa.o.
# Hardware-specific drivers should follow in the order they should be
diff --git a/arch/x86/realmode/rm/a20.c b/arch/x86/realmode/rm/a20.c
new file mode 100644
index 0000000..e71d518
--- /dev/null
+++ b/arch/x86/realmode/rm/a20.c
@@ -0,0 +1 @@
+#include "../../boot/a20.c"
diff --git a/arch/x86/realmode/rm/wakemain.c b/arch/x86/realmode/rm/wakemain.c
index 91405d5..6e0d548 100644
--- a/arch/x86/realmode/rm/wakemain.c
+++ b/arch/x86/realmode/rm/wakemain.c
@@ -79,4 +79,7 @@ void main(void)
probe_cards(0);
set_mode(wakeup_header.video_mode);
}
+
+ /* If A20 is closed, fix now */
+ enable_a20();
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-10 21:26 ` H. Peter Anvin
@ 2012-12-10 22:51 ` Ondrej Zary
2012-12-11 18:59 ` Ondrej Zary
1 sibling, 0 replies; 10+ messages in thread
From: Ondrej Zary @ 2012-12-10 22:51 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On Monday 10 December 2012 22:26:18 H. Peter Anvin wrote:
> On 11/05/2012 12:35 PM, Ondrej Zary wrote:
> > On Friday 26 October 2012 10:56:44 Ondrej Zary wrote:
> >> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable
> >> A20 line but resume code assumes that KBC was used.
> >> The laptop will not resume from S3 otherwise but powers off after a
> >> while and then powers on again stuck with a blank screen.
> >>
> >> Fix it by enabling A20 using KBC. Affected laptop list and DMI data are
> >> from bug reports at Ubuntu Launchpad.
> >>
> >> Also add kernel parameter to easily activate this quirk on any system.
> >>
> >> Only compile tested. The original patch was tested with EX600 and PR200.
> >>
> >> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
> >
> > The bug was marked as RESOLVED CODE_FIX but I wonder what happened to
> > this patch. Was it applied? Or is someone working on a better way to fix
> > this problem?
>
> Sorry, I managed to forget about this.
>
> Is there any way you could test this patch by any chance?
>
> I would be a lot happier if this works as a general solution rather than
> relying on a quirk...
I have a PR200 laptop for a while now so I'll try to test this patch.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-10 21:26 ` H. Peter Anvin
2012-12-10 22:51 ` Ondrej Zary
@ 2012-12-11 18:59 ` Ondrej Zary
2012-12-11 19:07 ` H. Peter Anvin
1 sibling, 1 reply; 10+ messages in thread
From: Ondrej Zary @ 2012-12-11 18:59 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On Monday 10 December 2012 22:26:18 H. Peter Anvin wrote:
> On 11/05/2012 12:35 PM, Ondrej Zary wrote:
> > On Friday 26 October 2012 10:56:44 Ondrej Zary wrote:
> >> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable
> >> A20 line but resume code assumes that KBC was used.
> >> The laptop will not resume from S3 otherwise but powers off after a
> >> while and then powers on again stuck with a blank screen.
> >>
> >> Fix it by enabling A20 using KBC. Affected laptop list and DMI data are
> >> from bug reports at Ubuntu Launchpad.
> >>
> >> Also add kernel parameter to easily activate this quirk on any system.
> >>
> >> Only compile tested. The original patch was tested with EX600 and PR200.
> >>
> >> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
> >
> > The bug was marked as RESOLVED CODE_FIX but I wonder what happened to
> > this patch. Was it applied? Or is someone working on a better way to fix
> > this problem?
>
> Sorry, I managed to forget about this.
>
> Is there any way you could test this patch by any chance?
I've just tested the patch and it does not work (no change in behavior).
> I would be a lot happier if this works as a general solution rather than
> relying on a quirk...
As I said before, the BIOS probably breaks on resume before any Linux code is
executed. So any fix must be done before suspending.
I hate quirks too. A general solution would be to always enable A20 using KBC
(if KBC is present) but that's probably not acceptable.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-11 18:59 ` Ondrej Zary
@ 2012-12-11 19:07 ` H. Peter Anvin
2012-12-11 20:29 ` Ondrej Zary
0 siblings, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2012-12-11 19:07 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On 12/11/2012 10:59 AM, Ondrej Zary wrote:
>
> As I said before, the BIOS probably breaks on resume before any Linux code is
> executed. So any fix must be done before suspending.
>
Well, that code should be independent of A20, being in low memory, but
if the BIOS itself crashes, then that's... yeah.
> I hate quirks too. A general solution would be to always enable A20 using KBC
> (if KBC is present) but that's probably not acceptable.
I don't see why not. If so we could just do it as part of the
initialization of the i8042 driver.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-11 19:07 ` H. Peter Anvin
@ 2012-12-11 20:29 ` Ondrej Zary
2012-12-11 20:36 ` H. Peter Anvin
0 siblings, 1 reply; 10+ messages in thread
From: Ondrej Zary @ 2012-12-11 20:29 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On Tuesday 11 December 2012 20:07:50 H. Peter Anvin wrote:
> On 12/11/2012 10:59 AM, Ondrej Zary wrote:
> > As I said before, the BIOS probably breaks on resume before any Linux
> > code is executed. So any fix must be done before suspending.
>
> Well, that code should be independent of A20, being in low memory, but
> if the BIOS itself crashes, then that's... yeah.
>
> > I hate quirks too. A general solution would be to always enable A20 using
> > KBC (if KBC is present) but that's probably not acceptable.
>
> I don't see why not. If so we could just do it as part of the
> initialization of the i8042 driver.
Something like this? (It works.)
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index d6cc77a..0807ac7 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -921,6 +921,7 @@ static int __init i8042_platform_init(void)
int retval;
#ifdef CONFIG_X86
+ u8 a20_on = 0xdf;
/* Just return if pre-detection shows no i8042 controller exist */
if (!x86_platform.i8042_detect())
return -ENODEV;
@@ -960,6 +961,13 @@ static int __init i8042_platform_init(void)
if (dmi_check_system(i8042_dmi_dritek_table))
i8042_dritek = true;
+
+ /*
+ * A20 was already enabled during early kernel init. But some buggy
+ * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
+ * resume from S3. So we do it here and hope that nothing breaks.
+ */
+ i8042_command(&a20_on, 0x10d1);
#endif /* CONFIG_X86 */
return retval;
--
Ondrej Zary
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-11 20:29 ` Ondrej Zary
@ 2012-12-11 20:36 ` H. Peter Anvin
2012-12-11 20:50 ` Ondrej Zary
0 siblings, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2012-12-11 20:36 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On 12/11/2012 12:29 PM, Ondrej Zary wrote:
>
> Something like this? (It works.)
>
Something like that. We need to make sure we send the proper sequence,
though, or it might break some SMM firmware...
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index d6cc77a..0807ac7 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -921,6 +921,7 @@ static int __init i8042_platform_init(void)
> int retval;
>
> #ifdef CONFIG_X86
> + u8 a20_on = 0xdf;
> /* Just return if pre-detection shows no i8042 controller exist */
> if (!x86_platform.i8042_detect())
> return -ENODEV;
> @@ -960,6 +961,13 @@ static int __init i8042_platform_init(void)
>
> if (dmi_check_system(i8042_dmi_dritek_table))
> i8042_dritek = true;
> +
> + /*
> + * A20 was already enabled during early kernel init. But some buggy
> + * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
> + * resume from S3. So we do it here and hope that nothing breaks.
> + */
> + i8042_command(&a20_on, 0x10d1);
> #endif /* CONFIG_X86 */
>
> return retval;
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-11 20:36 ` H. Peter Anvin
@ 2012-12-11 20:50 ` Ondrej Zary
2012-12-11 20:56 ` H. Peter Anvin
0 siblings, 1 reply; 10+ messages in thread
From: Ondrej Zary @ 2012-12-11 20:50 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On Tuesday 11 December 2012 21:36:46 H. Peter Anvin wrote:
> On 12/11/2012 12:29 PM, Ondrej Zary wrote:
> > Something like this? (It works.)
>
> Something like that. We need to make sure we send the proper sequence,
> though, or it might break some SMM firmware...
Could you please create proper patch? You're the x86 expert (and I'm not).
I've read that 0xd1 command with 0xdf data is often used to enable A20. But I
don't know when this must be done or what else needs to be done for the SMM
to not break.
> > diff --git a/drivers/input/serio/i8042-x86ia64io.h
> > b/drivers/input/serio/i8042-x86ia64io.h index d6cc77a..0807ac7 100644
> > --- a/drivers/input/serio/i8042-x86ia64io.h
> > +++ b/drivers/input/serio/i8042-x86ia64io.h
> > @@ -921,6 +921,7 @@ static int __init i8042_platform_init(void)
> > int retval;
> >
> > #ifdef CONFIG_X86
> > + u8 a20_on = 0xdf;
> > /* Just return if pre-detection shows no i8042 controller exist */
> > if (!x86_platform.i8042_detect())
> > return -ENODEV;
> > @@ -960,6 +961,13 @@ static int __init i8042_platform_init(void)
> >
> > if (dmi_check_system(i8042_dmi_dritek_table))
> > i8042_dritek = true;
> > +
> > + /*
> > + * A20 was already enabled during early kernel init. But some buggy
> > + * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
> > + * resume from S3. So we do it here and hope that nothing breaks.
> > + */
> > + i8042_command(&a20_on, 0x10d1);
> > #endif /* CONFIG_X86 */
> >
> > return retval;
--
Ondrej Zary
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume
2012-12-11 20:50 ` Ondrej Zary
@ 2012-12-11 20:56 ` H. Peter Anvin
0 siblings, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2012-12-11 20:56 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel
On 12/11/2012 12:50 PM, Ondrej Zary wrote:
> On Tuesday 11 December 2012 21:36:46 H. Peter Anvin wrote:
>> On 12/11/2012 12:29 PM, Ondrej Zary wrote:
>>> Something like this? (It works.)
>>
>> Something like that. We need to make sure we send the proper sequence,
>> though, or it might break some SMM firmware...
>
> Could you please create proper patch? You're the x86 expert (and I'm not).
>
> I've read that 0xd1 command with 0xdf data is often used to enable A20. But I
> don't know when this must be done or what else needs to be done for the SMM
> to not break.
>
You need to send an FF dummy command afterwards, that's all.
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-12-11 20:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 8:56 [PATCH v3] Enable A20 using KBC for some MSI laptops to fix S3 resume Ondrej Zary
2012-11-05 20:35 ` Ondrej Zary
2012-12-10 21:26 ` H. Peter Anvin
2012-12-10 22:51 ` Ondrej Zary
2012-12-11 18:59 ` Ondrej Zary
2012-12-11 19:07 ` H. Peter Anvin
2012-12-11 20:29 ` Ondrej Zary
2012-12-11 20:36 ` H. Peter Anvin
2012-12-11 20:50 ` Ondrej Zary
2012-12-11 20:56 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).