]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/CpuRuntimeDxe/Cpu.c
According to PI errata 0000654 and 000811, we need use 0xFFFE to instead of 0 for...
[mirror_edk2.git] / UnixPkg / CpuRuntimeDxe / Cpu.c
index 7778c43b23c2763a395e3e144321b0cb9a9cb5e7..54c784ea6677c2c60bd6d19a8720f14a5c1bce19 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -26,8 +26,9 @@ Abstract:
 #include <Protocol/Cpu.h>\r
 #include <Protocol/Smbios.h>\r
 #include <Guid/DataHubRecords.h>\r
-#include <Protocol/CpuIo.h>\r
+#include <Protocol/CpuIo2.h>\r
 #include <Protocol/FrameworkHii.h>\r
+#include <Protocol/UnixThunk.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -37,6 +38,8 @@ Abstract:
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UnixLib.h>\r
+\r
 #include "CpuDriver.h"\r
 #include "UnixDxe.h"\r
 #include <Protocol/UnixIo.h>\r
@@ -151,6 +154,7 @@ Returns:
 \r
   Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
   Private->InterruptState = TRUE;\r
+  gUnix->EnableInterrupt ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -184,6 +188,7 @@ Returns:
 \r
   Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
   Private->InterruptState = FALSE;\r
+  gUnix->DisableInterrupt ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -412,7 +417,7 @@ LogSmbiosData (
   EFI_STATUS         Status;\r
   EFI_SMBIOS_HANDLE  SmbiosHandle;\r
   \r
-  SmbiosHandle = 0;\r
+  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
   Status = Smbios->Add (\r
                      Smbios,\r
                      NULL,\r
@@ -540,7 +545,7 @@ Returns:
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &mCpuTemplate.Handle,\r
                   &gEfiCpuArchProtocolGuid,   &mCpuTemplate.Cpu,\r
-                  &gEfiCpuIoProtocolGuid,     &mCpuTemplate.CpuIo,\r
+                  &gEfiCpuIo2ProtocolGuid,    &mCpuTemplate.CpuIo,\r
                   NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r