Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkg.dsc
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkg.dsc	(revision 44611)
+++ 	(revision )
@@ -1,416 +1,0 @@
-# $Id$
-## @file
-# VBoxPkg.dsc - VirtualBox Flash Device.
-#
-
-#
-# Copyright (C) 2009-2010 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#/
-
-
-# --------------------------------------------------------------------
-#
-# This file is based on: Ovmf/OvmfIA32.dsc
-#/** @file
-#  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
-#
-#  Copyright (c) 2006 - 2009, Intel Corporation
-#
-#  All rights reserved. This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies this distribution. The full text of the license may be found at
-#  http://opensource.org/licenses/bsd-license.php
-#
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#**/
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
-  PLATFORM_NAME                  = VBoxPkg
-  PLATFORM_GUID                  = 5a9e7754-d81b-49ea-85ad-69eaa7b1539b
-  PLATFORM_VERSION               = 0.1
-  DSC_ SPECIFICATION             = 0x00010005
-  OUTPUT_DIRECTORY               = Build/VBoxPkg
-  SUPPORTED_ARCHITECTURES        = IA32
-  BUILD_TARGETS                  = DEBUG|RELEASE
-  SKUID_IDENTIFIER               = DEFAULT
-  FLASH_DEFINITION               = VBoxPkg/VBoxPkg.fdf
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this Platform.
-#
-################################################################################
-[SkuIds]
-  0|DEFAULT
-
-################################################################################
-#
-# Library Class section - list of all Library Classes needed by this Platform.
-#
-################################################################################
-[LibraryClasses.common]
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-  #TimerLib|DuetPkg/Library/DuetTimerLib/DuetTimerLib.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
-  CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
-  PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-  #PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-  PeCoffLib|VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf
-  PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
-  #PciIncompatibleDeviceSupportLib|IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.inf
-  CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
-  UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
-  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
-  RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
-  GenericBdsLib|VBoxPkg/Library/VBoxGenericBdsLib/VBoxGenericBdsLib.inf
-  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
-  PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
-  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-  #OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  OemHookStatusCodeLib|VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
-  SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
-  MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-  NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
-  FileHandleLib|ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
-  SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-
-[LibraryClasses.common.SEC]
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-
-[LibraryClasses.common.PEI_CORE]
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-  MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-  OemHookStatusCodeLib|VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
-  #OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-
-[LibraryClasses.common.PEIM]
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-  MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-  OemHookStatusCodeLib|VBoxPkg/Library/VBoxOemHookStatusCodeLib/VBoxOemHookStatusCodeLib.inf
-  #OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-  PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-
-[LibraryClasses.common.DXE_CORE]
-  HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  PlatformBdsLib|OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
-  
-[LibraryClasses.common.UEFI_APPLICATION]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-
-################################################################################
-#
-# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
-#
-################################################################################
-[PcdsFeatureFlag.common]
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|TRUE
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-
-[PcdsFixedAtBuild.common]
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiSioTokenSpaceGuid.PcdSerialRegisterBase|0x3F8
-  gEfiSioTokenSpaceGuid.PcdSerialLineControl|0x07
-  gEfiSioTokenSpaceGuid.PcdSerialBoudRate|115200
-
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize|0x200000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize|0x10000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashFvRecoveryBase|0xFFE00000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashFvRecoverySize|0x00200000
-
-  gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|6
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xc000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0xc000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x2000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x10000
-
-  gEfiEdkModulePkgTokenSpaceGuid.PcdDxePcdDatabaseTraverseEnabled|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
-
-[PcdsFeatureFlag.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-  gVBoxVgaPkgTokenSpaceGuid.PcdSupportUga|FALSE
-  gVBoxVgaPkgTokenSpaceGuid.PcdSupportGop|TRUE
-
-[PcdsFixedAtBuild.common]
-  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
-
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"VBOX 32"|VOID*
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|0x10001|UINT32
-
-
-[PcdsDynamicDefault.common]
-  gEfiMdePkgTokenSpaceGuid.PcdFSBClock|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
-
-
-################################################################################
-#
-# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
-#
-################################################################################
-
-[PcdsDynamicDefault.common.DEFAULT]
-
-################################################################################
-#
-# Components Section - list of all EDK II Modules needed by this Platform.
-#
-################################################################################
-[Components.common]
-  #
-  # SEC Phase modules
-  #
-  OvmfPkg/Sec/SecMain.inf
-
-  #
-  # PEI Phase modules
-  #
-  MdeModulePkg/Core/Pei/PeiMain.inf
-  MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  }
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
-  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
-    <LibraryClasses>
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
-  }
-
-  OvmfPkg/PlatformPei/PlatformPei.inf {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  }
-
-
-  #
-  # DXE Phase modules
-  #
-  MdeModulePkg/Core/Dxe/DxeMain.inf {
-    <LibraryClasses>
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
-  }
-
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
-  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf  {
-   <LibraryClasses>
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  }
-
-  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-  IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
-  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
-  PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
-  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
-  UefiCpuPkg/CpuDxe/CpuDxe.inf
-  PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
-  PcAtChipsetPkg/KbcResetDxe/Reset.inf
-  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  MdeModulePkg/Universal/Metronome/Metronome.inf {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-      #TimerLib|DuetPkg/Library/DuetTimerLib/DuetTimerLib.inf
-  }
-
-  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-      #TimerLib|DuetPkg/Library/DuetTimerLib/DuetTimerLib.inf
-  }
-
-  IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf  {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-      #TimerLib|DuetPkg/Library/DuetTimerLib/DuetTimerLib.inf
-  }
-
-  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf {
-    <LibraryClasses>
-      PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf
-  }
- 
-  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-  MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-  MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-  MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-  MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-  MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-  MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
-  MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-  MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-  MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-  # VBOX
-  VBoxPkg/VBoxIdeBusDxe/VBoxIdeBusDxe.inf 
-  VBoxPkg/VBoxIdeControllerDxe/VBoxIdeControllerDxe.inf
-  # VBOX end
-  #IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
-  #PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
-  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-
-  # VBOX
-  VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
-  VBoxPkg/VBoxFsDxe/VBoxHfs.inf
-  VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
-  VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
-  VBoxPkg/VBoxSysTables/VBoxSysTables.inf
-  VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
-  VBoxPkg/VBoxConsoleDxe/VBoxConsoleDxe.inf
-  # VBOX end
-  IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
-
-  #
-  # ISA Support
-  #
-  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
-
-  #
-  # ACPI Support
-  #
-  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
-
-  #
-  # This module is for debug purposes (breaks build in Windows host). 
-  # Don't include it to fdf
-  #VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
-  
- #
- # add -DVBOX
- #
-[BuildOptions.common]
-  GCC:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=32 -DHC_ARCH_BITS=32 -DEFI_SPECIFICATION_VERSION=0x0002000A -DPI_SPECIFICATION_VERSION=0x00010000 -DTIANO_RELEASE_VERSION=0x00080006
-  # 
-  # mingw set 0x4000000 as a default image base that is the reason 
-  # PCD module loaded in the middle of space grub supposed to load
-  # boot images. 
-  # this base address chosen looking at 
-  # Shell> memmap 
-  # in the place where Image.c locates the rest of the modules.
-  GCC:*_*_*_DLINK_FLAGS = --image-base 0x1f000000 
-  INTEL:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=32 -DHC_ARCH_BITS=32 -DEFI_SPECIFICATION_VERSION=0x0002000A -DPI_SPECIFICATION_VERSION=0x00010000 -DTIANO_RELEASE_VERSION=0x00080006
-  MSFT:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=32 -DHC_ARCH_BITS=32 -DEFI_SPECIFICATION_VERSION=0x0002000A -DPI_SPECIFICATION_VERSION=0x00010000 -DTIANO_RELEASE_VERSION=0x00080006
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkg.fdf
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkg.fdf	(revision 44611)
+++ 	(revision )
@@ -1,368 +1,0 @@
-# $Id$
-## @file
-# VBoxPkg.fdf - VirtualBox Flash Device.
-#
-
-
-#
-# Copyright (C) 2009-2010 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-
-# --------------------------------------------------------------------
-#  This file is based on: Ovmf/Ovmf.fdf
-#
-#  Open Virtual Machine Firmware: FDF
-#
-#  Copyright (c) 2006 - 2009, Intel Corporation
-#
-#  All rights reserved. This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies this distribution. The full text of the license may be found at
-#  http://opensource.org/licenses/bsd-license.php
-#
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#
-
-################################################################################
-#
-# FD Section
-# The [FD] Section is made up of the definition statements and a
-# description of what goes into  the Flash Device Image.  Each FD section
-# defines one flash "device" image.  A flash device image may be one of
-# the following: Removable media bootable image (like a boot floppy
-# image,) an Option ROM image (that would be "flashed" into an add-in
-# card,) a System "Flash"  image (that would be burned into a system's
-# flash) or an Update ("Capsule") image that will be used to update and
-# existing system flash.
-#
-################################################################################
-[FD.VBOX]
-BaseAddress   = 0xFFE00000     # The base address of the FLASH Device.
-Size          = 0x001f0000     # The size in bytes of the FLASH Device
-ErasePolarity = 1
-BlockSize     = 0x10000
-NumBlocks     = 0x1f
-
-################################################################################
-#
-# Following are lists of FD Region layout which correspond to the locations of different
-# images within the flash device.
-#
-# Regions must be defined in ascending order and may not overlap.
-#
-# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
-# the pipe "|" character, followed by the size of the region, also in hex with the leading
-# "0x" characters. Like:
-# Offset|Size
-# PcdOffsetCName|PcdSizeCName
-# RegionType <FV, DATA, or FILE>
-#
-################################################################################
-0x0|0x1F0000
-gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoveryBase|gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoverySize
-FV = MAINFV
-
-################################################################################
-#
-# FV Section
-#
-# [FV] section is used to define what components or modules are placed within a flash
-# device file.  This section also defines order the components and modules are positioned
-# within the image.  The [FV] section consists of define statements, set statements and
-# module statements.
-#
-################################################################################
-[FV.DXEFV]
-BlockSize          = 0x1000
-FvAlignment        = 16         #FV alignment and FV attributes setting.
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-#
-# Files to be placed in DXEFV
-#
-# This firmware volume will have files placed in it uncompressed,
-# and then then entire firmware volume will be compressed in a
-# single compression operation in order to achieve better
-# overall compression.
-#
-
-APRIORI DXE {
-  INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF  IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
-}
-
-#
-# DXE Phase modules
-#
-INF  MdeModulePkg/Core/Dxe/DxeMain.inf
-
-INF  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
-INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-
-INF  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-INF  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF  IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
-INF  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
-INF  PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
-INF  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
-INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
-INF  PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-INF  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
-INF  PcAtChipsetPkg/KbcResetDxe/Reset.inf
-INF  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-INF  MdeModulePkg/Universal/Metronome/Metronome.inf
-INF  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
-#INF  PcAtChipsetPkg/PcRtc/RealTimeClock.inf
-
-INF  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf
-INF  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-INF  MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-INF  MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-INF  MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-INF  MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-INF  MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-INF  MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-INF  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-INF  IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
-INF  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF  MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
-INF  MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-INF  MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-INF  MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-INF  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-INF  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-#INF  IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
-# VBOX
-INF  VBoxPkg/VBoxIdeBusDxe/VBoxIdeBusDxe.inf
-INF  VBoxPkg/VBoxIdeControllerDxe/VBoxIdeControllerDxe.inf
-# VBOX end
-#INF  PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
-INF  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-INF  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-
-# VBOX
-INF VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
-INF VBoxPkg/VBoxFsDxe/VBoxHfs.inf
-INF VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
-INF VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
-INF VBoxPkg/VBoxSysTables/VBoxSysTables.inf
-INF VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
-INF VBoxPkg/VBoxConsoleDxe/VBoxConsoleDxe.inf
-#INF  RuleOverride=ACPITABLE VBoxPkg/AcpiTables/AcpiTables.inf
-#INF VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
-# VBOX end
-#INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
-
-INF  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
-INF  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
-INF  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
-INF  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
-INF  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
-
-INF  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-INF  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
-
-INF FatBinPkg/EnhancedFatDxe/Fat.inf
-INF EdkShellBinPkg/FullShell/FullShell.inf
-#FILE DRIVER = 961578FE-B6B7-44c3-AF35-6BC705CD2B1F {
-#    SECTION PE32 = FatBinPkg/EnhancedFatDxe/Ia32/Fat.efi
-#  }
-#
-#FILE APPLICATION = c57ad6b7-0515-40a8-9d21-551652854e37 {
-#    SECTION COMPRESS PI_STD {
-#      SECTION GUIDED {
-#        SECTION PE32 = EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi
-#      }
-#    }
-#  }
-
-FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D {
-    SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { # LzmaCompress
-      # OSE build should use VBoxOSELogo/ose_logo.bmp
-      SECTION RAW = VBoxPkg/VBoxPUELLogo/puel_logo.bmp
-    }
-  }
-
-################################################################################
-
-[FV.MAINFV]
-FvAlignment        = 16
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-#
-# Files to be placed in MAINFV
-#
-# This firmware volume will have all the files placed in it which
-# must not be compressed at the initial boot phase.  The only
-# exception to this is the compressed 'DXEFV'.
-#
-
-APRIORI PEI {
-  INF  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-}
-
-#
-#  SEC Phase modules
-#
-INF  OvmfPkg/Sec/SecMain.inf
-#INF VBoxPkg/VBoxSec/VBoxSec.inf
-
-#
-#  PEI Phase modules
-#
-INF  MdeModulePkg/Core/Pei/PeiMain.inf
-INF  RuleOverride=NORELOC MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-INF  RuleOverride=NORELOC IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
-INF  RuleOverride=NORELOC OvmfPkg/PlatformPei/PlatformPei.inf
-INF  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-
-#
-# This file contains the compressed 'DXEFV', which is compressed
-# in a single compression operation in order to achieve better
-# overall compression.
-#
-FILE FV_IMAGE = 20bc8ac9-94d1-4208-ab28-5d673fd73486 {
-   SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { # LzmaCompress
-      SECTION FV_IMAGE = DXEFV
-   }
- }
-
-#INF  RuleOverride=RESET_VECTOR OvmfPkg/ResetVector/Bin/ResetVector.inf
-
-################################################################################
-#
-# Rules are use with the [FV] section's module INF type to define
-# how an FFS file is created for a given INF file. The following Rule are the default
-# rules for the different module type. User can add the customized rules to define the
-# content of the FFS file.
-#
-################################################################################
-
-[Rule.Common.PEI_CORE]
-  FILE PEI_CORE = $(NAMED_GUID) {
-    PE32     PE32           |.efi
-    UI       STRING ="$(MODULE_NAME)" Optional
-    VERSION  STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.SEC]
-  FILE SEC = $(NAMED_GUID) {
-    PE32     PE32   		         |.efi
-    UI       STRING ="$(MODULE_NAME)" Optional
-    VERSION  STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.PEIM]
-  FILE PEIM = $(NAMED_GUID) {
-     PEI_DEPEX PEI_DEPEX Optional        |.depex
-     PE32      PE32   Align=32           |.efi
-     UI       STRING="$(MODULE_NAME)" Optional
-     VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.PEIM.NORELOC]
-  FILE PEIM = $(NAMED_GUID) RELOCS_STRIPPED  {
-     PEI_DEPEX PEI_DEPEX Optional        |.depex
-     TE        TE                        |.efi
-     UI        STRING="$(MODULE_NAME)" Optional
-     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) {
-    PEI_DEPEX PEI_DEPEX Optional         |.depex
-    GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-      PE32      PE32                     |.efi
-      UI        STRING="$(MODULE_NAME)" Optional
-      VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-    }
-  }
-
-[Rule.Common.DXE_CORE]
-  FILE DXE_CORE = $(NAMED_GUID) {
-    PE32     PE32           |.efi
-    UI       STRING="$(MODULE_NAME)" Optional
-    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.UEFI_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX Optional      |.depex
-    PE32     PE32                    |.efi
-    UI       STRING="$(MODULE_NAME)" Optional
-    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.DXE_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX Optional      |.depex
-    PE32     PE32                    |.efi
-    UI       STRING="$(MODULE_NAME)" Optional
-    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.DXE_RUNTIME_DRIVER]
-  FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX    DXE_DEPEX Optional      |.depex
-    PE32     PE32                    |.efi
-    UI       STRING="$(MODULE_NAME)" Optional
-    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.UEFI_APPLICATION]
-  FILE APPLICATION = $(NAMED_GUID) {
-    PE32     PE32                    |.efi
-    UI       STRING="$(MODULE_NAME)" Optional
-    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
-  }
-
-[Rule.Common.USER_DEFINED.ACPITABLE]
-  FILE FREEFORM = $(NAMED_GUID) {
-    RAW ACPI               |.acpi
-    RAW ASL                |.aml
-  }
-
-[Rule.Common.SEC.RESET_VECTOR]
-  FILE RAW = $(NAMED_GUID) {
-    RAW RAW                |.raw
-  }
-
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkgX64.dsc
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxPkgX64.dsc	(revision 44611)
+++ 	(revision )
@@ -1,378 +1,0 @@
-# $Id$
-
-#
-# Copyright (C) 2009-2010 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#/
-
-#/** @file
-#  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
-#
-#  Copyright (c) 2006 - 2009, Intel Corporation
-#
-#  All rights reserved. This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies this distribution. The full text of the license may be found at
-#  http://opensource.org/licenses/bsd-license.php
-#
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#**/
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
-  PLATFORM_NAME                  = VBoxPkg
-  PLATFORM_GUID                  = 5a9e7754-d81b-49ea-85ad-69eaa7b1539b
-  PLATFORM_VERSION               = 0.1
-  DSC_ SPECIFICATION             = 0x00010005
-  OUTPUT_DIRECTORY               = Build/VBoxPkgX64
-  SUPPORTED_ARCHITECTURES        = X64
-  BUILD_TARGETS                  = DEBUG|RELEASE
-  SKUID_IDENTIFIER               = DEFAULT
-  FLASH_DEFINITION               = VBoxPkg/VBoxPkg.fdf
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this Platform.
-#
-################################################################################
-[SkuIds]
-  0|DEFAULT
-
-################################################################################
-#
-# Library Class section - list of all Library Classes needed by this Platform.
-#
-################################################################################
-[LibraryClasses.common]
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
-  CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
-  PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-  PeCoffLib|VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf
-  PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
-  CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
-  UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
-  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  GenericBdsLib|VBoxPkg/Library/VBoxGenericBdsLib/VBoxGenericBdsLib.inf
-  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
-  PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
-  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-  OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
-  MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-  NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
-  FileHandleLib|ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
-  SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-
-[LibraryClasses.common.SEC]
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-
-[LibraryClasses.common.PEI_CORE]
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-  MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-  OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-
-[LibraryClasses.common.PEIM]
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-  MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-  OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-
-[LibraryClasses.common.DXE_CORE]
-  HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  PlatformBdsLib|OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
-
-[LibraryClasses.common.UEFI_APPLICATION]
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf
-  #DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-
-################################################################################
-#
-# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
-#
-################################################################################
-[PcdsFeatureFlag.common]
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|TRUE
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-
-[PcdsFixedAtBuild.common]
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiSioTokenSpaceGuid.PcdSerialRegisterBase|0x3F8
-  gEfiSioTokenSpaceGuid.PcdSerialLineControl|0x07
-  gEfiSioTokenSpaceGuid.PcdSerialBoudRate|115200
-
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize|0x200000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize|0x10000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashFvRecoveryBase|0xFFE00000
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashFvRecoverySize|0x00200000
-
-  gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|6
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xc000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0xc000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x2000
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x10000
-
-  gEfiEdkModulePkgTokenSpaceGuid.PcdDxePcdDatabaseTraverseEnabled|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"VBOX 64"|VOID*
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|0x10001|UINT32
-
-[PcdsFeatureFlag.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-  gOptionRomPkgTokenSpaceGuid.PcdSupportGop|TRUE
-  gOptionRomPkgTokenSpaceGuid.PcdSupportUga|FALSE
-
-[PcdsFixedAtBuild.common]
-  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
-
-
-################################################################################
-#
-# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
-#
-################################################################################
-
-[PcdsDynamicDefault.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
-
-
-################################################################################
-#
-# Components Section - list of all EDK II Modules needed by this Platform.
-#
-################################################################################
-[Components.common]
-  #
-  # SEC Phase modules
-  #
-  OvmfPkg/Sec/SecMain.inf
-
-  #
-  # PEI Phase modules
-  #
-  MdeModulePkg/Core/Pei/PeiMain.inf
-  MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  }
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
-  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
-    <LibraryClasses>
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
-  }
-
-  OvmfPkg/PlatformPei/PlatformPei.inf {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  }
-
-  #
-  # DXE Phase modules
-  #
-  MdeModulePkg/Core/Dxe/DxeMain.inf {
-    <LibraryClasses>
-      NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
-  }
-
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
-  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf  {
-   <LibraryClasses>
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  }
-
-  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-  IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
-  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
-  PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
-  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
-  UefiCpuPkg/CpuDxe/CpuDxe.inf
-  PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
-  PcAtChipsetPkg/KbcResetDxe/Reset.inf
-  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  MdeModulePkg/Universal/Metronome/Metronome.inf {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-  }
-
-  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-  }
-
-  IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf  {
-    <LibraryClasses>
-      TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-  }
-
-  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf {
-    <LibraryClasses>
-      PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf
-  }
-  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-  MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-  MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-  MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-  MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-  MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-  MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
-  MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-  MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-  MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-  MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-  MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-  #IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
-# VBOX
-  VBoxPkg/VBoxIdeBusDxe/VBoxIdeBusDxe.inf
-  VBoxPkg/VBoxIdeControllerDxe/VBoxIdeControllerDxe.inf
-# VBOX end
-  #PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
-  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-
-  # VBOX
-  VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
-  VBoxPkg/VBoxFsDxe/VBoxHfs.inf
-  VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaMiniPortDxe.inf
-  VBoxPkg/VBoxVgaDxe/VBoxVgaDxe.inf
-  VBoxPkg/VBoxSysTables/VBoxSysTables.inf
-  VBoxPkg/VBoxAppleSim/VBoxAppleSim.inf
-  VBoxPkg/VBoxConsoleDxe/VBoxConsoleDxe.inf
-  # VBOX end
-
-  #
-  # ISA Support
-  #
-  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
-  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
-
-  #
-  # ACPI Support
-  #
-  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
-  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-
-  #
-  # Don't include it to fdf
-  VBoxPkg/VBoxInterceptorDxe/VBoxInterceptorDxe.inf
-  VBoxPkg/VBoxMimicryDxe/VBoxMimicryDxe.inf
-
-[BuildOptions.common]
-  GCC:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=64 -DHC_ARCH_BITS=64
-  GCC:*_*_*_DLINK_FLAGS = --image-base 0x1f000000
-  INTEL:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=64 -DHC_ARCH_BITS=64
-  MSFT:*_*_*_CC_FLAGS = -DVBOX -DARCH_BITS=64 -DHC_ARCH_BITS=64
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-apple
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-apple	(revision 44611)
+++ 	(revision )
@@ -1,317 +1,0 @@
-Index: MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h
-===================================================================
---- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h	(revision 9332)
-+++ MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h	(working copy)
-@@ -399,6 +399,75 @@
-   IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath
-   );
- 
-+/**
-+  Install child handles if the Handle supports Apple format.
-+
-+  @param  This              Calling context.
-+  @param  Handle            Parent Handle.
-+  @param  DiskIo            Parent DiskIo interface.
-+  @param  BlockIo           Parent BlockIo interface.
-+  @param  DevicePath        Parent Device Path.
-+   
-+  @retval EFI_SUCCESS       A child handle was added.
-+  @retval EFI_MEDIA_CHANGED Media change was detected.
-+  @retval Others            MBR partition was not found.
-+
-+**/
-+EFI_STATUS
-+PartitionInstallAppleChildHandles (
-+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
-+  IN  EFI_HANDLE                   Handle,
-+  IN  EFI_DISK_IO_PROTOCOL         *DiskIo,
-+  IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,
-+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath
-+  );
-+
-+/**
-+  Install child handles if the Handle supports Apple format.
-+
-+  @param  This              Calling context.
-+  @param  Handle            Parent Handle.
-+  @param  DiskIo            Parent DiskIo interface.
-+  @param  BlockIo           Parent BlockIo interface.
-+  @param  DevicePath        Parent Device Path.
-+   
-+  @retval EFI_SUCCESS       A child handle was added.
-+  @retval EFI_MEDIA_CHANGED Media change was detected.
-+  @retval Others            Apple partition was not found.
-+
-+**/
-+EFI_STATUS
-+PartitionInstallAppleChildHandles (
-+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
-+  IN  EFI_HANDLE                   Handle,
-+  IN  EFI_DISK_IO_PROTOCOL         *DiskIo,
-+  IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,
-+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath
-+  );
-+
-+/**
-+  Install child handles if the Handle supports Apple format.
-+
-+  @param  This              Calling context.
-+  @param  Handle            Parent Handle.
-+  @param  DiskIo            Parent DiskIo interface.
-+  @param  BlockIo           Parent BlockIo interface.
-+  @param  DevicePath        Parent Device Path.
-+   
-+  @retval EFI_SUCCESS       A child handle was added.
-+  @retval EFI_MEDIA_CHANGED Media change was detected.
-+  @retval Others            Apple partition was not found.
-+
-+**/
-+EFI_STATUS
-+PartitionInstallAppleChildHandles (
-+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
-+  IN  EFI_HANDLE                   Handle,
-+  IN  EFI_DISK_IO_PROTOCOL         *DiskIo,
-+  IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,
-+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath
-+  );
-+
- typedef
- EFI_STATUS
- (*PARTITION_DETECT_ROUTINE) (
-Index: MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c
-===================================================================
---- MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c	(revision 0)
-+++ MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c	(revision 0)
-@@ -0,0 +1,208 @@
-+/** @file
-+  Decode an Apple formatted partition table
-+
-+  Copyright (c) 2009-2010, Oracle Corporation
-+**/
-+
-+
-+#include "Partition.h"
-+
-+#define DPISTRLEN       32
-+
-+#pragma pack(1)
-+typedef struct APPLE_PT_HEADER {
-+    UINT16  	sbSig;		/* must be BE 0x4552 */
-+    UINT16  	sbBlkSize;	/* block size of device */
-+    UINT32  	sbBlkCount;	/* number of blocks on device */
-+    UINT16  	sbDevType;	/* device type */
-+    UINT16  	sbDevId;	/* device id */
-+    UINT32  	sbData;		/* not used */
-+    UINT16  	sbDrvrCount;	/* driver descriptor count */
-+    UINT16  	sbMap[247];	/* descriptor map */
-+} APPLE_PT_HEADER;
-+
-+typedef struct APPLE_PT_ENTRY  {
-+    UINT16       signature          ; /* must be BE 0x504D for new style PT */
-+    UINT16       reserved_1         ;
-+    UINT32       map_entries        ; /* how many PT entries are there */
-+    UINT32       pblock_start       ; /* first physical block */
-+    UINT32       pblocks            ; /* number of physical blocks */
-+    char         name[DPISTRLEN]    ; /* name of partition */
-+    char         type[DPISTRLEN]    ; /* type of partition */
-+    /* Some more data we don't really need */
-+} APPLE_PT_ENTRY;
-+#pragma pack()
-+
-+static UINT16
-+be16_to_cpu(UINT16 x)
-+{
-+    return SwapBytes16(x);
-+}
-+
-+static UINT32
-+be32_to_cpu(UINT32 x)
-+{
-+    return SwapBytes32(x);
-+}
-+
-+
-+/**
-+  Install child handles if the Handle supports Apple partition table format.
-+
-+  @param[in]  This        Calling context.
-+  @param[in]  Handle      Parent Handle
-+  @param[in]  DiskIo      Parent DiskIo interface
-+  @param[in]  BlockIo     Parent BlockIo interface
-+  @param[in]  DevicePath  Parent Device Path
-+
-+
-+  @retval EFI_SUCCESS         Child handle(s) was added
-+  @retval EFI_MEDIA_CHANGED   Media changed Detected
-+  @retval other               no child handle was added
-+
-+**/
-+EFI_STATUS
-+PartitionInstallAppleChildHandles (
-+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
-+  IN  EFI_HANDLE                   Handle,
-+  IN  EFI_DISK_IO_PROTOCOL         *DiskIo,
-+  IN  EFI_BLOCK_IO_PROTOCOL        *BlockIo,
-+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath
-+  )
-+{
-+  EFI_STATUS                Status;
-+  UINT32                    Lba;
-+  EFI_BLOCK_IO_MEDIA       *Media;
-+  VOID                     *Block;
-+  //UINTN                   MaxIndex;
-+  /** @todo: wrong, as this PT can be on both HDD or CD */
-+  CDROM_DEVICE_PATH         CdDev;
-+  //EFI_DEVICE_PATH_PROTOCOL  Dev;
-+  EFI_STATUS                Found;
-+  UINT32                    Partition;
-+  UINT32                    PartitionEntries;
-+  UINT32                    VolSpaceSize;
-+  UINT32                    SubBlockSize;
-+  UINT32                    BlkPerSec;
-+
-+  Found         = EFI_NOT_FOUND;
-+  Media         = BlockIo->Media;
-+  VolSpaceSize  = 0;
-+
-+  Block = AllocatePool ((UINTN) Media->BlockSize);
-+
-+  if (Block == NULL) {
-+    return EFI_NOT_FOUND;
-+  }
-+
-+  do {
-+      APPLE_PT_HEADER * Header;
-+
-+      /* read PT header first */
-+      Lba = 0;
-+
-+      Status = DiskIo->ReadDisk (
-+                       DiskIo,
-+                       Media->MediaId,
-+                       MultU64x32 (Lba, Media->BlockSize),
-+                       Media->BlockSize,
-+                       Block
-+                       );
-+      if (EFI_ERROR (Status))
-+      {
-+          Found = Status;
-+          break;
-+      }
-+
-+      Header = (APPLE_PT_HEADER *)Block;
-+      if (be16_to_cpu(Header->sbSig) != 0x4552)
-+      {
-+          break;
-+      }
-+      SubBlockSize = be16_to_cpu(Header->sbBlkSize);
-+      BlkPerSec    = Media->BlockSize / SubBlockSize;
-+
-+      /* Fail if media block size isn't an exact multiple */
-+      if (Media->BlockSize != SubBlockSize * BlkPerSec)
-+      {
-+          break;
-+      }
-+
-+      /* Now iterate over PT entries and install child handles */
-+      PartitionEntries = 1;
-+      for (Partition = 1; Partition <= PartitionEntries; Partition++)
-+      {
-+          APPLE_PT_ENTRY * Entry;
-+          UINT32 StartLba;
-+          UINT32 SizeLbs;
-+
-+          Status = DiskIo->ReadDisk (
-+                       DiskIo,
-+                       Media->MediaId,
-+                       MultU64x32 (Partition, SubBlockSize),
-+                       SubBlockSize,
-+                       Block
-+                       );
-+
-+          if (EFI_ERROR (Status)) {
-+              Status = EFI_NOT_FOUND;
-+              goto done; /* would break, but ... */
-+          }
-+
-+          Entry = (APPLE_PT_ENTRY *)Block;
-+
-+          if (be16_to_cpu(Entry->signature) != 0x504D)
-+          {
-+              Print(L"Not a new PT entry: %x", Entry->signature);
-+              continue;
-+          }
-+
-+          /* First partition contains partitions count */
-+          if (Partition == 1)
-+          {
-+             PartitionEntries  = be32_to_cpu(Entry->map_entries);
-+          }
-+
-+          StartLba = be32_to_cpu(Entry->pblock_start);
-+          SizeLbs  = be32_to_cpu(Entry->pblocks);
-+
-+          if (0 && CompareMem("Apple_HFS", Entry->type, 10) == 0)
-+              Print(L"HFS partition (%d of %d) at LBA 0x%x size=%dM\n",
-+                    Partition, PartitionEntries, StartLba,
-+                    (UINT32)(MultU64x32(SizeLbs, SubBlockSize) / (1024 * 1024)));
-+
-+          ZeroMem (&CdDev, sizeof (CdDev));
-+          CdDev.Header.Type     = MEDIA_DEVICE_PATH;
-+          CdDev.Header.SubType  = MEDIA_CDROM_DP;
-+          SetDevicePathNodeLength (&CdDev.Header, sizeof (CdDev));
-+
-+          CdDev.BootEntry = 0;
-+          /* Convert from partition to media blocks */
-+          CdDev.PartitionStart = StartLba / BlkPerSec;  /* start, LBA */
-+          CdDev.PartitionSize  = SizeLbs / BlkPerSec;   /* size,  LBs */
-+
-+          Status = PartitionInstallChildHandle (
-+              This,
-+              Handle,
-+              DiskIo,
-+              BlockIo,
-+              DevicePath,
-+              (EFI_DEVICE_PATH_PROTOCOL *) &CdDev,
-+              CdDev.PartitionStart,
-+              CdDev.PartitionStart + CdDev.PartitionSize - 1,
-+              SubBlockSize,
-+              FALSE
-+                                                );
-+
-+          if (!EFI_ERROR (Status)) {
-+              Found = EFI_SUCCESS;
-+          }
-+      }
-+
-+  } while (0);
-+
-+ done:
-+  FreePool (Block);
-+
-+  return Found;
-+}
-Index: MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-===================================================================
---- MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf	(revision 9332)
-+++ MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf	(working copy)
-@@ -41,6 +41,7 @@
-   Mbr.c
-   Gpt.c
-   ElTorito.c
-+  Apple.c
-   Partition.c
-   Partition.h
- 
-Index: MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
-===================================================================
---- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c	(revision 9332)
-+++ MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c	(working copy)
-@@ -34,6 +34,7 @@
- // Prioritized function list to detect partition table. 
- //
- PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {
-+  PartitionInstallAppleChildHandles,
-   PartitionInstallGptChildHandles,
-   PartitionInstallElToritoChildHandles,
-   PartitionInstallMbrChildHandles,
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-idtgdt
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-idtgdt	(revision 44611)
+++ 	(revision )
@@ -1,283 +1,0 @@
-Index: UefiCpuPkg/CpuDxe/CpuDxe.inf
-===================================================================
---- UefiCpuPkg/CpuDxe/CpuDxe.inf	(revision 9332)
-+++ UefiCpuPkg/CpuDxe/CpuDxe.inf	(working copy)
-@@ -62,6 +62,9 @@
- [Protocols]
-   gEfiCpuArchProtocolGuid
- 
-+[Guids]
-+  gEfiEventVirtualAddressChangeGuid             # ALWAYS_CONSUMED  Create Event: EVENT_GROUP_GUID
-+
- [Depex]
-   TRUE
- 
-Index: UefiCpuPkg/CpuDxe/CpuGdt.c
-===================================================================
---- UefiCpuPkg/CpuDxe/CpuGdt.c	(revision 9332)
-+++ UefiCpuPkg/CpuDxe/CpuGdt.c	(working copy)
-@@ -67,6 +67,9 @@
- #error CPU type not supported for CPU GDT initialization!
- #endif
- 
-+VOID           * Gdt;
-+UINT32           GdtSize;
-+
- //
- // Global descriptor table (GDT) Template
- //
-@@ -161,6 +164,20 @@
-   },
- };
- 
-+VOID EFIAPI
-+LoadGdt(VOID* Gdt, UINT32 GdtSize)
-+{
-+  IA32_DESCRIPTOR gdtPtr;
-+
-+  //
-+  // Write GDT register
-+  //
-+  gdtPtr.Base = (UINT32)(UINTN)Gdt;
-+  gdtPtr.Limit = GdtSize - 1;
-+
-+  AsmWriteGdtr (&gdtPtr);
-+}
-+
- /**
-   Initialize Global Descriptor Table
- 
-@@ -169,27 +186,27 @@
- InitGlobalDescriptorTable (
-   )
- {
--  GDT_ENTRIES *gdt;
--  IA32_DESCRIPTOR gdtPtr;
--
-   //
-   // Allocate Runtime Data for the GDT
-   //
--  gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);
--  ASSERT (gdt != NULL);
--  gdt = ALIGN_POINTER (gdt, 8);
-+  GdtSize = sizeof (GdtTemplate);
-+#if 0
-+  Gdt = AllocateRuntimePool (GdtSize + 8);
-+  ASSERT (Gdt != NULL);
-+  Gdt = ALIGN_POINTER (Gdt, 8);
-+#else
-+  Gdt = (VOID*)(UINTN)HandyCpuPage;
-+#endif
- 
-   //
-   // Initialize all GDT entries
-   //
--  CopyMem (gdt, &GdtTemplate, sizeof (GdtTemplate));
-+  CopyMem (Gdt, &GdtTemplate, GdtSize);
- 
-   //
-   // Write GDT register
-   //
--  gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;
--  gdtPtr.Limit = sizeof (GdtTemplate) - 1;
--  AsmWriteGdtr (&gdtPtr);
-+  LoadGdt(Gdt, GdtSize);
- 
-   //
-   // Update selector (segment) registers base on new GDT
-@@ -197,4 +214,3 @@
-   SetCodeSelector ((UINT16)CPU_CODE_SEL);
-   SetDataSelectors ((UINT16)CPU_DATA_SEL);
- }
--
-Index: UefiCpuPkg/CpuDxe/CpuDxe.c
-===================================================================
---- UefiCpuPkg/CpuDxe/CpuDxe.c	(revision 9332)
-+++ UefiCpuPkg/CpuDxe/CpuDxe.c	(working copy)
-@@ -14,11 +14,14 @@
- 
- #include "CpuDxe.h"
- 
-+EFI_EVENT                 mEfiVirtualNotifyEvent;
-+EFI_PHYSICAL_ADDRESS      HandyCpuPage;
-+IA32_IDT_GATE_DESCRIPTOR* Idt;
-+UINT32                    IdtSize;
-+
- //
- // Global Variables
- //
--IA32_IDT_GATE_DESCRIPTOR  gIdtTable[INTERRUPT_VECTOR_NUMBER] = { 0 };
--
- EFI_CPU_INTERRUPT_HANDLER ExternalVectorTable[0x100];
- BOOLEAN                   InterruptState = FALSE;
- EFI_HANDLE                mCpuHandle = NULL;
-@@ -1004,8 +1007,6 @@
-   )
- {
-   EFI_STATUS      Status;
--  VOID            *IdtPtrAlignmentBuffer;
--  IA32_DESCRIPTOR *IdtPtr;
-   UINTN           Index;
-   UINTN           CurrentHandler;
- 
-@@ -1015,27 +1016,33 @@
-   // Initialize IDT
-   //
-   CurrentHandler = (UINTN)AsmIdtVector00;
-+
-+  //
-+  // Allocate Runtime Data for the IDT
-+  //
-+  IdtSize = INTERRUPT_VECTOR_NUMBER*sizeof(IA32_IDT_GATE_DESCRIPTOR);
-+#if 0
-+  Idt = AllocateRuntimePool (IdtSize + 16);
-+  ASSERT (Idt != NULL);
-+  Idt = ALIGN_POINTER (Idt, 16);
-+#else
-+  Idt = (VOID*)(UINTN)HandyCpuPage + 0x500;
-+#endif
-+
-   for (Index = 0; Index < INTERRUPT_VECTOR_NUMBER; Index ++, CurrentHandler += 0x08) {
--    gIdtTable[Index].Bits.OffsetLow   = (UINT16)CurrentHandler;
--    gIdtTable[Index].Bits.Selector    = AsmReadCs();
--    gIdtTable[Index].Bits.Reserved_0  = 0;
--    gIdtTable[Index].Bits.GateType    = IA32_IDT_GATE_TYPE_INTERRUPT_32;
--    gIdtTable[Index].Bits.OffsetHigh  = (UINT16)(CurrentHandler >> 16);
-+    Idt[Index].Bits.OffsetLow   = (UINT16)CurrentHandler;
-+    Idt[Index].Bits.Selector    = AsmReadCs();
-+    Idt[Index].Bits.Reserved_0  = 0;
-+    Idt[Index].Bits.GateType    = IA32_IDT_GATE_TYPE_INTERRUPT_32;
-+    Idt[Index].Bits.OffsetHigh  = (UINT16)(CurrentHandler >> 16);
- #if defined (MDE_CPU_X64)
--    gIdtTable[Index].Bits.OffsetUpper = (UINT32)(CurrentHandler >> 32);
--    gIdtTable[Index].Bits.Reserved_1  = 0;
-+    Idt[Index].Bits.OffsetUpper = (UINT32)(CurrentHandler >> 32);
-+    Idt[Index].Bits.Reserved_1  = 0;
- #endif
-   }
- 
--  //
--  // Load IDT Pointer
--  //
--  IdtPtrAlignmentBuffer = AllocatePool (sizeof (*IdtPtr) + 16);
--  IdtPtr = ALIGN_POINTER (IdtPtrAlignmentBuffer, 16);
--  IdtPtr->Base = (UINT32)(((UINTN)(VOID*) gIdtTable) & (BASE_4GB-1));
--  IdtPtr->Limit = sizeof (gIdtTable) - 1;
--  AsmWriteIdtr (IdtPtr);
--  FreePool (IdtPtrAlignmentBuffer);
-+  // Load IDT
-+  LoadIdt(Idt, IdtSize);
- 
-   //
-   // Initialize Exception Handlers
-@@ -1052,7 +1059,50 @@
- 
- }
- 
-+VOID EFIAPI
-+LoadIdt(VOID* Idt, UINT32 IdtSize)
-+{
-+    IA32_DESCRIPTOR IdtPtr;
- 
-+    IdtPtr.Base = (UINT32)(((UINTN) Idt) & (BASE_4GB-1));
-+    IdtPtr.Limit = IdtSize - 1;
-+    AsmWriteIdtr (&IdtPtr);
-+}
-+
-+UINT32
-+EFIAPI
-+IoWrite32 (
-+  IN      UINTN                     Port,
-+  IN      UINT32                    Value
-+  )
-+{
-+  __asm__ __volatile__ ("outl %0,%w1" : : "a" (Value), "d" ((UINT16)Port));
-+  return Value;
-+}
-+
-+VOID
-+EFIAPI
-+CpuLibVirtualNotifyEvent (
-+  IN EFI_EVENT        Event,
-+  IN VOID             *Context
-+  )
-+{
-+    EFI_RUNTIME_SERVICES * rs = (EFI_RUNTIME_SERVICES *)Context;
-+
-+    rs->ConvertPointer (0, (VOID **) &Gdt);
-+    rs->ConvertPointer (0, (VOID **) &Idt);
-+
-+    DisableInterrupts();
-+
-+    LoadIdt(Idt, IdtSize);
-+    LoadGdt(Gdt, GdtSize);
-+
-+    //IoWrite32(0xef11, 1);
-+}
-+
-+extern EFI_GUID gEfiEventVirtualAddressChangeGuid;
-+
-+
- /**
-   Initialize the state information for the CPU Architectural Protocol.
- 
-@@ -1073,6 +1123,17 @@
- {
-   EFI_STATUS  Status;
- 
-+
-+  // Allocate handy page
-+  HandyCpuPage = 0xffffffff;
-+  Status = gBS->AllocatePages (
-+      AllocateMaxAddress,
-+      EfiReservedMemoryType,
-+      1,
-+      &HandyCpuPage                               );
-+  ASSERT_EFI_ERROR (Status);
-+  ASSERT (HandyCpuPage != 0xffffffff);
-+
-   //
-   // Make sure interrupts are disabled
-   //
-@@ -1103,6 +1164,18 @@
-   //
-   RefreshGcdMemoryAttributes ();
- 
-+
-+  // Register virtual address change notifier
-+#if 0
-+  gBS->CreateEventEx (
-+      EVT_NOTIFY_SIGNAL,
-+      TPL_NOTIFY,
-+      CpuLibVirtualNotifyEvent,
-+      SystemTable->RuntimeServices,
-+      &gEfiEventVirtualAddressChangeGuid,
-+      &mEfiVirtualNotifyEvent
-+  );
-+#endif
-+
-   return Status;
- }
--
-Index: UefiCpuPkg/CpuDxe/CpuDxe.h
-===================================================================
---- UefiCpuPkg/CpuDxe/CpuDxe.h	(revision 9332)
-+++ UefiCpuPkg/CpuDxe/CpuDxe.h	(working copy)
-@@ -136,5 +136,17 @@
-   );
- 
- 
-+VOID EFIAPI
-+LoadGdt(VOID* Gdt, UINT32 GdtSize);
-+
-+VOID EFIAPI
-+LoadIdt(VOID* Idt, UINT32 IdtSize);
-+
-+extern EFI_PHYSICAL_ADDRESS      HandyCpuPage;
-+extern VOID*                     Gdt;
-+extern UINT32                    GdtSize;
-+extern IA32_IDT_GATE_DESCRIPTOR* Idt;
-+extern UINT32                    IdtSize;
-+
- #endif
- 
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-mem_acpi
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-mem_acpi	(revision 44611)
+++ 	(revision )
@@ -1,221 +1,0 @@
-Index: MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c
-===================================================================
---- MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c	(revision 9332)
-+++ MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c	(working copy)
-@@ -10,7 +10,7 @@
-   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- 
--**/ 
-+**/
- 
- #include <PiDxe.h>
- 
-@@ -153,7 +153,137 @@
-   Buffer[ChecksumOffset] = CalculateCheckSum8(Buffer, Size);
- }
- 
-+#ifdef VBOX
- 
-+#define ACPI_RSD_PTR      SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-+#define EBDA_BASE         (0x9FC0 << 4)
-+
-+VOID *
-+FindAcpiRsdPtr (
-+  VOID
-+  )
-+{
-+  UINTN                           Address;
-+  UINTN                           Index;
-+
-+  //
-+  // First Search 0x0e0000 - 0x0fffff for RSD Ptr
-+  //
-+  for (Address = 0xe0000; Address < 0xfffff; Address += 0x10) {
-+    if (*(UINT64 *)(Address) == ACPI_RSD_PTR) {
-+      return (VOID *)Address;
-+    }
-+  }
-+
-+  //
-+  // Search EBDA
-+  //
-+
-+  Address = EBDA_BASE;
-+  for (Index = 0; Index < 0x400 ; Index += 16) {
-+    if (*(UINT64 *)(Address + Index) == ACPI_RSD_PTR) {
-+      return (VOID *)Address;
-+    }
-+  }
-+  return NULL;
-+}
-+
-+VOID* FindSignature(VOID* Start, UINT32 Signature, BOOLEAN NoChecksum)
-+{
-+    UINT8* Ptr = (UINT8*)Start;
-+    UINT32 Count = 0x10000; // 16 pages
-+
-+    while (Count-- > 0)
-+    {
-+        if (   *(UINT32*)Ptr == Signature
-+            && ((EFI_ACPI_DESCRIPTION_HEADER *)Ptr)->Length <= Count
-+            && (NoChecksum ||
-+                CalculateCheckSum8(Ptr, ((EFI_ACPI_DESCRIPTION_HEADER *)Ptr)->Length) == 0
-+                ))
-+        {
-+                return Ptr;
-+        }
-+
-+        Ptr++;
-+    }
-+    return NULL;
-+}
-+
-+VOID
-+FillSysTablesInfo(VOID** Tables, UINT32 TablesSize)
-+{
-+    UINT32 Table = 0;
-+    EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER*  RsdPtr;
-+    VOID* TablesPage;
-+#define FLAG_OPTIONAL    1<<0
-+#define FLAG_NO_CHECKSUM 1<<1
-+    static struct {
-+        UINT32 Signature;
-+        UINT32 Flags;
-+        CHAR8* Name;
-+    } TableInfo[] = {
-+        // MADT, optional
-+        { SIGNATURE_32('A', 'P', 'I', 'C'),  FLAG_OPTIONAL, "MADT"},
-+        // FACP (also called FADT)
-+        { SIGNATURE_32('F', 'A', 'C', 'P'),  0, "FADT"},
-+        // FACS, according 5.2.9 of ACPI v2. spec FACS doesn't have checksum field
-+        { SIGNATURE_32('F', 'A', 'C', 'S'),  FLAG_NO_CHECKSUM, "FACS"},
-+        // DSDT
-+        { SIGNATURE_32('D', 'S', 'D', 'T'), 0, "DSDT"},
-+        // SSDT
-+        { SIGNATURE_32('S', 'S', 'D', 'T'), FLAG_OPTIONAL, "SSDT"},
-+        // HPET
-+        { SIGNATURE_32('H', 'P', 'E', 'T'), FLAG_OPTIONAL, "HPET"},
-+        // MCFG
-+        { SIGNATURE_32('M', 'C', 'F', 'G'), FLAG_OPTIONAL, "MCFG"}
-+    };
-+    UINT32 Index;
-+
-+    RsdPtr = (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER*)FindAcpiRsdPtr();
-+    ASSERT(RsdPtr != NULL);
-+    TablesPage = (VOID*)(UINTN)((RsdPtr->RsdtAddress) & ~0xfff);
-+
-+    for (Index = 0; Index < sizeof TableInfo / sizeof TableInfo[0]; Index++)
-+    {
-+        VOID* Ptr = FindSignature(TablesPage, TableInfo[Index].Signature,
-+                                  (BOOLEAN)((TableInfo[Index].Flags & FLAG_NO_CHECKSUM) != 0));
-+        if (TableInfo[Index].Signature == SIGNATURE_32('F', 'A', 'C', 'P'))
-+        {
-+             // we actually have 2 FADTs, see https://xtracker.innotek.de/index.php?bug=4082
-+            Ptr = FindSignature((UINT8*)Ptr+32, SIGNATURE_32('F', 'A', 'C', 'P'), FALSE);
-+        }
-+        if (!(TableInfo[Index].Flags & FLAG_OPTIONAL))
-+             ASSERT(Ptr != NULL);
-+        DEBUG ((EFI_D_ERROR, "%a: %p\n", TableInfo[Index].Name, Ptr));
-+        if (Ptr)
-+           Tables[Table++] = Ptr;
-+    }
-+
-+#if 0
-+    // RSDT
-+    ASSERT(Table < TablesSize);
-+    Tables[Table] = FindSignature(TablesPage, SIGNATURE_32('R', 'S', 'D', 'T'));
-+    DEBUG ((EFI_D_ERROR, "RSDT: %p\n", Tables[Table]));
-+    ASSERT(Tables[Table] != NULL);
-+    Table++;
-+
-+    // XSDT
-+    ASSERT(Table < TablesSize);
-+    Tables[Table] = FindSignature(TablesPage, SIGNATURE_32('X', 'S', 'D', 'T'));
-+    DEBUG ((EFI_D_ERROR, "XSDT: %p\n", Tables[Table]));
-+    ASSERT(Tables[Table] != NULL);
-+    Table++;
-+#endif
-+
-+    DEBUG((DEBUG_INFO, "We found %d tables from %d\n", Table, TablesSize));
-+    Tables[Table] = NULL;
-+}
-+#endif
-+
-+#ifdef VBOX
-+#define USE_MEM_TABLES 1
-+#endif
-+
- /**
-   Entrypoint of Acpi Platform driver.
- 
-@@ -174,14 +304,21 @@
- {
-   EFI_STATUS                     Status;
-   EFI_ACPI_TABLE_PROTOCOL        *AcpiTable;
-+#if USE_MEM_TABLES
-+  VOID                           *VBoxTables[10];
-+#else
-   EFI_FIRMWARE_VOLUME2_PROTOCOL  *FwVol;
-+#endif
-   INTN                           Instance;
-   EFI_ACPI_COMMON_HEADER         *CurrentTable;
-   UINTN                          TableHandle;
-+#if !USE_MEM_TABLES
-   UINT32                         FvStatus;
-+#endif
-   UINTN                          TableSize;
-   UINTN                          Size;
- 
-+  Size         = 0;
-   Instance     = 0;
-   CurrentTable = NULL;
-   TableHandle  = 0;
-@@ -194,6 +331,18 @@
-     return EFI_ABORTED;
-   }
- 
-+#if USE_MEM_TABLES
-+  /* VBOX already has tables prepared in memory - just reuse it */
-+  FillSysTablesInfo(VBoxTables, sizeof(VBoxTables)/sizeof(VBoxTables[0]));
-+  while (Status == EFI_SUCCESS) {
-+      CurrentTable = (EFI_ACPI_COMMON_HEADER*)VBoxTables[Instance];
-+      Status = (CurrentTable == NULL) ? EFI_NOT_FOUND : EFI_SUCCESS;
-+      if (CurrentTable)
-+      {
-+          Size = CurrentTable->Length;
-+          DEBUG ((EFI_D_ERROR, "adding %p %d\n", CurrentTable, Size));
-+      }
-+#else
-   //
-   // Locate the firmware volume protocol
-   //
-@@ -205,7 +354,6 @@
-   // Read tables from the storage file.
-   //
-   while (Status == EFI_SUCCESS) {
--
-     Status = FwVol->ReadSection (
-                       FwVol,
-                       (EFI_GUID*)FixedPcdGetPtr (PcdAcpiTableStorageFile),
-@@ -215,6 +363,7 @@
-                       &Size,
-                       &FvStatus
-                       );
-+#endif
-     if (!EFI_ERROR(Status)) {
-       //
-       // Add the table
-@@ -222,6 +371,7 @@
-       TableHandle = 0;
- 
-       TableSize = ((EFI_ACPI_DESCRIPTION_HEADER *) CurrentTable)->Length;
-+      DEBUG((DEBUG_INFO, "Size:%d, TableSize:%d\n", Size, TableSize));
-       ASSERT (Size >= TableSize);
- 
-       //
-@@ -252,4 +402,3 @@
- 
-   return EFI_SUCCESS;
- }
--
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-memdetect
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-memdetect	(revision 44611)
+++ 	(revision )
@@ -1,40 +1,0 @@
-Index: OvmfPkg/PlatformPei/MemDetect.c
-===================================================================
---- OvmfPkg/PlatformPei/MemDetect.c	(revision 9332)
-+++ OvmfPkg/PlatformPei/MemDetect.c	(working copy)
-@@ -34,12 +34,12 @@
- #include "Cmos.h"
- 
- STATIC
--UINTN
-+UINT64
- GetSystemMemorySize (
-   )
- {
--  UINT8 Cmos0x34;
--  UINT8 Cmos0x35;
-+  UINT64 Cmos0x34;
-+  UINT64 Cmos0x35;
- 
-   //
-   // CMOS 0x34/0x35 specifies the system memory above 16 MB.
-@@ -50,8 +50,8 @@
-   //   into the calculation to get the total memory size.
-   //
- 
--  Cmos0x34 = (UINT8) CmosRead8 (0x34);
--  Cmos0x35 = (UINT8) CmosRead8 (0x35);
-+  Cmos0x34 = CmosRead8(0x34);
-+  Cmos0x35 = CmosRead8(0x35);
- 
-   return ((((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
- }
-@@ -77,7 +77,7 @@
-   //
-   // Determine total memory size available
-   //
--  TotalMemorySize = (UINT64)GetSystemMemorySize ();
-+  TotalMemorySize = GetSystemMemorySize ();
- 
-   MemoryBase = 0x800000;
-   MemorySize = TotalMemorySize - MemoryBase - 0x100000;
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-no_blocking_partition
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-no_blocking_partition	(revision 44611)
+++ 	(revision )
@@ -1,20 +1,0 @@
-Index: MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
-===================================================================
---- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c	(revision 9330)
-+++ MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c	(working copy)
-@@ -310,8 +310,15 @@
-           This->DriverBindingHandle,
-           ControllerHandle
-           );
-+    return Status;
-   }
- 
-+    gBS->CloseProtocol (
-+          ControllerHandle,
-+          &gEfiDiskIoProtocolGuid,
-+          This->DriverBindingHandle,
-+          ControllerHandle
-+          );
-   return Status;
- }
- 
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-ovmf_pei
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-ovmf_pei	(revision 44611)
+++ 	(revision )
@@ -1,99 +1,0 @@
-Index: OvmfPkg/PlatformPei/Platform.c
-===================================================================
---- OvmfPkg/PlatformPei/Platform.c	(revision 9332)
-+++ OvmfPkg/PlatformPei/Platform.c	(working copy)
-@@ -67,6 +67,34 @@
- 
- 
- VOID
-+AddRomMemoryBaseSizeHob (
-+  EFI_PHYSICAL_ADDRESS        MemoryBase,
-+  UINT64                      MemorySize
-+  )
-+{
-+  STATIC EFI_RESOURCE_ATTRIBUTE_TYPE Attributes =
-+    (
-+      EFI_RESOURCE_ATTRIBUTE_PRESENT     |
-+      EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED |
-+      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
-+      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE
-+    );
-+
-+  BuildResourceDescriptorHob (
-+    EFI_RESOURCE_FIRMWARE_DEVICE,
-+    Attributes,
-+    MemoryBase,
-+    MemorySize
-+    );
-+
-+  DEBUG (
-+      (EFI_D_ERROR, "ROM HOB: at 0x%llx size 0x%llx\n", MemoryBase, MemorySize)
-+    );
-+
-+}
-+
-+
-+VOID
- AddIoMemoryRangeHob (
-   EFI_PHYSICAL_ADDRESS        MemoryBase,
-   EFI_PHYSICAL_ADDRESS        MemoryLimit
-@@ -111,11 +139,33 @@
-   AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
- }
- 
-+#define ACPI_RSD_PTR      SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-+VOID *
-+FindAcpiRsdPtr (
-+  VOID
-+  )
-+{
-+  UINTN                           Address;
- 
-+  //
-+  // First Search 0x0e0000 - 0x0fffff for RSD Ptr
-+  //
-+  for (Address = 0xe0000; Address < 0xfffff; Address += 0x10) {
-+    if (*(UINT64 *)(Address) == ACPI_RSD_PTR) {
-+      return (VOID *)Address;
-+    }
-+  }
-+  return NULL;
-+}
-+
-+
- VOID
- MemMapInitialization (
-   )
- {
-+  EFI_PHYSICAL_ADDRESS RsdPtr;
-+  EFI_PHYSICAL_ADDRESS AcpiTables;
-+
-   //
-   // Create Memory Type Information HOB
-   //
-@@ -139,6 +189,20 @@
-   // Video memory + Legacy BIOS region
-   //
-   AddIoMemoryRangeHob (0x0A0000, 0x100000);
-+
-+
-+  //
-+  // Add ACPI memory, provided by VBox
-+  //
-+  RsdPtr = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr();
-+  ASSERT(RsdPtr != 0);
-+  AcpiTables = (EFI_PHYSICAL_ADDRESS)*(UINT32*)((UINTN)RsdPtr + 16) & ~0xfff;
-+  ASSERT(AcpiTables != 0);
-+
-+  // Floating pointer page
-+  AddRomMemoryBaseSizeHob(RsdPtr,      0x1000);
-+  // ACPI tables 64 K
-+  AddRomMemoryBaseSizeHob(AcpiTables, 0x10000);
- }
- 
- 
-@@ -214,4 +278,3 @@
- 
-   return EFI_SUCCESS;
- }
--
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-pmtimer
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-pmtimer	(revision 44611)
+++ 	(revision )
@@ -1,67 +1,0 @@
-Index: OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
-===================================================================
---- OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c	(revision 8827)
-+++ OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c	(working copy)
-@@ -17,10 +17,23 @@
- #include <Library/BaseLib.h>
- #include <Library/IoLib.h>
- #include <Library/PciLib.h>
-+#include <Library/DebugLib.h>
- 
- #define ACPI_TIMER_FREQUENCY   3579545
- #define ACPI_TIMER_COUNT_SIZE  0x01000000
- 
-+struct DeviceProbe
-+{
-+    UINT8 Device;
-+    UINT16 VendorID;
-+    UINT16 DeviceID;
-+};
-+
-+struct DeviceProbe DeviceProber[] =
-+{
-+    {1, 0xabad, 0xbabe }, /*qemu, todo fill right values */
-+    {7, 0x8086, 0x7113 }, /*vbox*/
-+};
- /**
-   The constructor function enables ACPI IO space.
- 
-@@ -36,17 +49,30 @@
-   VOID
-   )
- {
--  UINT8 Device;
-+  UINT8 Device = (UINT8)~0;
-+  UINT16 DeviceID;
-+  UINT16 VendorID;
-+  UINTN i;
-+  for (i = 0; i < 2; ++i)
-+  {
-+    VendorID = PciRead16(PCI_LIB_ADDRESS(0, DeviceProber[i].Device, 0, 0));
-+    DeviceID = PciRead16(PCI_LIB_ADDRESS(0, DeviceProber[i].Device, 0, 2));
-+    DEBUG((DEBUG_INFO, "TM(%d)(VendorID:%x, DeviceID(%x))\n", DeviceProber[i].Device, VendorID, DeviceID));
-+    if (VendorID == DeviceProber[i].VendorID 
-+        && DeviceID == DeviceProber[i].DeviceID)
-+    {
-+        Device = DeviceProber[i].Device;
-+        break;
-+    }    
-+  }
-+  ASSERT(Device != (UINT8)~0);
- 
--  Device = 1;
--  // Device = 7;
--
-   //
--  // ACPI Timer enable is in Bus 0, Device ?, Function 3
-+  // ACPI Timer enable is in Bus 0, Device ?, Function 0
-   //
--  PciOr8         (PCI_LIB_ADDRESS (0,Device,3,0x04), 0x01);
--  PciAndThenOr32 (PCI_LIB_ADDRESS (0,Device,3,0x40), (UINT32) ~0xfc0, 0x400);
--  PciOr8         (PCI_LIB_ADDRESS (0,Device,3,0x80), 0x01);  return RETURN_SUCCESS;
-+  PciOr8         (PCI_LIB_ADDRESS (0,Device,0,0x04), 0x01);
-+  PciAndThenOr32 (PCI_LIB_ADDRESS (0,Device,0,0x40), (UINT32) ~0xfc0, 0x400);
-+  PciOr8         (PCI_LIB_ADDRESS (0,Device,0,0x80), 0x01);  return RETURN_SUCCESS;
- }
- 
- /**
Index: trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-rtc
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/edk2.patch-rtc	(revision 44611)
+++ 	(revision )
@@ -1,97 +1,0 @@
-Index: PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
-===================================================================
---- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c	(revision 9330)
-+++ PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c	(working copy)
-@@ -243,6 +243,7 @@
-   EFI_STATUS      Status;
-   RTC_REGISTER_B  RegisterB;
-   UINT8           Century;
-+  EFI_TIME        TimeCopy;
- 
-   //
-   // Check parameters for null pointer
-@@ -275,15 +276,15 @@
-   //
-   // Get the Time/Date/Daylight Savings values.
-   //
--  Time->Second  = RtcRead (RTC_ADDRESS_SECONDS);
--  Time->Minute  = RtcRead (RTC_ADDRESS_MINUTES);
--  Time->Hour    = RtcRead (RTC_ADDRESS_HOURS);
--  Time->Day     = RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH);
--  Time->Month   = RtcRead (RTC_ADDRESS_MONTH);
--  Time->Year    = RtcRead (RTC_ADDRESS_YEAR);
-+  TimeCopy.Second  = RtcRead (RTC_ADDRESS_SECONDS);
-+  TimeCopy.Minute  = RtcRead (RTC_ADDRESS_MINUTES);
-+  TimeCopy.Hour    = RtcRead (RTC_ADDRESS_HOURS);
-+  TimeCopy.Day     = RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH);
-+  TimeCopy.Month   = RtcRead (RTC_ADDRESS_MONTH);
-+  TimeCopy.Year    = RtcRead (RTC_ADDRESS_YEAR);
- 
--  Century = RtcRead (RTC_ADDRESS_CENTURY);
--  
-+  Century = RtcRead (RTC_ADDRESS_CENTURY);  
-+
-   //
-   // Release RTC Lock.
-   //
-@@ -294,16 +295,18 @@
-   //
-   // Get the variable that contains the TimeZone and Daylight fields
-   //
--  Time->TimeZone  = Global->SavedTimeZone;
--  Time->Daylight  = Global->Daylight;
-+  TimeCopy.TimeZone  = Global->SavedTimeZone;
-+  TimeCopy.Daylight  = Global->Daylight;
- 
-   //
-   // Make sure all field values are in correct range
-   //
--  Status = ConvertRtcTimeToEfiTime (Time, Century, RegisterB);
-+  Status = ConvertRtcTimeToEfiTime (&TimeCopy, Century, RegisterB);
-+  //DEBUG((DEBUG_INFO, "%a:%d - %r\n", __FILE__, __LINE__, Status));
-   if (!EFI_ERROR (Status)) {
--    Status = RtcTimeFieldsValid (Time);
-+    Status = RtcTimeFieldsValid (&TimeCopy);
-   }
-+  //DEBUG((DEBUG_INFO, "%a:%d - %r\n", __FILE__, __LINE__, Status));
-   if (EFI_ERROR (Status)) {
-     return EFI_DEVICE_ERROR;
-   }
-@@ -323,6 +326,8 @@
-     Capabilities->SetsToZero = FALSE;
-   }
- 
-+  CopyMem(Time, &TimeCopy, sizeof(*Time));
-+
-   return EFI_SUCCESS;
- }
- 
-@@ -800,8 +805,9 @@
-   IN EFI_TIME *Time
-   )
- {
--  if (Time->Year < 1998 ||
--      Time->Year > 2099 ||
-+  if (
-+      //Time->Year < 1998 ||
-+      //Time->Year > 2099 ||
-       Time->Month < 1 ||
-       Time->Month > 12 ||
-       (!DayValid (Time)) ||
-@@ -848,12 +854,12 @@
-   //
-   // The validity of Time->Month field should be checked before
-   //
--  ASSERT (Time->Month >=1);
--  ASSERT (Time->Month <=12);
--  if (Time->Day < 1 ||
--      Time->Day > DayOfMonth[Time->Month - 1] ||
-+  ASSERT (Time->Month >= 1 && Time->Month  <= 12);
-+
-+  if ( Time->Day > DayOfMonth[Time->Month - 1] ||
-       (Time->Month == 2 && (!IsLeapYear (Time) && Time->Day > 28))
-       ) {
-+    DEBUG((DEBUG_INFO, "%a:%d - %r\n", __FILE__, __LINE__, EFI_INVALID_PARAMETER));
-     return FALSE;
-   }
- 
