]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/CpuRuntimeDxe/MpService.c
Add EFI_FILE_PROTOCOL_LATEST_REVISION macro to SimpleFileSystem.h.
[mirror_edk2.git] / EmulatorPkg / CpuRuntimeDxe / MpService.c
index ba0ad82504c92f8a5c844f9d605f12bba96e1806..bffc82b0479fed4fbe2233111e194997645711f1 100644 (file)
@@ -28,7 +28,7 @@
   APs to help test system memory in parallel with other device initialization.\r
   Diagnostics applications may also use this protocol for multi-processor.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 Portitions Copyright (c) 2011, Apple Inc. All rights reserved.\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
@@ -1158,7 +1158,7 @@ FillInProcessorInformation (
     gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= PROCESSOR_AS_BSP_BIT;\r
   }\r
 \r
-  gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Package = ProcessorNumber;\r
+  gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Package = (UINT32) ProcessorNumber;\r
   gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Core    = 0;\r
   gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Thread  = 0;\r
   gMPSystem.ProcessorData[ProcessorNumber].State = BSP ? CPU_STATE_BUSY : CPU_STATE_IDLE;\r
@@ -1308,35 +1308,33 @@ CpuReadToBootFunction (
 \r
 EFI_STATUS\r
 CpuMpServicesInit (\r
-  VOID\r
+  OUT UINTN *MaxCpus\r
   )\r
 {\r
   EFI_STATUS              Status;\r
   EFI_HANDLE              Handle;\r
   EMU_IO_THUNK_PROTOCOL   *IoThunk;\r
-  UINTN                   MaxCpus;\r
-\r
-  MaxCpus = 1; // BSP\r
 \r
+  *MaxCpus = 1; // BSP\r
   IoThunk = GetIoThunkInstance (&gEmuThreadThunkProtocolGuid, 0);\r
   if (IoThunk != NULL) {\r
     Status = IoThunk->Open (IoThunk);\r
     if (!EFI_ERROR (Status)) {\r
       if (IoThunk->ConfigString != NULL) {\r
-        MaxCpus += StrDecimalToUintn (IoThunk->ConfigString);\r
+        *MaxCpus += StrDecimalToUintn (IoThunk->ConfigString);\r
         gThread = IoThunk->Interface;\r
       }\r
     }\r
   }\r
 \r
-  if (MaxCpus == 1) {\r
+  if (*MaxCpus == 1) {\r
     // We are not MP so nothing to do\r
     return EFI_SUCCESS;\r
   }\r
 \r
-  gPollInterval = PcdGet64 (PcdEmuMpServicesPollingInterval);\r
+  gPollInterval = (UINTN) PcdGet64 (PcdEmuMpServicesPollingInterval);\r
 \r
-  Status  = InitializeMpSystemData (MaxCpus);\r
+  Status  = InitializeMpSystemData (*MaxCpus);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r