diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-14 14:44:26 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-14 14:44:26 -0400 |
commit | 065cb3dfe24978651caedfa54da585388ad15dde (patch) | |
tree | 692de26e80c86faa4e0bd6831e7180ff6ec5af6c /arch/x86/kernel/acpi/sleep.c | |
parent | 3bf2e77453a87c22eb57ed4926760ac131c84459 (diff) |
x86, suspend, acpi: correct and add comments about Big Real Mode
Explain that we set up the descriptors for Big Real Mode, and why we
do so. In particular, one system that is known to fail without it is
the Lenovo X61.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/acpi/sleep.c')
-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 | ||