|
@@ -13,6 +13,7 @@
|
|
#include <linux/dmi.h>
|
|
#include <linux/dmi.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/apic.h>
|
|
#include <asm/apic.h>
|
|
|
|
+#include <asm/desc.h>
|
|
#include "mach_reboot.h"
|
|
#include "mach_reboot.h"
|
|
#include <linux/reboot_fixups.h>
|
|
#include <linux/reboot_fixups.h>
|
|
|
|
|
|
@@ -242,13 +243,13 @@ void machine_real_restart(unsigned char *code, int length)
|
|
|
|
|
|
/* Set up the IDT for real mode. */
|
|
/* Set up the IDT for real mode. */
|
|
|
|
|
|
- __asm__ __volatile__ ("lidt %0" : : "m" (real_mode_idt));
|
|
|
|
|
|
+ load_idt(&real_mode_idt);
|
|
|
|
|
|
/* Set up a GDT from which we can load segment descriptors for real
|
|
/* Set up a GDT from which we can load segment descriptors for real
|
|
mode. The GDT is not used in real mode; it is just needed here to
|
|
mode. The GDT is not used in real mode; it is just needed here to
|
|
prepare the descriptors. */
|
|
prepare the descriptors. */
|
|
|
|
|
|
- __asm__ __volatile__ ("lgdt %0" : : "m" (real_mode_gdt));
|
|
|
|
|
|
+ load_gdt(&real_mode_gdt);
|
|
|
|
|
|
/* Load the data segment registers, and thus the descriptors ready for
|
|
/* Load the data segment registers, and thus the descriptors ready for
|
|
real mode. The base address of each segment is 0x100, 16 times the
|
|
real mode. The base address of each segment is 0x100, 16 times the
|
|
@@ -316,7 +317,7 @@ void machine_emergency_restart(void)
|
|
if (!reboot_thru_bios) {
|
|
if (!reboot_thru_bios) {
|
|
if (efi_enabled) {
|
|
if (efi_enabled) {
|
|
efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
|
|
efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
|
|
- __asm__ __volatile__("lidt %0": :"m" (no_idt));
|
|
|
|
|
|
+ load_idt(&no_idt);
|
|
__asm__ __volatile__("int3");
|
|
__asm__ __volatile__("int3");
|
|
}
|
|
}
|
|
/* rebooting needs to touch the page at absolute addr 0 */
|
|
/* rebooting needs to touch the page at absolute addr 0 */
|
|
@@ -325,7 +326,7 @@ void machine_emergency_restart(void)
|
|
mach_reboot_fixups(); /* for board specific fixups */
|
|
mach_reboot_fixups(); /* for board specific fixups */
|
|
mach_reboot();
|
|
mach_reboot();
|
|
/* That didn't work - force a triple fault.. */
|
|
/* That didn't work - force a triple fault.. */
|
|
- __asm__ __volatile__("lidt %0": :"m" (no_idt));
|
|
|
|
|
|
+ load_idt(&no_idt);
|
|
__asm__ __volatile__("int3");
|
|
__asm__ __volatile__("int3");
|
|
}
|
|
}
|
|
}
|
|
}
|