diff options
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 130711f1454b..41bb130c31db 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -60,16 +60,25 @@ int acpi_save_state_mem(void) | |||
60 | header->video_mode = saved_video_mode; | 60 | header->video_mode = saved_video_mode; |
61 | 61 | ||
62 | header->wakeup_jmp_seg = acpi_wakeup_address >> 4; | 62 | header->wakeup_jmp_seg = acpi_wakeup_address >> 4; |
63 | |||
64 | /* | ||
65 | * Set up the wakeup GDT. We set these up as Big Real Mode, | ||
66 | * that is, with limits set to 4 GB. At least the Lenovo | ||
67 | * Thinkpad X61 is known to need this for the video BIOS | ||
68 | * initialization quirk to work; this is likely to also | ||
69 | * be the case for other laptops or integrated video devices. | ||
70 | */ | ||
71 | |||
63 | /* GDT[0]: GDT self-pointer */ | 72 | /* GDT[0]: GDT self-pointer */ |
64 | header->wakeup_gdt[0] = | 73 | header->wakeup_gdt[0] = |
65 | (u64)(sizeof(header->wakeup_gdt) - 1) + | 74 | (u64)(sizeof(header->wakeup_gdt) - 1) + |
66 | ((u64)(acpi_wakeup_address + | 75 | ((u64)(acpi_wakeup_address + |
67 | ((char *)&header->wakeup_gdt - (char *)acpi_realmode)) | 76 | ((char *)&header->wakeup_gdt - (char *)acpi_realmode)) |
68 | << 16); | 77 | << 16); |
69 | /* GDT[1]: real-mode-like code segment */ | 78 | /* GDT[1]: big real mode-like code segment */ |
70 | header->wakeup_gdt[1] = | 79 | header->wakeup_gdt[1] = |
71 | GDT_ENTRY(0x809b, acpi_wakeup_address, 0xfffff); | 80 | GDT_ENTRY(0x809b, acpi_wakeup_address, 0xfffff); |
72 | /* GDT[2]: real-mode-like data segment */ | 81 | /* GDT[2]: big real mode-like data segment */ |
73 | header->wakeup_gdt[2] = | 82 | header->wakeup_gdt[2] = |
74 | GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff); | 83 | GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff); |
75 | 84 | ||