Skip to content
  • Zwane Mwaikambo's avatar
    [PATCH] i386: LVT entries remaining unmasked on reboot · 77f72b19
    Zwane Mwaikambo authored
    Excerpt from bugzilla entry
    
    http://bugzilla.kernel.org/show_bug.cgi?id=5518
    
    
    
    "i386 version of Reboot-through-BIOS is unsafe: it forgets to mask APIC LVT
    interrupts before jumping to a BIOS entry point.  As a result, BIOS ends up
    bombarded with interrupts early on boot.  The BIOS does not expect it since
    following a "normal" hardware cpu reset, all APIC LVT registers have the
    Mask bit (16) set and can't generate interrupts.
    
    For example, the version of Phoenix BIOS used by VMware enables interrupts
    for the first time before masking/clearing APIC LVT.  The APIC Timer LVT
    register is still set up for a timer interrupt delivery with a high vector
    from the previous Linux incarnation (0xef in our case).  The BIOS has not
    fully initialized its IDT at this point and the real mode gate for 0xef
    remains all zeros.  Vector 0xef dispatches BIOS to address 0:0, BIOS takes
    a #GP and eventually hangs.
    
    machine_shutdown() does attempt to shut down APIC before jumping to BIOS,
    but it is ineffective"
    
    Signed-off-by: default avatarZwane Mwaikambo <zwane@arm.linux.org.uk>
    Cc: "Seth, Rohit" <rohit.seth@intel.com>
    Cc: Zachary Amsden <zach@vmware.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    77f72b19