Nt32Pkg: Remove it
authorRay Ni <ray.ni@intel.com>
Fri, 17 May 2019 04:55:16 +0000 (12:55 +0800)
committerRay Ni <ray.ni@intel.com>
Fri, 17 May 2019 05:02:41 +0000 (13:02 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1812

Now since EmulatorPkg supports to run in Windows environment,
this patch removes Nt32Pkg to remove duplicate code in edk2 repo.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
137 files changed:
Nt32Pkg/BootModePei/BootModePei.c [deleted file]
Nt32Pkg/BootModePei/BootModePei.inf [deleted file]
Nt32Pkg/CpuRuntimeDxe/Cpu.c [deleted file]
Nt32Pkg/CpuRuntimeDxe/CpuDriver.h [deleted file]
Nt32Pkg/CpuRuntimeDxe/CpuIo.c [deleted file]
Nt32Pkg/CpuRuntimeDxe/CpuRuntimeDxe.inf [deleted file]
Nt32Pkg/CpuRuntimeDxe/Strings.uni [deleted file]
Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c [deleted file]
Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c [deleted file]
Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf [deleted file]
Nt32Pkg/FvbServicesRuntimeDxe/FwBlockService.h [deleted file]
Nt32Pkg/Include/Common/WinNTInclude.h [deleted file]
Nt32Pkg/Include/Guid/WinNtSystemConfig.h [deleted file]
Nt32Pkg/Include/Library/WinNtLib.h [deleted file]
Nt32Pkg/Include/Ppi/NtAutoscan.h [deleted file]
Nt32Pkg/Include/Ppi/NtFwh.h [deleted file]
Nt32Pkg/Include/Ppi/NtPeiLoadFile.h [deleted file]
Nt32Pkg/Include/Ppi/NtThunk.h [deleted file]
Nt32Pkg/Include/Protocol/WinNtIo.h [deleted file]
Nt32Pkg/Include/Protocol/WinNtThunk.h [deleted file]
Nt32Pkg/Include/WinNtDxe.h [deleted file]
Nt32Pkg/Include/WinNtPeim.h [deleted file]
Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf [deleted file]
Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c [deleted file]
Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c [deleted file]
Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf [deleted file]
Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf [deleted file]
Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c [deleted file]
Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf [deleted file]
Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c [deleted file]
Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c [deleted file]
Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/PeiNt32OemHookStatusCodeLib.inf [deleted file]
Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.c [deleted file]
Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.inf [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/MemoryTest.c [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.h [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/PlatformData.c [deleted file]
Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni [deleted file]
Nt32Pkg/Library/PlatformSecureLib/PlatformSecureLib.c [deleted file]
Nt32Pkg/Library/PlatformSecureLib/PlatformSecureLib.inf [deleted file]
Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.c [deleted file]
Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.inf [deleted file]
Nt32Pkg/MetronomeDxe/Metronome.c [deleted file]
Nt32Pkg/MetronomeDxe/Metronome.h [deleted file]
Nt32Pkg/MetronomeDxe/MetronomeDxe.inf [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscDevicePath.h [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.uni [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverDataTable.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationData.c [deleted file]
Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c [deleted file]
Nt32Pkg/Nt32Pkg.dec [deleted file]
Nt32Pkg/Nt32Pkg.dsc [deleted file]
Nt32Pkg/Nt32Pkg.fdf [deleted file]
Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c [deleted file]
Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf [deleted file]
Nt32Pkg/Sec/FwVol.c [deleted file]
Nt32Pkg/Sec/SecMain.c [deleted file]
Nt32Pkg/Sec/SecMain.h [deleted file]
Nt32Pkg/Sec/SecMain.inf [deleted file]
Nt32Pkg/Sec/Stack.asm [deleted file]
Nt32Pkg/Sec/StackX64.asm [deleted file]
Nt32Pkg/Sec/WinNtThunk.c [deleted file]
Nt32Pkg/SnpNt32Dxe/ComponentName.c [deleted file]
Nt32Pkg/SnpNt32Dxe/SnpNt32.c [deleted file]
Nt32Pkg/SnpNt32Dxe/SnpNt32.h [deleted file]
Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf [deleted file]
Nt32Pkg/StallPei/Stall.c [deleted file]
Nt32Pkg/StallPei/StallPei.inf [deleted file]
Nt32Pkg/TimerDxe/Timer.c [deleted file]
Nt32Pkg/TimerDxe/Timer.h [deleted file]
Nt32Pkg/TimerDxe/TimerDxe.inf [deleted file]
Nt32Pkg/WinNtAutoScanPei/WinNtAutoScan.c [deleted file]
Nt32Pkg/WinNtAutoScanPei/WinNtAutoScanPei.inf [deleted file]
Nt32Pkg/WinNtBlockIoDxe/ComponentName.c [deleted file]
Nt32Pkg/WinNtBlockIoDxe/DriverConfiguration.c [deleted file]
Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c [deleted file]
Nt32Pkg/WinNtBlockIoDxe/WinNtBlockIo.c [deleted file]
Nt32Pkg/WinNtBlockIoDxe/WinNtBlockIo.h [deleted file]
Nt32Pkg/WinNtBlockIoDxe/WinNtBlockIoDxe.inf [deleted file]
Nt32Pkg/WinNtBusDriverDxe/ComponentName.c [deleted file]
Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c [deleted file]
Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.h [deleted file]
Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf [deleted file]
Nt32Pkg/WinNtFirmwareVolumePei/WinNtFirmwareVolumePei.inf [deleted file]
Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c [deleted file]
Nt32Pkg/WinNtFlashMapPei/FlashMap.c [deleted file]
Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf [deleted file]
Nt32Pkg/WinNtGopDxe/ComponentName.c [deleted file]
Nt32Pkg/WinNtGopDxe/WinNtGop.h [deleted file]
Nt32Pkg/WinNtGopDxe/WinNtGopDriver.c [deleted file]
Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf [deleted file]
Nt32Pkg/WinNtGopDxe/WinNtGopInput.c [deleted file]
Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c [deleted file]
Nt32Pkg/WinNtOemHookStatusCodeHandlerDxe/WinNtOemHookStatusCodeHandlerDxe.c [deleted file]
Nt32Pkg/WinNtOemHookStatusCodeHandlerDxe/WinNtOemHookStatusCodeHandlerDxe.inf [deleted file]
Nt32Pkg/WinNtOemHookStatusCodeHandlerPei/WinNtOemHookStatusCodeHandlerPei.c [deleted file]
Nt32Pkg/WinNtOemHookStatusCodeHandlerPei/WinNtOemHookStatusCodeHandlerPei.inf [deleted file]
Nt32Pkg/WinNtSerialIoDxe/ComponentName.c [deleted file]
Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c [deleted file]
Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h [deleted file]
Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf [deleted file]
Nt32Pkg/WinNtSimpleFileSystemDxe/ComponentName.c [deleted file]
Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c [deleted file]
Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.h [deleted file]
Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystemDxe.inf [deleted file]
Nt32Pkg/WinNtThunkDxe/WinNtThunk.c [deleted file]
Nt32Pkg/WinNtThunkDxe/WinNtThunk.h [deleted file]
Nt32Pkg/WinNtThunkDxe/WinNtThunkDxe.inf [deleted file]
Nt32Pkg/WinNtThunkPPIToProtocolPei/WinNtThunkPPIToProtocol.c [deleted file]
Nt32Pkg/WinNtThunkPPIToProtocolPei/WinNtThunkPPIToProtocolPei.inf [deleted file]

diff --git a/Nt32Pkg/BootModePei/BootModePei.c b/Nt32Pkg/BootModePei/BootModePei.c
deleted file mode 100644 (file)
index 6de0774..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  BootMode.c\r
-   \r
-Abstract:\r
-\r
-  Tiano PEIM to provide the platform support functionality within Windows\r
-\r
-**/\r
-\r
-\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/MasterBootMode.h>\r
-#include <Ppi/BootInRecoveryMode.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
-\r
-\r
-//\r
-// Module globals\r
-//\r
-EFI_PEI_PPI_DESCRIPTOR  mPpiListBootMode = {\r
-  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
-  &gEfiPeiMasterBootModePpiGuid,\r
-  NULL\r
-};\r
-\r
-EFI_PEI_PPI_DESCRIPTOR  mPpiListRecoveryBootMode = {\r
-  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
-  &gEfiPeiBootInRecoveryModePpiGuid,\r
-  NULL\r
-};\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeBootMode (\r
-  IN       EFI_PEI_FILE_HANDLE  FileHandle,\r
-  IN CONST EFI_PEI_SERVICES     **PeiServices\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Peform the boot mode determination logic\r
-\r
-Arguments:\r
-\r
-  FileHandle  - Handle of the file being invoked.\r
-  PeiServices - Describes the list of possible PEI Services.\r
-    \r
-Returns:\r
-\r
-  Status -  EFI_SUCCESS if the boot mode could be set\r
-\r
---*/\r
-{\r
-  EFI_STATUS  Status;\r
-  UINTN       BootMode;\r
-\r
-  DEBUG ((EFI_D_ERROR, "NT32 Boot Mode PEIM Loaded\n"));\r
-\r
-  //\r
-  // Let's assume things are OK if not told otherwise\r
-  // Should we read an environment variable in order to easily change this?\r
-  //\r
-  BootMode  = BOOT_WITH_FULL_CONFIGURATION;\r
-\r
-  Status    = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListBootMode);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  if (BootMode == BOOT_IN_RECOVERY_MODE) {\r
-    Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListRecoveryBootMode);\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-\r
-  return Status;\r
-}\r
diff --git a/Nt32Pkg/BootModePei/BootModePei.inf b/Nt32Pkg/BootModePei/BootModePei.inf
deleted file mode 100644 (file)
index 2579b34..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-## @file\r
-# Component description file for BootMode module\r
-#\r
-# This module provides platform specific function to detect boot mode.\r
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = BootMode\r
-  FILE_GUID                      = B7611005-1F26-45ba-A3DB-01F39DDB2785\r
-  MODULE_TYPE                    = PEIM\r
-  VERSION_STRING                 = 1.0\r
-\r
-  ENTRY_POINT                    = InitializeBootMode\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
-#\r
-\r
-[Sources]\r
-  BootModePei.c\r
-\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-\r
-\r
-[LibraryClasses]\r
-  PeimEntryPoint\r
-  DebugLib\r
-\r
-\r
-[Ppis]\r
-  gEfiPeiMasterBootModePpiGuid                  # PPI ALWAYS_PRODUCED\r
-  gEfiPeiBootInRecoveryModePpiGuid              # PPI SOMETIMES_PRODUCED\r
-\r
-[depex]\r
-  TRUE\r
diff --git a/Nt32Pkg/CpuRuntimeDxe/Cpu.c b/Nt32Pkg/CpuRuntimeDxe/Cpu.c
deleted file mode 100644 (file)
index 8bf93ae..0000000
+++ /dev/null
@@ -1,547 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  Cpu.c\r
-\r
-Abstract:\r
-\r
-  NT Emulation Architectural Protocol Driver as defined in Tiano.\r
-  This CPU module abstracts the interrupt subsystem of a platform and\r
-  the CPU-specific setjump/long pair.  Other services are not implemented\r
-  in this driver.\r
-\r
-**/\r
-\r
-\r
-#include "CpuDriver.h"\r
-\r
-UINT64  mTimerPeriod;\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
-    1,\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
-\r
-\r
-//\r
-// Service routines for the driver\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
-\r
-Routine Description:\r
-\r
-  This routine would provide support for flushing the CPU data cache.\r
-  In the case of NT emulation environment, this flushing is not necessary and\r
-  is thus not implemented.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-  Start adddress in memory to flush\r
-  Length of memory to flush\r
-  Flush type\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_SUCCESS\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    FlushType - add argument and description to function comment\r
-// TODO:    EFI_UNSUPPORTED - add return value to function comment\r
-{\r
-  if (FlushType == EfiCpuFlushTypeWriteBackInvalidate) {\r
-    //\r
-    // Only WB flush is supported. We actually need do nothing on NT emulator\r
-    // environment. Classify this to follow EFI spec\r
-    //\r
-    return EFI_SUCCESS;\r
-  }\r
-  //\r
-  // Other flush types are not supported by NT emulator\r
-  //\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-WinNtEnableInterrupt (\r
-  IN EFI_CPU_ARCH_PROTOCOL  *This\r
-  )\r
-/*++\r
-\r
-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
-  Architectural Protocol observes in order to defer behaviour while in its\r
-  emulated interrupt, or timer tick.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_SUCCESS\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-{\r
-  CPU_ARCH_PROTOCOL_PRIVATE *Private;\r
-\r
-  Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
-  Private->InterruptState = TRUE;\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-WinNtDisableInterrupt (\r
-  IN EFI_CPU_ARCH_PROTOCOL  *This\r
-  )\r
-/*++\r
-\r
-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
-  Architectural Protocol observes in order to defer behaviour while in its\r
-  emulated interrupt, or timer tick.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_SUCCESS\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-{\r
-  CPU_ARCH_PROTOCOL_PRIVATE *Private;\r
-\r
-  Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
-  Private->InterruptState = FALSE;\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-WinNtGetInterruptState (\r
-  IN EFI_CPU_ARCH_PROTOCOL  *This,\r
-  OUT BOOLEAN               *State\r
-  )\r
-/*++\r
-\r
-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
-  Architectural Protocol observes in order to defer behaviour while in its\r
-  emulated interrupt, or timer tick.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_SUCCESS\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    State - add argument and description to function comment\r
-// TODO:    EFI_INVALID_PARAMETER - add return value to function comment\r
-{\r
-  CPU_ARCH_PROTOCOL_PRIVATE *Private;\r
-\r
-  if (State == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
-  *State  = Private->InterruptState;\r
-  return EFI_SUCCESS;\r
-}\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
-\r
-Routine Description:\r
-\r
-  This routine would support generation of a CPU INIT.  At\r
-  present, this code does not provide emulation.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-  INIT Type\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_UNSUPPORTED - not yet implemented\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    InitType - add argument and description to function comment\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\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
-\r
-Routine Description:\r
-\r
-  This routine would support registration of an interrupt handler.  At\r
-  present, this code does not provide emulation.\r
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-  Pointer to interrupt handlers\r
-  Interrupt type\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_UNSUPPORTED - not yet implemented\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    InterruptType - add argument and description to function comment\r
-// TODO:    InterruptHandler - add argument and description to function comment\r
-{\r
-\r
-  //\r
-  // Do parameter checking for EFI spec conformance\r
-  //\r
-  if (InterruptType < 0 || InterruptType > 0xff) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-  //\r
-  // Do nothing for Nt32 emulation\r
-  //\r
-  return EFI_UNSUPPORTED;\r
-}\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
-\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
-\r
-Arguments:\r
-\r
-  This        - Pointer to CPU Architectural Protocol interface\r
-  TimerIndex  - Index of given CPU timer\r
-  TimerValue  - Output of the timer\r
-  TimerPeriod - Output of the timer period\r
-\r
-Returns:\r
-\r
-  EFI_UNSUPPORTED       - not yet implemented\r
-  EFI_INVALID_PARAMETER - TimeValue is NULL\r
-\r
---*/\r
-{\r
-  if (TimerValue == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-  \r
-  if (TimerIndex != 0) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-  \r
-  gWinNt->QueryPerformanceCounter ((LARGE_INTEGER *)TimerValue);\r
-  \r
-  if (TimerPeriod != NULL) {\r
-    *TimerPeriod = mTimerPeriod;\r
-  }\r
-  \r
-  return EFI_SUCCESS;\r
-}\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
-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
-\r
-Arguments:\r
-\r
-  Pointer to CPU Architectural Protocol interface\r
-  Start address of memory region\r
-  The size in bytes of the memory region\r
-  The bit mask of attributes to set for the memory region\r
-\r
-Returns:\r
-\r
-  Status\r
-    EFI_UNSUPPORTED - not yet implemented\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    BaseAddress - add argument and description to function comment\r
-// TODO:    Length - add argument and description to function comment\r
-// TODO:    Attributes - add argument and description to function comment\r
-// TODO:    EFI_INVALID_PARAMETER - add return value to function comment\r
-{\r
-  //\r
-  // Check for invalid parameter for Spec conformance\r
-  //\r
-  if (Length == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  //\r
-  // Do nothing for Nt32 emulation\r
-  //\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-\r
-\r
-/**\r
-  Logs SMBIOS record.\r
-\r
-  @param  Smbios   Pointer to SMBIOS protocol instance.\r
-  @param  Buffer   Pointer to the data buffer.\r
-\r
-**/\r
-VOID\r
-LogSmbiosData (\r
-  IN  EFI_SMBIOS_PROTOCOL        *Smbios,\r
-  IN  UINT8                      *Buffer\r
-  )\r
-{\r
-  EFI_STATUS         Status;\r
-  EFI_SMBIOS_HANDLE  SmbiosHandle;\r
-  \r
-  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
-  Status = Smbios->Add (\r
-                     Smbios,\r
-                     NULL,\r
-                     &SmbiosHandle,\r
-                     (EFI_SMBIOS_TABLE_HEADER*)Buffer\r
-                     );\r
-  ASSERT_EFI_ERROR (Status);\r
-}\r
-\r
-\r
-VOID\r
-CpuUpdateSmbios (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function will log processor version and frequency data to Smbios.\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
-  None.\r
-\r
---*/\r
-{\r
-  EFI_STATUS                  Status;\r
-  UINT32                      TotalSize;\r
-  EFI_SMBIOS_PROTOCOL         *Smbios;\r
-  EFI_HII_HANDLE              HiiHandle;\r
-  STRING_REF                  Token;\r
-  UINTN                       CpuVerStrLen;\r
-  EFI_STRING                  CpuVerStr;\r
-  SMBIOS_TABLE_TYPE4          *SmbiosRecord;\r
-  CHAR8                       *OptionalStrStart;\r
-\r
-  //\r
-  // Locate Smbios protocol.\r
-  //\r
-  Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)&Smbios);\r
-  \r
-  if (EFI_ERROR (Status)) {\r
-    return;\r
-  }\r
-\r
-  //\r
-  // Initialize strings to HII database\r
-  //\r
-  HiiHandle = HiiAddPackages (\r
-                &gEfiCallerIdGuid,\r
-                NULL,\r
-                CpuStrings,\r
-                NULL\r
-                );\r
-  ASSERT (HiiHandle != NULL);\r
-\r
-  Token  = STRING_TOKEN (STR_PROCESSOR_VERSION);\r
-  CpuVerStr = HiiGetPackageString(&gEfiCallerIdGuid, Token, NULL);\r
-  CpuVerStrLen = StrLen(CpuVerStr);\r
-  ASSERT (CpuVerStrLen <= SMBIOS_STRING_MAX_LENGTH);\r
-\r
-\r
-  TotalSize = (UINT32)(sizeof(SMBIOS_TABLE_TYPE4) + CpuVerStrLen + 1 + 1);\r
-  SmbiosRecord = AllocatePool(TotalSize);\r
-  ZeroMem(SmbiosRecord, TotalSize);\r
-\r
-  SmbiosRecord->Hdr.Type = EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION;\r
-  SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE4);\r
-  //\r
-  // Make handle chosen by smbios protocol.add automatically.\r
-  //\r
-  SmbiosRecord->Hdr.Handle = 0;  \r
-  //\r
-  // Processor version is the 1st string.\r
-  //\r
-  SmbiosRecord->ProcessorVersion = 1;\r
-  //\r
-  // Store CPU frequency data record to data hub - It's an emulator so make up a value\r
-  //\r
-  SmbiosRecord->CurrentSpeed  = 1234;\r
-\r
-  OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);\r
-  UnicodeStrToAsciiStr(CpuVerStr, OptionalStrStart);\r
-\r
-  //\r
-  // Now we have got the full smbios record, call smbios protocol to add this record.\r
-  //\r
-  LogSmbiosData(Smbios, (UINT8 *) SmbiosRecord);\r
-  FreePool (SmbiosRecord);\r
-\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
-  UINT64      Frequency;\r
-\r
-  //\r
-  // Retrieve the frequency of the performance counter in Hz.\r
-  //  \r
-  gWinNt->QueryPerformanceFrequency ((LARGE_INTEGER *)&Frequency);\r
-  \r
-  //\r
-  // Convert frequency in Hz to a clock period in femtoseconds.\r
-  //\r
-  mTimerPeriod = DivU64x64Remainder (1000000000000000, Frequency, NULL);\r
-  \r
-  CpuUpdateSmbios ();\r
-\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &mCpuTemplate.Handle,\r
-                  &gEfiCpuArchProtocolGuid,   &mCpuTemplate.Cpu,\r
-                  &gEfiCpuIo2ProtocolGuid,    &mCpuTemplate.CpuIo,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return Status;\r
-}\r
diff --git a/Nt32Pkg/CpuRuntimeDxe/CpuDriver.h b/Nt32Pkg/CpuRuntimeDxe/CpuDriver.h
deleted file mode 100644 (file)
index 94f8eb4..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  CpuDriver.h\r
-\r
-Abstract:\r
-\r
-  NT Emulation Architectural Protocol Driver as defined in Tiano.\r
-\r
-**/\r
-\r
-#ifndef _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_\r
-#define _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_\r
-\r
-\r
-#include <FrameworkDxe.h>\r
-#include <IndustryStandard/SmBios.h>\r
-#include <Protocol/Cpu.h>\r
-#include <Protocol/Smbios.h>\r
-#include <Protocol/FrameworkHii.h>\r
-#include <Guid/DataHubRecords.h>\r
-#include <Protocol/CpuIo2.h>\r
-#include <Protocol/WinNtIo.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HiiLib.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
-#include <Library/WinNtLib.h>\r
-\r
-\r
-extern UINT8  CpuStrings[];\r
-\r
-//\r
-// Internal Data Structures\r
-//\r
-#define CPU_ARCH_PROT_PRIVATE_SIGNATURE SIGNATURE_32 ('c', 'a', 'p', 'd')\r
-\r
-typedef struct {\r
-  UINTN                 Signature;\r
-  EFI_HANDLE            Handle;\r
-\r
-  EFI_CPU_ARCH_PROTOCOL Cpu;\r
-  EFI_CPU_IO2_PROTOCOL  CpuIo;\r
-\r
-  //\r
-  // Local Data for CPU interface goes here\r
-  //\r
-  CRITICAL_SECTION      NtCriticalSection;\r
-  BOOLEAN               InterruptState;\r
-\r
-} CPU_ARCH_PROTOCOL_PRIVATE;\r
-\r
-#define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \\r
-  CR (a, \\r
-      CPU_ARCH_PROTOCOL_PRIVATE, \\r
-      Cpu, \\r
-      CPU_ARCH_PROT_PRIVATE_SIGNATURE \\r
-      )\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceRead (\r
-  IN  EFI_CPU_IO2_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
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceWrite (\r
-  IN EFI_CPU_IO2_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
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceRead (\r
-  IN EFI_CPU_IO2_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
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceWrite (\r
-  IN EFI_CPU_IO2_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
-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 4809f9c..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\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_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_IO2_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
-  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\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_UNSUPPORTED;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceWrite (\r
-  IN EFI_CPU_IO2_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
-  if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\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_UNSUPPORTED;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceRead (\r
-  IN EFI_CPU_IO2_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 < 0) || (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_UNSUPPORTED;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceWrite (\r
-  IN EFI_CPU_IO2_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 < 0) || (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_UNSUPPORTED;\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 = (EFI_CPU_IO_PROTOCOL_WIDTH)(Width & 0x03);\r
-  if (Address - 1 + ((UINTN)1 << Width) * Count > Limit) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  AlignMask = ((UINTN)1 << Width) - 1;\r
-  if ((UINTN) Buffer & AlignMask) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
diff --git a/Nt32Pkg/CpuRuntimeDxe/CpuRuntimeDxe.inf b/Nt32Pkg/CpuRuntimeDxe/CpuRuntimeDxe.inf
deleted file mode 100644 (file)
index c55b628..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-## @file\r
-# Component description file for Cpu module.\r
-#\r
-# This CPU module abstracts the interrupt subsystem of a platform and the CPU-specific setjump-long pair.\r
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = Cpu\r
-  FILE_GUID                      = ee993080-5197-4d4e-b63c-f1f7413e33ce\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-\r
-  ENTRY_POINT                    = InitializeCpu\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  CpuIo.c\r
-  Cpu.c\r
-  CpuDriver.h\r
-  Strings.uni\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-[LibraryClasses]\r
-  UefiBootServicesTableLib\r
-  MemoryAllocationLib\r
-  BaseMemoryLib\r
-  UefiDriverEntryPoint\r
-  DebugLib\r
-  HiiLib\r
-  WinNtLib\r
-\r
-[Protocols]\r
-  gEfiWinNtIoProtocolGuid                       # PROTOCOL_NOTIFY SOMETIMES_CONSUMED\r
-  gEfiSmbiosProtocolGuid                        # PROTOCOL SOMETIMES_CONSUMED\r
-  gEfiWinNtIoProtocolGuid                       # PROTOCOL ALWAYS_CONSUMED\r
-  gEfiCpuIo2ProtocolGuid                        # PROTOCOL ALWAYS_PRODUCED\r
-  gEfiCpuArchProtocolGuid                       # PROTOCOL ALWAYS_PRODUCED\r
-\r
-[Depex]\r
-  gEfiSmbiosProtocolGuid\r
diff --git a/Nt32Pkg/CpuRuntimeDxe/Strings.uni b/Nt32Pkg/CpuRuntimeDxe/Strings.uni
deleted file mode 100644 (file)
index 0b3a612..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// *++\r
-//\r
-// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-// SPDX-License-Identifier: BSD-2-Clause-Patent\r
-// \r
-// Module Name:\r
-//\r
-//   Strings.uni\r
-// \r
-// Abstract:\r
-// \r
-//     String definition\r
-// Revision History:\r
-// \r
-// --*/\r
-\r
-/=#\r
-\r
-#langdef  en-US "English"\r
-#langdef  fr-FR "Français"\r
-\r
-\r
-#string STR_PROCESSOR_VERSION          #language en-US  "NT32 Emulated Processor"\r
-                                       #language fr-FR  "Processeur Émulé par NT32"
\ No newline at end of file
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c b/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
deleted file mode 100644 (file)
index 4af535d..0000000
+++ /dev/null
@@ -1,1372 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  FWBlockService.c\r
-\r
-Abstract:\r
-\r
-Revision History\r
-\r
-**/\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiDxe.h>\r
-#include <WinNtDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Guid/EventGroup.h>\r
-#include <Protocol/FirmwareVolumeBlock.h>\r
-#include <Protocol/DevicePath.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DxeServicesTableLib.h>\r
-#include <Library/UefiRuntimeLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DevicePathLib.h>\r
-\r
-#include "FWBlockService.h"\r
-\r
-#define EFI_FVB2_STATUS (EFI_FVB2_READ_STATUS | EFI_FVB2_WRITE_STATUS | EFI_FVB2_LOCK_STATUS)\r
-\r
-ESAL_FWB_GLOBAL         *mFvbModuleGlobal;\r
-\r
-FV_MEMMAP_DEVICE_PATH mFvMemmapDevicePathTemplate = {\r
-  {\r
-    {\r
-      HARDWARE_DEVICE_PATH,\r
-      HW_MEMMAP_DP,\r
-      {\r
-        (UINT8)(sizeof (MEMMAP_DEVICE_PATH)),\r
-        (UINT8)(sizeof (MEMMAP_DEVICE_PATH) >> 8)\r
-      }\r
-    },\r
-    EfiMemoryMappedIO,\r
-    (EFI_PHYSICAL_ADDRESS) 0,\r
-    (EFI_PHYSICAL_ADDRESS) 0,\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    {\r
-      END_DEVICE_PATH_LENGTH,\r
-      0\r
-    }\r
-  }\r
-};\r
-\r
-FV_PIWG_DEVICE_PATH mFvPIWGDevicePathTemplate = {\r
-  {\r
-    {\r
-      MEDIA_DEVICE_PATH,\r
-      MEDIA_PIWG_FW_VOL_DP,\r
-      {\r
-        (UINT8)(sizeof (MEDIA_FW_VOL_DEVICE_PATH)),\r
-        (UINT8)(sizeof (MEDIA_FW_VOL_DEVICE_PATH) >> 8)\r
-      }\r
-    },\r
-    { 0 }\r
-  },\r
-  {\r
-    END_DEVICE_PATH_TYPE,\r
-    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    {\r
-      END_DEVICE_PATH_LENGTH,\r
-      0\r
-    }\r
-  }\r
-};\r
-\r
-EFI_FW_VOL_BLOCK_DEVICE mFvbDeviceTemplate = {\r
-  FVB_DEVICE_SIGNATURE,\r
-  NULL,\r
-  0,\r
-  {\r
-    FvbProtocolGetAttributes,\r
-    FvbProtocolSetAttributes,\r
-    FvbProtocolGetPhysicalAddress,\r
-    FvbProtocolGetBlockSize,\r
-    FvbProtocolRead,\r
-    FvbProtocolWrite,\r
-    FvbProtocolEraseBlocks,\r
-    NULL\r
-  }\r
-};\r
-\r
-\r
-\r
-VOID\r
-EFIAPI\r
-FvbVirtualddressChangeEvent (\r
-  IN EFI_EVENT        Event,\r
-  IN VOID             *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Fixup internal data so that EFI and SAL can be call in virtual mode.\r
-  Call the passed in Child Notify event and convert the mFvbModuleGlobal\r
-  date items to there virtual address.\r
-\r
-  mFvbModuleGlobal->FvInstance[FVB_PHYSICAL]  - Physical copy of instance data\r
-  mFvbModuleGlobal->FvInstance[FVB_VIRTUAL]   - Virtual pointer to common\r
-                                                instance data.\r
-\r
-Arguments:\r
-\r
-  (Standard EFI notify event - EFI_EVENT_NOTIFY)\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_INSTANCE *FwhInstance;\r
-  UINTN               Index;\r
-\r
-  EfiConvertPointer (0x0, (VOID **) &mFvbModuleGlobal->FvInstance[FVB_VIRTUAL]);\r
-\r
-  //\r
-  // Convert the base address of all the instances\r
-  //\r
-  Index       = 0;\r
-  FwhInstance = mFvbModuleGlobal->FvInstance[FVB_PHYSICAL];\r
-  while (Index < mFvbModuleGlobal->NumFv) {\r
-    EfiConvertPointer (0x0, (VOID **) &FwhInstance->FvBase[FVB_VIRTUAL]);\r
-    FwhInstance = (EFI_FW_VOL_INSTANCE *)\r
-      (\r
-        (UINTN) ((UINT8 *) FwhInstance) + FwhInstance->VolumeHeader.HeaderLength +\r
-          (sizeof (EFI_FW_VOL_INSTANCE) - sizeof (EFI_FIRMWARE_VOLUME_HEADER))\r
-      );\r
-    Index++;\r
-  }\r
-\r
-  EfiConvertPointer (0x0, (VOID **) &mFvbModuleGlobal->FvbScratchSpace[FVB_VIRTUAL]);\r
-  EfiConvertPointer (0x0, (VOID **) &mFvbModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-GetFvbInstance (\r
-  IN  UINTN                               Instance,\r
-  IN  ESAL_FWB_GLOBAL                     *Global,\r
-  OUT EFI_FW_VOL_INSTANCE                 **FwhInstance,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves the physical address of a memory mapped FV\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose base address is going to be\r
-                          returned\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  FwhInstance           - The EFI_FW_VOL_INSTANCE fimrware instance structure\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-  EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_INSTANCE *FwhRecord;\r
-\r
-  if (Instance >= Global->NumFv) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-  //\r
-  // Find the right instance of the FVB private data\r
-  //\r
-  FwhRecord = Global->FvInstance[Virtual];\r
-  while (Instance > 0) {\r
-    FwhRecord = (EFI_FW_VOL_INSTANCE *)\r
-      (\r
-        (UINTN) ((UINT8 *) FwhRecord) + FwhRecord->VolumeHeader.HeaderLength +\r
-          (sizeof (EFI_FW_VOL_INSTANCE) - sizeof (EFI_FIRMWARE_VOLUME_HEADER))\r
-      );\r
-    Instance--;\r
-  }\r
-\r
-  *FwhInstance = FwhRecord;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-FvbGetPhysicalAddress (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_PHYSICAL_ADDRESS                *Address,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves the physical address of a memory mapped FV\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose base address is going to be\r
-                          returned\r
-  Address               - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS\r
-                          that on successful return, contains the base address\r
-                          of the firmware volume.\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-  EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_INSTANCE *FwhInstance;\r
-  EFI_STATUS          Status;\r
-\r
-  //\r
-  // Find the right instance of the FVB private data\r
-  //\r
-  Status = GetFvbInstance (Instance, Global, &FwhInstance, Virtual);\r
-  ASSERT_EFI_ERROR (Status);\r
-  *Address = FwhInstance->FvBase[Virtual];\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-FvbGetVolumeAttributes (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_FVB_ATTRIBUTES_2                *Attributes,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves attributes, insures positive polarity of attribute bits, returns\r
-  resulting attributes in output parameter\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose attributes is going to be\r
-                          returned\r
-  Attributes            - Output buffer which contains attributes\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-  EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_INSTANCE *FwhInstance;\r
-  EFI_STATUS          Status;\r
-\r
-  //\r
-  // Find the right instance of the FVB private data\r
-  //\r
-  Status = GetFvbInstance (Instance, Global, &FwhInstance, Virtual);\r
-  ASSERT_EFI_ERROR (Status);\r
-  *Attributes = FwhInstance->VolumeHeader.Attributes;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-FvbGetLbaAddress (\r
-  IN  UINTN                               Instance,\r
-  IN  EFI_LBA                             Lba,\r
-  OUT UINTN                               *LbaAddress,\r
-  OUT UINTN                               *LbaLength,\r
-  OUT UINTN                               *NumOfBlocks,\r
-  IN  ESAL_FWB_GLOBAL                     *Global,\r
-  IN  BOOLEAN                             Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves the starting address of an LBA in an FV\r
-\r
-Arguments:\r
-  Instance              - The FV instance which the Lba belongs to\r
-  Lba                   - The logical block address\r
-  LbaAddress            - On output, contains the physical starting address\r
-                          of the Lba\r
-  LbaLength             - On output, contains the length of the block\r
-  NumOfBlocks           - A pointer to a caller allocated UINTN in which the\r
-                          number of consecutive blocks starting with Lba is\r
-                          returned. All blocks in this range have a size of\r
-                          BlockSize\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-  EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
-  UINT32                  NumBlocks;\r
-  UINT32                  BlockLength;\r
-  UINTN                   Offset;\r
-  EFI_LBA                 StartLba;\r
-  EFI_LBA                 NextLba;\r
-  EFI_FW_VOL_INSTANCE     *FwhInstance;\r
-  EFI_FV_BLOCK_MAP_ENTRY  *BlockMap;\r
-  EFI_STATUS              Status;\r
-\r
-  //\r
-  // Find the right instance of the FVB private data\r
-  //\r
-  Status = GetFvbInstance (Instance, Global, &FwhInstance, Virtual);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  StartLba  = 0;\r
-  Offset    = 0;\r
-  BlockMap  = &(FwhInstance->VolumeHeader.BlockMap[0]);\r
-\r
-  //\r
-  // Parse the blockmap of the FV to find which map entry the Lba belongs to\r
-  //\r
-  while (TRUE) {\r
-    NumBlocks   = BlockMap->NumBlocks;\r
-    BlockLength = BlockMap->Length;\r
-\r
-    if (NumBlocks == 0 || BlockLength == 0) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-\r
-    NextLba = StartLba + NumBlocks;\r
-\r
-    //\r
-    // The map entry found\r
-    //\r
-    if (Lba >= StartLba && Lba < NextLba) {\r
-      Offset = Offset + (UINTN) MultU64x32 ((Lba - StartLba), BlockLength);\r
-      if (LbaAddress != NULL) {\r
-        *LbaAddress = FwhInstance->FvBase[Virtual] + Offset;\r
-      }\r
-\r
-      if (LbaLength != NULL) {\r
-        *LbaLength = BlockLength;\r
-      }\r
-\r
-      if (NumOfBlocks != NULL) {\r
-        *NumOfBlocks = (UINTN) (NextLba - Lba);\r
-      }\r
-\r
-      return EFI_SUCCESS;\r
-    }\r
-\r
-    StartLba  = NextLba;\r
-    Offset    = Offset + NumBlocks * BlockLength;\r
-    BlockMap++;\r
-  }\r
-}\r
-\r
-EFI_STATUS\r
-FvbReadBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  IN UINTN                                BlockOffset,\r
-  IN OUT UINTN                            *NumBytes,\r
-  IN UINT8                                *Buffer,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Reads specified number of bytes into a buffer from the specified block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be read from\r
-  Lba                   - The logical block address to be read from\r
-  BlockOffset           - Offset into the block at which to begin reading\r
-  NumBytes              - Pointer that on input contains the total size of\r
-                          the buffer. On output, it contains the total number\r
-                          of bytes read\r
-  Buffer                - Pointer to a caller allocated buffer that will be\r
-                          used to hold the data read\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume was read successfully and\r
-                          contents are in Buffer\r
-  EFI_BAD_BUFFER_SIZE   - Read attempted across a LBA boundary. On output,\r
-                          NumBytes contains the total number of bytes returned\r
-                          in Buffer\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the ReadDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be read\r
-  EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL\r
-\r
---*/\r
-{\r
-  EFI_FVB_ATTRIBUTES_2  Attributes;\r
-  UINTN                 LbaAddress;\r
-  UINTN                 LbaLength;\r
-  EFI_STATUS            Status;\r
-\r
-  //\r
-  // Check for invalid conditions\r
-  //\r
-  if ((NumBytes == NULL) || (Buffer == NULL)) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  if (*NumBytes == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = FvbGetLbaAddress (Instance, Lba, &LbaAddress, &LbaLength, NULL, Global, Virtual);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-  //\r
-  // Check if the FV is read enabled\r
-  //\r
-  FvbGetVolumeAttributes (Instance, &Attributes, Global, Virtual);\r
-\r
-  if ((Attributes & EFI_FVB2_READ_STATUS) == 0) {\r
-    return EFI_ACCESS_DENIED;\r
-  }\r
-  //\r
-  // Perform boundary checks and adjust NumBytes\r
-  //\r
-  if (BlockOffset > LbaLength) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  if (LbaLength < (*NumBytes + BlockOffset)) {\r
-    *NumBytes = (UINT32) (LbaLength - BlockOffset);\r
-    Status    = EFI_BAD_BUFFER_SIZE;\r
-  }\r
-\r
-  CopyMem (Buffer, (UINT8 *) (LbaAddress + BlockOffset), (UINTN) (*NumBytes));\r
-\r
-  return Status;\r
-}\r
-\r
-EFI_STATUS\r
-FvbWriteBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  IN UINTN                                BlockOffset,\r
-  IN OUT UINTN                            *NumBytes,\r
-  IN UINT8                                *Buffer,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Writes specified number of bytes from the input buffer to the block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be written to\r
-  Lba                   - The starting logical block index to write to\r
-  BlockOffset           - Offset into the block at which to begin writing\r
-  NumBytes              - Pointer that on input contains the total size of\r
-                          the buffer. On output, it contains the total number\r
-                          of bytes actually written\r
-  Buffer                - Pointer to a caller allocated buffer that contains\r
-                          the source for the write\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume was written successfully\r
-  EFI_BAD_BUFFER_SIZE   - Write attempted across a LBA boundary. On output,\r
-                          NumBytes contains the total number of bytes\r
-                          actually written\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the WriteDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be written\r
-  EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL\r
-\r
---*/\r
-{\r
-  EFI_FVB_ATTRIBUTES_2  Attributes;\r
-  UINTN                 LbaAddress;\r
-  UINTN                 LbaLength;\r
-  EFI_STATUS            Status;\r
-\r
-  //\r
-  // Check for invalid conditions\r
-  //\r
-  if ((NumBytes == NULL) || (Buffer == NULL)) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  if (*NumBytes == 0) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  Status = FvbGetLbaAddress (Instance, Lba, &LbaAddress, &LbaLength, NULL, Global, Virtual);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-  //\r
-  // Check if the FV is write enabled\r
-  //\r
-  FvbGetVolumeAttributes (Instance, &Attributes, Global, Virtual);\r
-\r
-  if ((Attributes & EFI_FVB2_WRITE_STATUS) == 0) {\r
-    return EFI_ACCESS_DENIED;\r
-  }\r
-  //\r
-  // Perform boundary checks and adjust NumBytes\r
-  //\r
-  if (BlockOffset > LbaLength) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  if (LbaLength < (*NumBytes + BlockOffset)) {\r
-    *NumBytes = (UINT32) (LbaLength - BlockOffset);\r
-    Status    = EFI_BAD_BUFFER_SIZE;\r
-  }\r
-  //\r
-  // Write data\r
-  //\r
-  CopyMem ((UINT8 *) (LbaAddress + BlockOffset), Buffer, (UINTN) (*NumBytes));\r
-\r
-  return Status;\r
-}\r
-\r
-EFI_STATUS\r
-FvbEraseBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Erases and initializes a firmware volume block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be erased\r
-  Lba                   - The logical block index to be erased\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The erase request was successfully completed\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the WriteDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be written. Firmware device may have been\r
-                          partially erased\r
-  EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
-\r
-  EFI_FVB_ATTRIBUTES_2  Attributes;\r
-  UINTN                 LbaAddress;\r
-  UINTN                 LbaLength;\r
-  EFI_STATUS            Status;\r
-  UINT8                 Data;\r
-\r
-  //\r
-  // Check if the FV is write enabled\r
-  //\r
-  FvbGetVolumeAttributes (Instance, &Attributes, Global, Virtual);\r
-\r
-  if ((Attributes & EFI_FVB2_WRITE_STATUS) == 0) {\r
-    return EFI_ACCESS_DENIED;\r
-  }\r
-  //\r
-  // Get the starting address of the block for erase.\r
-  //\r
-  Status = FvbGetLbaAddress (Instance, Lba, &LbaAddress, &LbaLength, NULL, Global, Virtual);\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  if ((Attributes & EFI_FVB2_ERASE_POLARITY) != 0) {\r
-    Data = 0xFF;\r
-  } else {\r
-    Data = 0x0;\r
-  }\r
-\r
-  SetMem ((UINT8 *) LbaAddress, LbaLength, Data);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-FvbSetVolumeAttributes (\r
-  IN UINTN                                  Instance,\r
-  IN OUT EFI_FVB_ATTRIBUTES_2               *Attributes,\r
-  IN ESAL_FWB_GLOBAL                        *Global,\r
-  IN BOOLEAN                                Virtual\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Modifies the current settings of the firmware volume according to the\r
-  input parameter, and returns the new setting of the volume\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose attributes is going to be\r
-                          modified\r
-  Attributes            - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2\r
-                          containing the desired firmware volume settings.\r
-                          On successful return, it contains the new settings\r
-                          of the firmware volume\r
-  Global                - Pointer to ESAL_FWB_GLOBAL that contains all\r
-                          instance data\r
-  Virtual               - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-  EFI_ACCESS_DENIED     - The volume setting is locked and cannot be modified\r
-  EFI_INVALID_PARAMETER - Instance not found, or The attributes requested are\r
-                          in conflict with the capabilities as declared in the\r
-                          firmware volume header\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_INSTANCE   *FwhInstance;\r
-  EFI_FVB_ATTRIBUTES_2  OldAttributes;\r
-  EFI_FVB_ATTRIBUTES_2  *AttribPtr;\r
-  UINT32                Capabilities;\r
-  UINT32                OldStatus;\r
-  UINT32                NewStatus;\r
-  EFI_STATUS            Status;\r
-  EFI_FVB_ATTRIBUTES_2  UnchangedAttributes;\r
-\r
-  //\r
-  // Find the right instance of the FVB private data\r
-  //\r
-  Status = GetFvbInstance (Instance, Global, &FwhInstance, Virtual);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  AttribPtr     = (EFI_FVB_ATTRIBUTES_2 *) &(FwhInstance->VolumeHeader.Attributes);\r
-  OldAttributes = *AttribPtr;\r
-  Capabilities  = OldAttributes & (EFI_FVB2_READ_DISABLED_CAP | \\r
-                                   EFI_FVB2_READ_ENABLED_CAP | \\r
-                                   EFI_FVB2_WRITE_DISABLED_CAP | \\r
-                                   EFI_FVB2_WRITE_ENABLED_CAP | \\r
-                                   EFI_FVB2_LOCK_CAP \\r
-                                   );\r
-  OldStatus     = OldAttributes & EFI_FVB2_STATUS;\r
-  NewStatus     = *Attributes & EFI_FVB2_STATUS;\r
-\r
-  UnchangedAttributes = EFI_FVB2_READ_DISABLED_CAP  | \\r
-                        EFI_FVB2_READ_ENABLED_CAP   | \\r
-                        EFI_FVB2_WRITE_DISABLED_CAP | \\r
-                        EFI_FVB2_WRITE_ENABLED_CAP  | \\r
-                        EFI_FVB2_LOCK_CAP           | \\r
-                        EFI_FVB2_STICKY_WRITE       | \\r
-                        EFI_FVB2_MEMORY_MAPPED      | \\r
-                        EFI_FVB2_ERASE_POLARITY     | \\r
-                        EFI_FVB2_READ_LOCK_CAP      | \\r
-                        EFI_FVB2_WRITE_LOCK_CAP     | \\r
-                        EFI_FVB2_ALIGNMENT;\r
-\r
-  //\r
-  // Some attributes of FV is read only can *not* be set\r
-  //\r
-  if ((OldAttributes & UnchangedAttributes) ^ (*Attributes & UnchangedAttributes)) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-  //\r
-  // If firmware volume is locked, no status bit can be updated\r
-  //\r
-  if (OldAttributes & EFI_FVB2_LOCK_STATUS) {\r
-    if (OldStatus ^ NewStatus) {\r
-      return EFI_ACCESS_DENIED;\r
-    }\r
-  }\r
-  //\r
-  // Test read disable\r
-  //\r
-  if ((Capabilities & EFI_FVB2_READ_DISABLED_CAP) == 0) {\r
-    if ((NewStatus & EFI_FVB2_READ_STATUS) == 0) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-  //\r
-  // Test read enable\r
-  //\r
-  if ((Capabilities & EFI_FVB2_READ_ENABLED_CAP) == 0) {\r
-    if (NewStatus & EFI_FVB2_READ_STATUS) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-  //\r
-  // Test write disable\r
-  //\r
-  if ((Capabilities & EFI_FVB2_WRITE_DISABLED_CAP) == 0) {\r
-    if ((NewStatus & EFI_FVB2_WRITE_STATUS) == 0) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-  //\r
-  // Test write enable\r
-  //\r
-  if ((Capabilities & EFI_FVB2_WRITE_ENABLED_CAP) == 0) {\r
-    if (NewStatus & EFI_FVB2_WRITE_STATUS) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-  //\r
-  // Test lock\r
-  //\r
-  if ((Capabilities & EFI_FVB2_LOCK_CAP) == 0) {\r
-    if (NewStatus & EFI_FVB2_LOCK_STATUS) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-\r
-  *AttribPtr  = (*AttribPtr) & (0xFFFFFFFF & (~EFI_FVB2_STATUS));\r
-  *AttribPtr  = (*AttribPtr) | NewStatus;\r
-  *Attributes = *AttribPtr;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-//\r
-// FVB protocol APIs\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetPhysicalAddress (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  OUT EFI_PHYSICAL_ADDRESS                        *Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Retrieves the physical address of the device.\r
-\r
-Arguments:\r
-\r
-  This                  - Calling context\r
-  Address               - Output buffer containing the address.\r
-\r
-Returns:\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbGetPhysicalAddress (FvbDevice->Instance, Address, mFvbModuleGlobal, EfiGoneVirtual ());\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetBlockSize (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN CONST EFI_LBA                                     Lba,\r
-  OUT UINTN                                       *BlockSize,\r
-  OUT UINTN                                       *NumOfBlocks\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieve the size of a logical block\r
-\r
-Arguments:\r
-  This                  - Calling context\r
-  Lba                   - Indicates which block to return the size for.\r
-  BlockSize             - A pointer to a caller allocated UINTN in which\r
-                          the size of the block is returned\r
-  NumOfBlocks           - a pointer to a caller allocated UINTN in which the\r
-                          number of consecutive blocks starting with Lba is\r
-                          returned. All blocks in this range have a size of\r
-                          BlockSize\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume was read successfully and\r
-                          contents are in Buffer\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbGetLbaAddress (\r
-          FvbDevice->Instance,\r
-          Lba,\r
-          NULL,\r
-          BlockSize,\r
-          NumOfBlocks,\r
-          mFvbModuleGlobal,\r
-          EfiGoneVirtual ()\r
-          );\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetAttributes (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  OUT EFI_FVB_ATTRIBUTES_2                              *Attributes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-    Retrieves Volume attributes.  No polarity translations are done.\r
-\r
-Arguments:\r
-    This                - Calling context\r
-    Attributes          - output buffer which contains attributes\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbGetVolumeAttributes (FvbDevice->Instance, Attributes, mFvbModuleGlobal, EfiGoneVirtual ());\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolSetAttributes (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN OUT EFI_FVB_ATTRIBUTES_2                           *Attributes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Sets Volume attributes. No polarity translations are done.\r
-\r
-Arguments:\r
-  This                  - Calling context\r
-  Attributes            - output buffer which contains attributes\r
-\r
-Returns:\r
-  EFI_SUCCESS           - Successfully returns\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbSetVolumeAttributes (FvbDevice->Instance, Attributes, mFvbModuleGlobal, EfiGoneVirtual ());\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolEraseBlocks (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *This,\r
-  ...\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  The EraseBlock() function erases one or more blocks as denoted by the\r
-  variable argument list. The entire parameter list of blocks must be verified\r
-  prior to erasing any blocks.  If a block is requested that does not exist\r
-  within the associated firmware volume (it has a larger index than the last\r
-  block of the firmware volume), the EraseBlock() function must return\r
-  EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
-\r
-Arguments:\r
-  This                  - Calling context\r
-  ...                   - Starting LBA followed by Number of Lba to erase.\r
-                          a -1 to terminate the list.\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The erase request was successfully completed\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the WriteDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be written. Firmware device may have been\r
-                          partially erased\r
-\r
---*/\r
-{\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-  EFI_FW_VOL_INSTANCE     *FwhInstance;\r
-  UINTN                   NumOfBlocks;\r
-  VA_LIST                 args;\r
-  EFI_LBA                 StartingLba;\r
-  UINTN                   NumOfLba;\r
-  EFI_STATUS              Status;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  Status    = GetFvbInstance (FvbDevice->Instance, mFvbModuleGlobal, &FwhInstance, EfiGoneVirtual ());\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  NumOfBlocks = FwhInstance->NumOfBlocks;\r
-\r
-  VA_START (args, This);\r
-\r
-  do {\r
-    StartingLba = VA_ARG (args, EFI_LBA);\r
-    if (StartingLba == EFI_LBA_LIST_TERMINATOR) {\r
-      break;\r
-    }\r
-\r
-    NumOfLba = VA_ARG (args, UINTN);\r
-\r
-    //\r
-    // Check input parameters\r
-    //\r
-    if ((NumOfLba == 0) || ((StartingLba + NumOfLba) > NumOfBlocks)) {\r
-      VA_END (args);\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-  } while (1);\r
-\r
-  VA_END (args);\r
-\r
-  VA_START (args, This);\r
-  do {\r
-    StartingLba = VA_ARG (args, EFI_LBA);\r
-    if (StartingLba == EFI_LBA_LIST_TERMINATOR) {\r
-      break;\r
-    }\r
-\r
-    NumOfLba = VA_ARG (args, UINTN);\r
-\r
-    while (NumOfLba > 0) {\r
-      Status = FvbEraseBlock (FvbDevice->Instance, StartingLba, mFvbModuleGlobal, EfiGoneVirtual ());\r
-      if (EFI_ERROR (Status)) {\r
-        VA_END (args);\r
-        return Status;\r
-      }\r
-\r
-      StartingLba++;\r
-      NumOfLba--;\r
-    }\r
-\r
-  } while (1);\r
-\r
-  VA_END (args);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolWrite (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN       EFI_LBA                                      Lba,\r
-  IN       UINTN                                        Offset,\r
-  IN OUT   UINTN                                    *NumBytes,\r
-  IN       UINT8                                        *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Writes data beginning at Lba:Offset from FV. The write terminates either\r
-  when *NumBytes of data have been written, or when a block boundary is\r
-  reached.  *NumBytes is updated to reflect the actual number of bytes\r
-  written. The write opertion does not include erase. This routine will\r
-  attempt to write only the specified bytes. If the writes do not stick,\r
-  it will return an error.\r
-\r
-Arguments:\r
-  This                  - Calling context\r
-  Lba                   - Block in which to begin write\r
-  Offset                - Offset in the block at which to begin write\r
-  NumBytes              - On input, indicates the requested write size. On\r
-                          output, indicates the actual number of bytes written\r
-  Buffer                - Buffer containing source data for the write.\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume was written successfully\r
-  EFI_BAD_BUFFER_SIZE   - Write attempted across a LBA boundary. On output,\r
-                          NumBytes contains the total number of bytes\r
-                          actually written\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the WriteDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be written\r
-  EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL\r
-\r
---*/\r
-{\r
-\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbWriteBlock (FvbDevice->Instance, (EFI_LBA)Lba, (UINTN)Offset, NumBytes, (UINT8 *)Buffer, mFvbModuleGlobal, EfiGoneVirtual ());\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolRead (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN CONST EFI_LBA                                      Lba,\r
-  IN CONST UINTN                                        Offset,\r
-  IN OUT UINTN                                    *NumBytes,\r
-  IN UINT8                                        *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Reads data beginning at Lba:Offset from FV. The Read terminates either\r
-  when *NumBytes of data have been read, or when a block boundary is\r
-  reached.  *NumBytes is updated to reflect the actual number of bytes\r
-  written. The write opertion does not include erase. This routine will\r
-  attempt to write only the specified bytes. If the writes do not stick,\r
-  it will return an error.\r
-\r
-Arguments:\r
-  This                  - Calling context\r
-  Lba                   - Block in which to begin Read\r
-  Offset                - Offset in the block at which to begin Read\r
-  NumBytes              - On input, indicates the requested write size. On\r
-                          output, indicates the actual number of bytes Read\r
-  Buffer                - Buffer containing source data for the Read.\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume was read successfully and\r
-                          contents are in Buffer\r
-  EFI_BAD_BUFFER_SIZE   - Read attempted across a LBA boundary. On output,\r
-                          NumBytes contains the total number of bytes returned\r
-                          in Buffer\r
-  EFI_ACCESS_DENIED     - The firmware volume is in the ReadDisabled state\r
-  EFI_DEVICE_ERROR      - The block device is not functioning correctly and\r
-                          could not be read\r
-  EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL\r
-\r
---*/\r
-{\r
-\r
-  EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
-  FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
-\r
-  return FvbReadBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer, mFvbModuleGlobal, EfiGoneVirtual ());\r
-}\r
-\r
-EFI_STATUS\r
-ValidateFvHeader (\r
-  EFI_FIRMWARE_VOLUME_HEADER            *FwVolHeader\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Check the integrity of firmware volume header\r
-\r
-Arguments:\r
-  FwVolHeader           - A pointer to a firmware volume header\r
-\r
-Returns:\r
-  EFI_SUCCESS           - The firmware volume is consistent\r
-  EFI_NOT_FOUND         - The firmware volume has corrupted. So it is not an FV\r
-\r
---*/\r
-{\r
-  //\r
-  // Verify the header revision, header signature, length\r
-  // Length of FvBlock cannot be 2**64-1\r
-  // HeaderLength cannot be an odd number\r
-  //\r
-  if ((FwVolHeader->Revision != EFI_FVH_REVISION) ||\r
-      (FwVolHeader->Signature != EFI_FVH_SIGNATURE) ||\r
-      (FwVolHeader->FvLength == ((UINTN) -1)) ||\r
-      ((FwVolHeader->HeaderLength & 0x01) != 0)\r
-      ) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-  \r
-  //\r
-  // Verify the header checksum\r
-  //\r
-  if (CalculateCheckSum16 ((UINT16 *) FwVolHeader, FwVolHeader->HeaderLength) != 0) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbInitialize (\r
-  IN EFI_HANDLE         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE   *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This function does common initialization for FVB services\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  EFI_STATUS                          Status;\r
-  EFI_FW_VOL_INSTANCE                 *FwhInstance;\r
-  EFI_FIRMWARE_VOLUME_HEADER          *FwVolHeader;\r
-  EFI_DXE_SERVICES                    *DxeServices;\r
-  EFI_GCD_MEMORY_SPACE_DESCRIPTOR     Descriptor;\r
-  UINT32                              BufferSize;\r
-  EFI_FV_BLOCK_MAP_ENTRY              *PtrBlockMapEntry;\r
-  EFI_HANDLE                          FwbHandle;\r
-  EFI_FW_VOL_BLOCK_DEVICE             *FvbDevice;\r
-  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *OldFwbInterface;\r
-  UINT32                              MaxLbaSize;\r
-  EFI_PHYSICAL_ADDRESS                BaseAddress;\r
-  UINT64                              Length;\r
-  UINTN                               NumOfBlocks;\r
-  EFI_PEI_HOB_POINTERS                FvHob;\r
-\r
-  //\r
-  // Get the DXE services table\r
-  //\r
-  DxeServices = gDS;\r
-\r
-  //\r
-  // Allocate runtime services data for global variable, which contains\r
-  // the private data of all firmware volume block instances\r
-  //\r
-  mFvbModuleGlobal = AllocateRuntimePool (sizeof (ESAL_FWB_GLOBAL));\r
-  ASSERT (mFvbModuleGlobal != NULL);\r
-\r
-  //\r
-  // Calculate the total size for all firmware volume block instances\r
-  //\r
-  BufferSize            = 0;\r
-\r
-  FvHob.Raw = GetHobList ();\r
-  while ((FvHob.Raw = GetNextHob (EFI_HOB_TYPE_FV, FvHob.Raw)) != NULL) {\r
-    BaseAddress = FvHob.FirmwareVolume->BaseAddress;\r
-    Length      = FvHob.FirmwareVolume->Length;\r
-    //\r
-    // Check if it is a "real" flash\r
-    //\r
-    Status = DxeServices->GetMemorySpaceDescriptor (\r
-                            BaseAddress,\r
-                            &Descriptor\r
-                            );\r
-    if (EFI_ERROR (Status)) {\r
-      break;\r
-    }\r
-\r
-    if (Descriptor.GcdMemoryType != EfiGcdMemoryTypeMemoryMappedIo) {\r
-      FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-      continue;\r
-    }\r
-\r
-    FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress;\r
-    Status      = ValidateFvHeader (FwVolHeader);\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // Get FvbInfo\r
-      //\r
-      Status = GetFvbInfo (Length, &FwVolHeader);\r
-      if (EFI_ERROR (Status)) {\r
-        FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-        continue;\r
-      }\r
-    }\r
-\r
-    BufferSize += (sizeof (EFI_FW_VOL_INSTANCE) + FwVolHeader->HeaderLength - sizeof (EFI_FIRMWARE_VOLUME_HEADER));\r
-    FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-  }\r
-\r
-  //\r
-  // Only need to allocate once. There is only one copy of physical memory for\r
-  // the private data of each FV instance. But in virtual mode or in physical\r
-  // mode, the address of the the physical memory may be different.\r
-  //\r
-  mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] = AllocateRuntimePool (BufferSize);\r
-  ASSERT (mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] != NULL);\r
-\r
-  //\r
-  // Make a virtual copy of the FvInstance pointer.\r
-  //\r
-  FwhInstance = mFvbModuleGlobal->FvInstance[FVB_PHYSICAL];\r
-  mFvbModuleGlobal->FvInstance[FVB_VIRTUAL] = FwhInstance;\r
-\r
-  mFvbModuleGlobal->NumFv                   = 0;\r
-  MaxLbaSize = 0;\r
-\r
-  FvHob.Raw = GetHobList ();\r
-  while (NULL != (FvHob.Raw = GetNextHob (EFI_HOB_TYPE_FV, FvHob.Raw))) {\r
-    BaseAddress = FvHob.FirmwareVolume->BaseAddress;\r
-    Length      = FvHob.FirmwareVolume->Length;\r
-    //\r
-    // Check if it is a "real" flash\r
-    //\r
-    Status = DxeServices->GetMemorySpaceDescriptor (\r
-                            BaseAddress,\r
-                            &Descriptor\r
-                            );\r
-    if (EFI_ERROR (Status)) {\r
-      break;\r
-    }\r
-\r
-    if (Descriptor.GcdMemoryType != EfiGcdMemoryTypeMemoryMappedIo) {\r
-      FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-      continue;\r
-    }\r
-\r
-    FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress;\r
-    Status      = ValidateFvHeader (FwVolHeader);\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // Get FvbInfo to provide in FwhInstance.\r
-      //\r
-      Status = GetFvbInfo (Length, &FwVolHeader);\r
-      if (EFI_ERROR (Status)) {\r
-        FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-        continue;\r
-      }\r
-      //\r
-      //  Write healthy FV header back.\r
-      //\r
-      CopyMem (\r
-        (VOID *) (UINTN) BaseAddress,\r
-        (VOID *) FwVolHeader,\r
-        FwVolHeader->HeaderLength\r
-        );\r
-    }\r
-    \r
-    FwhInstance->FvBase[FVB_PHYSICAL] = (UINTN) BaseAddress;\r
-    FwhInstance->FvBase[FVB_VIRTUAL]  = (UINTN) BaseAddress;\r
-\r
-    CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);\r
-    FwVolHeader = &(FwhInstance->VolumeHeader);\r
-    EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);\r
-\r
-    NumOfBlocks = 0;\r
-\r
-    for (PtrBlockMapEntry = FwVolHeader->BlockMap; PtrBlockMapEntry->NumBlocks != 0; PtrBlockMapEntry++) {\r
-      //\r
-      // Get the maximum size of a block.\r
-      //\r
-      if (MaxLbaSize < PtrBlockMapEntry->Length) {\r
-        MaxLbaSize = PtrBlockMapEntry->Length;\r
-      }\r
-\r
-      NumOfBlocks = NumOfBlocks + PtrBlockMapEntry->NumBlocks;\r
-    }\r
-    //\r
-    // The total number of blocks in the FV.\r
-    //\r
-    FwhInstance->NumOfBlocks = NumOfBlocks;\r
-\r
-    //\r
-    // Add a FVB Protocol Instance\r
-    //\r
-    FvbDevice = AllocateRuntimePool (sizeof (EFI_FW_VOL_BLOCK_DEVICE));\r
-    ASSERT (FvbDevice != NULL);\r
-\r
-    CopyMem (FvbDevice, &mFvbDeviceTemplate, sizeof (EFI_FW_VOL_BLOCK_DEVICE));\r
-\r
-    FvbDevice->Instance = mFvbModuleGlobal->NumFv;\r
-    mFvbModuleGlobal->NumFv++;\r
-    \r
-    \r
-    //\r
-    // Set up the devicepath\r
-    //\r
-    if (FwVolHeader->ExtHeaderOffset == 0) {\r
-        //\r
-        // FV does not contains extension header, then produce MEMMAP_DEVICE_PATH\r
-        //\r
-      FvbDevice->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);\r
-      ((FV_MEMMAP_DEVICE_PATH *) FvbDevice->DevicePath)->MemMapDevPath.StartingAddress = BaseAddress;\r
-      ((FV_MEMMAP_DEVICE_PATH *) FvbDevice->DevicePath)->MemMapDevPath.EndingAddress   = BaseAddress + FwVolHeader->FvLength - 1;\r
-    } else {\r
-      FvbDevice->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);\r
-      CopyGuid (\r
-        &((FV_PIWG_DEVICE_PATH *)FvbDevice->DevicePath)->FvDevPath.FvName, \r
-        (GUID *)(UINTN)(BaseAddress + FwVolHeader->ExtHeaderOffset)\r
-        );\r
-    }\r
-    //\r
-    // Find a handle with a matching device path that has supports FW Block protocol\r
-    //\r
-    Status = gBS->LocateDevicePath (&gEfiFirmwareVolumeBlockProtocolGuid, &FvbDevice->DevicePath, &FwbHandle);\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // LocateDevicePath fails so install a new interface and device path\r
-      //\r
-      FwbHandle = NULL;\r
-      Status = gBS->InstallMultipleProtocolInterfaces (\r
-                      &FwbHandle,\r
-                      &gEfiFirmwareVolumeBlockProtocolGuid,\r
-                      &FvbDevice->FwVolBlockInstance,\r
-                      &gEfiDevicePathProtocolGuid,\r
-                      FvbDevice->DevicePath,\r
-                      NULL\r
-                      );\r
-      ASSERT_EFI_ERROR (Status);\r
-    } else if (IsDevicePathEnd (FvbDevice->DevicePath)) {\r
-      //\r
-      // Device allready exists, so reinstall the FVB protocol\r
-      //\r
-      Status = gBS->HandleProtocol (\r
-                      FwbHandle,\r
-                      &gEfiFirmwareVolumeBlockProtocolGuid,\r
-                      (VOID**)&OldFwbInterface\r
-                      );\r
-      ASSERT_EFI_ERROR (Status);\r
-\r
-      Status = gBS->ReinstallProtocolInterface (\r
-                      FwbHandle,\r
-                      &gEfiFirmwareVolumeBlockProtocolGuid,\r
-                      OldFwbInterface,\r
-                      &FvbDevice->FwVolBlockInstance\r
-                      );\r
-      ASSERT_EFI_ERROR (Status);\r
-\r
-    } else {\r
-      //\r
-      // There was a FVB protocol on an End Device Path node\r
-      //\r
-      ASSERT (FALSE);\r
-    }\r
-\r
-    FwhInstance = (EFI_FW_VOL_INSTANCE *)\r
-      (\r
-        (UINTN) ((UINT8 *) FwhInstance) + FwVolHeader->HeaderLength +\r
-          (sizeof (EFI_FW_VOL_INSTANCE) - sizeof (EFI_FIRMWARE_VOLUME_HEADER))\r
-      );\r
-\r
-    FvHob.Raw = GET_NEXT_HOB (FvHob);\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c b/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c
deleted file mode 100644 (file)
index 1b4d082..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  FvbInfo.c\r
-\r
-Abstract:\r
-\r
-  Defines data structure that is the volume header found.These data is intent\r
-  to decouple FVB driver with FV header.\r
-\r
-**/\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiDxe.h>\r
-#include <WinNtDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Guid/EventGroup.h>\r
-#include <Guid/FirmwareFileSystem2.h>\r
-#include <Guid/SystemNvDataGuid.h>\r
-#include <Protocol/FirmwareVolumeBlock.h>\r
-#include <Protocol/DevicePath.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/DxeServicesTableLib.h>\r
-#include <Library/UefiRuntimeLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/PcdLib.h>\r
-\r
-typedef struct {\r
-  UINT64                      FvLength;\r
-  EFI_FIRMWARE_VOLUME_HEADER  FvbInfo;\r
-  //\r
-  // EFI_FV_BLOCK_MAP_ENTRY    ExtraBlockMap[n];//n=0\r
-  //\r
-  EFI_FV_BLOCK_MAP_ENTRY      End[1];\r
-} EFI_FVB_MEDIA_INFO;\r
-\r
-EFI_FVB_MEDIA_INFO  mPlatformFvbMediaInfo[] = {\r
-  //\r
-  // Recovery BOIS FVB\r
-  //\r
-  {\r
-    FixedPcdGet32 (PcdWinNtFlashFvRecoverySize),\r
-    {\r
-      {\r
-        0,\r
-      },  // ZeroVector[16]\r
-      EFI_FIRMWARE_FILE_SYSTEM2_GUID,\r
-      FixedPcdGet32 (PcdWinNtFlashFvRecoverySize),\r
-      EFI_FVH_SIGNATURE,\r
-      EFI_FVB2_MEMORY_MAPPED |  \r
-        EFI_FVB2_READ_ENABLED_CAP |\r
-        EFI_FVB2_READ_STATUS |\r
-        EFI_FVB2_WRITE_ENABLED_CAP |\r
-        EFI_FVB2_WRITE_STATUS |\r
-        EFI_FVB2_ERASE_POLARITY |\r
-        EFI_FVB2_ALIGNMENT_16,\r
-      sizeof (EFI_FIRMWARE_VOLUME_HEADER) + sizeof (EFI_FV_BLOCK_MAP_ENTRY),\r
-      0xE947,   // CheckSum\r
-      0,        // ExtHeaderOffset\r
-      {\r
-        0,\r
-      },  // Reserved[1]\r
-      2,  // Revision\r
-      {\r
-        FixedPcdGet32 (PcdWinNtFlashFvRecoverySize)/FixedPcdGet32 (PcdWinNtFirmwareBlockSize),\r
-        FixedPcdGet32 (PcdWinNtFirmwareBlockSize),\r
-      }\r
-    },\r
-    {\r
-      0,\r
-      0\r
-    }\r
-  },\r
-  //\r
-  // Systen NvStorage FVB\r
-  //\r
-  {\r
-    FixedPcdGet32 (PcdFlashNvStorageVariableSize) +\r
-    FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +\r
-    FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +\r
-    FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize),\r
-    {\r
-      {\r
-        0,\r
-      },  // ZeroVector[16]\r
-      EFI_SYSTEM_NV_DATA_FV_GUID,\r
-      FixedPcdGet32 (PcdFlashNvStorageVariableSize) +\r
-      FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +\r
-      FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +\r
-      FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize),\r
-      EFI_FVH_SIGNATURE,\r
-      EFI_FVB2_MEMORY_MAPPED |  \r
-        EFI_FVB2_READ_ENABLED_CAP |\r
-        EFI_FVB2_READ_STATUS |\r
-        EFI_FVB2_WRITE_ENABLED_CAP |\r
-        EFI_FVB2_WRITE_STATUS |\r
-        EFI_FVB2_ERASE_POLARITY |\r
-        EFI_FVB2_ALIGNMENT_16,\r
-      sizeof (EFI_FIRMWARE_VOLUME_HEADER) + sizeof (EFI_FV_BLOCK_MAP_ENTRY),\r
-      0xFBFF,  // CheckSum\r
-      0,       // ExtHeaderOffset\r
-      {\r
-        0,\r
-      },  // Reserved[1]\r
-      2,  // Revision\r
-      {\r
-       (FixedPcdGet32 (PcdFlashNvStorageVariableSize) +\r
-        FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +\r
-        FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +\r
-        FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize)) / FixedPcdGet32 (PcdWinNtFirmwareBlockSize),\r
-        FixedPcdGet32 (PcdWinNtFirmwareBlockSize),\r
-      }\r
-    },\r
-    {\r
-      0,\r
-      0\r
-    }\r
-  }\r
-};\r
-\r
-EFI_STATUS\r
-GetFvbInfo (\r
-  IN  UINT64                        FvLength,\r
-  OUT EFI_FIRMWARE_VOLUME_HEADER    **FvbInfo\r
-  )\r
-{\r
-  UINTN Index;\r
-\r
-  for (Index = 0; Index < sizeof (mPlatformFvbMediaInfo) / sizeof (EFI_FVB_MEDIA_INFO); Index += 1) {\r
-    if (mPlatformFvbMediaInfo[Index].FvLength == FvLength) {\r
-      *FvbInfo = &mPlatformFvbMediaInfo[Index].FvbInfo;\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
-\r
-  return EFI_NOT_FOUND;\r
-}\r
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
deleted file mode 100644 (file)
index 1d7c86f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-## @file\r
-# Component description file for Nt32 Fimware Volume Block DXE driver module.\r
-#\r
-# This DXE runtime driver implements and produces the Fimware Volue Block Protocol on\r
-#  NT32 emulator.\r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = FvbServicesRuntimeDxe\r
-  FILE_GUID                      = BDFE5FAA-2A35-44bb-B17A-8084D4E2B9E9\r
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  ENTRY_POINT                    = FvbInitialize\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  FvbInfo.c\r
-  FwBlockService.h\r
-  FWBlockService.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  UefiBootServicesTableLib\r
-  MemoryAllocationLib\r
-  BaseMemoryLib\r
-  HobLib\r
-  DebugLib\r
-  UefiRuntimeLib\r
-  DxeServicesTableLib\r
-  BaseLib\r
-  UefiDriverEntryPoint\r
-  UefiLib\r
-  PcdLib\r
-\r
-[Guids]\r
-  gEfiEventVirtualAddressChangeGuid             # ALWAYS_CONSUMED  Create Event: EVENT_GROUP_GUID\r
-\r
-[Protocols]\r
-  gEfiFirmwareVolumeBlockProtocolGuid           # PROTOCOL ALWAYS_PRODUCED\r
-  gEfiDevicePathProtocolGuid                    # PROTOCOL SOMETIMES_PRODUCED\r
-\r
-[FixedPcd]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashFvRecoverySize\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareBlockSize\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageEventLogSize\r
-\r
-[Pcd]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareFdSize\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashFvRecoveryBase\r
-  gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashNvStorageEventLogBase\r
-\r
-[Depex]\r
-  TRUE\r
-  \r
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FwBlockService.h b/Nt32Pkg/FvbServicesRuntimeDxe/FwBlockService.h
deleted file mode 100644 (file)
index cdf6b1f..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  FwBlockService.h\r
-  \r
-Abstract:\r
-\r
-  Firmware volume block driver for Intel Firmware Hub (FWH) device\r
-\r
-**/\r
-\r
-#ifndef _FW_BLOCK_SERVICE_H\r
-#define _FW_BLOCK_SERVICE_H\r
-\r
-//\r
-// BugBug: Add documentation here for data structure!!!!\r
-//\r
-#define FVB_PHYSICAL  0\r
-#define FVB_VIRTUAL   1\r
-\r
-typedef struct {\r
-  EFI_LOCK                    FvbDevLock;\r
-  UINTN                       FvBase[2];\r
-  UINTN                       NumOfBlocks;\r
-  EFI_FIRMWARE_VOLUME_HEADER  VolumeHeader;\r
-} EFI_FW_VOL_INSTANCE;\r
-\r
-typedef struct {\r
-  UINT32              NumFv;\r
-  EFI_FW_VOL_INSTANCE *FvInstance[2];\r
-  UINT8               *FvbScratchSpace[2];\r
-} ESAL_FWB_GLOBAL;\r
-\r
-//\r
-// Fvb Protocol instance data\r
-//\r
-#define FVB_DEVICE_FROM_THIS(a)         CR (a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)\r
-#define FVB_EXTEND_DEVICE_FROM_THIS(a)  CR (a, EFI_FW_VOL_BLOCK_DEVICE, FvbExtension, FVB_DEVICE_SIGNATURE)\r
-#define FVB_DEVICE_SIGNATURE            SIGNATURE_32 ('F', 'V', 'B', 'N')\r
-\r
-typedef struct {\r
-  MEDIA_FW_VOL_DEVICE_PATH  FvDevPath;\r
-  EFI_DEVICE_PATH_PROTOCOL  EndDevPath;\r
-} FV_PIWG_DEVICE_PATH;\r
-\r
-typedef struct {\r
-  MEMMAP_DEVICE_PATH          MemMapDevPath;\r
-  EFI_DEVICE_PATH_PROTOCOL    EndDevPath;\r
-} FV_MEMMAP_DEVICE_PATH;\r
-\r
-typedef struct {\r
-  UINTN                               Signature;\r
-  EFI_DEVICE_PATH_PROTOCOL            *DevicePath;\r
-  UINTN                               Instance;\r
-  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  FwVolBlockInstance;\r
-} EFI_FW_VOL_BLOCK_DEVICE;\r
-\r
-EFI_STATUS\r
-GetFvbInfo (\r
-  IN  UINT64                            FvLength,\r
-  OUT EFI_FIRMWARE_VOLUME_HEADER        **FvbInfo\r
-  );\r
-\r
-EFI_STATUS\r
-FvbReadBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  IN UINTN                                BlockOffset,\r
-  IN OUT UINTN                            *NumBytes,\r
-  IN UINT8                                *Buffer,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-FvbWriteBlock (\r
-  IN UINTN                                Instance,\r
-  IN CONST EFI_LBA                              Lba,\r
-  IN CONST UINTN                                BlockOffset,\r
-  IN OUT UINTN                            *NumBytes,\r
-  IN CONST UINT8                                *Buffer,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-FvbEraseBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-FvbSetVolumeAttributes (\r
-  IN UINTN                                Instance,\r
-  IN OUT EFI_FVB_ATTRIBUTES_2             *Attributes,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-FvbGetVolumeAttributes (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_FVB_ATTRIBUTES_2                *Attributes,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-FvbGetPhysicalAddress (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_PHYSICAL_ADDRESS                *Address,\r
-  IN ESAL_FWB_GLOBAL                      *Global,\r
-  IN BOOLEAN                              Virtual\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbInitialize (\r
-  IN EFI_HANDLE         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE   *SystemTable\r
-  );\r
-\r
-\r
-VOID\r
-EFIAPI\r
-FvbClassAddressChangeEvent (\r
-  IN EFI_EVENT        Event,\r
-  IN VOID             *Context\r
-  );\r
-\r
-EFI_STATUS\r
-FvbGetLbaAddress (\r
-  IN  UINTN                               Instance,\r
-  IN  EFI_LBA                             Lba,\r
-  OUT UINTN                               *LbaAddress,\r
-  OUT UINTN                               *LbaLength,\r
-  OUT UINTN                               *NumOfBlocks,\r
-  IN  ESAL_FWB_GLOBAL                     *Global,\r
-  IN  BOOLEAN                             Virtual\r
-  );\r
-\r
-//\r
-// Protocol APIs\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetAttributes (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  OUT EFI_FVB_ATTRIBUTES_2                              *Attributes\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolSetAttributes (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN OUT EFI_FVB_ATTRIBUTES_2                           *Attributes\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetPhysicalAddress (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  OUT EFI_PHYSICAL_ADDRESS                        *Address\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolGetBlockSize (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN CONST EFI_LBA                                     Lba,\r
-  OUT UINTN                                       *BlockSize,\r
-  OUT UINTN                                       *NumOfBlocks\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolRead (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN CONST EFI_LBA                                      Lba,\r
-  IN CONST UINTN                                        Offset,\r
-  IN OUT UINTN                                    *NumBytes,\r
-  IN UINT8                                        *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolWrite (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL           *This,\r
-  IN       EFI_LBA                                      Lba,\r
-  IN       UINTN                                        Offset,\r
-  IN OUT   UINTN                                        *NumBytes,\r
-  IN       UINT8                                        *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-FvbProtocolEraseBlocks (\r
-  IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL    *This,\r
-  ...\r
-  );\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Common/WinNTInclude.h b/Nt32Pkg/Include/Common/WinNTInclude.h
deleted file mode 100644 (file)
index 345d15d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-  WinNtLib.h\r
-\r
-Abstract:\r
-  Public include file for the WinNt Library\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_INCLUDE_H__\r
-#define __WIN_NT_INCLUDE_H__\r
-\r
-//\r
-// Win32 include files do not compile clean with /W4, so we use the warning\r
-// pragma to suppress the warnings for Win32 only. This way our code can stil\r
-// compile at /W4 (highest warning level) with /WX (warnings cause build\r
-// errors).\r
-//\r
-#pragma warning(disable : 4115)\r
-#pragma warning(disable : 4201)\r
-#pragma warning(disable : 4028)\r
-#pragma warning(disable : 4133)\r
-\r
-#define GUID  _WINNT_DUP_GUID_____\r
-#define _LIST_ENTRY  _WINNT_DUP_LIST_ENTRY_FORWARD\r
-#define LIST_ENTRY   _WINNT_DUP_LIST_ENTRY\r
-#if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)\r
-#define InterlockedIncrement _WINNT_DUP_InterlockedIncrement\r
-#define InterlockedDecrement _WINNT_DUP_InterlockedDecrement\r
-#define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64\r
-#endif\r
-#undef UNALIGNED\r
-#undef CONST\r
-#undef VOID\r
-#undef DEBUG_EVENT\r
-\r
-// WQBugBug: This typedef is to make "windows.h" buildable.\r
-//                   It should be removed after the root cause why\r
-//                   size_t is undefined when go into the line below is found.\r
-#if defined (MDE_CPU_IA32)\r
-typedef UINT32 size_t ;\r
-#endif\r
-\r
-#include "windows.h"\r
-\r
-#undef GUID\r
-#undef _LIST_ENTRY\r
-#undef LIST_ENTRY\r
-#undef InterlockedIncrement\r
-#undef InterlockedDecrement\r
-#undef InterlockedCompareExchange64\r
-#undef InterlockedCompareExchangePointer\r
-#undef CreateEventEx\r
-\r
-#define VOID void\r
-\r
-//\r
-// Prevent collisions with Windows API name macros that deal with Unicode/Not issues\r
-//\r
-#undef LoadImage\r
-#undef CreateEvent\r
-\r
-//\r
-// Set the warnings back on as the EFI code must be /W4.\r
-//\r
-#pragma warning(default : 4115)\r
-#pragma warning(default : 4201)\r
-\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Guid/WinNtSystemConfig.h b/Nt32Pkg/Include/Guid/WinNtSystemConfig.h
deleted file mode 100644 (file)
index 975de36..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/**@file\r
-  Setup Variable data structure for NT32 platform.\r
-\r
-Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_SYSTEM_CONFIGUE_H__\r
-#define __WIN_NT_SYSTEM_CONFIGUE_H__\r
-\r
-#define EFI_WIN_NT_SYSTEM_CONFIG_GUID  \\r
-  { 0xb347f047, 0xaf8c, 0x490e, { 0xac, 0x07, 0x0a, 0xa9, 0xb7, 0xe5, 0x38, 0x58 }}\r
-\r
-#pragma pack(1)\r
-typedef struct {\r
-  //\r
-  // Console output mode\r
-  //\r
-  UINT32        ConOutColumn;\r
-  UINT32        ConOutRow;\r
-} WIN_NT_SYSTEM_CONFIGURATION;\r
-#pragma pack()\r
-\r
-\r
-extern EFI_GUID   gEfiWinNtSystemConfigGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Library/WinNtLib.h b/Nt32Pkg/Include/Library/WinNtLib.h
deleted file mode 100644 (file)
index a3e3152..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Public include file for the WinNt Library\r
-\r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_LIB_H__\r
-#define __WIN_NT_LIB_H__\r
-\r
-#include <Protocol/WinNtThunk.h>\r
-\r
-extern EFI_WIN_NT_THUNK_PROTOCOL  *gWinNt;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Ppi/NtAutoscan.h b/Nt32Pkg/Include/Ppi/NtAutoscan.h
deleted file mode 100644 (file)
index 130112a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  NtAutoscan.h\r
-\r
-Abstract:\r
-\r
-Nt Autoscan PPI\r
-\r
-**/\r
-\r
-#ifndef __NT_PEI_AUTOSCAN_H__\r
-#define __NT_PEI_AUTOSCAN_H__\r
-\r
-#include <WinNtDxe.h>\r
-\r
-#define PEI_NT_AUTOSCAN_PPI_GUID \\r
-  { \\r
-    0xdce384d, 0x7c, 0x4ba5, {0x94, 0xbd, 0xf, 0x6e, 0xb6, 0x4d, 0x2a, 0xa9 } \\r
-  }\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *PEI_NT_AUTOSCAN) (\r
-  IN  UINTN                 Index,\r
-  OUT EFI_PHYSICAL_ADDRESS  * MemoryBase,\r
-  OUT UINT64                *MemorySize\r
-  );\r
-\r
-/*++\r
-\r
-Routine Description:\r
-  This service is called from Index == 0 until it returns EFI_UNSUPPORTED.\r
-  It allows discontinuous memory regions to be supported by the emulator.\r
-  It uses gSystemMemory[] and gSystemMemoryCount that were created by\r
-  parsing the Windows environment variable EFI_MEMORY_SIZE.\r
-  The size comes from the varaible and the address comes from the call to\r
-  WinNtOpenFile. \r
-\r
-Arguments:\r
-  Index      - Which memory region to use\r
-  MemoryBase - Return Base address of memory region\r
-  MemorySize - Return size in bytes of the memory region\r
-\r
-Returns:\r
-  EFI_SUCCESS - If memory region was mapped\r
-  EFI_UNSUPPORTED - If Index is not supported\r
-\r
---*/\r
-typedef struct {\r
-  PEI_NT_AUTOSCAN NtAutoScan;\r
-} PEI_NT_AUTOSCAN_PPI;\r
-\r
-extern EFI_GUID gPeiNtAutoScanPpiGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Ppi/NtFwh.h b/Nt32Pkg/Include/Ppi/NtFwh.h
deleted file mode 100644 (file)
index 711d44d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  NtFwh.h\r
-\r
-Abstract:\r
-\r
-  WinNt FWH PPI as defined in Tiano\r
-\r
-**/\r
-\r
-#ifndef __NT_PEI_FWH_H__\r
-#define __NT_PEI_FWH_H__\r
-\r
-#include <WinNtDxe.h>\r
-\r
-#define NT_FWH_PPI_GUID \\r
-  { \\r
-    0x4e76928f, 0x50ad, 0x4334, {0xb0, 0x6b, 0xa8, 0x42, 0x13, 0x10, 0x8a, 0x57 } \\r
-  }\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *NT_FWH_INFORMATION) (\r
-  IN     UINTN                  Index,\r
-  IN OUT EFI_PHYSICAL_ADDRESS   * FdBase,\r
-  IN OUT UINT64                 *FdSize\r
-  );\r
-\r
-/*++\r
-\r
-Routine Description:\r
-  Return the FD Size and base address. Since the FD is loaded from a \r
-  file into Windows memory only the SEC will know it's address.\r
-\r
-Arguments:\r
-  Index  - Which FD, starts at zero.\r
-  FdSize - Size of the FD in bytes\r
-  FdBase - Start address of the FD. Assume it points to an FV Header\r
-\r
-Returns:\r
-  EFI_SUCCESS     - Return the Base address and size of the FV\r
-  EFI_UNSUPPORTED - Index does nto map to an FD in the system\r
-\r
---*/\r
-typedef struct {\r
-  NT_FWH_INFORMATION  NtFwh;\r
-} NT_FWH_PPI;\r
-\r
-extern EFI_GUID gNtFwhPpiGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Ppi/NtPeiLoadFile.h b/Nt32Pkg/Include/Ppi/NtPeiLoadFile.h
deleted file mode 100644 (file)
index c961e35..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
- NtPeiLoadFile.h\r
-\r
-Abstract:\r
-\r
-  WinNt Load File PPI.\r
-\r
-  When the PEI core is done it calls the DXE IPL via PPI\r
-\r
-**/\r
-\r
-#ifndef __NT_PEI_LOAD_FILE_H__\r
-#define __NT_PEI_LOAD_FILE_H__\r
-\r
-#include <WinNtDxe.h>\r
-\r
-#define NT_PEI_LOAD_FILE_GUID \\r
-  { \\r
-    0xfd0c65eb, 0x405, 0x4cd2, {0x8a, 0xee, 0xf4, 0x0, 0xef, 0x13, 0xba, 0xc2 } \\r
-  }\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *NT_PEI_LOAD_FILE) (\r
-  VOID                  *Pe32Data,\r
-  EFI_PHYSICAL_ADDRESS  *ImageAddress,\r
-  UINT64                *ImageSize,\r
-  EFI_PHYSICAL_ADDRESS  *EntryPoint\r
-  );\r
-\r
-/*++\r
-\r
-Routine Description:\r
-  Loads and relocates a PE/COFF image into memory.\r
-\r
-Arguments:\r
-  Pe32Data         - The base address of the PE/COFF file that is to be loaded and relocated\r
-  ImageAddress     - The base address of the relocated PE/COFF image\r
-  ImageSize        - The size of the relocated PE/COFF image\r
-  EntryPoint       - The entry point of the relocated PE/COFF image\r
-\r
-Returns:\r
-  EFI_SUCCESS   - The file was loaded and relocated\r
-  EFI_OUT_OF_RESOURCES - There was not enough memory to load and relocate the PE/COFF file\r
-\r
---*/\r
-typedef struct {\r
-  NT_PEI_LOAD_FILE  PeiLoadFileService;\r
-} NT_PEI_LOAD_FILE_PPI;\r
-\r
-extern EFI_GUID gNtPeiLoadFilePpiGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Ppi/NtThunk.h b/Nt32Pkg/Include/Ppi/NtThunk.h
deleted file mode 100644 (file)
index a585bfb..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  NtThunk.h\r
-\r
-Abstract:\r
-\r
-  WinNt Thunk interface PPI\r
-\r
-**/\r
-\r
-#ifndef __NT_PEI_WIN_NT_THUNK_H__\r
-#define __NT_PEI_WIN_NT_THUNK_H__\r
-\r
-#include <WinNtDxe.h>\r
-\r
-#define PEI_NT_THUNK_PPI_GUID \\r
-  { \\r
-    0x98c281e5, 0xf906, 0x43dd, {0xa9, 0x2b, 0xb0, 0x3, 0xbf, 0x27, 0x65, 0xda } \\r
-  }\r
-\r
-typedef\r
-VOID *\r
-(EFIAPI *PEI_NT_THUNK_INTERFACE) (\r
-  VOID\r
-  );\r
-\r
-/*++\r
-\r
-Routine Description:\r
-  Export of EFI_WIN_NT_THUNK_PROTOCOL from the Windows SEC.\r
-\r
-Arguments:\r
-  InterfaceBase - Address of the EFI_WIN_NT_THUNK_PROTOCOL\r
-\r
-Returns:\r
-  EFI_SUCCESS - Data returned\r
-\r
---*/\r
-typedef struct {\r
-  PEI_NT_THUNK_INTERFACE  NtThunk;\r
-} PEI_NT_THUNK_PPI;\r
-\r
-extern EFI_GUID gPeiNtThunkPpiGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Protocol/WinNtIo.h b/Nt32Pkg/Include/Protocol/WinNtIo.h
deleted file mode 100644 (file)
index 00a7128..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  WinNtIo.h\r
-\r
-Abstract:\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_IO_H__\r
-#define __WIN_NT_IO_H__\r
-\r
-#include <Protocol/WinNtThunk.h>\r
-\r
-#define EFI_WIN_NT_IO_PROTOCOL_GUID \\r
-  { 0x96eb4ad6, 0xa32a, 0x11d4, { 0xbc, 0xfd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }\r
-\r
-extern EFI_GUID gEfiWinNtIoProtocolGuid;\r
-\r
-typedef struct {\r
-  EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;\r
-  EFI_GUID                  *TypeGuid;\r
-  CHAR16                    *EnvString;\r
-  UINT16                    InstanceNumber;\r
-} EFI_WIN_NT_IO_PROTOCOL;\r
-\r
-//\r
-// The following GUIDs are used in EFI_WIN_NT_IO_PROTOCOL_GUID\r
-// Device paths. They map 1:1 with NT envirnment variables. The variables\r
-// define what virtual hardware the emulator/WinNtBusDriver will produce.\r
-//\r
-//\r
-// EFI_WIN_NT_VIRTUAL_DISKS\r
-//\r
-#define EFI_WIN_NT_VIRTUAL_DISKS_GUID \\r
-  { \\r
-    0xc95a928, 0xa006, 0x11d4, {0xbc, 0xfa, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtVirtualDisksGuid;\r
-\r
-//\r
-// EFI_WIN_NT_PHYSICAL_DISKS\r
-//\r
-#define EFI_WIN_NT_PHYSICAL_DISKS_GUID \\r
-  { \\r
-    0xc95a92f, 0xa006, 0x11d4, {0xbc, 0xfa, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtPhysicalDisksGuid;\r
-\r
-//\r
-// EFI_WIN_NT_FILE_SYSTEM\r
-//\r
-#define EFI_WIN_NT_FILE_SYSTEM_GUID \\r
-  { \\r
-    0xc95a935, 0xa006, 0x11d4, {0xbc, 0xfa, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtFileSystemGuid;\r
-\r
-//\r
-// EFI_WIN_NT_SERIAL_PORT\r
-//\r
-#define EFI_WIN_NT_SERIAL_PORT_GUID \\r
-  { \\r
-    0xc95a93d, 0xa006, 0x11d4, {0xbc, 0xfa, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtSerialPortGuid;\r
-\r
-//\r
-// EFI_WIN_NT_UGA\r
-//\r
-#define EFI_WIN_NT_UGA_GUID \\r
-  { \\r
-    0xab248e99, 0xabe1, 0x11d4, {0xbd, 0xd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtUgaGuid;\r
-\r
-//\r
-// EFI_WIN_NT_GOP\r
-//\r
-#define EFI_WIN_NT_GOP_GUID \\r
-  { \\r
-    0x4e11e955, 0xccca, 0x11d4, 0xbd, 0xd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtGopGuid;\r
-\r
-//\r
-// EFI_WIN_NT_CONSOLE\r
-//\r
-#define EFI_WIN_NT_CONSOLE_GUID \\r
-  { \\r
-    0xba73672c, 0xa5d3, 0x11d4, {0xbd, 0x0, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtConsoleGuid;\r
-\r
-//\r
-// EFI_WIN_NT_MEMORY\r
-//\r
-#define EFI_WIN_NT_MEMORY_GUID \\r
-  { \\r
-    0x99042912, 0x122a, 0x11d4, {0xbd, 0xd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtMemoryGuid;\r
-\r
-//\r
-// EFI_WIN_NT_CPU_MODEL\r
-//\r
-#define EFI_WIN_NT_CPU_MODEL_GUID \\r
-  { \\r
-    0xbee9b6ce, 0x2f8a, 0x11d4, {0xbd, 0xd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtCPUModelGuid;\r
-\r
-//\r
-// EFI_WIN_NT_CPU_SPEED\r
-//\r
-#define EFI_WIN_NT_CPU_SPEED_GUID \\r
-  { \\r
-    0xd4f29055, 0xe1fb, 0x11d4, {0xbd, 0xd, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtCPUSpeedGuid;\r
-\r
-//\r
-// EFI_WIN_NT_PASS_THROUGH\r
-//\r
-#define EFI_WIN_NT_PASS_THROUGH_GUID \\r
-  { \\r
-    0xcc664eb8, 0x3c24, 0x4086, {0xb6, 0xf6, 0x34, 0xe8, 0x56, 0xbc, 0xe3, 0x6e } \\r
-  }\r
-\r
-extern EFI_GUID gEfiWinNtPassThroughGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/Protocol/WinNtThunk.h b/Nt32Pkg/Include/Protocol/WinNtThunk.h
deleted file mode 100644 (file)
index 847f67b..0000000
+++ /dev/null
@@ -1,1287 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  WinNtThunk.h\r
-\r
-Abstract:\r
-\r
-  This protocol allows an EFI driver (DLL) in the NT emulation envirnment\r
-  to make Win32 API calls.\r
-\r
-  NEVER make a Win32 call directly, always make the call via this protocol.\r
-\r
-  There are no This pointers on the protocol member functions as they map\r
-  exactly into Win32 system calls.\r
-\r
-  YOU MUST include EfiWinNT.h in place of Efi.h to make this file compile.\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_THUNK_H__\r
-#define __WIN_NT_THUNK_H__\r
-\r
-#include <Common/WinNtInclude.h>\r
-\r
-#define EFI_WIN_NT_THUNK_PROTOCOL_GUID \\r
-  { 0x58c518b1, 0x76f3, 0x11d4, { 0xbc, 0xea, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtSleep) (\r
-  DWORD Milliseconds\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtSuspendThread) (\r
-  HANDLE hThread\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtGetCurrentThread) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetCurrentThreadId) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtGetCurrentProcess) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtCreateThread) (\r
-  LPSECURITY_ATTRIBUTES   lpThreadAttributes,\r
-  DWORD                   dwStackSize,\r
-  LPTHREAD_START_ROUTINE  lpStartAddress,\r
-  LPVOID                  lpParameter,\r
-  DWORD                   dwCreationFlags,\r
-  LPDWORD                 lpThreadId\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtTerminateThread) (\r
-  HANDLE hThread,\r
-  DWORD  dwExitCode\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSendMessage) (\r
-  HWND    hWnd,\r
-  UINT    Msg,\r
-  WPARAM  wParam,\r
-  LPARAM  lParam\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtExitThread) (\r
-  DWORD   dwExitCode\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtResumeThread) (\r
-  HANDLE hThread\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetThreadPriority) (\r
-  HANDLE    hThread,\r
-  INTN      nPriority\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtInitializeCriticalSection) (\r
-  LPCRITICAL_SECTION lpCriticalSection\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtDeleteCriticalSection) (\r
-  LPCRITICAL_SECTION lpCriticalSection\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtEnterCriticalSection) (\r
-  LPCRITICAL_SECTION lpCriticalSection\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtLeaveCriticalSection) (\r
-  LPCRITICAL_SECTION lpCriticalSection\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtTlsAlloc) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-LPVOID\r
-(WINAPI *WinNtTlsGetValue) (\r
-  DWORD dwTlsIndex\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtTlsSetValue) (\r
-  DWORD  dwTlsIndex,\r
-  LPVOID lpTlsValue\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtTlsFree) (\r
-  DWORD dwTlsIndex\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtCreateSemaphore) (\r
-  LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,\r
-  LONG                  lInitialCount,\r
-  LONG                  lMaximumCount,\r
-  LPCWSTR               lpName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtWaitForSingleObject) (\r
-  HANDLE  hHandle,\r
-  DWORD   dwMilliseconds\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtReleaseSemaphore) (\r
-  HANDLE  hSemaphore,\r
-  LONG    lReleaseCount,\r
-  LPLONG  lpPreviousCount\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtDuplicateHandle) (\r
-  HANDLE   hSourceProcessHandle,\r
-  HANDLE   hSourceHandle,\r
-  HANDLE   hTargetProcessHandle,\r
-  LPHANDLE lpTargetHandle,\r
-  DWORD    dwDesiredAccess,\r
-  BOOL     bInheritHandle,\r
-  DWORD    dwOptions\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtCreateConsoleScreenBuffer) (\r
-  DWORD                       DesiredAccess,\r
-  DWORD                       ShareMode,\r
-  CONST SECURITY_ATTRIBUTES   *SecurityAttributes,\r
-  DWORD                       Flags,\r
-  LPVOID                      ScreenBufferData\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetConsoleScreenBufferSize) (\r
-  HANDLE  ConsoleOutput,\r
-  COORD   Size\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetConsoleActiveScreenBuffer) (\r
-  HANDLE  ConsoleOutput\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFillConsoleOutputAttribute) (\r
-  HANDLE  ConsoleOutput,\r
-  WORD    Attribute,\r
-  DWORD   Length,\r
-  COORD   WriteCoord,\r
-  LPDWORD NumberOfAttrsWritten\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFillConsoleOutputCharacter) (\r
-  HANDLE  ConsoleOutput,\r
-  TCHAR   Character,\r
-  DWORD   Length,\r
-  COORD   WriteCoord,\r
-  LPDWORD NumberOfCharsWritten\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtWriteConsoleOutput) (\r
-  HANDLE          ConsoleOutput,\r
-  CONST CHAR_INFO *Buffer,\r
-  COORD           BufferSize,\r
-  COORD           BufferCoord,\r
-  PSMALL_RECT     WriteRegion\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtScrollConsoleScreenBuffer) (\r
-  HANDLE            ConsoleOutput,\r
-  CONST SMALL_RECT  *ScrollRectangle,\r
-  CONST SMALL_RECT  *ClipRectangle,\r
-  COORD             DestinationOrigin,\r
-  CONST CHAR_INFO   *Fill\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetConsoleTitleW) (\r
-  LPCTSTR   ConsoleTitle\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetConsoleCursorInfo) (\r
-  HANDLE                ConsoleOutput,\r
-  PCONSOLE_CURSOR_INFO  ConsoleCursorInfo\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetConsoleCursorInfo) (\r
-  HANDLE                      ConsoleOutput,\r
-  CONST CONSOLE_CURSOR_INFO   *ConsoleCursorInfo\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetPriorityClass) (\r
-  HANDLE  Process,\r
-  DWORD   PriorityClass\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtWriteConsoleInput) (\r
-  HANDLE              ConsoleInput,\r
-  CONST INPUT_RECORD  *Buffer,\r
-  DWORD               Legnth,\r
-  LPDWORD             NumberOfEventsWritten\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetNumberOfConsoleInputEvents) (\r
-  HANDLE              ConsoleInput,\r
-  LPDWORD             NumberOfEvents\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtGetStdHandle) (\r
-  DWORD   StdHandle\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtReadConsoleInput) (\r
-  HANDLE              ConsoleInput,\r
-  PINPUT_RECORD       Buffer,\r
-  DWORD               Length,\r
-  LPDWORD             NumberOfEventsRead\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtPeekConsoleInput) (\r
-  HANDLE              ConsoleInput,\r
-  PINPUT_RECORD       Buffer,\r
-  DWORD               Length,\r
-  LPDWORD             NumberOfEventsRead\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetConsoleCursorPosition) (\r
-  HANDLE              ConsoleInput,\r
-  COORD               CursorPosition\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtCreateFile) (\r
-  LPCWSTR               FileName,\r
-  DWORD                 DesiredAccess,\r
-  DWORD                 SharedMode,\r
-  LPSECURITY_ATTRIBUTES SecurityAttributes,\r
-  DWORD                 CreationDisposition,\r
-  DWORD                 FlagsAndAttributes,\r
-  HANDLE                TemplateFile\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtDeviceIoControl) (\r
-  HANDLE                DeviceHandle,\r
-  DWORD                 IoControlCode,\r
-  LPVOID                InBuffer,\r
-  DWORD                 InBufferSize,\r
-  LPVOID                OutBuffer,\r
-  DWORD                 OutBufferSize,\r
-  LPDWORD               BytesReturned,\r
-  LPOVERLAPPED          Overlapped\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtCreateDirectory) (\r
-  LPCWSTR               PathName,\r
-  LPSECURITY_ATTRIBUTES SecurityAttributes\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtRemoveDirectory) (\r
-  LPCWSTR               PathName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetFileAttributes) (\r
-  LPCWSTR               FileName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetFileAttributes) (\r
-  LPCWSTR               FileName,\r
-  DWORD                 FileAttributes\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtCreateFileMapping) (\r
-  HANDLE                  FileHandle,\r
-  LPSECURITY_ATTRIBUTES   Attributes,\r
-  DWORD                   Protect,\r
-  DWORD                   MaximumSizeHigh,\r
-  DWORD                   MaximumSizeLow,\r
-  LPCTSTR                 Name\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-LPVOID\r
-(WINAPI *WinNtMapViewOfFileEx) (\r
-  HANDLE                  FileHandle,\r
-  DWORD                   DesiredAccess,\r
-  DWORD                   FileOffsetHigh,\r
-  DWORD                   FileOffsetLow,\r
-  DWORD                   NumberOfBytesToMap,\r
-  LPVOID                  BaseAddress\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetEnvironmentVariable) (\r
-  LPCTSTR Name,\r
-  LPTSTR  Buffer,\r
-  DWORD   Size\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtCloseHandle) (\r
-  HANDLE    Object\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtSetFilePointer) (\r
-  HANDLE    FileHandle,\r
-  LONG      DistanceToMove,\r
-  PLONG     DistanceToHoveHigh,\r
-  DWORD     MoveMethod\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetEndOfFile) (\r
-  HANDLE    FileHandle\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtReadFile) (\r
-  HANDLE        FileHandle,\r
-  LPVOID        Buffer,\r
-  DWORD         NumberOfBytesToRead,\r
-  LPDWORD       NumberOfBytesRead,\r
-  LPOVERLAPPED  Overlapped\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtWriteFile) (\r
-  HANDLE        FileHandle,\r
-  LPCVOID       Buffer,\r
-  DWORD         NumberOfBytesToWrite,\r
-  LPDWORD       NumberOfBytesWritten,\r
-  LPOVERLAPPED  Overlapped\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetFileInformationByHandle) (\r
-  HANDLE                      FileHandle,\r
-  BY_HANDLE_FILE_INFORMATION  *FileInfo\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetDiskFreeSpace) (\r
-  LPCTSTR     RootPathName,\r
-  LPDWORD     SectorsPerCluster,\r
-  LPDWORD     BytesPerSector,\r
-  LPDWORD     NumberOfFreeClusters,\r
-  LPDWORD     TotalNumberOfClusters\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetDiskFreeSpaceEx) (\r
-  LPCTSTR             DirectoryName,\r
-  PULARGE_INTEGER     FreeBytesAvailable,\r
-  PULARGE_INTEGER     TotalNumberOfBytes,\r
-  PULARGE_INTEGER     TotoalNumberOfFreeBytes\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtMoveFile) (\r
-  LPCTSTR     ExistingFileName,\r
-  LPCTSTR     NewFileName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetFileTime) (\r
-  HANDLE      FileHandle,\r
-  FILETIME    *CreationTime,\r
-  FILETIME    *LastAccessTime,\r
-  FILETIME    *LastWriteTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSystemTimeToFileTime) (\r
-  SYSTEMTIME  * SystemTime,\r
-  FILETIME    * FileTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtDeleteFile) (\r
-  LPCTSTR   FileName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFlushFileBuffers) (\r
-  HANDLE\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetLastError) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-UINT\r
-(WINAPI *WinNtSetErrorMode) (\r
-  UINT  Mode\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetTickCount) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HMODULE\r
-(WINAPI *WinNtLoadLibraryEx) (\r
-  LPCTSTR LibFileName,\r
-  HANDLE  FileHandle,\r
-  DWORD   Flags\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-FARPROC\r
-(WINAPI *WinNtGetProcAddress) (\r
-  HMODULE Module,\r
-  LPCSTR  ProcName\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtGetTimeZoneInformation) (\r
-  LPTIME_ZONE_INFORMATION timeZoneInformation\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-MMRESULT\r
-(WINAPI *WinNttimeSetEvent) (\r
-  UINT           uDelay,\r
-  UINT           uResolution,\r
-  LPTIMECALLBACK lpTimeProc,\r
-  DWORD_PTR      dwUser,\r
-  UINT           fuEvent\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-MMRESULT\r
-(WINAPI *WinNttimeKillEvent) (\r
-  UINT           uTimerID\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-DWORD\r
-(WINAPI *WinNtSetTimeZoneInformation) (\r
-  LPTIME_ZONE_INFORMATION timeZoneInformation\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtGetSystemTime) (\r
-  LPSYSTEMTIME        SystemTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetSystemTime) (\r
-  CONST SYSTEMTIME    *SystemTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtGetLocalTime) (\r
-  LPSYSTEMTIME        SystemTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetLocalTime) (\r
-  CONST SYSTEMTIME    *SystemTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtLocalFileTimeToFileTime) (\r
-  CONST FILETIME  *LocalFileTime,\r
-  LPFILETIME      FileTime\r
-  );\r
-\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFileTimeToLocalFileTime) (\r
-  CONST FILETIME  *FileTime,\r
-  LPFILETIME      LocalFileTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFileTimeToSystemTime) (\r
-  CONST FILETIME  *FileTime,\r
-  LPSYSTEMTIME    SystemTime\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-HANDLE\r
-(WINAPI *WinNtFindFirstFile) (\r
-  LPCTSTR           FileName,\r
-  LPWIN32_FIND_DATA FindFileData\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFindNextFile) (\r
-  HANDLE            FindFile,\r
-  LPWIN32_FIND_DATA FindFileData\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFindClose) (\r
-  HANDLE            FindFile\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetCommState) (\r
-  HANDLE  FileHandle,\r
-  LPDCB   DCB\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetCommState) (\r
-  HANDLE  FileHandle,\r
-  LPDCB   DCB\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetCommState) (\r
-  HANDLE  FileHandle,\r
-  LPDCB   DCB\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtSetCommTimeouts) (\r
-  HANDLE          FileHandle,\r
-  LPCOMMTIMEOUTS  CommTimeouts\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-VOID\r
-(WINAPI *WinNtExitProcess) (\r
-  UINT uExitCode  // exit code for all threads\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtPurgeComm) (\r
-  HANDLE  FileHandle,\r
-  DWORD   Flags\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtEscapeCommFunction) (\r
-  HANDLE  FileHandle,\r
-  DWORD   Func\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtGetCommModemStatus) (\r
-  HANDLE  FileHandle,\r
-  LPDWORD ModemStat\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtClearCommError) (\r
-  HANDLE    FileHandle,\r
-  LPDWORD   Errors,\r
-  LPCOMSTAT Stat\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-INT32\r
-(WINAPIV *WinNtSprintf) (\r
-  LPWSTR    Buffer,\r
-  size_t    Count,\r
-  LPCWSTR   String,\r
-  ...\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HWND\r
-(WINAPI *WinNtGetDesktopWindow) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HWND\r
-(WINAPI *WinNtGetForegroundWindow) (\r
-  VOID\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HWND\r
-(WINAPI *WinNtCreateWindowEx) (\r
-  DWORD     dwExStyle,\r
-  LPCTSTR   lpClassName,\r
-  LPCTSTR   lpWindowName,\r
-  DWORD     dwStyle,\r
-  INT32     x,\r
-  INT32     y,\r
-  INT32     nWidth,\r
-  INT32     nHeight,\r
-  HWND      hWndParent,\r
-  HMENU     hMenu,\r
-  HINSTANCE hInstance,\r
-  LPVOID    *lpParam\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtUpdateWindow) (\r
-  HWND      hWnd\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtShowWindow) (\r
-  HWND        hWnd,\r
-  INT32       nCmdShow\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtDestroyWindow) (\r
-  HWND    hWnd\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HDC\r
-(WINAPI *WinNtGetWindowDC) (\r
-  HWND    hWnd\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtGetClientRect) (\r
-  HWND    hWnd,\r
-  LPRECT  lpRect\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtAdjustWindowRect) (\r
-  LPRECT  lpRect,\r
-  DWORD   dwStyle,\r
-  BOOL    bMenu\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-INT32\r
-(WINAPI *WinNtSetDIBitsToDevice) (\r
-  HDC,\r
-  INT32,\r
-  INT32,\r
-  DWORD,\r
-  DWORD,\r
-  INT32,\r
-  INT32,\r
-  UINT,\r
-  UINT,\r
-  CONST VOID       *,\r
-  CONST BITMAPINFO *,\r
-  UINT\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtBitBlt) (\r
-  HDC,\r
-  INT32,\r
-  INT32,\r
-  INT32,\r
-  INT32,\r
-  HDC,\r
-  INT32,\r
-  INT32,\r
-  DWORD\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtInvalidateRect) (\r
-  HWND        hWnd,\r
-  CONST RECT  *lpRect,\r
-  BOOL        bErase\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HDC\r
-(WINAPI *WinNtGetDC) (\r
-  HWND    hWnd\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-INT32\r
-(WINAPI *WinNtReleaseDC) (\r
-  HWND    hWnd,\r
-  HDC     hDC\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-ATOM\r
-(WINAPI *WinNtRegisterClassEx) (\r
-  CONST   WNDCLASSEX *\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtUnregisterClass) (\r
-  LPCTSTR   lpClassName,\r
-  HINSTANCE hInstance\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HDC\r
-(WINAPI *WinNtBeginPaint) (\r
-  HWND          hWnd,\r
-  LPPAINTSTRUCT lpPaint\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtEndPaint) (\r
-  HWND                hWnd,\r
-  CONST PAINTSTRUCT   *lpPaint\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-VOID\r
-(WINAPI *WinNtPostQuitMessage) (\r
-  INT32   nExitCode\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-LRESULT\r
-(WINAPI *WinNtDefWindowProc) (\r
-  HWND    hWnd,\r
-  UINT    Msg,\r
-  WPARAM  wParam,\r
-  LPARAM  lParam\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HICON\r
-(WINAPI *WinNtLoadIcon) (\r
-  HINSTANCE hInstance,\r
-  LPCTSTR   lpIconName\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HCURSOR\r
-(WINAPI *WinNtLoadCursor) (\r
-  HINSTANCE   hInstance,\r
-  LPCTSTR     lpCursorName\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-HGDIOBJ\r
-(WINAPI *WinNtGetStockObject) (\r
-  INT32\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtSetViewportOrgEx) (\r
-  HDC,\r
-  INT32,\r
-  INT32,\r
-  LPPOINT\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtSetWindowOrgEx) (\r
-  HDC,\r
-  INT32,\r
-  INT32,\r
-  LPPOINT\r
-  );\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtMoveWindow) (\r
-  HWND,\r
-  INT32,\r
-  INT32,\r
-  INT32,\r
-  INT32,\r
-  BOOL\r
-  );\r
-\r
-typedef\r
-WINGDIAPI\r
-BOOL\r
-(WINAPI *WinNtGetWindowRect) (\r
-  HWND,\r
-  LPRECT\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtGetMessage) (\r
-  LPMSG     lpMsg,\r
-  HWND      hWnd,\r
-  UINT      wMsgFilterMin,\r
-  UINT      wMsgFilterMax\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtTranslateMessage) (\r
-  CONST MSG *lpMsg\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtDispatchMessage) (\r
-  CONST MSG *lpMsg\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-HANDLE\r
-(WINAPI *WinNtGetProcessHeap) ();\r
-\r
-typedef\r
-WINUSERAPI\r
-LPVOID\r
-(WINAPI *WinNtHeapAlloc) (\r
-  HANDLE  hHeap,\r
-  DWORD   dwFlags,\r
-  SIZE_T  dwBytes\r
-  );\r
-\r
-typedef\r
-WINUSERAPI\r
-BOOL\r
-(WINAPI *WinNtHeapFree) (\r
-  HANDLE  hHeap,\r
-  DWORD   dwFlags,\r
-  LPVOID  lpMem\r
-  );\r
-\r
-typedef\r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtFreeLibrary) (\r
-  HANDLE  ModHandle\r
-  );\r
-typedef  \r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtQueryPerformanceCounter) (\r
-  LARGE_INTEGER  *PerformanceCount\r
-  );\r
-  \r
-typedef  \r
-WINBASEAPI\r
-BOOL\r
-(WINAPI *WinNtQueryPerformanceFrequency) (\r
-  LARGE_INTEGER  *Frequency\r
-  );\r
-//\r
-//\r
-//\r
-\r
-#define EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE SIGNATURE_32 ('N', 'T', 'T', 'T')\r
-\r
-typedef struct {\r
-  UINT64                              Signature;\r
-\r
-  //\r
-  // Win32 Process APIs\r
-  //\r
-  WinNtGetProcAddress                 GetProcAddress;\r
-  WinNtGetTickCount                   GetTickCount;\r
-  WinNtLoadLibraryEx                  LoadLibraryEx;\r
-  WinNtFreeLibrary                    FreeLibrary;\r
-\r
-  WinNtSetPriorityClass               SetPriorityClass;\r
-  WinNtSetThreadPriority              SetThreadPriority;\r
-  WinNtSleep                          Sleep;\r
-\r
-  WinNtSuspendThread                  SuspendThread;\r
-  WinNtGetCurrentThread               GetCurrentThread;\r
-  WinNtGetCurrentThreadId             GetCurrentThreadId;\r
-  WinNtGetCurrentProcess              GetCurrentProcess;\r
-  WinNtCreateThread                   CreateThread;\r
-  WinNtTerminateThread                TerminateThread;\r
-  WinNtSendMessage                    SendMessage;\r
-  WinNtExitThread                     ExitThread;\r
-  WinNtResumeThread                   ResumeThread;\r
-  WinNtDuplicateHandle                DuplicateHandle;\r
-\r
-  //\r
-  // Wint32 Mutex primitive\r
-  //\r
-  WinNtInitializeCriticalSection      InitializeCriticalSection;\r
-  WinNtEnterCriticalSection           EnterCriticalSection;\r
-  WinNtLeaveCriticalSection           LeaveCriticalSection;\r
-  WinNtDeleteCriticalSection          DeleteCriticalSection;\r
-  WinNtTlsAlloc                       TlsAlloc;\r
-  WinNtTlsFree                        TlsFree;\r
-  WinNtTlsSetValue                    TlsSetValue;\r
-  WinNtTlsGetValue                    TlsGetValue;\r
-  WinNtCreateSemaphore                CreateSemaphore;\r
-  WinNtWaitForSingleObject            WaitForSingleObject;\r
-  WinNtReleaseSemaphore               ReleaseSemaphore;\r
-\r
-  //\r
-  // Win32 Console APIs\r
-  //\r
-  WinNtCreateConsoleScreenBuffer      CreateConsoleScreenBuffer;\r
-  WinNtFillConsoleOutputAttribute     FillConsoleOutputAttribute;\r
-  WinNtFillConsoleOutputCharacter     FillConsoleOutputCharacter;\r
-  WinNtGetConsoleCursorInfo           GetConsoleCursorInfo;\r
-  WinNtGetNumberOfConsoleInputEvents  GetNumberOfConsoleInputEvents;\r
-  WinNtPeekConsoleInput               PeekConsoleInput;\r
-  WinNtScrollConsoleScreenBuffer      ScrollConsoleScreenBuffer;\r
-  WinNtReadConsoleInput               ReadConsoleInput;\r
-\r
-  WinNtSetConsoleActiveScreenBuffer   SetConsoleActiveScreenBuffer;\r
-  WinNtSetConsoleCursorInfo           SetConsoleCursorInfo;\r
-  WinNtSetConsoleCursorPosition       SetConsoleCursorPosition;\r
-  WinNtSetConsoleScreenBufferSize     SetConsoleScreenBufferSize;\r
-  WinNtSetConsoleTitleW               SetConsoleTitleW;\r
-  WinNtWriteConsoleInput              WriteConsoleInput;\r
-  WinNtWriteConsoleOutput             WriteConsoleOutput;\r
-\r
-  //\r
-  // Win32 File APIs\r
-  //\r
-  WinNtCreateFile                     CreateFile;\r
-  WinNtDeviceIoControl                DeviceIoControl;\r
-  WinNtCreateDirectory                CreateDirectory;\r
-  WinNtRemoveDirectory                RemoveDirectory;\r
-  WinNtGetFileAttributes              GetFileAttributes;\r
-  WinNtSetFileAttributes              SetFileAttributes;\r
-  WinNtCreateFileMapping              CreateFileMapping;\r
-  WinNtCloseHandle                    CloseHandle;\r
-  WinNtDeleteFile                     DeleteFile;\r
-  WinNtFindFirstFile                  FindFirstFile;\r
-  WinNtFindNextFile                   FindNextFile;\r
-  WinNtFindClose                      FindClose;\r
-  WinNtFlushFileBuffers               FlushFileBuffers;\r
-  WinNtGetEnvironmentVariable         GetEnvironmentVariable;\r
-  WinNtGetLastError                   GetLastError;\r
-  WinNtSetErrorMode                   SetErrorMode;\r
-  WinNtGetStdHandle                   GetStdHandle;\r
-  WinNtMapViewOfFileEx                MapViewOfFileEx;\r
-  WinNtReadFile                       ReadFile;\r
-  WinNtSetEndOfFile                   SetEndOfFile;\r
-  WinNtSetFilePointer                 SetFilePointer;\r
-  WinNtWriteFile                      WriteFile;\r
-  WinNtGetFileInformationByHandle     GetFileInformationByHandle;\r
-  WinNtGetDiskFreeSpace               GetDiskFreeSpace;\r
-  WinNtGetDiskFreeSpaceEx             GetDiskFreeSpaceEx;\r
-  WinNtMoveFile                       MoveFile;\r
-  WinNtSetFileTime                    SetFileTime;\r
-  WinNtSystemTimeToFileTime           SystemTimeToFileTime;\r
-\r
-  //\r
-  // Win32 Time APIs\r
-  //\r
-  WinNtLocalFileTimeToFileTime        LocalFileTimeToFileTime;\r
-  WinNtFileTimeToLocalFileTime        FileTimeToLocalFileTime;\r
-  WinNtFileTimeToSystemTime           FileTimeToSystemTime;\r
-  WinNtGetSystemTime                  GetSystemTime;\r
-  WinNtSetSystemTime                  SetSystemTime;\r
-  WinNtGetLocalTime                   GetLocalTime;\r
-  WinNtSetLocalTime                   SetLocalTime;\r
-  WinNtGetTimeZoneInformation         GetTimeZoneInformation;\r
-  WinNtSetTimeZoneInformation         SetTimeZoneInformation;\r
-  WinNttimeSetEvent                   timeSetEvent;\r
-  WinNttimeKillEvent                  timeKillEvent;\r
-\r
-  //\r
-  // Win32 Serial APIs\r
-  //\r
-  WinNtClearCommError                 ClearCommError;\r
-  WinNtEscapeCommFunction             EscapeCommFunction;\r
-  WinNtGetCommModemStatus             GetCommModemStatus;\r
-  WinNtGetCommState                   GetCommState;\r
-  WinNtSetCommState                   SetCommState;\r
-  WinNtPurgeComm                      PurgeComm;\r
-  WinNtSetCommTimeouts                SetCommTimeouts;\r
-\r
-  WinNtExitProcess                    ExitProcess;\r
-\r
-  WinNtSprintf                        SPrintf;\r
-\r
-  WinNtGetDesktopWindow               GetDesktopWindow;\r
-  WinNtGetForegroundWindow            GetForegroundWindow;\r
-  WinNtCreateWindowEx                 CreateWindowEx;\r
-  WinNtShowWindow                     ShowWindow;\r
-  WinNtUpdateWindow                   UpdateWindow;\r
-  WinNtDestroyWindow                  DestroyWindow;\r
-  WinNtInvalidateRect                 InvalidateRect;\r
-  WinNtGetWindowDC                    GetWindowDC;\r
-  WinNtGetClientRect                  GetClientRect;\r
-  WinNtAdjustWindowRect               AdjustWindowRect;\r
-  WinNtSetDIBitsToDevice              SetDIBitsToDevice;\r
-  WinNtBitBlt                         BitBlt;\r
-  WinNtGetDC                          GetDC;\r
-  WinNtReleaseDC                      ReleaseDC;\r
-  WinNtRegisterClassEx                RegisterClassEx;\r
-  WinNtUnregisterClass                UnregisterClass;\r
-\r
-  WinNtBeginPaint                     BeginPaint;\r
-  WinNtEndPaint                       EndPaint;\r
-  WinNtPostQuitMessage                PostQuitMessage;\r
-  WinNtDefWindowProc                  DefWindowProc;\r
-  WinNtLoadIcon                       LoadIcon;\r
-  WinNtLoadCursor                     LoadCursor;\r
-  WinNtGetStockObject                 GetStockObject;\r
-  WinNtSetViewportOrgEx               SetViewportOrgEx;\r
-  WinNtSetWindowOrgEx                 SetWindowOrgEx;\r
-  WinNtMoveWindow                     MoveWindow;\r
-  WinNtGetWindowRect                  GetWindowRect;\r
-\r
-  WinNtGetMessage                     GetMessage;\r
-  WinNtTranslateMessage               TranslateMessage;\r
-  WinNtDispatchMessage                DispatchMessage;\r
-\r
-  WinNtGetProcessHeap                 GetProcessHeap;\r
-  WinNtHeapAlloc                      HeapAlloc;\r
-  WinNtHeapFree                       HeapFree;\r
-  \r
-  WinNtQueryPerformanceCounter        QueryPerformanceCounter;\r
-  WinNtQueryPerformanceFrequency      QueryPerformanceFrequency;\r
-  \r
-} EFI_WIN_NT_THUNK_PROTOCOL;\r
-\r
-extern EFI_GUID gEfiWinNtThunkProtocolGuid;\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Include/WinNtDxe.h b/Nt32Pkg/Include/WinNtDxe.h
deleted file mode 100644 (file)
index c57ab93..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-  WinNtLib.h\r
-\r
-Abstract:\r
-  Public include file for the WinNt Library\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_DXE_H__\r
-#define __WIN_NT_DXE_H__\r
-\r
-//\r
-// This forces Windows.h WIN32 include file to be included\r
-//  it's needed for WinNtThunk.h\r
-//  WinNtIo.h depends on WinNtThunk.h\r
-//\r
-#include <Common/WinNtInclude.h>\r
-#endif\r
diff --git a/Nt32Pkg/Include/WinNtPeim.h b/Nt32Pkg/Include/WinNtPeim.h
deleted file mode 100644 (file)
index 57d66a2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-  WinNtLib.h\r
-\r
-Abstract:\r
-  Public include file for the WinNt Library\r
-\r
-**/\r
-\r
-#ifndef __WIN_NT_PEIM_H__\r
-#define __WIN_NT_PEIM_H__\r
-\r
-//\r
-// This forces Windows.h WIN32 include file to be included\r
-//  it's needed for WinNtThunk.h\r
-//\r
-#include <Common/WinNtInclude.h>\r
-\r
-#include <Protocol/WinNtThunk.h>\r
-\r
-#endif\r
diff --git a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf
deleted file mode 100644 (file)
index dd98ba1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-## @file\r
-# Memory Status Code Library for UEFI drivers\r
-#\r
-# Lib to provide memory journal status code reporting Routines\r
-# \r
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = DxeNt32OemHookStatusCodeLib\r
-  FILE_GUID                      = EF172A23-C7C5-47b7-B24E-D10DFE15540F\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = OemHookStatusCodeLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-#  HOB Guid C Name: gEfiWinNtThunkProtocolGuid Hob Type: GUID_EXTENSION\r
-#\r
-\r
-[Sources]\r
-  Nt32OemHookStatusCodeLib.c\r
-\r
-\r
-[Packages]\r
-  Nt32Pkg/Nt32Pkg.dec\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-\r
-[LibraryClasses]\r
-  ReportStatusCodeLib\r
-  BaseMemoryLib\r
-  PrintLib\r
-  HobLib\r
-  DebugLib\r
-\r
-[Protocols]\r
-  gEfiWinNtThunkProtocolGuid                    # ALWAYS_CONSUMED\r
diff --git a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
deleted file mode 100644 (file)
index a69dc33..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/** @file\r
-  OEM hook status code library functions with no library constructor/destructor\r
-\r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-  Module Name:  Nt32OemHookStatusCodeLib.c\r
-\r
-**/\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <WinNtDxe.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Protocol/WinNtThunk.h>\r
-#include <Guid/StatusCodeDataTypeId.h>\r
-#include <Guid/StatusCodeDataTypeDebug.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/OemHookStatusCodeLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-\r
-//\r
-// Cache of WinNtThunk protocol\r
-//\r
-EFI_WIN_NT_THUNK_PROTOCOL   *mWinNt;\r
-\r
-//\r
-// Cache of standard output handle .\r
-//\r
-HANDLE                      mStdOut;\r
-\r
-/**\r
-\r
-  Initialize OEM status code device .\r
-\r
-  @return    Always return EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-OemHookStatusCodeInitialize (\r
-  VOID\r
-  )\r
-{\r
-  EFI_HOB_GUID_TYPE   *GuidHob;\r
-\r
-  //\r
-  // Retrieve WinNtThunkProtocol from GUID'ed HOB\r
-  //\r
-  GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);\r
-  ASSERT (GuidHob != NULL);\r
-  mWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
-  ASSERT (mWinNt != NULL);\r
-\r
-  //\r
-  // Cache standard output handle.\r
-  //\r
-  mStdOut = mWinNt->GetStdHandle (STD_OUTPUT_HANDLE);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Report status code to OEM device.\r
-\r
-  @param  CodeType      Indicates the type of status code being reported.  Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
-\r
-  @param  Value         Describes the current status of a hardware or software entity.\r
-                        This included information about the class and subclass that is used to classify the entity\r
-                        as well as an operation.  For progress codes, the operation is the current activity.\r
-                        For error codes, it is the exception.  For debug codes, it is not defined at this time.\r
-                        Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r
-                        Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r
-\r
-  @param  Instance      The enumeration of a hardware or software entity within the system.\r
-                        A system may contain multiple entities that match a class/subclass pairing.\r
-                        The instance differentiates between them.  An instance of 0 indicates that instance information is unavailable,\r
-                        not meaningful, or not relevant.  Valid instance numbers start with 1.\r
-\r
-\r
-  @param  CallerId      This optional parameter may be used to identify the caller.\r
-                        This parameter allows the status code driver to apply different rules to different callers.\r
-                        Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r
-\r
-\r
-  @param  Data          This optional parameter may be used to pass additional data\r
-\r
-  @return               The function always return EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-OemHookStatusCodeReport (\r
-  IN EFI_STATUS_CODE_TYPE     CodeType,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 *CallerId, OPTIONAL\r
-  IN EFI_STATUS_CODE_DATA     *Data      OPTIONAL\r
-  )\r
-{\r
-  CHAR8           *Filename;\r
-  CHAR8           *Description;\r
-  CHAR8           *Format;\r
-  CHAR8           Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];\r
-  UINT32          ErrorLevel;\r
-  UINT32          LineNumber;\r
-  UINTN           CharCount;\r
-  BASE_LIST       Marker;\r
-\r
-  Buffer[0] = '\0';\r
-\r
-  if (Data != NULL &&\r
-      ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
-    //\r
-    // Print ASSERT() information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "\n\rASSERT!: %a (%d): %a\n\r",\r
-                  Filename,\r
-                  LineNumber,\r
-                  Description\r
-                  );\r
-\r
-    //\r
-    // Callout to standard output.\r
-    //\r
-    mWinNt->WriteFile (\r
-              mStdOut,\r
-              Buffer,\r
-              (DWORD)CharCount,\r
-              (LPDWORD)&CharCount,\r
-              NULL\r
-              );\r
-\r
-    return EFI_SUCCESS;\r
-\r
-  } else if (Data != NULL &&\r
-             ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {\r
-    //\r
-    // Print DEBUG() information into output buffer.\r
-    //\r
-    CharCount = AsciiBSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  Format,\r
-                  Marker\r
-                  );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {\r
-    //\r
-    // Print ERROR information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "ERROR: C%x:V%x I%x",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-\r
-    //\r
-    // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.\r
-    //\r
-\r
-    if (CallerId != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %g",\r
-                     CallerId\r
-                     );\r
-    }\r
-\r
-    if (Data != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %p",\r
-                     Data\r
-                     );\r
-    }\r
-\r
-    CharCount += AsciiSPrint (\r
-                   &Buffer[CharCount - 1],\r
-                   (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                   "\n\r"\r
-                   );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "PROGRESS CODE: V%x I%x\n\r",\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  } else {\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "Undefined: C%x:V%x I%x\n\r",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  }\r
-\r
-  //\r
-  // Callout to standard output.\r
-  //\r
-  mWinNt->WriteFile (\r
-            mStdOut,\r
-            Buffer,\r
-            (DWORD)CharCount,\r
-            (LPDWORD)&CharCount,\r
-            NULL\r
-            );\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
diff --git a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c
deleted file mode 100644 (file)
index 82bbbde..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  PeiNt32PeCoffExtraActionLib.c\r
-\r
-Abstract:\r
-\r
-  Provides services to perform additional actions to relocate and unload\r
-  PE/Coff image for NT32 environment specific purpose such as souce level debug.\r
-  This version only works for DXE phase  \r
-\r
-\r
-**/\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <WinNtDxe.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Protocol/WinNtThunk.h>\r
-\r
-#include <Library/PeCoffLib.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/PeCoffExtraActionLib.h>\r
-\r
-#define MAX_PDB_NAME_TO_MOD_HANDLE_ARRAY_SIZE 0x100\r
-\r
-typedef struct {\r
-  CHAR8   *PdbPointer;\r
-  VOID    *ModHandle;\r
-} PDB_NAME_TO_MOD_HANDLE;\r
-\r
-\r
-//\r
-// Cache of WinNtThunk protocol\r
-//\r
-EFI_WIN_NT_THUNK_PROTOCOL   *mWinNt = NULL;\r
-\r
-//\r
-// An Array to hold the ModHandle\r
-//\r
-PDB_NAME_TO_MOD_HANDLE  *mPdbNameModHandleArray = NULL;\r
-UINTN                   mPdbNameModHandleArraySize = 0;\r
-\r
-\r
-/**\r
-  The constructor function gets  the pointer of the WinNT thunk functions\r
-  It will ASSERT() if NT thunk protocol is not installed.\r
-\r
-  @retval EFI_SUCCESS   WinNT thunk protocol is found and cached.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-Nt32PeCoffGetWinNtThunkStucture (\r
-  VOID\r
-  )\r
-{\r
-  EFI_HOB_GUID_TYPE   *GuidHob;\r
-\r
-  //\r
-  // Retrieve WinNtThunkProtocol from GUID'ed HOB\r
-  //\r
-  GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);\r
-  ASSERT (GuidHob != NULL);\r
-  mWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
-  ASSERT (mWinNt != NULL);\r
-\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Convert the passed in Ascii string to Unicode.\r
-  \r
-  This function  Convert the passed in Ascii string to Unicode.Optionally return\r
-   the length of the strings..\r
-\r
-  @param  AsciiString    Pointer to an AscII string\r
-  @param  StrLen         Length of string\r
-\r
-  @return  Pointer to malloc'ed Unicode version of Ascii\r
-\r
-**/\r
-CHAR16 *\r
-AsciiToUnicode (\r
-  IN  CHAR8   *Ascii,\r
-  IN  UINTN   *StrLen OPTIONAL\r
-  )\r
-{\r
-  UINTN   Index;\r
-  CHAR16  *Unicode;\r
-\r
-  //\r
-  // Allocate a buffer for unicode string\r
-  //\r
-  for (Index = 0; Ascii[Index] != '\0'; Index++)\r
-    ;\r
-  Unicode = mWinNt->HeapAlloc ( mWinNt->GetProcessHeap (),\r
-                                HEAP_ZERO_MEMORY,\r
-                                ((Index + 1) * sizeof (CHAR16))\r
-                               ); \r
-  if (Unicode == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  for (Index = 0; Ascii[Index] != '\0'; Index++) {\r
-    Unicode[Index] = (CHAR16) Ascii[Index];\r
-  }\r
-\r
-  Unicode[Index] = '\0';\r
-\r
-  if (StrLen != NULL) {\r
-    *StrLen = Index;\r
-  }\r
-\r
-  return Unicode;\r
-}\r
-/**\r
-  Store the ModHandle in an array indexed by the Pdb File name.\r
-  The ModHandle is needed to unload the image. \r
-\r
-\r
-  @param ImageContext - Input data returned from PE Laoder Library. Used to find the \r
-                 .PDB file name of the PE Image.\r
-  @param ModHandle    - Returned from LoadLibraryEx() and stored for call to \r
-                 FreeLibrary().\r
-\r
-  @return   return EFI_SUCCESS when ModHandle was stored. \r
-\r
---*/\r
-EFI_STATUS\r
-AddModHandle (\r
-  IN  PE_COFF_LOADER_IMAGE_CONTEXT         *ImageContext,\r
-  IN  VOID                                 *ModHandle\r
-  )\r
-\r
-{\r
-  UINTN                   Index;\r
-  PDB_NAME_TO_MOD_HANDLE  *Array;\r
-  UINTN                   PreviousSize;\r
-  PDB_NAME_TO_MOD_HANDLE  *TempArray;\r
-  HANDLE                  Handle;\r
-\r
-  //\r
-  // Return EFI_ALREADY_STARTED if this DLL has already been loaded\r
-  //\r
-  Array = mPdbNameModHandleArray;\r
-  for (Index = 0; Index < mPdbNameModHandleArraySize; Index++, Array++) {\r
-    if (Array->PdbPointer != NULL && Array->ModHandle == ModHandle) {\r
-      return EFI_ALREADY_STARTED;\r
-    }\r
-  }\r
-  \r
-  Array = mPdbNameModHandleArray;\r
-  for (Index = 0; Index < mPdbNameModHandleArraySize; Index++, Array++) {\r
-    if (Array->PdbPointer == NULL) {\r
-      //\r
-      // Make a copy of the stirng and store the ModHandle\r
-      //\r
-      Handle = mWinNt->GetProcessHeap ();\r
-      Array->PdbPointer = mWinNt->HeapAlloc ( Handle,\r
-                                HEAP_ZERO_MEMORY,\r
-                                AsciiStrLen (ImageContext->PdbPointer) + 1\r
-                               ); \r
-                               \r
-      ASSERT (Array->PdbPointer != NULL);\r
-\r
-      AsciiStrCpy (Array->PdbPointer, ImageContext->PdbPointer);\r
-      Array->ModHandle = ModHandle;\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
-  \r
-  //\r
-  // No free space in mPdbNameModHandleArray so grow it by \r
-  // MAX_PDB_NAME_TO_MOD_HANDLE_ARRAY_SIZE entires. \r
-  //\r
-  PreviousSize = mPdbNameModHandleArraySize * sizeof (PDB_NAME_TO_MOD_HANDLE);\r
-  mPdbNameModHandleArraySize += MAX_PDB_NAME_TO_MOD_HANDLE_ARRAY_SIZE;\r
-  //\r
-  // re-allocate a new buffer and copy the old values to the new locaiton. \r
-  //\r
-  TempArray = mWinNt->HeapAlloc ( mWinNt->GetProcessHeap (),\r
-                                HEAP_ZERO_MEMORY,\r
-                                mPdbNameModHandleArraySize * sizeof (PDB_NAME_TO_MOD_HANDLE)\r
-                               ); \r
\r
-  CopyMem ((VOID *) (UINTN) TempArray, (VOID *) (UINTN)mPdbNameModHandleArray, PreviousSize);\r
-  \r
-  mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, mPdbNameModHandleArray);\r
-  \r
-  mPdbNameModHandleArray = TempArray;\r
-  if (mPdbNameModHandleArray == NULL) {\r
-    ASSERT (FALSE);\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-  \r
-  \r
-  return AddModHandle (ImageContext, ModHandle);\r
-}\r
-/**\r
-  Return the ModHandle and delete the entry in the array.\r
-\r
-\r
-   @param  ImageContext - Input data returned from PE Laoder Library. Used to find the \r
-                 .PDB file name of the PE Image.\r
-\r
-  @return   \r
-    ModHandle - ModHandle assoicated with ImageContext is returned\r
-    NULL      - No ModHandle associated with ImageContext\r
-\r
-**/\r
-VOID *\r
-RemoveModeHandle (\r
-  IN  PE_COFF_LOADER_IMAGE_CONTEXT         *ImageContext\r
-  )\r
-{\r
-  UINTN                   Index;\r
-  PDB_NAME_TO_MOD_HANDLE  *Array;\r
-\r
-  if (ImageContext->PdbPointer == NULL) {\r
-    //\r
-    // If no PDB pointer there is no ModHandle so return NULL\r
-    //\r
-    return NULL;\r
-  }\r
-\r
-  Array = mPdbNameModHandleArray;\r
-  for (Index = 0; Index < mPdbNameModHandleArraySize; Index++, Array++) {\r
-    if ((Array->PdbPointer != NULL) && (AsciiStrCmp(Array->PdbPointer, ImageContext->PdbPointer) == 0)) {\r
-      //\r
-      // If you find a match return it and delete the entry\r
-      //\r
-      mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, Array->PdbPointer);\r
-      Array->PdbPointer = NULL;\r
-      return Array->ModHandle;\r
-    }\r
-  }\r
-\r
-  return NULL;\r
-}\r
-\r
-/**\r
-  Performs additional actions after a PE/COFF image has been loaded and relocated.\r
-\r
-  For NT32, this function load symbols to support source level debugging.\r
-\r
-  If ImageContext is NULL, then ASSERT().\r
-\r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that has already been loaded and relocated.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderRelocateImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  EFI_STATUS        Status;\r
-  VOID              *DllEntryPoint;\r
-  CHAR16            *DllFileName;\r
-  HMODULE           Library;\r
-  UINTN             Index;\r
-\r
-  ASSERT (ImageContext != NULL);\r
-\r
-  if (mWinNt == NULL) {\r
-    Nt32PeCoffGetWinNtThunkStucture ();\r
-  }\r
-\r
-  //\r
-  // If we load our own PE COFF images the Windows debugger can not source\r
-  //  level debug our code. If a valid PDB pointer exists usw it to load\r
-  //  the *.dll file as a library using Windows* APIs. This allows \r
-  //  source level debug. The image is still loaded and relocated\r
-  //  in the Framework memory space like on a real system (by the code above),\r
-  //  but the entry point points into the DLL loaded by the code bellow. \r
-  //\r
-\r
-  DllEntryPoint = NULL;\r
-\r
-  //\r
-  // Load the DLL if it's not an EBC image.\r
-  //\r
-  if ((ImageContext->PdbPointer != NULL) &&\r
-      (ImageContext->Machine != EFI_IMAGE_MACHINE_EBC)) {\r
-    //\r
-    // Convert filename from ASCII to Unicode\r
-    //\r
-    DllFileName = AsciiToUnicode (ImageContext->PdbPointer, &Index);\r
-\r
-    //\r
-    // Check that we have a valid filename\r
-    //\r
-    if (Index < 5 || DllFileName[Index - 4] != '.') {\r
-      mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, DllFileName);\r
-\r
-      //\r
-      // Never return an error if PeCoffLoaderRelocateImage() succeeded.\r
-      // The image will run, but we just can't source level debug. If we\r
-      // return an error the image will not run.\r
-      //\r
-      return;\r
-    }\r
-    //\r
-    // Replace .PDB with .DLL on the filename\r
-    //\r
-    DllFileName[Index - 3]  = 'D';\r
-    DllFileName[Index - 2]  = 'L';\r
-    DllFileName[Index - 1]  = 'L';\r
-\r
-    //\r
-    // Load the .DLL file into the user process's address space for source \r
-    // level debug\r
-    //\r
-    Library = mWinNt->LoadLibraryEx  (DllFileName, NULL, DONT_RESOLVE_DLL_REFERENCES);\r
-    if (Library != NULL) {\r
-      //\r
-      // InitializeDriver is the entry point we put in all our EFI DLL's. The\r
-      // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() suppresses the \r
-      // normal DLL entry point of DllMain, and prevents other modules that are\r
-      // referenced in side the DllFileName from being loaded. There is no error \r
-      // checking as the we can point to the PE32 image loaded by Tiano. This \r
-      // step is only needed for source level debugging\r
-      //\r
-      DllEntryPoint = (VOID *) (UINTN) mWinNt->GetProcAddress (Library, "InitializeDriver");\r
-\r
-    }\r
-\r
-    if ((Library != NULL) && (DllEntryPoint != NULL)) {\r
-      Status = AddModHandle (ImageContext, Library);\r
-      if (Status == EFI_ALREADY_STARTED) {\r
-        //\r
-        // If the DLL has already been loaded before, then this instance of the DLL can not be debugged.\r
-        //\r
-        ImageContext->PdbPointer = NULL;\r
-        DEBUG ((EFI_D_ERROR, "WARNING: DLL already loaded.  No source level debug %s. \n", DllFileName));\r
-      } else {\r
-        //\r
-        // This DLL is not already loaded, so source level debugging is supported.\r
-        //\r
-        ImageContext->EntryPoint  = (EFI_PHYSICAL_ADDRESS) (UINTN) DllEntryPoint;\r
-        DEBUG ((EFI_D_INFO, "LoadLibraryEx (%s,\n               NULL, DONT_RESOLVE_DLL_REFERENCES)\n", DllFileName));\r
-      }\r
-    } else {\r
-      //\r
-      // This DLL does not support source level debugging at all.\r
-      //\r
-      DEBUG ((EFI_D_ERROR, "WARNING: No source level debug %s. \n", DllFileName));\r
-    }\r
-\r
-    mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, DllFileName);\r
-  }\r
-\r
-  //\r
-  // Never return an error if PeCoffLoaderRelocateImage() succeeded.\r
-  // The image will run, but we just can't source level debug. If we\r
-  // return an error the image will not run.\r
-  //\r
-  return;\r
-}  \r
-\r
-/**\r
-  Performs additional actions just before a PE/COFF image is unloaded.  Any resources\r
-  that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.\r
-  \r
-  For NT32, this function unloads symbols for source level debugging.\r
-\r
-  If ImageContext is NULL, then ASSERT().\r
-  \r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that is being unloaded.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderUnloadImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  VOID *ModHandle;\r
-\r
-  ASSERT (ImageContext != NULL);\r
-\r
-  ModHandle = RemoveModeHandle (ImageContext);\r
-  if (ModHandle != NULL) {\r
-    mWinNt->FreeLibrary (ModHandle);\r
-  }\r
-  return;\r
-}\r
diff --git a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf
deleted file mode 100644 (file)
index d81517a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-## @file\r
-# PeCoff extra action libary for DXE phase that run NT32 emulator.\r
-#\r
-# Lib to provide memory journal status code reporting Routines\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-# SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = DxeNt32PeCoffExtraActionLib\r
-  FILE_GUID                      = 23AF9A54-3D7C-444d-8318-E9CF752DA349\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PeCoffExtraActionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  DxeNt32PeCoffExtraActionLib.c\r
-\r
-[Packages]\r
-  Nt32Pkg/Nt32Pkg.dec\r
-  MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
-  DebugLib\r
-  HobLib\r
-  BaseMemoryLib\r
-\r
-[Protocols]\r
-  gEfiWinNtThunkProtocolGuid                # ALWAYS_CONSUMED\r
-\r
diff --git a/Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf b/Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf
deleted file mode 100644 (file)
index 47430e8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-## @file\r
-# A library to produce the global variable 'gWinNt'\r
-#\r
-# This library contains a single global variable 'gWinNt' along with a constructor to initialize that global.\r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = DxeWinNtLib\r
-  FILE_GUID                      = f6b5871d-5226-41b3-a569-3ff893fdc7bc\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = WinNtLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
-\r
-  CONSTRUCTOR                    = WinNtLibConstructor\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-#  HOB Guid C Name: gEfiWinNtThunkProtocolGuid Hob Type: GUID_EXTENSION\r
-#\r
-\r
-[Sources]\r
-  WinNtLib.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  HobLib\r
-  DebugLib\r
-\r
-[Protocols]\r
-  gEfiWinNtThunkProtocolGuid      # Used as HOB in the code.\r
-  \r
diff --git a/Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c b/Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c
deleted file mode 100644 (file)
index 55d6f9c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  WinNtLib.c\r
-\r
-Abstract:\r
-\r
-  WinNt Library \r
-\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <WinNtDxe.h>\r
-#include <Library/WinNtLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-\r
-\r
-EFI_WIN_NT_THUNK_PROTOCOL *gWinNt;\r
-\r
-EFI_STATUS\r
-WinNtLibConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
-  EFI_HOB_GUID_TYPE        *GuidHob;\r
-\r
-  GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);\r
-  ASSERT (GuidHob != NULL);\r
-  gWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
-  ASSERT (gWinNt != NULL);\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf b/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf
deleted file mode 100644 (file)
index 011c9d6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-## @file\r
-# Component description file for the EdkNt32PeiPeCoffGetEntryPointLib library.\r
-#\r
-# PeCoffGetEntryPointLib library class for NT32 instance implemented by use NTPeiLoadFile PPI.\r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = EdkNt32PeiPeCoffGetEntryPointLib\r
-  FILE_GUID                      = 434b164e-5fa6-4a3d-bc04-02da2a4eeb26\r
-  MODULE_TYPE                    = PEIM\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PeCoffGetEntryPointLib|PEI_CORE PEIM SEC\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  PeCoffGetEntryPoint.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  PeiServicesLib\r
-\r
-[Ppis]\r
-  gNtPeiLoadFilePpiGuid                         # PPI ALWAYS_CONSUMED\r
-\r
diff --git a/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c b/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
deleted file mode 100644 (file)
index 58a88a4..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  PeCoffGetEntryPoint.c\r
-\r
-Abstract:\r
-\r
-  Tiano PE/COFF loader\r
-\r
-Revision History\r
-\r
-**/\r
-\r
-#include <PiPei.h>\r
-#include <IndustryStandard/PeImage.h>\r
-#include <WinNtPeim.h>\r
-#include <Ppi/NtPeiLoadFile.h>\r
-#include <Library/PeCoffGetEntryPointLib.h>\r
-#include <Library/PeiServicesLib.h>\r
-#include <Library/DebugLib.h>\r
-\r
-\r
-RETURN_STATUS\r
-EFIAPI\r
-PeCoffLoaderGetEntryPoint (\r
-  IN     VOID  *Pe32Data,\r
-  IN OUT VOID  **EntryPoint\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Loads a PE/COFF image into memory, this is not follow the original purpose of \r
-  PeCoffGetEntryPoint library class.  But it's ok that Unix package not run on a real \r
-  platform and this is for source level debug.\r
-\r
-Arguments:\r
-\r
-  Pe32Data   - Pointer to a PE/COFF Image\r
-\r
-  EntryPoint - Pointer to the entry point of the PE/COFF image\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS            if the EntryPoint was returned\r
-  EFI_INVALID_PARAMETER  if the EntryPoint could not be found from Pe32Data\r
-\r
---*/\r
-{\r
-  EFI_STATUS              Status;\r
-  EFI_PEI_PPI_DESCRIPTOR  *PpiDescriptor;\r
-  NT_PEI_LOAD_FILE_PPI    *PeiNtService;\r
-  EFI_PHYSICAL_ADDRESS    ImageAddress;\r
-  UINT64                  ImageSize;\r
-  EFI_PHYSICAL_ADDRESS    ImageEntryPoint;\r
-\r
-  ASSERT (Pe32Data   != NULL);\r
-  ASSERT (EntryPoint != NULL);\r
-\r
-  Status = PeiServicesLocatePpi (\r
-             &gNtPeiLoadFilePpiGuid,\r
-             0,\r
-             &PpiDescriptor,\r
-             (VOID**)&PeiNtService\r
-             );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  Status = PeiNtService->PeiLoadFileService (\r
-                           Pe32Data,\r
-                           &ImageAddress,\r
-                           &ImageSize,\r
-                           &ImageEntryPoint\r
-                           );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  *EntryPoint = (VOID*)(UINTN)ImageEntryPoint;\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Returns the machine type of PE/COFF image. \r
-  This is copied from MDE BasePeCoffGetEntryPointLib, the code should be sync with it.\r
-  The reason is NT32 package needs to load the image to memory to support source\r
-  level debug.\r
-   \r
-\r
-  @param  Pe32Data   Pointer to a PE/COFF header\r
-\r
-  @return            Machine type or zero if not a valid iamge\r
-\r
-**/\r
-UINT16\r
-EFIAPI\r
-PeCoffLoaderGetMachineType (\r
-  IN  VOID  *Pe32Data\r
-  )\r
-{  \r
-  EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION  Hdr;\r
-  EFI_IMAGE_DOS_HEADER                 *DosHdr;\r
-\r
-  ASSERT (Pe32Data   != NULL);\r
-\r
-  DosHdr = (EFI_IMAGE_DOS_HEADER  *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
-    //\r
-    // DOS image header is present, so read the PE header after the DOS image header.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff));\r
-  } else {\r
-    //\r
-    // DOS image header is not present, so PE header is at the image base.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
-  }\r
-\r
-  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
-    return Hdr.Te->Machine;\r
-  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE)  {\r
-    return Hdr.Pe32->FileHeader.Machine;\r
-  }\r
-\r
-  return 0x0000;\r
-}\r
-\r
-/**\r
-  Returns a pointer to the PDB file name for a PE/COFF image that has been\r
-  loaded into system memory with the PE/COFF Loader Library functions.\r
-\r
-  Returns the PDB file name for the PE/COFF image specified by Pe32Data.  If\r
-  the PE/COFF image specified by Pe32Data is not a valid, then NULL is\r
-  returned.  If the PE/COFF image specified by Pe32Data does not contain a\r
-  debug directory entry, then NULL is returned.  If the debug directory entry\r
-  in the PE/COFF image specified by Pe32Data does not contain a PDB file name,\r
-  then NULL is returned.\r
-  If Pe32Data is NULL, then ASSERT().\r
-\r
-  @param  Pe32Data   Pointer to the PE/COFF image that is loaded in system\r
-                     memory.\r
-\r
-  @return The PDB file name for the PE/COFF image specified by Pe32Data or NULL\r
-          if it cannot be retrieved.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-PeCoffLoaderGetPdbPointer (\r
-  IN VOID  *Pe32Data\r
-  )\r
-{\r
-  EFI_IMAGE_DOS_HEADER                  *DosHdr;\r
-  EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION   Hdr;\r
-  EFI_IMAGE_DATA_DIRECTORY              *DirectoryEntry;\r
-  EFI_IMAGE_DEBUG_DIRECTORY_ENTRY       *DebugEntry;\r
-  UINTN                                 DirCount;\r
-  VOID                                  *CodeViewEntryPointer;\r
-  INTN                                  TEImageAdjust;\r
-  UINT32                                NumberOfRvaAndSizes;\r
-  UINT16                                Magic;\r
-\r
-  ASSERT (Pe32Data   != NULL);\r
-\r
-  TEImageAdjust       = 0;\r
-  DirectoryEntry      = NULL;\r
-  DebugEntry          = NULL;\r
-  NumberOfRvaAndSizes = 0;\r
-\r
-  DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
-    //\r
-    // DOS image header is present, so read the PE header after the DOS image header.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff));\r
-  } else {\r
-    //\r
-    // DOS image header is not present, so PE header is at the image base.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
-  }\r
-\r
-  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
-    if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {\r
-      DirectoryEntry  = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];\r
-      TEImageAdjust   = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;\r
-      DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN) Hdr.Te +\r
-                    Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress +\r
-                    TEImageAdjust);\r
-    }\r
-  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {\r
-    //\r
-    // NOTE: We use Machine field to identify PE32/PE32+, instead of Magic.\r
-    //       It is due to backward-compatibility, for some system might\r
-    //       generate PE32+ image with PE32 Magic.\r
-    //\r
-    switch (Hdr.Pe32->FileHeader.Machine) {\r
-    case IMAGE_FILE_MACHINE_I386:\r
-      //\r
-      // Assume PE32 image with IA32 Machine field.\r
-      //\r
-      Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;\r
-      break;\r
-    case IMAGE_FILE_MACHINE_X64:\r
-    case IMAGE_FILE_MACHINE_IA64:\r
-      //\r
-      // Assume PE32+ image with X64 or IA64 Machine field\r
-      //\r
-      Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;\r
-      break;\r
-    default:\r
-      //\r
-      // For unknow Machine field, use Magic in optional Header\r
-      //\r
-      Magic = Hdr.Pe32->OptionalHeader.Magic;\r
-    }\r
-\r
-    if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
-      //\r
-      // Use PE32 offset get Debug Directory Entry\r
-      //\r
-      NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes;\r
-      DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]);\r
-      DebugEntry     = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) ((UINTN) Pe32Data + DirectoryEntry->VirtualAddress);\r
-    } else if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {\r
-      //\r
-      // Use PE32+ offset get Debug Directory Entry\r
-      //\r
-      NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes;\r
-      DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]);\r
-      DebugEntry     = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) ((UINTN) Pe32Data + DirectoryEntry->VirtualAddress);\r
-    }\r
-\r
-    if (NumberOfRvaAndSizes <= EFI_IMAGE_DIRECTORY_ENTRY_DEBUG) {\r
-      DirectoryEntry = NULL;\r
-      DebugEntry = NULL;\r
-    }\r
-  } else {\r
-    return NULL;\r
-  }\r
-\r
-  if (DebugEntry == NULL || DirectoryEntry == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) {\r
-    if (DebugEntry->Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {\r
-      if (DebugEntry->SizeOfData > 0) {\r
-        CodeViewEntryPointer = (VOID *) ((UINTN) DebugEntry->RVA + ((UINTN)Pe32Data) + (UINTN)TEImageAdjust);\r
-        switch (* (UINT32 *) CodeViewEntryPointer) {\r
-        case CODEVIEW_SIGNATURE_NB10:\r
-          return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY));\r
-        case CODEVIEW_SIGNATURE_RSDS:\r
-          return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY));\r
-        case CODEVIEW_SIGNATURE_MTOC:              \r
-          return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY));\r
-          break;\r
-        default:\r
-          break;\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  return NULL;\r
-}\r
-\r
-/**\r
-  Returns the size of the PE/COFF headers\r
-\r
-  Returns the size of the PE/COFF header specified by Pe32Data.\r
-  If Pe32Data is NULL, then ASSERT().\r
-\r
-  @param  Pe32Data   Pointer to the PE/COFF image that is loaded in system\r
-                     memory.\r
-\r
-  @return Size of PE/COFF header in bytes or zero if not a valid image.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-PeCoffGetSizeOfHeaders (\r
-  IN VOID     *Pe32Data\r
-  )\r
-{\r
-  EFI_IMAGE_DOS_HEADER                  *DosHdr;\r
-  EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION   Hdr;\r
-  UINTN                                 SizeOfHeaders;\r
-\r
-  ASSERT (Pe32Data   != NULL);\r
\r
-  DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
-    //\r
-    // DOS image header is present, so read the PE header after the DOS image header.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff));\r
-  } else {\r
-    //\r
-    // DOS image header is not present, so PE header is at the image base.\r
-    //\r
-    Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
-  }\r
-\r
-  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
-    SizeOfHeaders = sizeof (EFI_TE_IMAGE_HEADER) + (UINTN)Hdr.Te->BaseOfCode - (UINTN)Hdr.Te->StrippedSize;\r
-  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {\r
-    SizeOfHeaders = Hdr.Pe32->OptionalHeader.SizeOfHeaders;\r
-  } else {\r
-    SizeOfHeaders = 0;\r
-  }\r
-\r
-  return (UINT32) SizeOfHeaders;\r
-}\r
-\r
diff --git a/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
deleted file mode 100644 (file)
index e7c2df0..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/** @file\r
-  OEM hook status code library functions with no library constructor/destructor\r
-\r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-  Module Name:  Nt32OemHookStatusCodeLib.c\r
-\r
-**/\r
-\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <WinNtPeim.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Guid/StatusCodeDataTypeId.h>\r
-#include <Guid/StatusCodeDataTypeDebug.h>\r
-#include <Ppi/NtThunk.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/OemHookStatusCodeLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/PeiServicesLib.h>\r
-\r
-//\r
-// Cache of WinNtThunk protocol\r
-//\r
-EFI_WIN_NT_THUNK_PROTOCOL   *mWinNt;\r
-\r
-//\r
-// Cache of standard output handle .\r
-//\r
-HANDLE                      mStdOut;\r
-\r
-/**\r
-\r
-  Initialize OEM status code device .\r
-\r
-  @return    Always return EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-OemHookStatusCodeInitialize (\r
-  VOID\r
-  )\r
-{\r
-  PEI_NT_THUNK_PPI  *NtThunkPpi;\r
-  EFI_STATUS        Status;\r
-\r
-\r
-  //\r
-  // Locate NtThunkPpi for retrieving standard output handle\r
-  //\r
-  Status = PeiServicesLocatePpi (\r
-              &gPeiNtThunkPpiGuid,\r
-              0,\r
-              NULL,\r
-              (VOID **) &NtThunkPpi\r
-              );\r
-\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  mWinNt  = (EFI_WIN_NT_THUNK_PROTOCOL *) NtThunkPpi->NtThunk ();\r
-\r
-\r
-  //\r
-  // Cache standard output handle.\r
-  //\r
-  mStdOut = mWinNt->GetStdHandle (STD_OUTPUT_HANDLE);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Report status code to OEM device.\r
-\r
-  @param  CodeType      Indicates the type of status code being reported.  Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
-\r
-  @param  Value         Describes the current status of a hardware or software entity.\r
-                        This included information about the class and subclass that is used to classify the entity\r
-                        as well as an operation.  For progress codes, the operation is the current activity.\r
-                        For error codes, it is the exception.  For debug codes, it is not defined at this time.\r
-                        Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r
-                        Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r
-\r
-  @param  Instance      The enumeration of a hardware or software entity within the system.\r
-                        A system may contain multiple entities that match a class/subclass pairing.\r
-                        The instance differentiates between them.  An instance of 0 indicates that instance information is unavailable,\r
-                        not meaningful, or not relevant.  Valid instance numbers start with 1.\r
-\r
-\r
-  @param  CallerId      This optional parameter may be used to identify the caller.\r
-                        This parameter allows the status code driver to apply different rules to different callers.\r
-                        Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r
-\r
-\r
-  @param  Data          This optional parameter may be used to pass additional data\r
-\r
-  @return               The function always return EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-OemHookStatusCodeReport (\r
-  IN EFI_STATUS_CODE_TYPE     CodeType,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 *CallerId, OPTIONAL\r
-  IN EFI_STATUS_CODE_DATA     *Data      OPTIONAL\r
-  )\r
-{\r
-  CHAR8           *Filename;\r
-  CHAR8           *Description;\r
-  CHAR8           *Format;\r
-  CHAR8           Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];\r
-  UINT32          ErrorLevel;\r
-  UINT32          LineNumber;\r
-  UINTN           CharCount;\r
-  BASE_LIST       Marker;\r
-\r
-  Buffer[0] = '\0';\r
-\r
-  if (Data != NULL &&\r
-      ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
-    //\r
-    // Print ASSERT() information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "\n\rASSERT!: %a (%d): %a\n\r",\r
-                  Filename,\r
-                  LineNumber,\r
-                  Description\r
-                  );\r
-\r
-    //\r
-    // Callout to standard output.\r
-    //\r
-    mWinNt->WriteFile (\r
-              mStdOut,\r
-              Buffer,\r
-              (DWORD)CharCount,\r
-              (LPDWORD)&CharCount,\r
-              NULL\r
-              );\r
-\r
-    return EFI_SUCCESS;\r
-\r
-  } else if (Data != NULL &&\r
-             ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {\r
-    //\r
-    // Print DEBUG() information into output buffer.\r
-    //\r
-    CharCount = AsciiBSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  Format,\r
-                  Marker\r
-                  );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {\r
-    //\r
-    // Print ERROR information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "ERROR: C%x:V%x I%x",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-\r
-    //\r
-    // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.\r
-    //\r
-\r
-    if (CallerId != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %g",\r
-                     CallerId\r
-                     );\r
-    }\r
-\r
-    if (Data != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount - 1],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %p",\r
-                     Data\r
-                     );\r
-    }\r
-\r
-    CharCount += AsciiSPrint (\r
-                   &Buffer[CharCount - 1],\r
-                   (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                   "\n\r"\r
-                   );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "PROGRESS CODE: V%x I%x\n\r",\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  } else {\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "Undefined: C%x:V%x I%x\n\r",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  }\r
-\r
-  //\r
-  // Callout to standard output.\r
-  //\r
-  mWinNt->WriteFile (\r
-            mStdOut,\r
-            Buffer,\r
-            (DWORD)CharCount,\r
-            (LPDWORD)&CharCount,\r
-            NULL\r
-            );\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
diff --git a/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/PeiNt32OemHookStatusCodeLib.inf b/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/PeiNt32OemHookStatusCodeLib.inf
deleted file mode 100644 (file)
index 5df74af..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-## @file\r
-# Memory Status Code Library for UEFI drivers\r
-#\r
-# Lib to provide memory journal status code reporting Routines\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-# SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PeiNt32OemHookStatusCodeLib\r
-  FILE_GUID                      = 0C2070F9-02A7-4e8e-B584-84EA922363FB\r
-  MODULE_TYPE                    = PEIM\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = OemHookStatusCodeLib|PEIM\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  Nt32OemHookStatusCodeLib.c\r
-\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  PeiServicesLib\r
-  ReportStatusCodeLib\r
-  BaseMemoryLib\r
-  PrintLib\r
-  DebugLib\r
-\r
-[Ppis]\r
-  gPeiNtThunkPpiGuid                            # PPI ALWAYS_CONSUMED\r
-\r
diff --git a/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.c b/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.c
deleted file mode 100644 (file)
index 1035b92..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/**@file\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-Module Name:\r
-\r
-  PeiNt32PeCoffExtraActionLib.c\r
-\r
-Abstract:\r
-\r
-  Provides services to perform additional actions to relocate and unload\r
-  PE/Coff image for NT32 environment specific purpose such as souce level debug.\r
-  This version only works for PEI phase  \r
-\r
-\r
-**/\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
-#include <WinNtPeim.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/NtThunk.h>\r
-\r
-#include <PiPei.h>\r
-#include <Library/PeCoffLib.h>\r
-#include <Library/PeiServicesLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/PeCoffExtraActionLib.h>\r
-\r
-//\r
-// Cache of WinNtThunk protocol\r
-//\r
-EFI_WIN_NT_THUNK_PROTOCOL   *mWinNt = NULL;\r
-\r
-/**\r
-  The function caches the pointer of the WinNT thunk functions\r
-  It will ASSERT() if NT thunk ppi is not installed.\r
-\r
-  @retval EFI_SUCCESS   WinNT thunk protocol is found and cached.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-Nt32PeCoffGetWinNtThunkStucture (\r
-  )\r
-{\r
-       PEI_NT_THUNK_PPI  *NtThunkPpi;\r
-  EFI_STATUS        Status;\r
-\r
-\r
-  //\r
-  // Locate NtThunkPpi for retrieving standard output handle\r
-  //\r
-  Status = PeiServicesLocatePpi (\r
-              &gPeiNtThunkPpiGuid,\r
-              0,\r
-              NULL,\r
-              (VOID **) &NtThunkPpi\r
-              );\r
-\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  mWinNt  = (EFI_WIN_NT_THUNK_PROTOCOL *) NtThunkPpi->NtThunk ();\r
-  \r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Convert the passed in Ascii string to Unicode.\r
-  \r
-  This function  Convert the passed in Ascii string to Unicode.Optionally return\r
-   the length of the strings..\r
-\r
-  @param  AsciiString    Pointer to an AscII string\r
-  @param  StrLen         Length of string\r
-\r
-  @return  Pointer to malloc'ed Unicode version of Ascii\r
-\r
-**/\r
-CHAR16 *\r
-AsciiToUnicode (\r
-  IN  CHAR8   *Ascii,\r
-  IN  UINTN   *StrLen OPTIONAL\r
-  )\r
-{\r
-  UINTN   Index;\r
-  CHAR16  *Unicode;\r
-\r
-  //\r
-  // Allocate a buffer for unicode string\r
-  //\r
-  for (Index = 0; Ascii[Index] != '\0'; Index++)\r
-    ;\r
-  Unicode = mWinNt->HeapAlloc ( mWinNt->GetProcessHeap (),\r
-                                HEAP_ZERO_MEMORY,\r
-                                ((Index + 1) * sizeof (CHAR16))\r
-                               ); \r
-  if (Unicode == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  for (Index = 0; Ascii[Index] != '\0'; Index++) {\r
-    Unicode[Index] = (CHAR16) Ascii[Index];\r
-  }\r
-\r
-  Unicode[Index] = '\0';\r
-\r
-  if (StrLen != NULL) {\r
-    *StrLen = Index;\r
-  }\r
-\r
-  return Unicode;\r
-}\r
-\r
-/**\r
-  Performs additional actions after a PE/COFF image has been loaded and relocated.\r
-\r
-  For NT32, this function load symbols to support source level debugging.\r
-\r
-  If ImageContext is NULL, then ASSERT().\r
-\r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that has already been loaded and relocated.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderRelocateImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  VOID              *DllEntryPoint;\r
-  CHAR16            *DllFileName;\r
-  HMODULE           Library;\r
-  UINTN             Index;\r
-  \r
-  ASSERT (ImageContext != NULL);\r
-\r
-  if (mWinNt == NULL) {\r
-    Nt32PeCoffGetWinNtThunkStucture ();\r
-  }\r
-       //\r
-  // If we load our own PE COFF images the Windows debugger can not source\r
-  //  level debug our code. If a valid PDB pointer exists usw it to load\r
-  //  the *.dll file as a library using Windows* APIs. This allows \r
-  //  source level debug. The image is still loaded and relocated\r
-  //  in the Framework memory space like on a real system (by the code above),\r
-  //  but the entry point points into the DLL loaded by the code bellow. \r
-  //\r
-\r
-  DllEntryPoint = NULL;\r
-\r
-  //\r
-  // Load the DLL if it's not an EBC image.\r
-  //\r
-  if ((ImageContext->PdbPointer != NULL) &&\r
-      (ImageContext->Machine != EFI_IMAGE_MACHINE_EBC)) {\r
-    //\r
-    // Convert filename from ASCII to Unicode\r
-    //\r
-    DllFileName = AsciiToUnicode (ImageContext->PdbPointer, &Index);\r
-\r
-    //\r
-    // Check that we have a valid filename\r
-    //\r
-    if (Index < 5 || DllFileName[Index - 4] != '.') {\r
-      mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, DllFileName);\r
-\r
-      //\r
-      // Never return an error if PeCoffLoaderRelocateImage() succeeded.\r
-      // The image will run, but we just can't source level debug. If we\r
-      // return an error the image will not run.\r
-      //\r
-      return;\r
-    }\r
-    //\r
-    // Replace .PDB with .DLL on the filename\r
-    //\r
-    DllFileName[Index - 3]  = 'D';\r
-    DllFileName[Index - 2]  = 'L';\r
-    DllFileName[Index - 1]  = 'L';\r
-\r
-    //\r
-    // Load the .DLL file into the user process's address space for source \r
-    // level debug\r
-    //\r
-    Library = mWinNt->LoadLibraryEx  (DllFileName, NULL, DONT_RESOLVE_DLL_REFERENCES);\r
-    if (Library != NULL) {\r
-      //\r
-      // InitializeDriver is the entry point we put in all our EFI DLL's. The\r
-      // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() suppresses the \r
-      // normal DLL entry point of DllMain, and prevents other modules that are\r
-      // referenced in side the DllFileName from being loaded. There is no error \r
-      // checking as the we can point to the PE32 image loaded by Tiano. This \r
-      // step is only needed for source level debugging\r
-      //\r
-      DllEntryPoint = (VOID *) (UINTN) mWinNt->GetProcAddress (Library, "InitializeDriver");\r
-\r
-    }\r
-\r
-    if ((Library != NULL) && (DllEntryPoint != NULL)) {\r
-      ImageContext->EntryPoint  = (EFI_PHYSICAL_ADDRESS) (UINTN) DllEntryPoint;\r
-      DEBUG ((EFI_D_INFO, "LoadLibraryEx (%s,\n               NULL, DONT_RESOLVE_DLL_REFERENCES)\n", DllFileName));\r
-     } else {\r
-      DEBUG ((EFI_D_ERROR, "WARNING: No source level debug %s. \n", DllFileName));\r
-    }\r
-\r
-    mWinNt->HeapFree (mWinNt->GetProcessHeap (), 0, DllFileName);\r
-  }\r
-\r
-  //\r
-  // Never return an error if PeCoffLoaderRelocateImage() succeeded.\r
-  // The image will run, but we just can't source level debug. If we\r
-  // return an error the image will not run.\r
-  //\r
-  return;\r
-}  \r
-\r
-/**\r
-  Performs additional actions just before a PE/COFF image is unloaded.  Any resources\r
-  that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.\r
-  \r
-  For NT32, this function unloads symbols for source level debugging.\r
-\r
-  If ImageContext is NULL, then ASSERT().\r
-  \r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that is being unloaded.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderUnloadImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  ASSERT (ImageContext != NULL);\r
-}\r
diff --git a/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.inf b/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib.inf
deleted file mode 100644 (file)
index 8b6bd91..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-## @file\r
-# PeCoff extra action libary for Pei phase that run NT32 emulator.\r
-#\r
-# Lib to provide memory journal status code reporting Routines\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-# SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PeiNt32PeCoffExtraActionLib\r
-  FILE_GUID                      = 057C712A-84F0-4f4a-94CB-713EEF002E2F\r
-  MODULE_TYPE                    = PEIM\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PeCoffExtraActionLib|PEI_CORE PEIM\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32\r
-#\r
-\r
-[Sources]\r
-  PeiNt32PeCoffExtraActionLib.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  PeiServicesLib\r
-  DebugLib\r
-\r
-[Ppis]\r
-  gPeiNtThunkPpiGuid                            # PPI ALWAYS_CONSUMED\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/MemoryTest.c b/Nt32Pkg/Library/PlatformBootManagerLib/MemoryTest.c
deleted file mode 100644 (file)
index df0d56a..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/** @file\r
-  Perform the platform memory test\r
-\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "PlatformBootManager.h"\r
-\r
-EFI_HII_HANDLE gStringPackHandle                  = NULL;\r
-EFI_GUID       mPlatformBootManagerStringPackGuid = {\r
-  0x154dd51, 0x9079, 0x4a10, { 0x89, 0x5c, 0x9c, 0x7, 0x72, 0x81, 0x57, 0x88 }\r
-  };\r
-// extern UINT8  BdsDxeStrings[];\r
-\r
-//\r
-// BDS Platform Functions\r
-//\r
-\r
-/**\r
-  Perform the memory test base on the memory test intensive level,\r
-  and update the memory resource.\r
-\r
-  @param  Level         The memory test intensive level.\r
-\r
-  @retval EFI_STATUS    Success test all the system memory and update\r
-                        the memory resource\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBootManagerMemoryTest (\r
-  IN EXTENDMEM_COVERAGE_LEVEL Level\r
-  )\r
-{\r
-  EFI_STATUS                        Status;\r
-  EFI_STATUS                        KeyStatus;\r
-  EFI_STATUS                        InitStatus;\r
-  EFI_STATUS                        ReturnStatus;\r
-  BOOLEAN                           RequireSoftECCInit;\r
-  EFI_GENERIC_MEMORY_TEST_PROTOCOL  *GenMemoryTest;\r
-  UINT64                            TestedMemorySize;\r
-  UINT64                            TotalMemorySize;\r
-  UINTN                             TestPercent;\r
-  UINT64                            PreviousValue;\r
-  BOOLEAN                           ErrorOut;\r
-  BOOLEAN                           TestAbort;\r
-  EFI_INPUT_KEY                     Key;\r
-  CHAR16                            StrPercent[80];\r
-  CHAR16                            *StrTotalMemory;\r
-  CHAR16                            *Pos;\r
-  CHAR16                            *TmpStr;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Foreground;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Background;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Color;\r
-  UINT32                            TempData;\r
-  UINTN                             StrTotalMemorySize;\r
-\r
-  ReturnStatus = EFI_SUCCESS;\r
-  ZeroMem (&Key, sizeof (EFI_INPUT_KEY));\r
-\r
-  StrTotalMemorySize = 128;\r
-  Pos = AllocateZeroPool (StrTotalMemorySize);\r
-  ASSERT (Pos != NULL);\r
-\r
-  if (gStringPackHandle == NULL) {  \r
-    gStringPackHandle = HiiAddPackages (\r
-                           &mPlatformBootManagerStringPackGuid,\r
-                           gImageHandle,\r
-                           PlatformBootManagerLibStrings,\r
-                           NULL\r
-                           );\r
-    ASSERT (gStringPackHandle != NULL);\r
-  }\r
-\r
-  StrTotalMemory    = Pos;\r
-\r
-  TestedMemorySize  = 0;\r
-  TotalMemorySize   = 0;\r
-  PreviousValue     = 0;\r
-  ErrorOut          = FALSE;\r
-  TestAbort         = FALSE;\r
-\r
-  SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
-  SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);\r
-  SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
-\r
-  RequireSoftECCInit = FALSE;\r
-\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiGenericMemTestProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &GenMemoryTest\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    FreePool (Pos);\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  InitStatus = GenMemoryTest->MemoryTestInit (\r
-                                GenMemoryTest,\r
-                                Level,\r
-                                &RequireSoftECCInit\r
-                                );\r
-  if (InitStatus == EFI_NO_MEDIA) {\r
-    //\r
-    // The PEI codes also have the relevant memory test code to check the memory,\r
-    // it can select to test some range of the memory or all of them. If PEI code\r
-    // checks all the memory, this BDS memory test will has no not-test memory to\r
-    // do the test, and then the status of EFI_NO_MEDIA will be returned by\r
-    // "MemoryTestInit". So it does not need to test memory again, just return.\r
-    //\r
-    FreePool (Pos);\r
-    return EFI_SUCCESS;\r
-  }\r
-  \r
-  if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
-    TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_ESC_TO_SKIP_MEM_TEST), NULL);\r
-\r
-    if (TmpStr != NULL) {\r
-      PrintXY (10, 10, NULL, NULL, TmpStr);\r
-      FreePool (TmpStr);\r
-    }\r
-  } else {\r
-    DEBUG ((EFI_D_INFO, "Enter memory test.\n"));\r
-  }\r
-  do {\r
-    Status = GenMemoryTest->PerformMemoryTest (\r
-                              GenMemoryTest,\r
-                              &TestedMemorySize,\r
-                              &TotalMemorySize,\r
-                              &ErrorOut,\r
-                              TestAbort\r
-                              );\r
-    if (ErrorOut && (Status == EFI_DEVICE_ERROR)) {\r
-      TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_SYSTEM_MEM_ERROR), NULL);\r
-      if (TmpStr != NULL) {\r
-        PrintXY (10, 10, NULL, NULL, TmpStr);\r
-        FreePool (TmpStr);\r
-      }\r
-\r
-      ASSERT (0);\r
-    }\r
-    \r
-    if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
-      TempData = (UINT32) DivU64x32 (TotalMemorySize, 16);\r
-      TestPercent = (UINTN) DivU64x32 (\r
-                              DivU64x32 (MultU64x32 (TestedMemorySize, 100), 16),\r
-                              TempData\r
-                              );\r
-      if (TestPercent != PreviousValue) {\r
-        UnicodeValueToStringS (StrPercent, sizeof (StrPercent), 0, TestPercent, 0);\r
-        TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MEMORY_TEST_PERCENT), NULL);\r
-        if (TmpStr != NULL) {\r
-          //\r
-          // TmpStr size is 64, StrPercent is reserved to 16.\r
-          //\r
-          StrnCatS (\r
-            StrPercent,\r
-            sizeof (StrPercent) / sizeof (CHAR16), \r
-            TmpStr,\r
-            sizeof (StrPercent) / sizeof (CHAR16) - StrLen (StrPercent) - 1\r
-            );\r
-          PrintXY (10, 10, NULL, NULL, StrPercent);\r
-          FreePool (TmpStr);\r
-        }\r
-\r
-        TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_PERFORM_MEM_TEST), NULL);\r
-        if (TmpStr != NULL) {\r
-          BootLogoUpdateProgress (\r
-            Foreground,\r
-            Background,\r
-            TmpStr,\r
-            Color,\r
-            TestPercent,\r
-            (UINTN) PreviousValue\r
-            );\r
-          FreePool (TmpStr);\r
-        }\r
-      }\r
-\r
-      PreviousValue = TestPercent;\r
-    } else {\r
-      DEBUG ((EFI_D_INFO, "Perform memory test (ESC to skip).\n"));\r
-    }\r
-\r
-    if (!PcdGetBool (PcdConInConnectOnDemand)) {\r
-      KeyStatus     = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
-      if (!EFI_ERROR (KeyStatus) && (Key.ScanCode == SCAN_ESC)) {\r
-        if (!RequireSoftECCInit) {\r
-          if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
-            TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_PERFORM_MEM_TEST), NULL);\r
-            if (TmpStr != NULL) {\r
-              BootLogoUpdateProgress (\r
-                Foreground,\r
-                Background,\r
-                TmpStr,\r
-                Color,\r
-                100,\r
-                (UINTN) PreviousValue\r
-                );\r
-              FreePool (TmpStr);\r
-            }\r
-\r
-            PrintXY (10, 10, NULL, NULL, L"100");\r
-          }\r
-          Status = GenMemoryTest->Finished (GenMemoryTest);\r
-          goto Done;\r
-        }\r
-\r
-        TestAbort = TRUE;\r
-      }\r
-    }\r
-  } while (Status != EFI_NOT_FOUND);\r
-\r
-  Status = GenMemoryTest->Finished (GenMemoryTest);\r
-\r
-Done:\r
-  if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
-    UnicodeValueToStringS (StrTotalMemory, StrTotalMemorySize, COMMA_TYPE, TotalMemorySize, 0);\r
-    if (StrTotalMemory[0] == L',') {\r
-      StrTotalMemory++;\r
-      StrTotalMemorySize -= sizeof (CHAR16);\r
-    }\r
-\r
-    TmpStr = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MEM_TEST_COMPLETED), NULL);\r
-    if (TmpStr != NULL) {\r
-      StrnCatS (\r
-        StrTotalMemory,\r
-        StrTotalMemorySize / sizeof (CHAR16),\r
-        TmpStr,\r
-        StrTotalMemorySize / sizeof (CHAR16) - StrLen (StrTotalMemory) - 1\r
-        );\r
-      FreePool (TmpStr);\r
-    }\r
-\r
-    PrintXY (10, 10, NULL, NULL, StrTotalMemory);\r
-    BootLogoUpdateProgress (\r
-      Foreground,\r
-      Background,\r
-      StrTotalMemory,\r
-      Color,\r
-      100,\r
-      (UINTN) PreviousValue\r
-      );\r
-    \r
-  } else {\r
-    DEBUG ((EFI_D_INFO, "%d bytes of system memory tested OK\r\n", TotalMemorySize));\r
-  }\r
-  \r
-  FreePool (Pos);\r
-  return ReturnStatus;\r
-}\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c
deleted file mode 100644 (file)
index 5967db1..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-/** @file\r
-  This file include all platform action which can be customized\r
-  by IBV/OEM.\r
-\r
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "PlatformBootManager.h"\r
-\r
-EFI_GUID mBootMenuFile = {\r
-  0xEEC25BDC, 0x67F2, 0x4D95, { 0xB1, 0xD5, 0xF8, 0x1B, 0x20, 0x39, 0xD1, 0x1D }\r
-};\r
-\r
-/**\r
-  Perform the platform diagnostic, such like test memory. OEM/IBV also\r
-  can customize this function to support specific platform diagnostic.\r
-\r
-  @param MemoryTestLevel  The memory test intensive level\r
-  @param QuietBoot        Indicate if need to enable the quiet boot\r
-\r
-**/\r
-VOID\r
-PlatformBootManagerDiagnostics (\r
-  IN EXTENDMEM_COVERAGE_LEVEL    MemoryTestLevel,\r
-  IN BOOLEAN                     QuietBoot\r
-  )\r
-{\r
-  EFI_STATUS                     Status;\r
-\r
-  //\r
-  // Here we can decide if we need to show\r
-  // the diagnostics screen\r
-  // Notes: this quiet boot code should be remove\r
-  // from the graphic lib\r
-  //\r
-  if (QuietBoot) {\r
-    BootLogoEnableLogo ();\r
-\r
-    //\r
-    // Perform system diagnostic\r
-    //\r
-    Status = PlatformBootManagerMemoryTest (MemoryTestLevel);\r
-    if (EFI_ERROR (Status)) {\r
-      BootLogoDisableLogo ();\r
-    }\r
-\r
-    return;\r
-  }\r
-\r
-  //\r
-  // Perform system diagnostic\r
-  //\r
-  Status = PlatformBootManagerMemoryTest (MemoryTestLevel);\r
-}\r
-\r
-/**\r
-  Do the platform specific action before the console is connected.\r
-\r
-  Such as:\r
-    Update console variable;\r
-    Register new Driver#### or Boot####;\r
-    Signal ReadyToLock event.\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBootManagerBeforeConsole (\r
-  VOID\r
-  )\r
-{\r
-  UINTN                        Index;\r
-  EFI_STATUS                   Status;\r
-  WIN_NT_SYSTEM_CONFIGURATION  *Configuration;\r
-\r
-  GetVariable2 (L"Setup", &gEfiWinNtSystemConfigGuid, (VOID **) &Configuration, NULL);\r
-  if (Configuration != NULL) {\r
-    //\r
-    // SetupVariable is corrupt\r
-    //\r
-    Configuration->ConOutRow = PcdGet32 (PcdConOutColumn);\r
-    Configuration->ConOutColumn = PcdGet32 (PcdConOutRow);\r
-\r
-    Status = gRT->SetVariable (\r
-                    L"Setup",\r
-                    &gEfiWinNtSystemConfigGuid,\r
-                    EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
-                    sizeof (WIN_NT_SYSTEM_CONFIGURATION),\r
-                    Configuration\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "Failed to save Setup Variable to non-volatile storage, Status = %r\n", Status));\r
-    }\r
-    FreePool (Configuration);\r
-  }\r
-\r
-  //\r
-  // Update the ocnsole variables.\r
-  //\r
-  for (Index = 0; gPlatformConsole[Index].DevicePath != NULL; Index++) {\r
-    if ((gPlatformConsole[Index].ConnectType & CONSOLE_IN) == CONSOLE_IN) {\r
-      EfiBootManagerUpdateConsoleVariable (ConIn, gPlatformConsole[Index].DevicePath, NULL);\r
-    }\r
-\r
-    if ((gPlatformConsole[Index].ConnectType & CONSOLE_OUT) == CONSOLE_OUT) {\r
-      EfiBootManagerUpdateConsoleVariable (ConOut, gPlatformConsole[Index].DevicePath, NULL);\r
-    }\r
-\r
-    if ((gPlatformConsole[Index].ConnectType & STD_ERROR) == STD_ERROR) {\r
-      EfiBootManagerUpdateConsoleVariable (ErrOut, gPlatformConsole[Index].DevicePath, NULL);\r
-    }\r
-  }\r
-\r
-  //\r
-  // From PI spec vol2:\r
-  // Prior to invoking any UEFI drivers, applications, or connecting consoles, \r
-  // the platform should signal the event EFI_END_OF_DXE_EVENT_GUID\r
-  //\r
-  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
-\r
-  //\r
-  // Dispatch deferred images after EndOfDxe event.\r
-  //\r
-  EfiBootManagerDispatchDeferredImages ();\r
-}\r
-\r
-/**\r
-  Returns the priority number.\r
-\r
-  @param BootOption\r
-**/\r
-UINTN\r
-BootOptionPriority (\r
-  CONST EFI_BOOT_MANAGER_LOAD_OPTION *BootOption\r
-  )\r
-{\r
-  //\r
-  // Make sure Shell is first\r
-  //\r
-  if (StrCmp (BootOption->Description, L"UEFI Shell") == 0) {\r
-    return 0;\r
-  }\r
-  return 100;\r
-}\r
-\r
-INTN\r
-EFIAPI\r
-CompareBootOption (\r
-  CONST EFI_BOOT_MANAGER_LOAD_OPTION  *Left,\r
-  CONST EFI_BOOT_MANAGER_LOAD_OPTION  *Right\r
-  )\r
-{\r
-  return BootOptionPriority (Left) - BootOptionPriority (Right);\r
-}\r
-\r
-/**\r
-  Generate device path include the input file guid info.\r
-\r
-  @param  FileGuid     Input file guid for the BootManagerMenuApp.\r
-\r
-  @retval DevicePath for BootManagerMenuApp.\r
-**/\r
-EFI_DEVICE_PATH *\r
-FvFilePath (\r
-  EFI_GUID                     *FileGuid\r
-  )\r
-{\r
-\r
-  EFI_STATUS                         Status;\r
-  EFI_LOADED_IMAGE_PROTOCOL          *LoadedImage;\r
-  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH  FileNode;\r
-\r
-  EfiInitializeFwVolDevicepathNode (&FileNode, FileGuid);\r
-\r
-  Status = gBS->HandleProtocol (\r
-                  gImageHandle,\r
-                  &gEfiLoadedImageProtocolGuid,\r
-                  (VOID **) &LoadedImage\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return AppendDevicePathNode (\r
-           DevicePathFromHandle (LoadedImage->DeviceHandle),\r
-           (EFI_DEVICE_PATH_PROTOCOL *) &FileNode\r
-           );\r
-}\r
-\r
-/**\r
-  Create one boot option for BootManagerMenuApp.\r
-\r
-  @param  FileGuid          Input file guid for the BootManagerMenuApp.\r
-  @param  Description       Description of the BootManagerMenuApp boot option.\r
-  @param  Position          Position of the new load option to put in the ****Order variable.\r
-  @param  IsBootCategory    Whether this is a boot category.\r
-\r
-\r
-  @retval OptionNumber      Return the option number info.\r
-\r
-**/\r
-UINTN\r
-RegisterBootManagerMenuAppBootOption (\r
-  EFI_GUID                         *FileGuid,\r
-  CHAR16                           *Description,\r
-  UINTN                            Position,\r
-  BOOLEAN                          IsBootCategory\r
-  )\r
-{\r
-  EFI_STATUS                       Status;\r
-  EFI_BOOT_MANAGER_LOAD_OPTION     NewOption;\r
-  EFI_DEVICE_PATH_PROTOCOL         *DevicePath;\r
-  UINTN                            OptionNumber;\r
-\r
-  DevicePath = FvFilePath (FileGuid);\r
-  Status = EfiBootManagerInitializeLoadOption (\r
-             &NewOption,\r
-             LoadOptionNumberUnassigned,\r
-             LoadOptionTypeBoot,\r
-             IsBootCategory ? LOAD_OPTION_ACTIVE : LOAD_OPTION_CATEGORY_APP,\r
-             Description,\r
-             DevicePath,\r
-             NULL,\r
-             0\r
-             );\r
-  ASSERT_EFI_ERROR (Status);\r
-  FreePool (DevicePath);\r
-\r
-  Status = EfiBootManagerAddLoadOptionVariable (&NewOption, Position);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  OptionNumber = NewOption.OptionNumber;\r
-\r
-  EfiBootManagerFreeLoadOption (&NewOption);\r
-\r
-  return OptionNumber;\r
-}\r
-\r
-/**\r
-  Check if it's a Device Path pointing to BootManagerMenuApp.\r
-\r
-  @param  DevicePath     Input device path.\r
-\r
-  @retval TRUE   The device path is BootManagerMenuApp File Device Path.\r
-  @retval FALSE  The device path is NOT BootManagerMenuApp File Device Path.\r
-**/\r
-BOOLEAN\r
-IsBootManagerMenuAppFilePath (\r
-  EFI_DEVICE_PATH_PROTOCOL     *DevicePath\r
-)\r
-{\r
-  EFI_HANDLE                      FvHandle;\r
-  VOID                            *NameGuid;\r
-  EFI_STATUS                      Status;\r
-\r
-  Status = gBS->LocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid, &DevicePath, &FvHandle);\r
-  if (!EFI_ERROR (Status)) {\r
-    NameGuid = EfiGetNameGuidFromFwVolDevicePathNode ((CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) DevicePath);\r
-    if (NameGuid != NULL) {\r
-      return CompareGuid (NameGuid, &mBootMenuFile);\r
-    }\r
-  }\r
-\r
-  return FALSE;\r
-}\r
-\r
-/**\r
-  Return the boot option number to the BootManagerMenuApp.\r
-\r
-  If not found it in the current boot option, create a new one.\r
-\r
-  @retval OptionNumber   Return the boot option number to the BootManagerMenuApp.\r
-\r
-**/\r
-UINTN\r
-GetBootManagerMenuAppOption (\r
-  VOID\r
-  )\r
-{\r
-  UINTN                        BootOptionCount;\r
-  EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;\r
-  UINTN                        Index;\r
-  UINTN                        OptionNumber;\r
-\r
-  OptionNumber = 0;\r
-\r
-  BootOptions = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot);\r
-\r
-  for (Index = 0; Index < BootOptionCount; Index++) {\r
-    if (IsBootManagerMenuAppFilePath (BootOptions[Index].FilePath)) {\r
-      OptionNumber = BootOptions[Index].OptionNumber;\r
-      break;\r
-    }\r
-  }\r
-\r
-  EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);\r
-\r
-  if (Index >= BootOptionCount) {\r
-    //\r
-    // If not found the BootManagerMenuApp, create it.\r
-    //\r
-    OptionNumber = (UINT16) RegisterBootManagerMenuAppBootOption (&mBootMenuFile, L"UEFI BootManagerMenuApp", (UINTN) -1, FALSE);\r
-  }\r
-\r
-  return OptionNumber;\r
-}\r
-\r
-/**\r
-  Do the platform specific action after the console is connected.\r
-\r
-  Such as:\r
-    Dynamically switch output mode;\r
-    Signal console ready platform customized event;\r
-    Run diagnostics like memory testing;\r
-    Connect certain devices;\r
-    Dispatch aditional option roms.\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBootManagerAfterConsole (\r
-  VOID\r
-  )\r
-{\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  Black;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  White;\r
-  EFI_INPUT_KEY                  Enter;\r
-  EFI_INPUT_KEY                  F2;\r
-  EFI_INPUT_KEY                  F7;\r
-  EFI_BOOT_MANAGER_LOAD_OPTION   BootOption;\r
-  UINTN                          OptionNumber;\r
-\r
-  Black.Blue = Black.Green = Black.Red = Black.Reserved = 0;\r
-  White.Blue = White.Green = White.Red = White.Reserved = 0xFF;\r
-\r
-  EfiBootManagerConnectAll ();\r
-  EfiBootManagerRefreshAllBootOption ();\r
-\r
-  //\r
-  // Register ENTER as CONTINUE key\r
-  //\r
-  Enter.ScanCode    = SCAN_NULL;\r
-  Enter.UnicodeChar = CHAR_CARRIAGE_RETURN;\r
-  EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);\r
-  //\r
-  // Map F2 to Boot Manager Menu\r
-  //\r
-  F2.ScanCode    = SCAN_F2;\r
-  F2.UnicodeChar = CHAR_NULL;\r
-  EfiBootManagerGetBootManagerMenu (&BootOption);\r
-  EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 0, &F2, NULL);\r
-\r
-  //\r
-  // 3. Boot Device List menu\r
-  //\r
-  F7.ScanCode     = SCAN_F7;\r
-  F7.UnicodeChar  = CHAR_NULL;\r
-  OptionNumber    = GetBootManagerMenuAppOption ();\r
-  EfiBootManagerAddKeyOptionVariable (NULL, (UINT16)OptionNumber, 0, &F7, NULL);\r
-\r
-  //\r
-  // Make Shell as the first boot option\r
-  //\r
-  EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, (SORT_COMPARE) CompareBootOption);\r
-\r
-  PlatformBootManagerDiagnostics (QUICK, TRUE);\r
-\r
-  PrintXY (10, 10, &White, &Black, L"F2    to enter Setup.                              ");\r
-  PrintXY (10, 30, &White, &Black, L"F7    to enter Boot Manager Menu.");\r
-  PrintXY (10, 50, &White, &Black, L"Enter to boot directly.");\r
-}\r
-\r
-/**\r
-  This function is called each second during the boot manager waits the timeout.\r
-\r
-  @param TimeoutRemain  The remaining timeout.\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBootManagerWaitCallback (\r
-  UINT16          TimeoutRemain\r
-  )\r
-{\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;\r
-  UINT16                              Timeout;\r
-\r
-  Timeout = PcdGet16 (PcdPlatformBootTimeOut);\r
-\r
-  Black.Raw = 0x00000000;\r
-  White.Raw = 0x00FFFFFF;\r
-\r
-  BootLogoUpdateProgress (\r
-    White.Pixel,\r
-    Black.Pixel,\r
-    L"Start boot option",\r
-    White.Pixel,\r
-    (Timeout - TimeoutRemain) * 100 / Timeout,\r
-    0\r
-    );\r
-}\r
-\r
-/**\r
-  The function is called when no boot option could be launched,\r
-  including platform recovery options and options pointing to applications\r
-  built into firmware volumes.\r
-\r
-  If this function returns, BDS attempts to enter an infinite loop.\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBootManagerUnableToBoot (\r
-  VOID\r
-  )\r
-{\r
-  return;\r
-}\r
-\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.h b/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.h
deleted file mode 100644 (file)
index 06822d1..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/**@file\r
-   Head file for BDS Platform specific code\r
-\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-**/\r
-\r
-#ifndef _PLATFORM_BOOT_MANAGER_H\r
-#define _PLATFORM_BOOT_MANAGER_H\r
-\r
-#include <PiDxe.h>\r
-#include <Guid/WinNtSystemConfig.h>\r
-#include <Protocol/GenericMemoryTest.h>\r
-#include <Protocol/WinNtThunk.h>\r
-#include <Protocol/WinNtIo.h>\r
-#include <Protocol/LoadedImage.h>\r
-#include <Protocol/FirmwareVolume2.h>\r
-\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/UefiBootManagerLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Library/HiiLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/DxeServicesLib.h>\r
-#include <Library/BootLogoLib.h>\r
-\r
-\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
-  UINTN                     ConnectType;\r
-} PLATFORM_CONSOLE_CONNECT_ENTRY;\r
-\r
-extern PLATFORM_CONSOLE_CONNECT_ENTRY  gPlatformConsole[];\r
-\r
-#define gEndEntire \\r
-  { \\r
-    END_DEVICE_PATH_TYPE,\\r
-    END_ENTIRE_DEVICE_PATH_SUBTYPE,\\r
-    END_DEVICE_PATH_LENGTH,\\r
-    0\\r
-  }\r
-\r
-#define CONSOLE_OUT BIT0\r
-#define CONSOLE_IN  BIT1\r
-#define STD_ERROR   BIT2\r
-\r
-typedef struct {\r
-  VENDOR_DEVICE_PATH  VendorDevicePath;\r
-  UINT32              Instance;\r
-} WIN_NT_VENDOR_DEVICE_PATH_NODE;\r
-\r
-//\r
-// Below is the platform console device path\r
-//\r
-typedef struct {\r
-  VENDOR_DEVICE_PATH              NtBus;\r
-  WIN_NT_VENDOR_DEVICE_PATH_NODE  SerialDevice;\r
-  UART_DEVICE_PATH                Uart;\r
-  VENDOR_DEVICE_PATH              TerminalType;\r
-  EFI_DEVICE_PATH_PROTOCOL        End;\r
-} NT_ISA_SERIAL_DEVICE_PATH;\r
-\r
-typedef struct {\r
-  VENDOR_DEVICE_PATH              NtBus;\r
-  WIN_NT_VENDOR_DEVICE_PATH_NODE  NtGopDevice;\r
-  EFI_DEVICE_PATH_PROTOCOL        End;\r
-} NT_PLATFORM_GOP_DEVICE_PATH;\r
-\r
-/**\r
-  Use SystemTable Conout to stop video based Simple Text Out consoles from going\r
-  to the video device. Put up LogoFile on every video device that is a console.\r
-\r
-  @param[in]  LogoFile   File name of logo to display on the center of the screen.\r
-\r
-  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo displayed.\r
-  @retval EFI_UNSUPPORTED Logo not found\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBootManagerEnableQuietBoot (\r
-  IN  EFI_GUID  *LogoFile\r
-  );\r
-\r
-/**\r
-  Use SystemTable Conout to turn on video based Simple Text Out consoles. The \r
-  Simple Text Out screens will now be synced up with all non video output devices\r
-\r
-  @retval EFI_SUCCESS     UGA devices are back in text mode and synced up.\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBootManagerDisableQuietBoot (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  Perform the memory test base on the memory test intensive level,\r
-  and update the memory resource.\r
-\r
-  @param  Level         The memory test intensive level.\r
-\r
-  @retval EFI_STATUS    Success test all the system memory and update\r
-                        the memory resource\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBootManagerMemoryTest (\r
-  IN EXTENDMEM_COVERAGE_LEVEL Level\r
-  );\r
-\r
-/**\r
-\r
-  Show progress bar with title above it. It only works in Graphics mode.\r
-\r
-\r
-  @param TitleForeground Foreground color for Title.\r
-  @param TitleBackground Background color for Title.\r
-  @param Title           Title above progress bar.\r
-  @param ProgressColor   Progress bar color.\r
-  @param Progress        Progress (0-100)\r
-  @param PreviousValue   The previous value of the progress.\r
-\r
-  @retval  EFI_STATUS       Success update the progress bar\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBootManagerShowProgress (\r
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,\r
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,\r
-  IN CHAR16                        *Title,\r
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,\r
-  IN UINTN                         Progress,\r
-  IN UINTN                         PreviousValue\r
-  );\r
-\r
-#endif // _PLATFORM_BOOT_MANAGER_H\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
deleted file mode 100644 (file)
index 343bd78..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-## @file\r
-#  Include all platform action which can be customized by IBV/OEM.\r
-#\r
-#  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>\r
-#  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PlatformBootManagerLib\r
-  FILE_GUID                      = F0D9063A-DADB-4185-85E2-D7ACDA93F7A6\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PlatformBootManagerLib|DXE_DRIVER\r
-\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
-#\r
-\r
-[Sources]\r
-  PlatformData.c\r
-  PlatformBootManager.c\r
-  PlatformBootManager.h\r
-  MemoryTest.c\r
-  Strings.uni\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-  Nt32Pkg/Nt32Pkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  UefiBootServicesTableLib\r
-  UefiRuntimeServicesTableLib\r
-  UefiLib\r
-  UefiBootManagerLib\r
-  PcdLib\r
-  DxeServicesLib\r
-  MemoryAllocationLib\r
-  DevicePathLib\r
-  HiiLib\r
-  PrintLib\r
-  BootLogoLib\r
-\r
-[Guids]\r
-  gEfiWinNtSystemConfigGuid\r
-  gEfiEndOfDxeEventGroupGuid\r
-\r
-[Protocols]\r
-  gEfiGenericMemTestProtocolGuid  ## CONSUMES\r
-  gEfiGraphicsOutputProtocolGuid  ## CONSUMES\r
-  gEfiUgaDrawProtocolGuid         ## CONSUMES\r
-  gEfiBootLogoProtocolGuid        ## CONSUMES\r
-  gEfiFirmwareVolume2ProtocolGuid ## CONSUMES\r
-\r
-[Pcd]\r
-  gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut\r
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootlogoOnlyEnable\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformData.c b/Nt32Pkg/Library/PlatformBootManagerLib/PlatformData.c
deleted file mode 100644 (file)
index 8ab53b4..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/**@file\r
-  Defined the platform specific device path which will be filled to\r
-  ConIn/ConOut variables.\r
-   \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-**/\r
-\r
-#include "PlatformBootManager.h"\r
-\r
-//\r
-// Platform specific keyboard device path\r
-//\r
-NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath0 = {\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_GOP_GUID,\r
-    0\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath1 = {\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_GOP_GUID,\r
-    1\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-//\r
-// Platform specific serial device path\r
-//\r
-NT_ISA_SERIAL_DEVICE_PATH   gNtSerialDevicePath0 = {\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_SERIAL_PORT_GUID\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_UART_DP,\r
-    (UINT8) (sizeof (UART_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8),\r
-    0,\r
-    115200,\r
-    8,\r
-    1,\r
-    1\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VENDOR_DP,\r
-    (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
-    DEVICE_PATH_MESSAGING_PC_ANSI\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-NT_ISA_SERIAL_DEVICE_PATH   gNtSerialDevicePath1 = {\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_SERIAL_PORT_GUID,\r
-    1\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_UART_DP,\r
-    (UINT8) (sizeof (UART_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8),\r
-    0,\r
-    115200,\r
-    8,\r
-    1,\r
-    1\r
-  },\r
-  {\r
-    MESSAGING_DEVICE_PATH,\r
-    MSG_VENDOR_DP,\r
-    (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
-    (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
-    DEVICE_PATH_MESSAGING_PC_ANSI\r
-  },\r
-  gEndEntire\r
-};\r
-\r
-//\r
-// Predefined platform default console device path\r
-//\r
-PLATFORM_CONSOLE_CONNECT_ENTRY   gPlatformConsole[] = {\r
-  {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gNtSerialDevicePath0,\r
-    (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
-  },\r
-  {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gNtSerialDevicePath1,\r
-    (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
-  },\r
-  {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath0,\r
-    (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
-  },\r
-  {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath1,\r
-    (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
-  },\r
-  {\r
-    NULL,\r
-    0\r
-  }\r
-};\r
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni b/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni
deleted file mode 100644 (file)
index d5a28e0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-///** @file\r
-//  \r
-//    String definitions for PlatformBootManagerLib.\r
-//  \r
-//  Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
-//  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-//  \r
-//**/\r
-\r
-/=#\r
-\r
-#langdef   en-US "English"\r
-#langdef   fr-FR "Français"\r
-\r
-#string STR_PERFORM_MEM_TEST           #language en-US  "Perform memory test (ESC to skip)"\r
-                                       #language fr-FR  "Exécute l'examen de mémoire (ESC pour sauter)"\r
-#string STR_MEMORY_TEST_PERCENT        #language en-US  "% of the system memory tested OK"\r
-                                       #language fr-FR  "% de la mémoire de système essayée D'ACCORD"\r
-#string STR_ESC_TO_SKIP_MEM_TEST       #language en-US  "Press ESC key to skip memory test"\r
-                                       #language fr-FR  "Appuie sur ESC sauter examen de mémoire"\r
-#string STR_MEM_TEST_COMPLETED         #language en-US  " bytes of system memory tested OK\r\n"\r
-                                       #language fr-FR  "octets dela mémoire de système essayée D'ACCORD\r\n"\r
-#string STR_SYSTEM_MEM_ERROR           #language en-US  "System encounters memory errors"\r
-                                       #language fr-FR  "le Système rencontre les erreurs de mémoire"\r
-#string STR_START_BOOT_OPTION          #language en-US  "Start boot option"\r
-                                       #language fr-FR  "l'option de botte de Début"\r
-                                       
\ No newline at end of file