lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRE: [patch] Fix GDT re-load on ACPI resume
    Date
    From
    >The ACPI resume code currently uses a real-mode 16-bit lgdt instruction
    to
    >reload the GDT. This only restores the lower 24 bits of the GDT base
    >address. In recent kernels, the GDT seems to have moved out of the
    lower
    >16 megs, thereby causing the ACPI resume to fail -- an invalid GDT was
    >being loaded.
    >
    >This simple patch adds the 0x66 prefix to lgdt, which forces it to load
    >all 32 bits of the GDT base address, thereby removing any restrictions
    on
    >where the GDT can be placed in memory. This makes ACPI resume work for
    me
    >on a Thinkpad T40 laptop.
    >
    >-- kolya
    >
    >--- linux-2.6.9/arch/i386/kernel/acpi/wakeup.S 2004/11/15 09:00:34
    1.1
    >+++ linux-2.6.9/arch/i386/kernel/acpi/wakeup.S 2004/11/15 20:33:27
    >@@ -67,6 +67,8 @@
    > movw $0x0e00 + 'i', %fs:(0x12)
    >
    > # need a gdt
    >+ .byte 0x66 # force 32-bit operands in case
    >+ # the GDT is past 16 megabytes
    > lgdt real_save_gdt - wakeup_code
    >
    > movl real_save_cr0 - wakeup_code, %eax
    There is a patch from hiroit@mcn.ne.jp to fix the GDT issue. You can try
    it.
    Please cc 'acpi-devel@lists.sourceforge.net' for suspend/resume issue.

    Thanks,
    Shaohua
    [unhandled content-type:application/octet-stream]
    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.040 / U:0.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site