/* Initialize the state of the SoftwareEnable bit in the Local APIC Spurious Interrupt Vector register. */
VOID EFIAPI InitializeLocalApicSoftwareEnable(IN BOOLEAN Enable)
/* Initialize the state of the SoftwareEnable bit in the Local APIC Spurious Interrupt Vector register. */
VOID EFIAPI InitializeLocalApicSoftwareEnable(IN BOOLEAN Enable)
{
  LOCAL_APIC_SVR  Svr;
  Svr.Uint32 = ReadLocalApicReg (XAPIC_SPURIOUS_VECTOR_OFFSET);
  if (Enable) {
    if (Svr.Bits.SoftwareEnable == 0) {
      Svr.Bits.SoftwareEnable = 1;
      WriteLocalApicReg (XAPIC_SPURIOUS_VECTOR_OFFSET, Svr.Uint32);
    }
  } else {
    if (Svr.Bits.SoftwareEnable == 1) {
      Svr.Bits.SoftwareEnable = 0;
      WriteLocalApicReg (XAPIC_SPURIOUS_VECTOR_OFFSET, Svr.Uint32);
    }
  }
}