removed gEfiWinNtCPUSpeedGuid, gEfiWinNtCPUModelGuid, and gEfiWinNtMemoryGuid. Replac...
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Jul 2007 21:33:37 +0000 (21:33 +0000)
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Jul 2007 21:33:37 +0000 (21:33 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3458 6f19259b-4bc3-4df7-8a09-765794883524

24 files changed:
Nt32Pkg/CpuRuntimeDxe/Cpu.c
Nt32Pkg/CpuRuntimeDxe/CpuDriver.h
Nt32Pkg/CpuRuntimeDxe/CpuIo.c [deleted file]
Nt32Pkg/CpuRuntimeDxe/CpuRuntimeDxe.inf
Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscOemString.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni [deleted file]
Nt32Pkg/Nt32Pkg.dec
Nt32Pkg/Nt32Pkg.dsc
Nt32Pkg/PlatformBdsDxe/PlatformData.c
Nt32Pkg/WinNtBlockIoDxe/WinNtBlockIo.c
Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c
Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf
Nt32Pkg/WinNtGopDxe/WinNtGop.h
Nt32Pkg/WinNtGopDxe/WinNtGopDriver.c

index a331752..f0e22a4 100644 (file)
@@ -25,21 +25,35 @@ Abstract:
 \r
 #include "CpuDriver.h"\r
 \r
+\r
+CPU_ARCH_PROTOCOL_PRIVATE mCpuTemplate = {\r
+  CPU_ARCH_PROT_PRIVATE_SIGNATURE,\r
+  NULL,\r
+  {\r
+    WinNtFlushCpuDataCache,\r
+    WinNtEnableInterrupt,\r
+    WinNtDisableInterrupt,\r
+    WinNtGetInterruptState,\r
+    WinNtInit,\r
+    WinNtRegisterInterruptHandler,\r
+    WinNtGetTimerValue,\r
+    WinNtSetMemoryAttributes,\r
+    0,\r
+    4\r
+  },\r
+  {\r
+    CpuMemoryServiceRead,\r
+    CpuMemoryServiceWrite,\r
+    CpuIoServiceRead,\r
+    CpuIoServiceWrite\r
+  },\r
+  0,\r
+  TRUE\r
+};\r
+\r
 #define EFI_CPU_DATA_MAXIMUM_LENGTH 0x100\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-InitializeCpu (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  );\r
 \r
-VOID\r
-EFIAPI\r
-WinNtIoProtocolNotifyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
-  );\r
 \r
 typedef union {\r
   EFI_CPU_DATA_RECORD *DataRecord;\r
@@ -57,7 +71,6 @@ EFI_SUBCLASS_TYPE1_HEADER mCpuDataRecordHeader = {
 //\r
 // Service routines for the driver\r
 //\r
-STATIC\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtFlushCpuDataCache (\r
@@ -104,7 +117,7 @@ Returns:
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtEnableInterrupt (\r
@@ -138,7 +151,7 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtDisableInterrupt (\r
@@ -172,7 +185,7 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtGetInterruptState (\r
@@ -213,7 +226,7 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtInit (\r
@@ -247,7 +260,7 @@ Returns:
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtRegisterInterruptHandler (\r
@@ -293,7 +306,7 @@ Returns:
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtGetTimerValue (\r
@@ -333,7 +346,7 @@ Returns:
   return EFI_UNSUPPORTED;\r
 }\r
 \r
-STATIC\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WinNtSetMemoryAttributes (\r
@@ -385,150 +398,9 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-InitializeCpu (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the state information for the CPU Architectural Protocol\r
-\r
-Arguments:\r
-\r
-  ImageHandle of the loaded driver\r
-  Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  Status\r
-\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
---*/\r
-// TODO:    SystemTable - add argument and description to function comment\r
-{\r
-  EFI_STATUS                Status;\r
-  EFI_EVENT                 Event;\r
-  CPU_ARCH_PROTOCOL_PRIVATE *Private;\r
-  VOID                      *Registration;\r
-\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
-  Private->Cpu.EnableInterrupt          = WinNtEnableInterrupt;\r
-  Private->Cpu.DisableInterrupt         = WinNtDisableInterrupt;\r
-  Private->Cpu.GetInterruptState        = WinNtGetInterruptState;\r
-  Private->Cpu.Init                     = WinNtInit;\r
-  Private->Cpu.RegisterInterruptHandler = WinNtRegisterInterruptHandler;\r
-  Private->Cpu.GetTimerValue            = WinNtGetTimerValue;\r
-  Private->Cpu.SetMemoryAttributes      = WinNtSetMemoryAttributes;\r
-\r
-  Private->Cpu.NumberOfTimers           = 0;\r
-  Private->Cpu.DmaBufferAlignment       = 4;\r
-\r
-  Private->InterruptState               = TRUE;\r
-\r
-  Private->CpuIo.Mem.Read   = CpuMemoryServiceRead;\r
-  Private->CpuIo.Mem.Write  = CpuMemoryServiceWrite;\r
-  Private->CpuIo.Io.Read    = CpuIoServiceRead;\r
-  Private->CpuIo.Io.Write   = CpuIoServiceWrite;\r
-\r
-\r
-  Private->Handle                       = NULL;\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &Private->Handle,\r
-                  &gEfiCpuArchProtocolGuid,   &Private->Cpu,\r
-                  &gEfiCpuIoProtocolGuid,     &Private->CpuIo,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  //\r
-  // Install notify function to store processor data to HII database and data hub.\r
-  //\r
-  Status = gBS->CreateEvent (\r
-                  EVT_NOTIFY_SIGNAL,\r
-                  TPL_CALLBACK,\r
-                  WinNtIoProtocolNotifyFunction,\r
-                  ImageHandle,\r
-                  &Event\r
-                  );\r
-  ASSERT (!EFI_ERROR (Status));\r
-\r
-  Status = gBS->RegisterProtocolNotify (\r
-                  &gEfiWinNtIoProtocolGuid,\r
-                  Event,\r
-                  &Registration\r
-                  );\r
-  ASSERT (!EFI_ERROR (Status));\r
-\r
-  //\r
-  // Should be at EFI_D_INFO, but lets us now things are running\r
-  //\r
-  DEBUG ((EFI_D_ERROR, "CPU Architectural Protocol Loaded\n"));\r
-\r
-\r
-\r
-  return Status;\r
-}\r
-\r
-UINTN\r
-Atoi (\r
-  CHAR16  *String\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Convert a unicode string to a UINTN\r
-\r
-Arguments:\r
-  String - Unicode string.\r
-\r
-Returns:\r
-  UINTN of the number represented by String.\r
-\r
---*/\r
-{\r
-  UINTN   Number;\r
-  CHAR16  *Str;\r
-\r
-  //\r
-  // skip preceeding white space\r
-  //\r
-  Str = String;\r
-  while ((*Str) && (*Str == ' ' || *Str == '"')) {\r
-    Str++;\r
-  }\r
-  //\r
-  // Convert ot a Number\r
-  //\r
-  Number = 0;\r
-  while (*Str != '\0') {\r
-    if ((*Str >= '0') && (*Str <= '9')) {\r
-      Number = (Number * 10) +*Str - '0';\r
-    } else {\r
-      break;\r
-    }\r
-\r
-    Str++;\r
-  }\r
-\r
-  return Number;\r
-}\r
-\r
 VOID\r
-EFIAPI\r
-WinNtIoProtocolNotifyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
+CpuUpdateDataHub (\r
+  VOID\r
   )\r
 /*++\r
 \r
@@ -546,54 +418,31 @@ Returns:
 {\r
   EFI_STATUS                  Status;\r
   EFI_CPU_DATA_RECORD_BUFFER  RecordBuffer;\r
-  EFI_DATA_RECORD_HEADER      *Record;\r
-  EFI_SUBCLASS_TYPE1_HEADER   *DataHeader;\r
   UINT32                      HeaderSize;\r
   UINT32                      TotalSize;\r
-  UINTN                       HandleCount;\r
-  UINTN                       HandleIndex;\r
-  UINT64                      MonotonicCount;\r
-  BOOLEAN                     RecordFound;\r
-  EFI_HANDLE                  *HandleBuffer;\r
-  EFI_WIN_NT_IO_PROTOCOL      *WinNtIo;\r
   EFI_DATA_HUB_PROTOCOL       *DataHub;\r
   EFI_HII_PROTOCOL            *Hii;\r
   EFI_HII_HANDLE              StringHandle;\r
   EFI_HII_PACKAGES            *PackageList;\r
   STRING_REF                  Token;\r
 \r
-  DataHub         = NULL;\r
-  Token           = 0;\r
-  MonotonicCount  = 0;\r
-  RecordFound     = FALSE;\r
 \r
   //\r
-  // Retrieve the list of all handles from the handle database\r
-  //\r
-  Status = gBS->LocateHandleBuffer (\r
-                  AllHandles,\r
-                  &gEfiWinNtIoProtocolGuid,\r
-                  NULL,\r
-                  &HandleCount,\r
-                  &HandleBuffer\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-  //\r
-  // Locate HII protocol\r
+  // Locate DataHub protocol.\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);\r
+  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
   if (EFI_ERROR (Status)) {\r
-    return ;\r
+    return;\r
   }\r
+\r
   //\r
   // Locate DataHub protocol.\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
+  Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);\r
   if (EFI_ERROR (Status)) {\r
-    return ;\r
+    return;\r
   }\r
+\r
   //\r
   // Initialize data record header\r
   //\r
@@ -605,123 +454,98 @@ Returns:
     return ;\r
   }\r
 \r
+  //\r
+  // Initialize strings to HII database\r
+  //\r
+  PackageList = PreparePackages (1, &gEfiProcessorProducerGuid, CpuStrings);\r
+  Status      = Hii->NewPack (Hii, PackageList, &StringHandle);\r
+  ASSERT (!EFI_ERROR (Status));\r
+  FreePool (PackageList);\r
+\r
   CopyMem (RecordBuffer.Raw, &mCpuDataRecordHeader, HeaderSize);\r
 \r
   //\r
-  // Search the Handle array to find the CPU model and speed information\r
+  // Store processor version data record to data hub\r
   //\r
-  for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {\r
-    Status = gBS->OpenProtocol (\r
-                    HandleBuffer[HandleIndex],\r
-                    &gEfiWinNtIoProtocolGuid,\r
-                    &WinNtIo,\r
-                    Context,\r
-                    NULL,\r
-                    EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      continue;\r
-    }\r
-\r
-    if ((WinNtIo->WinNtThunk->Signature == EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE) &&\r
-        CompareGuid (WinNtIo->TypeGuid, &gEfiWinNtCPUModelGuid)\r
-          ) {\r
-      //\r
-      // Check if this record has been stored in data hub\r
-      //\r
-      do {\r
-        Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);\r
-        if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {\r
-          DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
-          if (CompareGuid (&Record->DataRecordGuid, &gEfiProcessorSubClassGuid) &&\r
-              (DataHeader->RecordType == ProcessorVersionRecordType)\r
-              ) {\r
-            RecordFound = TRUE;\r
-          }\r
-        }\r
-      } while (MonotonicCount != 0);\r
-\r
-      if (RecordFound) {\r
-        RecordFound = FALSE;\r
-        continue;\r
-      }\r
-      //\r
-      // Initialize strings to HII database\r
-      //\r
-      PackageList = PreparePackages (1, &gEfiProcessorProducerGuid, CpuStrings);\r
-\r
-      Status      = Hii->NewPack (Hii, PackageList, &StringHandle);\r
-      ASSERT (!EFI_ERROR (Status));\r
-\r
-      FreePool (PackageList);\r
-\r
-      //\r
-      // Store processor version data record to data hub\r
-      //\r
-      Status = Hii->NewString (Hii, NULL, StringHandle, &Token, WinNtIo->EnvString);\r
-      ASSERT (!EFI_ERROR (Status));\r
-\r
-      RecordBuffer.DataRecord->DataRecordHeader.RecordType      = ProcessorVersionRecordType;\r
-      RecordBuffer.DataRecord->VariableRecord.ProcessorVersion  = Token;\r
-      TotalSize = HeaderSize + sizeof (EFI_PROCESSOR_VERSION_DATA);\r
-\r
-      Status = DataHub->LogData (\r
-                          DataHub,\r
-                          &gEfiProcessorSubClassGuid,\r
-                          &gEfiProcessorProducerGuid,\r
-                          EFI_DATA_RECORD_CLASS_DATA,\r
-                          RecordBuffer.Raw,\r
-                          TotalSize\r
-                          );\r
-    }\r
-\r
-    if ((WinNtIo->WinNtThunk->Signature == EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE) &&\r
-        CompareGuid (WinNtIo->TypeGuid, &gEfiWinNtCPUSpeedGuid)\r
-          ) {\r
-      //\r
-      // Check if this record has been stored in data hub\r
-      //\r
-      do {\r
-        Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);\r
-        if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {\r
-          DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
-          if (CompareGuid (&Record->DataRecordGuid, &gEfiProcessorSubClassGuid) &&\r
-              (DataHeader->RecordType == ProcessorCoreFrequencyRecordType)\r
-              ) {\r
-            RecordFound = TRUE;\r
-          }\r
-        }\r
-      } while (MonotonicCount != 0);\r
-\r
-      if (RecordFound) {\r
-        RecordFound = FALSE;\r
-        continue;\r
-      }\r
-      //\r
-      // Store CPU frequency data record to data hub\r
-      //\r
-      RecordBuffer.DataRecord->DataRecordHeader.RecordType                    = ProcessorCoreFrequencyRecordType;\r
-      RecordBuffer.DataRecord->VariableRecord.ProcessorCoreFrequency.Value    = (UINT16) Atoi (WinNtIo->EnvString);\r
-      RecordBuffer.DataRecord->VariableRecord.ProcessorCoreFrequency.Exponent = 6;\r
-      TotalSize = HeaderSize + sizeof (EFI_PROCESSOR_CORE_FREQUENCY_DATA);\r
-\r
-      Status = DataHub->LogData (\r
-                          DataHub,\r
-                          &gEfiProcessorSubClassGuid,\r
-                          &gEfiProcessorProducerGuid,\r
-                          EFI_DATA_RECORD_CLASS_DATA,\r
-                          RecordBuffer.Raw,\r
-                          TotalSize\r
-                          );\r
-\r
-      FreePool (RecordBuffer.Raw);\r
-    }\r
-\r
-    gBS->CloseProtocol (\r
-          HandleBuffer[HandleIndex],\r
-          &gEfiWinNtIoProtocolGuid,\r
-          Context,\r
-          NULL\r
-          );\r
-  }\r
+  Token = 0;\r
+  Status = Hii->NewString (Hii, NULL, StringHandle, &Token, (CHAR16 *)PcdGetPtr (PcdWinNtCpuModel));\r
+  ASSERT (!EFI_ERROR (Status));\r
+\r
+  RecordBuffer.DataRecord->DataRecordHeader.RecordType      = ProcessorVersionRecordType;\r
+  RecordBuffer.DataRecord->VariableRecord.ProcessorVersion  = Token;\r
+  TotalSize = HeaderSize + sizeof (EFI_PROCESSOR_VERSION_DATA);\r
+\r
+  Status = DataHub->LogData (\r
+                      DataHub,\r
+                      &gEfiProcessorSubClassGuid,\r
+                      &gEfiProcessorProducerGuid,\r
+                      EFI_DATA_RECORD_CLASS_DATA,\r
+                      RecordBuffer.Raw,\r
+                      TotalSize\r
+                      );\r
+\r
+  //\r
+  // Store CPU frequency data record to data hub\r
+  //\r
+  RecordBuffer.DataRecord->DataRecordHeader.RecordType                    = ProcessorCoreFrequencyRecordType;\r
+  RecordBuffer.DataRecord->VariableRecord.ProcessorCoreFrequency.Value    = (UINT16) StrDecimalToUintn (PcdGetPtr (PcdWinNtCpuSpeed));\r
+  RecordBuffer.DataRecord->VariableRecord.ProcessorCoreFrequency.Exponent = 6;\r
+  TotalSize = HeaderSize + sizeof (EFI_PROCESSOR_CORE_FREQUENCY_DATA);\r
+\r
+  Status = DataHub->LogData (\r
+                      DataHub,\r
+                      &gEfiProcessorSubClassGuid,\r
+                      &gEfiProcessorProducerGuid,\r
+                      EFI_DATA_RECORD_CLASS_DATA,\r
+                      RecordBuffer.Raw,\r
+                      TotalSize\r
+                      );\r
+\r
+  FreePool (RecordBuffer.Raw);\r
+}\r
+\r
+\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpu (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Initialize the state information for the CPU Architectural Protocol\r
+\r
+Arguments:\r
+\r
+  ImageHandle of the loaded driver\r
+  Pointer to the System Table\r
+\r
+Returns:\r
+\r
+  Status\r
+\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
+--*/\r
+{\r
+  EFI_STATUS                Status;\r
+\r
+  CpuUpdateDataHub ();\r
+\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &mCpuTemplate.Handle,\r
+                  &gEfiCpuArchProtocolGuid,   &mCpuTemplate.Cpu,\r
+                  &gEfiCpuIoProtocolGuid,     &mCpuTemplate.CpuIo,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return Status;\r
 }\r
+\r
+\r
index 15316fb..d05ba61 100644 (file)
@@ -30,12 +30,14 @@ Abstract:
 #include <Guid/DataHubRecords.h>\r
 #include <Protocol/CpuIo.h>\r
 #include <Protocol/WinNtIo.h>\r
+#include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/HiiLibFramework.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 \r
 extern UINT8  CpuStrings[];\r
@@ -108,4 +110,77 @@ CpuIoServiceWrite (
   );\r
 \r
 \r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpu (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtFlushCpuDataCache (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This,\r
+  IN EFI_PHYSICAL_ADDRESS   Start,\r
+  IN UINT64                 Length,\r
+  IN EFI_CPU_FLUSH_TYPE     FlushType\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtEnableInterrupt (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtDisableInterrupt (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtGetInterruptState (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This,\r
+  OUT BOOLEAN               *State\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtInit (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This,\r
+  IN EFI_CPU_INIT_TYPE      InitType\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtRegisterInterruptHandler (\r
+  IN EFI_CPU_ARCH_PROTOCOL      *This,\r
+  IN EFI_EXCEPTION_TYPE         InterruptType,\r
+  IN EFI_CPU_INTERRUPT_HANDLER  InterruptHandler\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtGetTimerValue (\r
+  IN  EFI_CPU_ARCH_PROTOCOL *This,\r
+  IN  UINT32                TimerIndex,\r
+  OUT UINT64                *TimerValue,\r
+  OUT UINT64                *TimerPeriod OPTIONAL\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+WinNtSetMemoryAttributes (\r
+  IN EFI_CPU_ARCH_PROTOCOL  *This,\r
+  IN EFI_PHYSICAL_ADDRESS   BaseAddress,\r
+  IN UINT64                 Length,\r
+  IN UINT64                 Attributes\r
+  );\r
+\r
+\r
+\r
+\r
+\r
+\r
 #endif\r
diff --git a/Nt32Pkg/CpuRuntimeDxe/CpuIo.c b/Nt32Pkg/CpuRuntimeDxe/CpuIo.c
deleted file mode 100644 (file)
index 4aaa431..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*++\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
-\r
-Module Name:\r
-\r
-  CpuIo.c\r
-\r
-Abstract:\r
-\r
-  This is the code that publishes the CPU I/O Protocol.\r
-  The intent herein is to have a single I/O service that can load\r
-  as early as possible, extend into runtime, and be layered upon by \r
-  the implementations of architectural protocols and the PCI Root\r
-  Bridge I/O Protocol.\r
-\r
---*/\r
-\r
-#include <CpuDriver.h>\r
-\r
-#define IA32_MAX_IO_ADDRESS   0xFFFF\r
-#define IA32_MAX_MEM_ADDRESS  0xFFFFFFFF\r
-\r
-EFI_CPU_IO_PROTOCOL mCpuIoProtocol;\r
-\r
-EFI_STATUS\r
-CpuIoCheckAddressRange (\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  VOID                              *Buffer,\r
-  IN  UINT64                            Limit\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceRead (\r
-  IN  EFI_CPU_IO_PROTOCOL               *This,\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  OUT VOID                          *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Perform the Memory Access Read service for the CPU I/O Protocol\r
-\r
-Arguments:\r
-\r
-  Pointer to an instance of the CPU I/O Protocol\r
-  Width of the Memory Access\r
-  Address of the Memory access\r
-  Count of the number of accesses to perform\r
-  Pointer to the buffer to read or write from memory\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  EFI_SUCCESS             - The data was read from or written to the EFI \r
-                            System.\r
-  EFI_INVALID_PARAMETER   - Width is invalid for this EFI System.\r
-  EFI_INVALID_PARAMETER   - Buffer is NULL.\r
-  EFI_UNSUPPORTED         - The Buffer is not aligned for the given Width.\r
-  EFI_UNSUPPORTED         - The address range specified by Address, Width, \r
-                            and Count is not valid for this EFI System.\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  if (!Buffer) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Do nothing for Nt32 version\r
-  //\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceWrite (\r
-  IN EFI_CPU_IO_PROTOCOL                *This,\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  OUT VOID                          *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Perform the Memory Access Read service for the CPU I/O Protocol\r
-\r
-Arguments:\r
-\r
-  Pointer to an instance of the CPU I/O Protocol\r
-  Width of the Memory Access\r
-  Address of the Memory access\r
-  Count of the number of accesses to perform\r
-  Pointer to the buffer to read or write from memory\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  EFI_SUCCESS             - The data was read from or written to the EFI System.\r
-  EFI_INVALID_PARAMETER   - Width is invalid for this EFI System.\r
-  EFI_INVALID_PARAMETER   - Buffer is NULL.\r
-  EFI_UNSUPPORTED         - The Buffer is not aligned for the given Width.\r
-  EFI_UNSUPPORTED         - The address range specified by Address, Width, and \r
-                            Count is not valid for this EFI System.\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  if (!Buffer) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Do nothing for Nt32 version\r
-  //\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceRead (\r
-  IN EFI_CPU_IO_PROTOCOL                *This,\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            UserAddress,\r
-  IN  UINTN                             Count,\r
-  IN  OUT VOID                          *UserBuffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  This is the service that implements the I/O read\r
-\r
-Arguments:\r
-\r
-  Pointer to an instance of the CPU I/O Protocol\r
-  Width of the Memory Access\r
-  Address of the I/O access\r
-  Count of the number of accesses to perform\r
-  Pointer to the buffer to read or write from I/O space\r
-\r
-Returns:\r
-\r
-  Status\r
-  EFI_SUCCESS             - The data was read from or written to the EFI System.\r
-  EFI_INVALID_PARAMETER   - Width is invalid for this EFI System.\r
-  EFI_INVALID_PARAMETER   - Buffer is NULL.\r
-  EFI_UNSUPPORTED         - The Buffer is not aligned for the given Width.\r
-  EFI_UNSUPPORTED         - The address range specified by Address, Width, and \r
-                            Count is not valid for this EFI System.\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    UserAddress - add argument and description to function comment\r
-// TODO:    UserBuffer - add argument and description to function comment\r
-{\r
-  UINTN       Address;\r
-  EFI_STATUS  Status;\r
-\r
-  if (!UserBuffer) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Address = (UINTN) UserAddress;\r
-\r
-  if (Width >= EfiCpuIoWidthMaximum) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = CpuIoCheckAddressRange (Width, Address, Count, UserBuffer, IA32_MAX_IO_ADDRESS);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Do nothing for Nt32 version\r
-  //\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceWrite (\r
-  IN EFI_CPU_IO_PROTOCOL                *This,\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            UserAddress,\r
-  IN  UINTN                             Count,\r
-  IN  OUT VOID                          *UserBuffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  \r
-  This is the service that implements the I/O Write\r
-\r
-Arguments:\r
-\r
-  Pointer to an instance of the CPU I/O Protocol\r
-  Width of the Memory Access\r
-  Address of the I/O access\r
-  Count of the number of accesses to perform\r
-  Pointer to the buffer to read or write from I/O space\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  Status\r
-  EFI_SUCCESS             - The data was read from or written to the EFI System.\r
-  EFI_INVALID_PARAMETER   - Width is invalid for this EFI System.\r
-  EFI_INVALID_PARAMETER   - Buffer is NULL.\r
-  EFI_UNSUPPORTED         - The Buffer is not aligned for the given Width.\r
-  EFI_UNSUPPORTED         - The address range specified by Address, Width, and \r
-                            Count is not valid for this EFI System.\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    UserAddress - add argument and description to function comment\r
-// TODO:    UserBuffer - add argument and description to function comment\r
-{\r
-  UINTN       Address;\r
-  EFI_STATUS  Status;\r
-\r
-  if (!UserBuffer) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Address = (UINTN) UserAddress;\r
-\r
-  if (Width >= EfiCpuIoWidthMaximum) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = CpuIoCheckAddressRange (Width, Address, Count, UserBuffer, IA32_MAX_IO_ADDRESS);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Do nothing for Nt32 version\r
-  //\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-CpuIoCheckAddressRange (\r
-  IN  EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  VOID                              *Buffer,\r
-  IN  UINT64                            Limit\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Width   - TODO: add argument description\r
-  Address - TODO: add argument description\r
-  Count   - TODO: add argument description\r
-  Buffer  - TODO: add argument description\r
-  Limit   - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_UNSUPPORTED - TODO: Add description for return value\r
-  EFI_UNSUPPORTED - TODO: Add description for return value\r
-  EFI_UNSUPPORTED - TODO: Add description for return value\r
-  EFI_SUCCESS - TODO: Add description for return value\r
-\r
---*/\r
-{\r
-  UINTN AlignMask;\r
-\r
-  if (Address > Limit) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  //\r
-  // For FiFo type, the target address won't increase during the access, so treat count as 1\r
-  //\r
-  if (Width >= EfiCpuIoWidthFifoUint8 && Width <= EfiCpuIoWidthFifoUint64) {\r
-    Count = 1;\r
-  }\r
-\r
-  Width = Width & 0x03;\r
-  if (Address - 1 + (1 << Width) * Count > Limit) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  AlignMask = (1 << Width) - 1;\r
-  if ((UINTN) Buffer & AlignMask) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
index dedc893..de8f93b 100644 (file)
@@ -50,8 +50,6 @@
   DebugLib\r
 \r
 [Guids]\r
-  gEfiWinNtCPUSpeedGuid                         # SOMETIMES_CONSUMED\r
-  gEfiWinNtCPUModelGuid                         # SOMETIMES_CONSUMED\r
   gEfiProcessorSubClassGuid                     # SOMETIMES_CONSUMED\r
   gEfiProcessorProducerGuid                     # SOMETIMES_CONSUMED\r
 \r
@@ -63,5 +61,9 @@
   gEfiCpuIoProtocolGuid                         # PROTOCOL ALWAYS_PRODUCED\r
   gEfiCpuArchProtocolGuid                       # PROTOCOL ALWAYS_PRODUCED\r
 \r
+[PcdsDynamic.common]\r
+  PcdWinNtCpuSpeed|gEfiNt32PkgTokenSpaceGuid\r
+  PcdWinNtCpuModel|gEfiNt32PkgTokenSpaceGuid\r
+\r
 [Depex]\r
   gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid\r
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni
deleted file mode 100644 (file)
index 14a6893..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni
deleted file mode 100644 (file)
index b1e7e52..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni
deleted file mode 100644 (file)
index 67bee85..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemString.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemString.uni
deleted file mode 100644 (file)
index fb79bdb..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemString.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni
deleted file mode 100644 (file)
index b6a617b..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni and /dev/null differ
index b9d4410..081dff4 100644 (file)
   MiscSubclassDriver.h\r
   MiscDevicePath.h\r
   MiscSubclassDriver.uni\r
-  MiscSystemSlotDesignation.uni\r
-  MiscSystemOptionString.uni\r
-  MiscSystemManufacturer.uni\r
-  MiscSystemLanguageString.uni\r
-  MiscPortInternalConnectorDesignator.uni\r
-  MiscOemString.uni\r
-  MiscChassisManufacturer.uni\r
-  MiscBiosVendor.uni\r
-  MiscBaseBoardManufacturer.uni\r
   CommonHeader.h\r
 \r
 [Packages]\r
   HiiLibFramework\r
   DebugLib\r
   BaseLib\r
+  PcdLib\r
 \r
 \r
 [Guids]\r
-  gEfiWinNtMemoryGuid                           # SOMETIMES_CONSUMED\r
   gEfiProcessorSubClassGuid                     # SOMETIMES_CONSUMED\r
   gEfiMiscSubClassGuid                          # SOMETIMES_CONSUMED\r
   gEfiMemoryProducerGuid                        # SOMETIMES_CONSUMED\r
   gEfiMemorySubClassGuid                        # SOMETIMES_CONSUMED\r
-  gEfiWinNtMemoryGuid                           # SOMETIMES_CONSUMED\r
 \r
 [Protocols]\r
   gEfiWinNtIoProtocolGuid                       # PROTOCOL_NOTIFY SOMETIMES_CONSUMED\r
   gEfiHiiProtocolGuid                           # PROTOCOL ALWAYS_CONSUMED\r
   gEfiDataHubProtocolGuid                       # PROTOCOL ALWAYS_CONSUMED\r
 \r
+[PcdsDynamic.common]\r
+  PcdWinNtMemorySize|gEfiNt32PkgTokenSpaceGuid\r
+\r
 [Depex]\r
-  gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid
\ No newline at end of file
+  gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid\r
+  
\ No newline at end of file
index 1374d7b..e17f835 100644 (file)
@@ -36,6 +36,7 @@ Abstract:
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/DevicePathLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 #include <MiscDevicePath.h>\r
 \r
index 03eb74f..138ed7f 100644 (file)
@@ -25,12 +25,6 @@ Abstract:
 \r
 extern UINT8  MiscSubclassStrings[];\r
 \r
-VOID\r
-EFIAPI\r
-WinNtIoProtocolNotifyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
-  );\r
 \r
 //\r
 //\r
@@ -70,7 +64,7 @@ Returns:
 --*/\r
 {\r
   EFI_MISC_SUBCLASS_DRIVER_DATA MiscSubclass;\r
-  EFI_STATUS                    EfiStatus;\r
+  EFI_STATUS                    Status;\r
 \r
   //\r
   // Do nothing if data parameters are not valid.\r
@@ -103,7 +97,7 @@ Returns:
   //\r
   // Log Data Hub record.\r
   //\r
-  EfiStatus = DataHub->LogData (\r
+  Status = DataHub->LogData (\r
                         DataHub,\r
                         &gEfiMiscSubClassGuid,\r
                         &gEfiMiscSubClassGuid,\r
@@ -112,16 +106,16 @@ Returns:
                         sizeof (EFI_SUBCLASS_TYPE1_HEADER) + RecordLen\r
                         );\r
 \r
-  if (EFI_ERROR (EfiStatus)) {\r
+  if (EFI_ERROR (Status)) {\r
     DEBUG (\r
       (EFI_D_ERROR,\r
       "LogData(%d bytes) == %r\n",\r
       sizeof (EFI_SUBCLASS_TYPE1_HEADER) + RecordLen,\r
-      EfiStatus)\r
+      Status)\r
       );\r
   }\r
 \r
-  return EfiStatus;\r
+  return Status;\r
 }\r
 \r
 \r
@@ -152,16 +146,17 @@ Returns:
 \r
 --*/\r
 {\r
-  EFI_MISC_SUBCLASS_DRIVER_DATA RecordData;\r
-  EFI_DATA_HUB_PROTOCOL         *DataHub;\r
-  EFI_HII_PROTOCOL              *Hii;\r
-  EFI_HII_PACKAGES              *PackageList;\r
-  EFI_HII_HANDLE                HiiHandle;\r
-  EFI_STATUS                    EfiStatus;\r
-  UINTN                         Index;\r
-  BOOLEAN                       LogRecordData;\r
-  EFI_EVENT                     Event;\r
-  VOID                          *Registration;\r
+  EFI_MISC_SUBCLASS_DRIVER_DATA     RecordData;\r
+  EFI_DATA_HUB_PROTOCOL             *DataHub;\r
+  EFI_HII_PROTOCOL                  *Hii;\r
+  EFI_HII_PACKAGES                  *PackageList;\r
+  EFI_HII_HANDLE                    HiiHandle;\r
+  EFI_STATUS                        Status;\r
+  UINTN                             Index;\r
+  BOOLEAN                           LogRecordData;\r
+  EFI_MEMORY_SUBCLASS_DRIVER_DATA   MemorySubClassData; \r
+  UINT64                            TotalMemorySize;\r
+  CHAR16                            *Nt32MemString;\r
 \r
 \r
   //\r
@@ -175,11 +170,11 @@ Returns:
   //\r
   // Locate data hub protocol.\r
   //\r
-  EfiStatus = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
+  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
 \r
-  if (EFI_ERROR (EfiStatus)) {\r
-    DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol.  %r\n", EfiStatus));\r
-    return EfiStatus;\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol.  %r\n", Status));\r
+    return Status;\r
   } else if (DataHub == NULL) {\r
     DEBUG ((EFI_D_ERROR, "LocateProtocol(DataHub) returned NULL pointer!\n"));\r
     return EFI_DEVICE_ERROR;\r
@@ -187,11 +182,11 @@ Returns:
   //\r
   // Locate hii protocol.\r
   //\r
-  EfiStatus = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);\r
+  Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);\r
 \r
-  if (EFI_ERROR (EfiStatus)) {\r
-    DEBUG ((EFI_D_ERROR, "Could not locate Hii protocol.  %r\n", EfiStatus));\r
-    return EfiStatus;\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((EFI_D_ERROR, "Could not locate Hii protocol.  %r\n", Status));\r
+    return Status;\r
   } else if (Hii == NULL) {\r
     DEBUG ((EFI_D_ERROR, "LocateProtocol(Hii) returned NULL pointer!\n"));\r
     return EFI_DEVICE_ERROR;\r
@@ -200,12 +195,12 @@ Returns:
   // Add our default strings to the HII database. They will be modified later.\r
   //\r
   PackageList = PreparePackages (1, &gEfiMiscSubClassGuid, MiscSubclassStrings);\r
-  EfiStatus   = Hii->NewPack (Hii, PackageList, &HiiHandle);\r
+  Status   = Hii->NewPack (Hii, PackageList, &HiiHandle);\r
   FreePool (PackageList);\r
 \r
-  if (EFI_ERROR (EfiStatus)) {\r
-    DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii.  %r\n", EfiStatus));\r
-    return EfiStatus;\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii.  %r\n", Status));\r
+    return Status;\r
   }\r
   //\r
   //\r
@@ -250,7 +245,7 @@ Returns:
       //\r
       // Log RecordData to Data Hub.\r
       //\r
-      EfiStatus = DataHub->LogData (\r
+      Status = DataHub->LogData (\r
                             DataHub,\r
                             &gEfiMiscSubClassGuid,\r
                             &gEfiMiscSubClassGuid,\r
@@ -259,12 +254,12 @@ Returns:
                             sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen\r
                             );\r
 \r
-      if (EFI_ERROR (EfiStatus)) {\r
+      if (EFI_ERROR (Status)) {\r
         DEBUG (\r
           (EFI_D_ERROR,\r
           "LogData(%d bytes) == %r\n",\r
           sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen,\r
-          EfiStatus)\r
+          Status)\r
           );\r
       }\r
 \r
@@ -276,29 +271,16 @@ Returns:
     // is no more data to log.\r
     //\r
     for (;;) {\r
-      //\r
-      //\r
-      //\r
-      EfiStatus = (*mMiscSubclassDataTable[Index].Function)\r
-        (\r
-          mMiscSubclassDataTable[Index].RecordType, &mMiscSubclassDataTable[Index].RecordLen, &RecordData.Record, &\r
-            LogRecordData\r
-        );\r
-\r
-      //\r
-      //\r
-      //\r
-      if (EFI_ERROR (EfiStatus)) {\r
+      Status = (*mMiscSubclassDataTable[Index].Function)(mMiscSubclassDataTable[Index].RecordType, &mMiscSubclassDataTable[Index].RecordLen, &RecordData.Record, &LogRecordData);\r
+      if (EFI_ERROR (Status)) {\r
         break;\r
       }\r
 \r
       if (!LogRecordData) {\r
         break;\r
       }\r
-      //\r
-      //\r
-      //\r
-      EfiStatus = DataHub->LogData (\r
+\r
+      Status = DataHub->LogData (\r
                             DataHub,\r
                             &gEfiMiscSubClassGuid,\r
                             &gEfiMiscSubClassGuid,\r
@@ -307,212 +289,62 @@ Returns:
                             sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen\r
                             );\r
 \r
-      if (EFI_ERROR (EfiStatus)) {\r
+      if (EFI_ERROR (Status)) {\r
         DEBUG (\r
           (EFI_D_ERROR,\r
           "LogData(%d bytes) == %r\n",\r
           sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen,\r
-          EfiStatus)\r
+          Status)\r
           );\r
       }\r
     }\r
   }\r
-  //\r
-  // Install notify function to fetch memory data through WinNtIo protocol and store to data hub.\r
-  //\r
-  EfiStatus = gBS->CreateEvent (\r
-                    EVT_NOTIFY_SIGNAL,\r
-                    TPL_CALLBACK,\r
-                    WinNtIoProtocolNotifyFunction,\r
-                    ImageHandle,\r
-                    &Event\r
-                    );\r
-  ASSERT (!EFI_ERROR (EfiStatus));\r
-\r
-  EfiStatus = gBS->RegisterProtocolNotify (\r
-                    &gEfiWinNtIoProtocolGuid,\r
-                    Event,\r
-                    &Registration\r
-                    );\r
-  ASSERT (!EFI_ERROR (EfiStatus));\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-UINTN\r
-Atoi (\r
-  CHAR16  *String\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Convert a unicode string to a UINTN\r
-\r
-Arguments:\r
-  String - Unicode string.\r
-\r
-Returns:\r
-  UINTN of the number represented by String.\r
-\r
---*/\r
-{\r
-  UINTN   Number;\r
-  CHAR16  *Str;\r
 \r
+  \r
   //\r
-  // skip preceeding white space\r
+  // Log Memory Size info based on PCD setting.\r
   //\r
-  Str = String;\r
-  while ((*Str) && (*Str == ' ' || *Str == '"')) {\r
-    Str++;\r
-  }\r
+  MemorySubClassData.Header.Instance    = 1;\r
+  MemorySubClassData.Header.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;\r
+  MemorySubClassData.Header.RecordType  = EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER;\r
+\r
   //\r
-  // Convert ot a Number\r
+  // Process Memory String in form size!size ...\r
+  // So 64!64 is 128 MB\r
   //\r
-  Number = 0;\r
-  while (*Str != '\0') {\r
-    if ((*Str >= '0') && (*Str <= '9')) {\r
-      Number = (Number * 10) +*Str - '0';\r
-    } else {\r
-      break;\r
+  Nt32MemString   = PcdGetPtr (PcdWinNtMemorySize);\r
+  for (TotalMemorySize = 0; *Nt32MemString != '\0';) {\r
+    TotalMemorySize += StrDecimalToUint64 (Nt32MemString);\r
+    while (*Nt32MemString != '\0') {\r
+      if (*Nt32MemString == '!') {\r
+        Nt32MemString++;       \r
+        break;\r
+      }\r
+      Nt32MemString++;\r
     }\r
-\r
-    Str++;\r
   }\r
 \r
-  return Number;\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-WinNtIoProtocolNotifyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function will log memory size data to data hub.\r
-\r
-Arguments:\r
-Event        - Event whose notification function is being invoked.\r
-Context      - Pointer to the notification function's context.\r
-\r
-Returns:\r
-    EFI_STATUS.\r
+  MemorySubClassData.Record.ArrayStartAddress.MemoryArrayStartAddress               = 0;\r
+  MemorySubClassData.Record.ArrayStartAddress.MemoryArrayEndAddress                 = LShiftU64 (TotalMemorySize, 20) - 1;\r
+  MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.ProducerName  = gEfiMemoryProducerGuid;\r
+  MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.Instance      = 1;\r
+  MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance   = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;\r
+  MemorySubClassData.Record.ArrayStartAddress.MemoryArrayPartitionWidth             = 0;\r
 \r
---*/\r
-{\r
-  EFI_STATUS                      Status;\r
-  EFI_MEMORY_SUBCLASS_DRIVER_DATA MemorySubClassData;\r
-  EFI_DATA_RECORD_HEADER          *Record;\r
-  EFI_SUBCLASS_TYPE1_HEADER       *DataHeader;\r
-  UINTN                           HandleCount;\r
-  UINTN                           HandleIndex;\r
-  UINT64                          MonotonicCount;\r
-  BOOLEAN                         RecordFound;\r
-  EFI_HANDLE                      *HandleBuffer;\r
-  EFI_WIN_NT_IO_PROTOCOL          *WinNtIo;\r
-  EFI_DATA_HUB_PROTOCOL           *DataHub;\r
-  UINT64                          TotalMemorySize;\r
-\r
-  DataHub         = NULL;\r
-  MonotonicCount  = 0;\r
-  RecordFound     = FALSE;\r
-\r
-  //\r
-  // Retrieve the list of all handles from the handle database.\r
-  //\r
-  Status = gBS->LocateHandleBuffer (\r
-                  AllHandles,\r
-                  &gEfiWinNtIoProtocolGuid,\r
-                  NULL,\r
-                  &HandleCount,\r
-                  &HandleBuffer\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
   //\r
-  // Locate DataHub protocol.\r
+  // Store memory size data record to data hub.\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-  //\r
-  // Search the Handle array to find the meory size information.\r
-  //\r
-  for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {\r
-    Status = gBS->OpenProtocol (\r
-                    HandleBuffer[HandleIndex],\r
-                    &gEfiWinNtIoProtocolGuid,\r
-                    &WinNtIo,\r
-                    Context,\r
-                    NULL,\r
-                    EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      continue;\r
-    }\r
-\r
-    if ((WinNtIo->WinNtThunk->Signature == EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE) &&\r
-        CompareGuid (WinNtIo->TypeGuid, &gEfiWinNtMemoryGuid)\r
-          ) {\r
-      //\r
-      // Check if this record has been stored in data hub.\r
-      //\r
-      do {\r
-        Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);\r
-        if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {\r
-          DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
-          if (CompareGuid (&Record->DataRecordGuid, &gEfiProcessorSubClassGuid) &&\r
-              (DataHeader->RecordType == EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER)\r
-              ) {\r
-            RecordFound = TRUE;\r
-          }\r
-        }\r
-      } while (MonotonicCount != 0);\r
-\r
-      if (RecordFound) {\r
-        RecordFound = FALSE;\r
-        continue;\r
-      }\r
-      //\r
-      // Initialize data record.\r
-      //\r
-      MemorySubClassData.Header.Instance    = 1;\r
-      MemorySubClassData.Header.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;\r
-      MemorySubClassData.Header.RecordType  = EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER;\r
+  Status = DataHub->LogData (\r
+                      DataHub,\r
+                      &gEfiMemorySubClassGuid,\r
+                      &gEfiMemoryProducerGuid,\r
+                      EFI_DATA_RECORD_CLASS_DATA,\r
+                      &MemorySubClassData,\r
+                      sizeof (EFI_SUBCLASS_TYPE1_HEADER) + sizeof (EFI_MEMORY_ARRAY_START_ADDRESS_DATA)\r
+                      );\r
 \r
-      TotalMemorySize                       = (UINT64) Atoi (WinNtIo->EnvString);\r
 \r
-      MemorySubClassData.Record.ArrayStartAddress.MemoryArrayStartAddress               = 0;\r
-      MemorySubClassData.Record.ArrayStartAddress.MemoryArrayEndAddress                 = LShiftU64 (TotalMemorySize, 20) - 1;\r
-      MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.ProducerName  = gEfiMemoryProducerGuid;\r
-      MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.Instance      = 1;\r
-      MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;\r
-      MemorySubClassData.Record.ArrayStartAddress.MemoryArrayPartitionWidth = 0;\r
-\r
-      //\r
-      // Store memory size data record to data hub.\r
-      //\r
-      Status = DataHub->LogData (\r
-                          DataHub,\r
-                          &gEfiMemorySubClassGuid,\r
-                          &gEfiMemoryProducerGuid,\r
-                          EFI_DATA_RECORD_CLASS_DATA,\r
-                          &MemorySubClassData,\r
-                          sizeof (EFI_SUBCLASS_TYPE1_HEADER) + sizeof (EFI_MEMORY_ARRAY_START_ADDRESS_DATA)\r
-                          );\r
-    }\r
-\r
-    gBS->CloseProtocol (\r
-          HandleBuffer[HandleIndex],\r
-          &gEfiWinNtIoProtocolGuid,\r
-          Context,\r
-          NULL\r
-          );\r
-  }\r
+  return EFI_SUCCESS;\r
 }\r
 \r
+\r
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni
deleted file mode 100644 (file)
index 36dacf0..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni
deleted file mode 100644 (file)
index 204588e..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni
deleted file mode 100644 (file)
index 617578d..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni and /dev/null differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni
deleted file mode 100644 (file)
index f279ff9..0000000
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni and /dev/null differ
index 0e4b17e..31b66ea 100644 (file)
@@ -59,9 +59,6 @@
 ################################################################################\r
 [Guids.common]\r
   gEfiWinNtPassThroughGuid       = { 0xCC664EB8, 0x3C24, 0x4086, { 0xB6, 0xF6, 0x34, 0xE8, 0x56, 0xBC, 0xE3, 0x6E }}\r
-  gEfiWinNtCPUSpeedGuid          = { 0xD4F29055, 0xE1FB, 0x11D4, { 0xBD, 0x0D, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}\r
-  gEfiWinNtCPUModelGuid          = { 0xBEE9B6CE, 0x2F8A, 0x11D4, { 0xBD, 0x0D, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}\r
-  gEfiWinNtMemoryGuid            = { 0x99042912, 0x122A, 0x11D4, { 0xBD, 0x0D, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}\r
   gEfiWinNtConsoleGuid           = { 0xBA73672C, 0xA5D3, 0x11D4, { 0xBD, 0x00, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}\r
   gEfiWinNtUgaGuid               = { 0xAB248E99, 0xABE1, 0x11D4, { 0xBD, 0x0D, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}\r
   gEfiWinNtGopGuid               = { 0x4e11e955, 0xccca, 0x11d4, { 0xbd, 0x0d, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}\r
index 6492e84..7aaab5f 100644 (file)
 ################################################################################\r
 \r
 [PcdsDynamicDefault.common.DEFAULT]\r
-  PcdWinNtCpuSpeed|gEfiNt32PkgTokenSpaceGuid|L"3000"|8\r
   PcdWinNtSerialPort|gEfiNt32PkgTokenSpaceGuid|L"COM1!COM2"|18\r
   PcdWinNtFileSystem|gEfiNt32PkgTokenSpaceGuid|L".!..\\..\\..\\..\\EdkShellBinPkg\\bin\\ia32\\Apps"|106\r
   PcdWinNtGop|gEfiNt32PkgTokenSpaceGuid|L"UGA Window 1!UGA Window 2"|50\r
   PcdWinNtConsole|gEfiNt32PkgTokenSpaceGuid|L"Bus Driver Console Window"|50\r
-  PcdWinNtMemorySize|gEfiNt32PkgTokenSpaceGuid|L"64!64"|10\r
   PcdWinNtVirtualDisk|gEfiNt32PkgTokenSpaceGuid|L"FW;40960;512"|24\r
-  PcdWinNtCpuModel|gEfiNt32PkgTokenSpaceGuid|L"Intel(R) Processor Model"|48\r
+  PcdWinNtCpuModel|gEfiNt32PkgTokenSpaceGuid|L"NT32 Processor Emulation"|52\r
+  PcdWinNtCpuSpeed|gEfiNt32PkgTokenSpaceGuid|L"1234"|8\r
+  PcdWinNtMemorySize|gEfiNt32PkgTokenSpaceGuid|L"64!64"|10\r
   PcdWinNtPhysicalDisk|gEfiNt32PkgTokenSpaceGuid|L"a:RW;2880;512!e:RW;262144;512"|58\r
   PcdWinNtUga|gEfiNt32PkgTokenSpaceGuid|L"UGA Window 1!UGA Window 2"|50\r
   PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid|0x0\r
   $(WORKSPACE)/MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
 \r
 [BuildOptions]\r
-       MSFT:DEBUG_*_IA32_DLINK_FLAGS = /EXPORT:InitializeDriver=_ModuleEntryPoint /ALIGN:4096 /SUBSYSTEM:CONSOLE\r
-       MSFT:RELEASE_*_IA32_DLINK_FLAGS = /ALIGN:4096\r
+  MSFT:DEBUG_*_IA32_DLINK_FLAGS = /EXPORT:InitializeDriver=_ModuleEntryPoint /ALIGN:4096 /SUBSYSTEM:CONSOLE\r
+  MSFT:RELEASE_*_IA32_DLINK_FLAGS = /ALIGN:4096\r
index f11e0b1..175c569 100644 (file)
@@ -186,62 +186,6 @@ NT_ISA_SERIAL_DEVICE_PATH   gNtSerialDevicePath1 = {
   gEndEntire\r
 };\r
 \r
-NT_PLATFORM_CPU_MODEL_VIRTUAL_DEVICE_PATH gCpuModelDevicePath = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
-    EFI_WIN_NT_THUNK_PROTOCOL_GUID\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),\r
-    (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),\r
-    EFI_WIN_NT_CPU_MODEL_GUID,\r
-    0\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-NT_PLATFORM_CPU_SPEED_VIRTUAL_DEVICE_PATH gCpuSpeedDevicePath = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
-    EFI_WIN_NT_THUNK_PROTOCOL_GUID\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),\r
-    (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),\r
-    EFI_WIN_NT_CPU_SPEED_GUID,\r
-    0\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-NT_PLATFORM_MEMORY_VIRTUAL_DEVICE_PATH gMemoryDevicePath = {\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
-    EFI_WIN_NT_THUNK_PROTOCOL_GUID\r
-  },\r
-  {\r
-    HARDWARE_DEVICE_PATH,\r
-    HW_VENDOR_DP,\r
-    (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),\r
-    (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),\r
-    EFI_WIN_NT_MEMORY_GUID,\r
-    0\r
-  },\r
-  gEndEntire\r
-};\r
 \r
 //\r
 // Predefined platform default console device path\r
@@ -285,8 +229,4 @@ EFI_DEVICE_PATH_PROTOCOL    *gPlatformDriverOption[] = { NULL };
 //\r
 // Predefined platform connect sequence\r
 //\r
-EFI_DEVICE_PATH_PROTOCOL    *gPlatformConnectSequence[] = { \r
-  (EFI_DEVICE_PATH_PROTOCOL *) &gCpuModelDevicePath,\r
-  (EFI_DEVICE_PATH_PROTOCOL *) &gCpuSpeedDevicePath,\r
-  (EFI_DEVICE_PATH_PROTOCOL *) &gMemoryDevicePath\r
-  };\r
+EFI_DEVICE_PATH_PROTOCOL    *gPlatformConnectSequence[] = { NULL };\r
index 3f32d20..b294d5b 100644 (file)
@@ -284,10 +284,10 @@ Returns:
       WriteProtected  = (BOOLEAN) (*Str == 'O');\r
       Str             = GetNextElementPastTerminator (Str, ';');\r
 \r
-      NumberOfBlocks  = Atoi (Str);\r
+      NumberOfBlocks  = StrDecimalToUintn (Str);\r
       if (NumberOfBlocks != 0) {\r
         Str       = GetNextElementPastTerminator (Str, ';');\r
-        BlockSize = Atoi (Str);\r
+        BlockSize = StrDecimalToUintn (Str);\r
         if (BlockSize != 0) {\r
           //\r
           // If we get here the variable is valid so do the work.\r
@@ -1063,52 +1063,6 @@ WinNtBlockIoResetBlock (
   return EFI_SUCCESS;\r
 }\r
 \r
-UINTN\r
-Atoi (\r
-  CHAR16  *String\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert a unicode string to a UINTN\r
-\r
-Arguments:\r
-\r
-  String - Unicode string.\r
-\r
-Returns:\r
-\r
-  UINTN of the number represented by String.\r
-\r
---*/\r
-{\r
-  UINTN   Number;\r
-  CHAR16  *Str;\r
-\r
-  //\r
-  // skip preceeding white space\r
-  //\r
-  Str = String;\r
-  while ((*Str) && (*Str == ' ')) {\r
-    Str++;\r
-  }\r
-  //\r
-  // Convert ot a Number\r
-  //\r
-  Number = 0;\r
-  while (*Str != '\0') {\r
-    if ((*Str >= '0') && (*Str <= '9')) {\r
-      Number = (Number * 10) +*Str - '0';\r
-    } else {\r
-      break;\r
-    }\r
-\r
-    Str++;\r
-  }\r
-\r
-  return Number;\r
-}\r
 \r
 EFI_STATUS\r
 SetFilePointer64 (\r
index 999fb0c..edcd9eb 100644 (file)
@@ -150,10 +150,7 @@ static NT_PCD_ENTRY  mPcdEnvironment[] = {
   PcdToken(PcdWinNtSerialPort),    &gEfiWinNtSerialPortGuid,\r
   PcdToken(PcdWinNtFileSystem),    &gEfiWinNtFileSystemGuid,\r
   PcdToken(PcdWinNtVirtualDisk),   &gEfiWinNtVirtualDisksGuid,\r
-  PcdToken(PcdWinNtPhysicalDisk),  &gEfiWinNtPhysicalDisksGuid,\r
-  PcdToken(PcdWinNtCpuModel),      &gEfiWinNtCPUModelGuid,\r
-  PcdToken(PcdWinNtCpuSpeed),      &gEfiWinNtCPUSpeedGuid,\r
-  PcdToken(PcdWinNtMemorySize),    &gEfiWinNtMemoryGuid\r
+  PcdToken(PcdWinNtPhysicalDisk),  &gEfiWinNtPhysicalDisksGuid\r
 };\r
 \r
 /**\r
index 50aca77..8c94849 100644 (file)
@@ -60,9 +60,6 @@
 \r
 \r
 [Guids]\r
-  gEfiWinNtCPUSpeedGuid                         # ALWAYS_CONSUMED\r
-  gEfiWinNtCPUModelGuid                         # ALWAYS_CONSUMED\r
-  gEfiWinNtMemoryGuid                           # ALWAYS_CONSUMED\r
   gEfiWinNtConsoleGuid                          # ALWAYS_CONSUMED\r
   gEfiWinNtGopGuid                              # ALWAYS_CONSUMED\r
   gEfiWinNtSerialPortGuid                       # ALWAYS_CONSUMED\r
index 74cfe41..e9cf80c 100644 (file)
@@ -304,18 +304,5 @@ WinNtGopDestroySimpleTextInForWindow (
 ;\r
 \r
 \r
-/**\r
-  TODO: Add function description\r
-\r
-  @param  String               TODO: add argument description\r
-\r
-  @return TODO: add return values\r
-\r
-**/\r
-UINTN\r
-Atoi (\r
-  IN  CHAR16  *String\r
-  )\r
-;\r
 \r
 #endif\r
index 86b6d19..5f41e29 100644 (file)
@@ -335,44 +335,3 @@ WinNtGopDriverBindingStop (
   return Status;\r
 }\r
 \r
-\r
-/**\r
-  Convert a unicode string to a UINTN\r
-\r
-  @param  String  Unicode string.\r
-\r
-  @return UINTN of the number represented by String.\r
-\r
-**/\r
-UINTN\r
-Atoi (\r
-  CHAR16  *String\r
-  )\r
-{\r
-  UINTN   Number;\r
-  CHAR16  *Str;\r
-\r
-  //\r
-  // skip preceeding white space\r
-  //\r
-  Str = String;\r
-  while ((*Str) && (*Str == ' ' || *Str == '"')) {\r
-    Str++;\r
-  }\r
-\r
-  //\r
-  // Convert ot a Number\r
-  //\r
-  Number = 0;\r
-  while (*Str != '\0') {\r
-    if ((*Str >= '0') && (*Str <= '9')) {\r
-      Number = (Number * 10) +*Str - '0';\r
-    } else {\r
-      break;\r
-    }\r
-\r
-    Str++;\r
-  }\r
-\r
-  return Number;\r
-}\r