]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkNt32Pkg/Dxe/WinNtThunk/Cpu/Cpu.c
1. Perfect libraries MSA files
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Cpu / Cpu.c
index 05a2eebae307e5e8295443bc0223c7ee16f2d1df..c777ec7c33094a5396c23b418c5c59ac0c5851c9 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -114,7 +114,7 @@ WinNtEnableInterrupt (
 Routine Description:\r
 \r
   This routine provides support for emulation of the interrupt enable of the\r
-  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer \r
+  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer\r
   Architectural Protocol observes in order to defer behaviour while in its\r
   emulated interrupt, or timer tick.\r
 \r
@@ -148,7 +148,7 @@ WinNtDisableInterrupt (
 Routine Description:\r
 \r
   This routine provides support for emulation of the interrupt disable of the\r
-  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer \r
+  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer\r
   Architectural Protocol observes in order to defer behaviour while in its\r
   emulated interrupt, or timer tick.\r
 \r
@@ -183,7 +183,7 @@ WinNtGetInterruptState (
 Routine Description:\r
 \r
   This routine provides support for emulation of the interrupt disable of the\r
-  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer \r
+  the system.  For our purposes, CPU enable is just a BOOLEAN that the Timer\r
   Architectural Protocol observes in order to defer behaviour while in its\r
   emulated interrupt, or timer tick.\r
 \r
@@ -223,8 +223,8 @@ WinNtInit (
 \r
 Routine Description:\r
 \r
-  This routine would support generation of a CPU INIT.  At \r
-  present, this code does not provide emulation.  \r
+  This routine would support generation of a CPU INIT.  At\r
+  present, this code does not provide emulation.\r
 \r
 Arguments:\r
 \r
@@ -258,8 +258,8 @@ WinNtRegisterInterruptHandler (
 \r
 Routine Description:\r
 \r
-  This routine would support registration of an interrupt handler.  At \r
-  present, this code does not provide emulation.  \r
+  This routine would support registration of an interrupt handler.  At\r
+  present, this code does not provide emulation.\r
 \r
 Arguments:\r
 \r
@@ -305,8 +305,8 @@ WinNtGetTimerValue (
 \r
 Routine Description:\r
 \r
-  This routine would support querying of an on-CPU timer.  At present, \r
-  this code does not provide timer emulation.  \r
+  This routine would support querying of an on-CPU timer.  At present,\r
+  this code does not provide timer emulation.\r
 \r
 Arguments:\r
 \r
@@ -325,7 +325,7 @@ Returns:
   if (TimerValue == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // No timer supported\r
   //\r
@@ -345,8 +345,8 @@ WinNtSetMemoryAttributes (
 \r
 Routine Description:\r
 \r
-  This routine would support querying of an on-CPU timer.  At present, \r
-  this code does not provide timer emulation.  \r
+  This routine would support querying of an on-CPU timer.  At present,\r
+  this code does not provide timer emulation.\r
 \r
 Arguments:\r
 \r
@@ -405,7 +405,7 @@ Returns:
 \r
   Status\r
 \r
-  EFI_SUCCESS           - protocol instance can be published \r
+  EFI_SUCCESS           - protocol instance can be published\r
   EFI_OUT_OF_RESOURCES  - cannot allocate protocol data structure\r
   EFI_DEVICE_ERROR      - cannot create the thread\r
 \r
@@ -417,12 +417,8 @@ Returns:
   CPU_ARCH_PROTOCOL_PRIVATE *Private;\r
   VOID                      *Registration;\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (CPU_ARCH_PROTOCOL_PRIVATE),\r
-                  &Private\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
+  Private = AllocatePool (sizeof (CPU_ARCH_PROTOCOL_PRIVATE));\r
+  ASSERT (Private != NULL);\r
 \r
   Private->Signature                    = CPU_ARCH_PROT_PRIVATE_SIGNATURE;\r
   Private->Cpu.FlushDataCache           = WinNtFlushCpuDataCache;\r
@@ -479,7 +475,7 @@ Returns:
   DEBUG ((EFI_D_ERROR, "CPU Architectural Protocol Loaded\n"));\r
 \r
 \r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -495,8 +491,8 @@ Routine Description:
 Arguments:\r
   String - Unicode string.\r
 \r
-Returns: \r
-  UINTN of the number represented by String.  \r
+Returns:\r
+  UINTN of the number represented by String.\r
 \r
 --*/\r
 {\r
@@ -656,7 +652,7 @@ Returns:
       Status      = Hii->NewPack (Hii, PackageList, &StringHandle);\r
       ASSERT (!EFI_ERROR (Status));\r
 \r
-      gBS->FreePool (PackageList);\r
+      FreePool (PackageList);\r
 \r
       //\r
       // Store processor version data record to data hub\r
@@ -717,7 +713,7 @@ Returns:
                           TotalSize\r
                           );\r
 \r
-      gBS->FreePool (RecordBuffer.Raw);\r
+      FreePool (RecordBuffer.Raw);\r
     }\r
 \r
     gBS->CloseProtocol (\r