1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
authorqwang12 <qwang12@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 24 Jan 2008 07:10:05 +0000 (07:10 +0000)
committerqwang12 <qwang12@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 24 Jan 2008 07:10:05 +0000 (07:10 +0000)
  1.1) Bug fixes. (For details, please check  Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
  1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
  1.3) Add Smbios 2.5, 2.6 supports.

  Incompatible changes hilighted:
  1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
  2) EFI_IP4_IPCONFIG_DATA changed.

2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.

git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4623 de2fecce-e211-0410-80a6-f3fac2684e05

448 files changed:
edk2/EdkCompatibilityPkg/Foundation/Include/EfiCompNameSupport.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Include/EfiTpm.h
edk2/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h
edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/Acpi3_0.h
edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/IScsiBootFirmwareTable.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/Smbios.h
edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/usb.h
edk2/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Include/TianoHii.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memsetRep1.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.asm with 50% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memsetRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiScriptLib/EfiScriptLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Graphics.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/GraphicsLite/Graphics.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/GraphicsLite/Print.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiPrintLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiRuntimeLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiScriptLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/Print/Print.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/PrintLite/Print.c
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiEfiIfrSupportLib.inf [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrLibrary.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrString.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDefinitionChangesBase.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDefinitionChangesDxe.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDefinitionChangesPeim.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDependencies.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGlueBase.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGlueConfig.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGlueDxe.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGluePeim.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGlueUefi.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGlueBaseLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGlueDebugLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGlueDxeRuntimeDriverLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGlueHiiLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseDebugLibNull/BaseDebugLibNull.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseDebugLibNull/DebugLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ARShiftU64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/BaseLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/BaseLibInternals.h [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/BaseLibInternal.h with 89% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/BitField.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/CheckSum.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Cpu.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/CpuDeadLoop.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/DivS64x64Remainder.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/DivU64x32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/DivU64x32Remainder.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/DivU64x64Remainder.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ebc/CpuBreakpoint.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ebc/SetJumpLongJump.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ebc/SwitchStack.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ebc/Synchronization.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/GetPowerOfTwo32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/GetPowerOfTwo64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/HighBitSet32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/HighBitSet64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ARShiftU64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuBreakpoint.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuFlushTlb.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuFlushTlb.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuPause.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisableInterrupts.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DisablePaging32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivS64x64Remainder.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32Remainder.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x64Remainder.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableDisableInterrupts.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnableInterrupts.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FlushCacheLine.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxRestore.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/FxSave.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedDecrement.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedIncrement.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InternalSwitchStack.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LRotU64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ModU64x32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Monitor.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Mwait.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Non-existing.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RRotU64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCr4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr5.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr6.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDr7.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadFs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadGs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadIdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadLdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm5.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm6.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMm7.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadMsr64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadPmc.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadSs.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr6.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr7.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteGdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteIdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteLdtr.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm0.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm2.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm3.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm5.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm6.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMm7.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.asm [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteMsr64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessDbr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessEicr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessGcr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessGp.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessKr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessPmr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessPsr.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AsmPalCall.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/CpuBreakpoint.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/ExecFc.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/InternalSwitchStack.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/Non-existing.c [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/ReadCpuid.s [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/ReadItc.s [deleted file]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/Synchronization.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/Unaligned.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LRotU32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LRotU64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LShiftU64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LinkedList.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LongJump.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LowBitSet32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/LowBitSet64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Math64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ModU64x32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/MultS64x64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/MultU64x32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/MultU64x64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/RRotU32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/RRotU64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/RShiftU64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SetJump.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/String.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SwapBytes16.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SwapBytes32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SwapBytes64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SwitchStack.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Synchronization.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SynchronizationMsc.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Unaligned.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Non-existing.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86DisablePaging32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86DisablePaging64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86EnablePaging32.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86EnablePaging64.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86FxRestore.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86FxSave.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86GetInterruptState.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86MemoryFence.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86Msr.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86ReadGdtr.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86ReadIdtr.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86Thunk.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86WriteGdtr.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/x86WriteIdtr.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/BaseMemoryLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ebc/CopyMem.c [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/CopyMem.c with 100% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ebc/MemLibGeneric.c [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/MemLibGeneric.c with 100% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ebc/SetMem.c [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/SetMem.c with 100% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadCs.asm with 51% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadDs.asm with 51% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadEflags.asm with 51% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ipf/CopyMem.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ipf/MemLibGeneric.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ipf/SetMem.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/MemLibGuid.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Invd.asm with 51% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Wbinvd.asm with 50% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/ReadTsc.asm with 50% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePciCf8Lib/BasePciCf8Lib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePciExpressLib/BasePciExpressLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePciLibCf8/BasePciLibCf8.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePeCoffLib/BasePeCoffLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePrintLib/BasePrintLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseTimerLibLocalApic/BaseTimerLibLocalApic.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseTimerLibLocalApic/Ia32/x86LocalApicTimerInitialize.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuSleep.asm with 70% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseTimerLibLocalApic/Ipf/IpfTimerLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseTimerLibLocalApic/X64/x86LocalApicTimerInitialize.asm [moved from edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteCr0.asm with 70% similarity]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseTimerLibLocalApic/x86TimerLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeHobLib/DxeHobLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxePerformanceLib/DxePerformanceLib.inf [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxePerformanceLib/PerformanceLib.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeServicesTableLib/DxeServicesTableLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeSmbusLib/DxeSmbusLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Common/RuntimeLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/EdkDxeRuntimeDriverLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Ipf/RuntimeLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Ipf/RuntimeService.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeSalLib/EdkDxeSalLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/HiiLib/HiiLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/HiiLib/HiiLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiHobLib/HobLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiHobLib/PeiHobLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiPerformanceLib/PeiPerformanceLib.inf [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiPerformanceLib/PerformanceLib.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibKr1/PeiServicesTablePointer.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibKr1/PeiServicesTablePointerLibInternals.h
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibKr1/PeiServicesTablePointerLibKr1.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointerLibMm7.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiSmbusLib/PeiSmbusLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiDevicePathLib/UefiDevicePathLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiDriverModelLib/UefiDriverModelLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiDriverModelLib/UefiDriverModelLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiLib/UefiLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemRep1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemRep4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMemRep1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMemRep4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMemRep1.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMemRep4.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep1.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep8.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/Include/peihoblib.h
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/FindFv.c
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Hob/Hob.c
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeCoffLoader.c
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Perf.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/Fvb.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c
edk2/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLibAsm.asm [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Ppi/OperatorPresence/OperatorPresence.c
edk2/EdkCompatibilityPkg/Foundation/Protocol/DiskInfo/DiskInfo.c
edk2/EdkCompatibilityPkg/Foundation/Protocol/DiskInfo/DiskInfo.h
edk2/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.c [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.h [new file with mode: 0644]
edk2/EdkCompatibilityPkg/Foundation/Protocol/EdkProtocolLib.inf
edk2/EdkCompatibilityPkg/Foundation/Protocol/GuidedSectionExtraction/GuidedSectionExtraction.h
edk2/EdkCompatibilityPkg/Foundation/Protocol/PlatformMemTest/PlatformMemTest.h
edk2/EdkCompatibilityPkg/Foundation/Protocol/TcgService/TcgService.c
edk2/EdkCompatibilityPkg/Foundation/Protocol/TcgService/TcgService.h

diff --git a/edk2/EdkCompatibilityPkg/Foundation/Include/EfiCompNameSupport.h b/edk2/EdkCompatibilityPkg/Foundation/Include/EfiCompNameSupport.h
new file mode 100644 (file)
index 0000000..7159588
--- /dev/null
@@ -0,0 +1,58 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  EfiCompNameSupport.h\r
+\r
+Abstract:\r
+\r
+  Private data structures for the Console Splitter driver\r
+\r
+--*/\r
+\r
+#ifndef EFI_COMPONENT_NAME_SUPPORT_H\r
+#define EFI_COMPONENT_NAME_SUPPORT_H\r
+\r
+#include "Tiano.h"\r
+\r
+#ifndef EFI_SIZE_REDUCTION_APPLIED\r
+\r
+#define INSTALL_ALL_DRIVER_PROTOCOLS(ImageHandle,               \\r
+                                     SystemTable,               \\r
+                                     DriverBinding,             \\r
+                                     DriverBindingHandle,       \\r
+                                     ComponentName,             \\r
+                                     DriverConfiguration,       \\r
+                                     DriverDiagnostics)         \\r
+        EfiLibInstallAllDriverProtocols ((ImageHandle),         \\r
+                                         (SystemTable),         \\r
+                                         (DriverBinding),       \\r
+                                         (DriverBindingHandle), \\r
+                                         (ComponentName),       \\r
+                                         (DriverConfiguration), \\r
+                                         (DriverDiagnostics))\r
+#else\r
+\r
+#define INSTALL_ALL_DRIVER_PROTOCOLS(ImageHandle,             \\r
+                                     SystemTable,             \\r
+                                     DriverBinding,           \\r
+                                     DriverBindingHandle,     \\r
+                                     ComponentName,           \\r
+                                     DriverConfiguration,     \\r
+                                     DriverDiagnostics)       \\r
+        EfiLibInstallDriverBinding ((ImageHandle),            \\r
+                                    (SystemTable),            \\r
+                                    (DriverBinding),          \\r
+                                    (DriverBindingHandle))\r
+#endif\r
+\r
+#endif\r
index 67379aa..ea89f56 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -24,13 +24,13 @@ Abstract:
 #ifndef _EFI_TPM_H_\r
 #define _EFI_TPM_H_\r
 \r
-#include <Tiano.h>\r
+#include "Tiano.h"\r
 \r
 //\r
 // The start of TPM return codes\r
 //\r
 #define TPM_BASE                    (EFI_MAX_BIT + (EFI_MAX_BIT >> 1))\r
-#include <IndustryStandard/Tpm12.h>\r
+#include "IndustryStandard/Tpm12.h"\r
 \r
 //\r
 // Standard event types\r
@@ -117,7 +117,7 @@ typedef struct tdEFI_IMAGE_LOAD_EVENT {
 // the measurement of given configuration tables.\r
 //\r
 typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
-  UINTN                            NumberOfTables;\r
+  UINTN                                  NumberOfTables;\r
   EFI_CONFIGURATION_TABLE           TableEntry[1];\r
 } EFI_HANDOFF_TABLE_POINTERS;\r
 \r
index ae60a28..12d40de 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -49,12 +49,12 @@ Abstract:
               return 1;                                       \\r
           }                                                   \\r
                                                               \\r
-          EFI_STATUS                                                 \\r
+          EFI_STATUS                                          \\r
           __declspec( dllexport  )                            \\r
           __cdecl                                             \\r
           InitializeDriver (                                  \\r
-              VOID *ImageHandle,                              \\r
-              VOID *SystemTable                               \\r
+              EFI_HANDLE       ImageHandle,                   \\r
+              EFI_SYSTEM_TABLE *SystemTable                   \\r
               )                                               \\r
           {                                                   \\r
               return InitFunction(ImageHandle, SystemTable);  \\r
index be4483a..cd359b6 100644 (file)
@@ -676,6 +676,16 @@ typedef struct {
 //\r
 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE 0x54524457\r
 \r
+//\r
+// "WDAT" Watchdog Action Table\r
+//\r
+#define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE 0x54414457\r
+\r
+//\r
+// "iBFT" iSCSI Boot Firmware Table\r
+//\r
+#define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE 0x54464269\r
+\r
 #pragma pack()\r
 \r
 #endif\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/IScsiBootFirmwareTable.h b/edk2/EdkCompatibilityPkg/Foundation/Include/IndustryStandard/IScsiBootFirmwareTable.h
new file mode 100644 (file)
index 0000000..8696e9c
--- /dev/null
@@ -0,0 +1,146 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.     \r
+\r
+Module Name:\r
+\r
+  IScsiBootFirmwareTable.h\r
+\r
+Abstract:\r
+\r
+  The definition for iSCSI Boot Firmware Table, it's defined in\r
+  Microsoft iBFT document.\r
+\r
+--*/\r
+\r
+#ifndef _ISCSI_BOOT_FIRMWARE_TABLE_H_\r
+#define _ISCSI_BOOT_FIRMWARE_TABLE_H_\r
+\r
+#include "Tiano.h"\r
+#include "Acpi3_0.h"\r
+\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION            0x01\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_ALIGNMENT 8\r
+\r
+enum {\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_RESERVED_STRUCTURE_ID = 0,\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_ID,\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_ID,\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_ID,\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_ID,\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_EXTERNSIONS_STRUCTURE_ID,\r
+};\r
+\r
+enum {\r
+  IpPrefixOriginOther = 0,\r
+  IpPrefixOriginManual,\r
+  IpPrefixOriginWellKnown,\r
+  IpPrefixOriginDhcp,\r
+  IpPrefixOriginRouterAdvertisement,\r
+  IpPrefixOriginUnchanged = 16\r
+};\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+  UINT32  Signature;\r
+  UINT32  Length;\r
+  UINT8   Revision;\r
+  UINT8   Checksum;\r
+  UINT8   OemId[6];\r
+  UINT64  OemTableId;\r
+  UINT8   Reserved[24];\r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER;\r
+\r
+typedef struct {\r
+  UINT8   StructureId;\r
+  UINT8   Version;\r
+  UINT16  Length;\r
+  UINT8   Index;\r
+  UINT8   Flags;\r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER;\r
+\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_VERSION            0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_FLAG_BOOT_FAILOVER 0x1\r
+\r
+typedef struct {\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER  Header;\r
+  UINT16                                               Extensions;\r
+  UINT16                                               InitiatorOffset;\r
+  UINT16                                               NIC0Offset;\r
+  UINT16                                               Target0Offset;\r
+  UINT16                                               NIC1Offset;\r
+  UINT16                                               Target1Offset;  \r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE;\r
+\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_VERSION            0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BLOCK_VALID   0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BOOT_SELECTED 0x2\r
+\r
+typedef struct {\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER  Header;\r
+  EFI_IPv6_ADDRESS                                     ISnsServer;\r
+  EFI_IPv6_ADDRESS                                     SlpServer;\r
+  EFI_IPv6_ADDRESS                                     PrimaryRadiusServer;\r
+  EFI_IPv6_ADDRESS                                     SecondaryRadiusServer;\r
+  UINT16                                               IScsiNameLength;\r
+  UINT16                                               IScsiNameOffset;\r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE;\r
+\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_VERSION            0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BLOCK_VALID   0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BOOT_SELECTED 0x2\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_GLOBAL        0x4\r
+\r
+typedef struct {\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER  Header;\r
+  EFI_IPv6_ADDRESS                                     Ip;\r
+  UINT8                                                SubnetMaskPrefixLength;\r
+  UINT8                                                Origin;\r
+  EFI_IPv6_ADDRESS                                     Gateway;\r
+  EFI_IPv6_ADDRESS                                     PrimaryDns;\r
+  EFI_IPv6_ADDRESS                                     SecondaryDns;\r
+  EFI_IPv6_ADDRESS                                     DhcpServer;\r
+  UINT16                                               VLanTag;\r
+  UINT8                                                Mac[6];\r
+  UINT16                                               PciLocation;\r
+  UINT16                                               HostNameLength;\r
+  UINT16                                               HostNameOffset;\r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE;\r
+\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_VERSION            0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID   0x1\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED 0x2\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP   0x4\r
+#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP  0x8\r
+\r
+typedef struct {\r
+  EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER  Header;\r
+  EFI_IPv6_ADDRESS                                     Ip;\r
+  UINT16                                               Port;\r
+  UINT8                                                BootLun[8];\r
+  UINT8                                                CHAPType;\r
+  UINT8                                                NicIndex;\r
+  UINT16                                               IScsiNameLength;\r
+  UINT16                                               IScsiNameOffset;\r
+  UINT16                                               CHAPNameLength;\r
+  UINT16                                               CHAPNameOffset;\r
+  UINT16                                               CHAPSecretLength;\r
+  UINT16                                               CHAPSecretOffset;\r
+  UINT16                                               ReverseCHAPNameLength;\r
+  UINT16                                               ReverseCHAPNameOffset;\r
+  UINT16                                               ReverseCHAPSecretLength;\r
+  UINT16                                               ReverseCHAPSecretOffset;\r
+} EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE;\r
+\r
+#pragma pack()\r
+\r
+#endif\r
+\r
index 10ef37d..9c6564c 100644 (file)
@@ -136,6 +136,17 @@ typedef struct {
   SMBIOS_TABLE_STRING   SerialNumber;\r
   SMBIOS_TABLE_STRING   AssetTag;\r
   SMBIOS_TABLE_STRING   PartNumber;\r
+  //\r
+  // Add for smbios 2.5\r
+  //\r
+  UINT8                 CoreCount;\r
+  UINT8                 EnabledCoreCount;\r
+  UINT8                 ThreadCount;\r
+  UINT16                ProcessorCharacteristics;\r
+  //\r
+  // Add for smbios 2.6\r
+  //\r
+  UINT16                ProcessorFamily2;\r
 } SMBIOS_TABLE_TYPE4;\r
 \r
 typedef struct {\r
@@ -197,6 +208,12 @@ typedef struct {
   UINT16                SlotID;\r
   UINT8                 SlotCharacteristics1;\r
   UINT8                 SlotCharacteristics2;\r
+  //\r
+  // Add for smbios 2.6\r
+  //\r
+  UINT16                SegmentGroupNum;\r
+  UINT8                 BusNum;\r
+  UINT8                 DevFuncNum;\r
 } SMBIOS_TABLE_TYPE9;\r
 \r
 typedef struct {\r
@@ -286,6 +303,10 @@ typedef struct {
   SMBIOS_TABLE_STRING   SerialNumber;\r
   SMBIOS_TABLE_STRING   AssetTag;\r
   SMBIOS_TABLE_STRING   PartNumber;\r
+  //\r
+  // Add for smbios 2.6\r
+  //  \r
+  UINT8                 Attributes;\r
 } SMBIOS_TABLE_TYPE17;\r
 \r
 typedef struct {\r
@@ -516,6 +537,33 @@ typedef struct {
   UINT16                InputCurrentProbeHandle;\r
 } SMBIOS_TABLE_TYPE39;\r
 \r
+//\r
+// Add type 40 and type 41 for smbios 2.6\r
+//\r
+typedef struct {                       \r
+  UINT8                   EntryLength; \r
+  UINT16                  ReferencedHandle;\r
+  UINT8                   ReferencedOffset;\r
+  SMBIOS_TABLE_STRING     EntryString;\r
+  UINT8                   Value[1];\r
+}ADDITIONAL_INFORMATION_ENTRY;\r
+\r
+typedef struct {\r
+  SMBIOS_TABLE_HEADER                   Hdr;\r
+  UINT8                                 NumberOfAdditionalInformationEntries;\r
+  ADDITIONAL_INFORMATION_ENTRY          AdditionalInfoEntries[1];  \r
+} SMBIOS_TABLE_TYPE40;\r
+\r
+typedef struct {\r
+  SMBIOS_TABLE_HEADER     Hdr;\r
+  SMBIOS_TABLE_STRING     ReferenceDesignation;\r
+  UINT8                   DeviceType;\r
+  UINT8                   DeviceTypeInstance;\r
+  UINT16                  SegmentGroupNum;\r
+  UINT8                   BusNum;\r
+  UINT8                   DevFuncNum;  \r
+} SMBIOS_TABLE_TYPE41;\r
+\r
 typedef struct {\r
   SMBIOS_TABLE_HEADER   Hdr;\r
 } SMBIOS_TABLE_TYPE126;\r
@@ -566,6 +614,8 @@ typedef union {
   SMBIOS_TABLE_TYPE37   *Type37;\r
   SMBIOS_TABLE_TYPE38   *Type38;\r
   SMBIOS_TABLE_TYPE39   *Type39;\r
+  SMBIOS_TABLE_TYPE40   *Type40;\r
+  SMBIOS_TABLE_TYPE41   *Type41;\r
   SMBIOS_TABLE_TYPE126  *Type126;\r
   SMBIOS_TABLE_TYPE127  *Type127;\r
   UINT8                 *Raw;\r
index 8ccfd11..f3858ed 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -14,7 +14,7 @@ Module Name:
     usb.h\r
 \r
 Abstract:\r
-    Support for USB 1.1 standard.\r
+    Support for USB standard.\r
 \r
 \r
 \r
@@ -23,8 +23,237 @@ Revision History
 \r
 --*/\r
 \r
-#ifndef _USB_H\r
-#define _USB_H\r
+#ifndef _USB_INDUSTRY_H_\r
+#define _USB_INDUSTRY_H_\r
+\r
+//\r
+// USB Transfer Results\r
+//\r
+#define EFI_USB_NOERROR             0x00\r
+#define EFI_USB_ERR_NOTEXECUTE      0x01\r
+#define EFI_USB_ERR_STALL           0x02\r
+#define EFI_USB_ERR_BUFFER          0x04\r
+#define EFI_USB_ERR_BABBLE          0x08\r
+#define EFI_USB_ERR_NAK             0x10\r
+#define EFI_USB_ERR_CRC             0x20\r
+#define EFI_USB_ERR_TIMEOUT         0x40\r
+#define EFI_USB_ERR_BITSTUFF        0x80\r
+#define EFI_USB_ERR_SYSTEM          0x100\r
+\r
+//\r
+// Constant value for Port Status & Port Change Status\r
+//\r
+#define USB_PORT_STAT_CONNECTION    0x0001\r
+#define USB_PORT_STAT_ENABLE        0x0002\r
+#define USB_PORT_STAT_SUSPEND       0x0004\r
+#define USB_PORT_STAT_OVERCURRENT   0x0008\r
+#define USB_PORT_STAT_RESET         0x0010\r
+#define USB_PORT_STAT_POWER         0x0100\r
+#define USB_PORT_STAT_LOW_SPEED     0x0200\r
+#define USB_PORT_STAT_HIGH_SPEED    0x0400\r
+#define USB_PORT_STAT_OWNER         0x0800\r
+\r
+#define USB_PORT_STAT_C_CONNECTION  0x0001\r
+#define USB_PORT_STAT_C_ENABLE      0x0002\r
+#define USB_PORT_STAT_C_SUSPEND     0x0004\r
+#define USB_PORT_STAT_C_OVERCURRENT 0x0008\r
+#define USB_PORT_STAT_C_RESET       0x0010\r
+\r
+//\r
+// Usb data transfer direction\r
+//\r
+typedef enum {\r
+  EfiUsbDataIn,\r
+  EfiUsbDataOut,\r
+  EfiUsbNoData\r
+} EFI_USB_DATA_DIRECTION;\r
+\r
+//\r
+// Usb data recipient type\r
+//\r
+typedef enum {\r
+  EfiUsbDevice,\r
+  EfiUsbInterface,\r
+  EfiUsbEndpoint\r
+} EFI_USB_RECIPIENT;\r
+\r
+//\r
+// Usb port features\r
+//\r
+typedef enum {\r
+  EfiUsbPortEnable            = 1,\r
+  EfiUsbPortSuspend           = 2,\r
+  EfiUsbPortReset             = 4,\r
+  EfiUsbPortPower             = 8,\r
+  EfiUsbPortOwner             = 13,\r
+  EfiUsbPortConnectChange     = 16,\r
+  EfiUsbPortEnableChange      = 17,\r
+  EfiUsbPortSuspendChange     = 18,\r
+  EfiUsbPortOverCurrentChange = 19,\r
+  EfiUsbPortResetChange       = 20\r
+} EFI_USB_PORT_FEATURE;\r
+\r
+//\r
+// Following are definitions not specified by UEFI spec.\r
+// Add new definitions below this line\r
+//\r
+enum {\r
+  //\r
+  // USB request type\r
+  //\r
+  USB_REQ_TYPE_STANDARD   = (0x00 << 5),\r
+  USB_REQ_TYPE_CLASS      = (0x01 << 5),\r
+  USB_REQ_TYPE_VENDOR     = (0x02 << 5),\r
+\r
+  //\r
+  // Standard control transfer request type, or the value \r
+  // to fill in EFI_USB_DEVICE_REQUEST.Request\r
+  //\r
+  USB_REQ_GET_STATUS      = 0x00,\r
+  USB_REQ_CLEAR_FEATURE   = 0x01,\r
+  USB_REQ_SET_FEATURE     = 0x03,\r
+  USB_REQ_SET_ADDRESS     = 0x05,\r
+  USB_REQ_GET_DESCRIPTOR  = 0x06,\r
+  USB_REQ_SET_DESCRIPTOR  = 0x07,\r
+  USB_REQ_GET_CONFIG      = 0x08,\r
+  USB_REQ_SET_CONFIG      = 0x09,\r
+  USB_REQ_GET_INTERFACE   = 0x0A,\r
+  USB_REQ_SET_INTERFACE   = 0x0B,\r
+  USB_REQ_SYNCH_FRAME     = 0x0C,\r
+\r
+  //\r
+  // Usb control transfer target \r
+  //\r
+  USB_TARGET_DEVICE       = 0,\r
+  USB_TARGET_INTERFACE    = 0x01,\r
+  USB_TARGET_ENDPOINT     = 0x02,\r
+  USB_TARGET_OTHER        = 0x03,\r
+\r
+  //\r
+  // USB Descriptor types\r
+  //\r
+  USB_DESC_TYPE_DEVICE    = 0x01,\r
+  USB_DESC_TYPE_CONFIG    = 0x02,\r
+  USB_DESC_TYPE_STRING    = 0x03,\r
+  USB_DESC_TYPE_INTERFACE = 0x04,\r
+  USB_DESC_TYPE_ENDPOINT  = 0x05,\r
+  USB_DESC_TYPE_HID       = 0x21,\r
+\r
+  //\r
+  // Features to be cleared by CLEAR_FEATURE requests\r
+  //\r
+  USB_FEATURE_ENDPOINT_HALT = 0,\r
+  \r
+  //\r
+  // USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt\r
+  // \r
+  USB_ENDPOINT_CONTROL    = 0x00,\r
+  USB_ENDPOINT_ISO        = 0x01,\r
+  USB_ENDPOINT_BULK       = 0x02,\r
+  USB_ENDPOINT_INTERRUPT  = 0x03,\r
+\r
+  USB_ENDPOINT_TYPE_MASK  = 0x03,\r
+  USB_ENDPOINT_DIR_IN     = 0x80,\r
+\r
+  MAXBYTES                = 8,\r
+  \r
+  //\r
+  //Use 200 ms to increase the error handling response time\r
+  //\r
+  EFI_USB_INTERRUPT_DELAY = 2000000,\r
+};\r
+\r
+\r
+//\r
+// USB standard descriptors and reqeust \r
+//\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+  UINT8           RequestType;\r
+  UINT8           Request;\r
+  UINT16          Value;\r
+  UINT16          Index;\r
+  UINT16          Length;\r
+} EFI_USB_DEVICE_REQUEST;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  UINT16          BcdUSB;\r
+  UINT8           DeviceClass;\r
+  UINT8           DeviceSubClass;\r
+  UINT8           DeviceProtocol;\r
+  UINT8           MaxPacketSize0;\r
+  UINT16          IdVendor;\r
+  UINT16          IdProduct;\r
+  UINT16          BcdDevice;\r
+  UINT8           StrManufacturer;\r
+  UINT8           StrProduct;\r
+  UINT8           StrSerialNumber;\r
+  UINT8           NumConfigurations;\r
+} EFI_USB_DEVICE_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  UINT16          TotalLength;\r
+  UINT8           NumInterfaces;\r
+  UINT8           ConfigurationValue;\r
+  UINT8           Configuration;\r
+  UINT8           Attributes;\r
+  UINT8           MaxPower;\r
+} EFI_USB_CONFIG_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  UINT8           InterfaceNumber;\r
+  UINT8           AlternateSetting;\r
+  UINT8           NumEndpoints;\r
+  UINT8           InterfaceClass;\r
+  UINT8           InterfaceSubClass;\r
+  UINT8           InterfaceProtocol;\r
+  UINT8           Interface;\r
+} EFI_USB_INTERFACE_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  UINT8           EndpointAddress;\r
+  UINT8           Attributes;\r
+  UINT16          MaxPacketSize;\r
+  UINT8           Interval;\r
+} EFI_USB_ENDPOINT_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  CHAR16          String[1];\r
+} EFI_USB_STRING_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  UINT16          PortStatus;\r
+  UINT16          PortChangeStatus;\r
+} EFI_USB_PORT_STATUS;\r
+\r
+typedef struct {\r
+  UINT8           Length;\r
+  UINT8           DescriptorType;\r
+  UINT8           NbrPorts;\r
+  UINT8           HubCharacteristics[2];\r
+  UINT8           PwrOn2PwrGood;\r
+  UINT8           HubContrCurrent;\r
+  UINT8           Filler[MAXBYTES];\r
+} EFI_USB_HUB_DESCRIPTOR;\r
+\r
+#pragma pack()\r
+\r
+\r
+///////////////////////////////////////////////////////////////////////////\r
+///////////////////      Backward Compatibility         ///////////////////\r
+///////////////////////////////////////////////////////////////////////////\r
+\r
 //\r
 // USB Descriptor types\r
 //\r
@@ -61,161 +290,35 @@ Revision History
 #define USB_RT_HUB        (USB_TYPE_CLASS | USB_RECIP_DEVICE)\r
 #define USB_RT_PORT       (USB_TYPE_CLASS | USB_RECIP_OTHER)\r
 \r
-//\r
-// USB Transfer Results\r
-//\r
-#define EFI_USB_NOERROR         0x00\r
-#define EFI_USB_ERR_NOTEXECUTE  0x01\r
-#define EFI_USB_ERR_STALL       0x02\r
-#define EFI_USB_ERR_BUFFER      0x04\r
-#define EFI_USB_ERR_BABBLE      0x08\r
-#define EFI_USB_ERR_NAK         0x10\r
-#define EFI_USB_ERR_CRC         0x20\r
-#define EFI_USB_ERR_TIMEOUT     0x40\r
-#define EFI_USB_ERR_BITSTUFF    0x80\r
-#define EFI_USB_ERR_SYSTEM      0x100\r
-\r
-//\r
-//Use 200 ms to increase the error handling response time\r
-//\r
-#define EFI_USB_INTERRUPT_DELAY 2000000\r
-\r
-//\r
-// USB transation direction\r
-//\r
-typedef enum {\r
-  EfiUsbDataIn,\r
-  EfiUsbDataOut,\r
-  EfiUsbNoData\r
-} EFI_USB_DATA_DIRECTION;\r
-\r
-//\r
-// Usb Data recipient type\r
-//\r
-typedef enum {\r
-  EfiUsbDevice,\r
-  EfiUsbInterface,\r
-  EfiUsbEndpoint\r
-} EFI_USB_RECIPIENT;\r
-\r
 typedef enum {\r
   EfiUsbEndpointHalt,\r
   EfiUsbDeviceRemoteWakeup\r
 } EFI_USB_STANDARD_FEATURE_SELECTOR;\r
 \r
-#pragma pack(1)\r
-//\r
-// Usb device request structure\r
-//\r
-typedef struct {\r
-  UINT8   RequestType;\r
-  UINT8   Request;\r
-  UINT16  Value;\r
-  UINT16  Index;\r
-  UINT16  Length;\r
-} EFI_USB_DEVICE_REQUEST;\r
-\r
 //\r
 // Standard USB request\r
 //\r
 #define USB_DEV_GET_STATUS                  0x00\r
-\r
 #define USB_DEV_CLEAR_FEATURE               0x01\r
-\r
 #define USB_DEV_SET_FEATURE                 0x03\r
-\r
 #define USB_DEV_SET_ADDRESS                 0x05\r
 #define USB_DEV_SET_ADDRESS_REQ_TYPE        0x00\r
-\r
 #define USB_DEV_GET_DESCRIPTOR              0x06\r
 #define USB_DEV_GET_DESCRIPTOR_REQ_TYPE     0x80\r
-\r
 #define USB_DEV_SET_DESCRIPTOR              0x07\r
 #define USB_DEV_SET_DESCRIPTOR_REQ_TYPE     0x00\r
-\r
 #define USB_DEV_GET_CONFIGURATION           0x08\r
 #define USB_DEV_GET_CONFIGURATION_REQ_TYPE  0x80\r
-\r
 #define USB_DEV_SET_CONFIGURATION           0x09\r
 #define USB_DEV_SET_CONFIGURATION_REQ_TYPE  0x00\r
-\r
 #define USB_DEV_GET_INTERFACE               0x0A\r
 #define USB_DEV_GET_INTERFACE_REQ_TYPE      0x81\r
-\r
 #define USB_DEV_SET_INTERFACE               0x0B\r
 #define USB_DEV_SET_INTERFACE_REQ_TYPE      0x01\r
-\r
 #define USB_DEV_SYNCH_FRAME                 0x0C\r
 #define USB_DEV_SYNCH_FRAME_REQ_TYPE        0x82\r
 \r
-//\r
-// Device descriptor. refer USB1.1\r
-//\r
-typedef struct usb_device_descriptor {\r
-  UINT8   Length;\r
-  UINT8   DescriptorType;\r
-  UINT16  BcdUSB;\r
-  UINT8   DeviceClass;\r
-  UINT8   DeviceSubClass;\r
-  UINT8   DeviceProtocol;\r
-  UINT8   MaxPacketSize0;\r
-  UINT16  IdVendor;\r
-  UINT16  IdProduct;\r
-  UINT16  BcdDevice;\r
-  UINT8   StrManufacturer;\r
-  UINT8   StrProduct;\r
-  UINT8   StrSerialNumber;\r
-  UINT8   NumConfigurations;\r
-} EFI_USB_DEVICE_DESCRIPTOR;\r
-\r
-//\r
-// Endpoint descriptor\r
-//\r
-typedef struct {\r
-  UINT8   Length;\r
-  UINT8   DescriptorType;\r
-  UINT8   EndpointAddress;\r
-  UINT8   Attributes;\r
-  UINT16  MaxPacketSize;\r
-  UINT8   Interval;\r
-} EFI_USB_ENDPOINT_DESCRIPTOR;\r
-\r
-//\r
-// Interface descriptor\r
-//\r
-typedef struct {\r
-  UINT8 Length;\r
-  UINT8 DescriptorType;\r
-  UINT8 InterfaceNumber;\r
-  UINT8 AlternateSetting;\r
-  UINT8 NumEndpoints;\r
-  UINT8 InterfaceClass;\r
-  UINT8 InterfaceSubClass;\r
-  UINT8 InterfaceProtocol;\r
-  UINT8 Interface;\r
-} EFI_USB_INTERFACE_DESCRIPTOR;\r
-\r
-//\r
-// USB alternate setting\r
-//\r
-typedef struct {\r
-  EFI_USB_INTERFACE_DESCRIPTOR  *Interface;\r
-} USB_ALT_SETTING;\r
-\r
-//\r
-// Configuration descriptor\r
-//\r
-typedef struct {\r
-  UINT8   Length;\r
-  UINT8   DescriptorType;\r
-  UINT16  TotalLength;\r
-  UINT8   NumInterfaces;\r
-  UINT8   ConfigurationValue;\r
-  UINT8   Configuration;\r
-  UINT8   Attributes;\r
-  UINT8   MaxPower;\r
-} EFI_USB_CONFIG_DESCRIPTOR;\r
-\r
+#pragma pack(1)\r
 //\r
 // Supported String Languages\r
 //\r
@@ -226,68 +329,16 @@ typedef struct {
 } EFI_USB_SUPPORTED_LANGUAGES;\r
 \r
 //\r
-// String descriptor\r
-//\r
-typedef struct {\r
-  UINT8   Length;\r
-  UINT8   DescriptorType;\r
-  CHAR16  String[1];\r
-} EFI_USB_STRING_DESCRIPTOR;\r
-\r
-//\r
-// Hub descriptor\r
+// USB alternate setting\r
 //\r
-#define MAXBYTES  8\r
-typedef struct {\r
-  UINT8 Length;\r
-  UINT8 DescriptorType;\r
-  UINT8 NbrPorts;\r
-  UINT8 HubCharacteristics[2];\r
-  UINT8 PwrOn2PwrGood;\r
-  UINT8 HubContrCurrent;\r
-  UINT8 Filler[MAXBYTES];\r
-} EFI_USB_HUB_DESCRIPTOR;\r
-\r
 typedef struct {\r
-  UINT16  PortStatus;\r
-  UINT16  PortChangeStatus;\r
-} EFI_USB_PORT_STATUS;\r
-\r
-//\r
-// Constant value for Port Status & Port Change Status\r
-//\r
-#define USB_PORT_STAT_CONNECTION    0x0001\r
-#define USB_PORT_STAT_ENABLE        0x0002\r
-#define USB_PORT_STAT_SUSPEND       0x0004\r
-#define USB_PORT_STAT_OVERCURRENT   0x0008\r
-#define USB_PORT_STAT_RESET         0x0010\r
-#define USB_PORT_STAT_POWER         0x0100\r
-#define USB_PORT_STAT_LOW_SPEED     0x0200\r
-#define USB_PORT_STAT_HIGH_SPEED    0x0400\r
-#define USB_PORT_STAT_OWNER         0x0800\r
-\r
-#define USB_PORT_STAT_C_CONNECTION  0x0001\r
-#define USB_PORT_STAT_C_ENABLE      0x0002\r
-#define USB_PORT_STAT_C_SUSPEND     0x0004\r
-#define USB_PORT_STAT_C_OVERCURRENT 0x0008\r
-#define USB_PORT_STAT_C_RESET       0x0010\r
-\r
-//\r
-// Used for set/clear port feature request\r
-//\r
-typedef enum {\r
-  EfiUsbPortEnable            = 1,\r
-  EfiUsbPortSuspend           = 2,\r
-  EfiUsbPortReset             = 4,\r
-  EfiUsbPortPower             = 8,\r
-  EfiUsbPortOwner             = 13,\r
-  EfiUsbPortConnectChange     = 16,\r
-  EfiUsbPortEnableChange      = 17,\r
-  EfiUsbPortSuspendChange     = 18,\r
-  EfiUsbPortOverCurrentChange = 19,\r
-  EfiUsbPortResetChange       = 20\r
-} EFI_USB_PORT_FEATURE;\r
+  EFI_USB_INTERFACE_DESCRIPTOR  *Interface;\r
+} USB_ALT_SETTING;\r
 \r
 #pragma pack()\r
 \r
+///////////////////////////////////////////////////////////////////////////\r
+///////////////////////////////////////////////////////////////////////////\r
+///////////////////////////////////////////////////////////////////////////\r
+\r
 #endif\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h b/edk2/EdkCompatibilityPkg/Foundation/Include/Pei/PeiPerf.h
new file mode 100644 (file)
index 0000000..5b86d83
--- /dev/null
@@ -0,0 +1,66 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+ PeiPerf.h\r
+\r
+Abstract:\r
\r
+ PeiPerf.h provides performance primitives for PEI modules\r
+\r
\r
+--*/\r
+\r
+#ifndef _PEI_PERF_H_\r
+#define _PEI_PERF_H_\r
+\r
+VOID\r
+EFIAPI\r
+PeiPerfMeasure (\r
+  EFI_PEI_SERVICES              **PeiServices,\r
+  IN UINT16                     *Token,\r
+  IN EFI_FFS_FILE_HEADER        *FileHeader,\r
+  IN BOOLEAN                    EntryExit,\r
+  IN UINT64                     Value\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Log a timestamp count.\r
+\r
+Arguments:\r
+\r
+  PeiServices - Pointer to the PEI Core Services table\r
+  \r
+  Token       - Pointer to Token Name\r
+  \r
+  FileHeader  - Pointer to the file header\r
+\r
+  EntryExit   - Indicates start or stop measurement\r
+\r
+  Value       - The start time or the stop time\r
+\r
+Returns:\r
+\r
+--*/\r
+;\r
+\r
+#ifdef EFI_PEI_PERFORMANCE\r
+#define PEI_PERF_START(Ps, Token, FileHeader, Value)  PeiPerfMeasure (Ps, Token, FileHeader, FALSE, Value)\r
+#define PEI_PERF_END(Ps, Token, FileHeader, Value)    PeiPerfMeasure (Ps, Token, FileHeader, TRUE, Value)\r
+#else\r
+#define PEI_PERF_START(Ps, Token, FileHeader, Value)\r
+#define PEI_PERF_END(Ps, Token, FileHeader, Value)\r
+#endif\r
+\r
+#endif\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Include/TianoHii.h b/edk2/EdkCompatibilityPkg/Foundation/Include/TianoHii.h
new file mode 100644 (file)
index 0000000..edce81e
--- /dev/null
@@ -0,0 +1,118 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  TianoHii.h\r
+\r
+Abstract:\r
+\r
+  Tiano specific HII relative definition.\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#ifndef _TIANO_HII_H_\r
+#define _TIANO_HII_H_\r
+\r
+#include "EfiHii.h"\r
+\r
+#define NARROW_CHAR         0xFFF0\r
+#define WIDE_CHAR           0xFFF1\r
+#define NON_BREAKING_CHAR   0xFFF2\r
+\r
+#define GLYPH_WIDTH         EFI_GLYPH_WIDTH\r
+#define GLYPH_HEIGHT        EFI_GLYPH_HEIGHT\r
+\r
+//\r
+// State defined for password statemachine \r
+//\r
+#define BROWSER_STATE_VALIDATE_PASSWORD  0\r
+#define BROWSER_STATE_SET_PASSWORD       1\r
+\r
+//\r
+// References to string tokens must use this macro to enable scanning for\r
+// token usages.\r
+//\r
+#define STRING_TOKEN(t) t\r
+\r
+//\r
+// GUIDed opcodes defined for Tiano\r
+//\r
+#define EFI_IFR_TIANO_GUID \\r
+  { 0xf0b1735, 0x87a0, 0x4193, 0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce }\r
+\r
+#pragma pack(1)\r
+\r
+#define EFI_IFR_EXTEND_OP_LABEL       0x0\r
+#define EFI_IFR_EXTEND_OP_BANNER      0x1\r
+#define EFI_IFR_EXTEND_OP_TIMEOUT     0x2\r
+#define EFI_IFR_EXTEND_OP_CLASS       0x3\r
+#define EFI_IFR_EXTEND_OP_SUBCLASS    0x4\r
+\r
+typedef struct _EFI_IFR_GUID_LABEL {\r
+  EFI_IFR_OP_HEADER   Header;\r
+  EFI_GUID            Guid;\r
+  UINT8               ExtendOpCode;\r
+  UINT16              Number;\r
+} EFI_IFR_GUID_LABEL;\r
+\r
+#define EFI_IFR_BANNER_ALIGN_LEFT     0\r
+#define EFI_IFR_BANNER_ALIGN_CENTER   1\r
+#define EFI_IFR_BANNER_ALIGN_RIGHT    2\r
+\r
+typedef struct _EFI_IFR_GUID_BANNER {\r
+  EFI_IFR_OP_HEADER   Header;\r
+  EFI_GUID            Guid;\r
+  UINT8               ExtendOpCode; // Extended opcode is EFI_IFR_EXTEND_OP_BANNER\r
+  EFI_STRING_ID       Title;        // The string token for the banner title\r
+  UINT16              LineNumber;   // 1-based line number\r
+  UINT8               Alignment;    // left, center, or right-aligned\r
+} EFI_IFR_GUID_BANNER;\r
+\r
+typedef struct _EFI_IFR_GUID_TIMEOUT {\r
+  EFI_IFR_OP_HEADER   Header;\r
+  EFI_GUID            Guid;\r
+  UINT8               ExtendOpCode;\r
+  UINT16              TimeOut;\r
+} EFI_IFR_GUID_TIMEOUT;\r
+\r
+#define EFI_NON_DEVICE_CLASS              0x00\r
+#define EFI_DISK_DEVICE_CLASS             0x01\r
+#define EFI_VIDEO_DEVICE_CLASS            0x02\r
+#define EFI_NETWORK_DEVICE_CLASS          0x04\r
+#define EFI_INPUT_DEVICE_CLASS            0x08\r
+#define EFI_ON_BOARD_DEVICE_CLASS         0x10\r
+#define EFI_OTHER_DEVICE_CLASS            0x20\r
+\r
+typedef struct _EFI_IFR_GUID_CLASS {\r
+  EFI_IFR_OP_HEADER   Header;\r
+  EFI_GUID            Guid;\r
+  UINT8               ExtendOpCode;\r
+  UINT16              Class;\r
+} EFI_IFR_GUID_CLASS;\r
+\r
+#define EFI_SETUP_APPLICATION_SUBCLASS    0x00\r
+#define EFI_GENERAL_APPLICATION_SUBCLASS  0x01\r
+#define EFI_FRONT_PAGE_SUBCLASS           0x02\r
+#define EFI_SINGLE_USE_SUBCLASS           0x03\r
+\r
+typedef struct _EFI_IFR_GUID_SUBCLASS {\r
+  EFI_IFR_OP_HEADER   Header;\r
+  EFI_GUID            Guid;\r
+  UINT8               ExtendOpCode;\r
+  UINT16              SubClass;\r
+} EFI_IFR_GUID_SUBCLASS;\r
+\r
+#pragma pack()\r
+\r
+#endif\r
index b80e6fa..aeb80b8 100644 (file)
 [defines]\r
 BASE_NAME       = CompilerStub\r
 COMPONENT_TYPE  = LIBRARY\r
-  \r
+\r
 [sources.common] \r
 \r
 [sources.ia32]\r
-  Ia32\memcpy.asm\r
-  Ia32\memset.asm\r
+  Ia32\memcpyRep1.asm\r
+  Ia32\memsetRep4.asm\r
+#  Ia32\memcpy.asm\r
+#  Ia32\memset.asm\r
   \r
 [sources.x64]  \r
-  x64\memcpy.asm\r
-  x64\memset.asm\r
+  x64\memcpyRep1.asm\r
+  x64\memsetRep4.asm\r
+#  x64\memcpy.asm\r
+#  x64\memset.asm\r
   \r
 [sources.Ipf]  \r
   memcpy.c\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep1.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep1.asm
new file mode 100644 (file)
index 0000000..aeebcfd
--- /dev/null
@@ -0,0 +1,61 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CopyMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   memcpy function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID *\r
+;  memcpy (\r
+;    IN VOID   *Destination,\r
+;    IN VOID   *Source,\r
+;    IN UINTN  Count\r
+;    );\r
+;------------------------------------------------------------------------------\r
+memcpy  PROC    USES    esi edi\r
+    mov     esi, [esp + 16]             ; esi <- Source\r
+    mov     edi, [esp + 12]             ; edi <- Destination\r
+    mov     edx, [esp + 20]             ; edx <- Count\r
+    cmp     esi, edi\r
+    je      @CopyDone\r
+    cmp     edx, 0\r
+    je      @CopyDone\r
+    lea     eax, [esi + edx - 1]         ; eax <- End of Source\r
+    cmp     esi, edi\r
+    jae     @F\r
+    cmp     eax, edi\r
+    jb      @F                           ; Copy backward if overlapped\r
+    mov     esi, eax                     ; esi <- End of Source\r
+    lea     edi, [edi + edx - 1]         ; edi <- End of Destination\r
+    std\r
+@@:\r
+    mov     ecx, edx\r
+    rep     movsb                        ; Copy bytes backward\r
+    cld\r
+@CopyDone:\r
+    mov     eax, [esp + 12]\r
+    ret\r
+memcpy  ENDP\r
+\r
+    END\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep4.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memcpyRep4.asm
new file mode 100644 (file)
index 0000000..d4cef09
--- /dev/null
@@ -0,0 +1,70 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CopyMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   memcpy function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .mmx\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID *\r
+;  memcpy (\r
+;    IN VOID   *Destination,\r
+;    IN VOID   *Source,\r
+;    IN UINTN  Count\r
+;    );\r
+;------------------------------------------------------------------------------\r
+memcpy  PROC    USES    esi edi\r
+    mov     esi, [esp + 16]             ; esi <- Source\r
+    mov     edi, [esp + 12]             ; edi <- Destination\r
+    mov     edx, [esp + 20]             ; edx <- Count\r
+    cmp     esi, edi\r
+    je      @CopyDone\r
+    cmp     edx, 0\r
+    je      @CopyDone\r
+    lea     eax, [esi + edx - 1]         ; eax <- End of Source\r
+    cmp     esi, edi\r
+    jae     @F\r
+    cmp     eax, edi\r
+    jae     @CopyBackward                ; Copy backward if overlapped\r
+@@:\r
+    mov     ecx, edx\r
+    and     edx, 3\r
+    shr     ecx, 2\r
+    rep     movsd                        ; Copy as many Dwords as possible\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     esi, eax                     ; esi <- End of Source\r
+    lea     edi, [edi + edx - 1]         ; edi <- End of Destination\r
+    std\r
+@CopyBytes:\r
+    mov     ecx, edx\r
+    rep     movsb                        ; Copy bytes backward\r
+    cld\r
+@CopyDone:\r
+    mov     eax, [esp + 12]\r
+    ret\r
+    \r
+memcpy  ENDP\r
+\r
+    END\r
@@ -1,19 +1,21 @@
-; Copyright (c) 2004, Intel Corporation                                                         \r
-; All rights reserved. This program and the accompanying materials                          \r
-; are licensed and made available under the terms and conditions of the BSD License         \r
-; which accompanies this distribution.  The full text of the license may be found at        \r
-; http://opensource.org/licenses/bsd-license.php                                            \r
-;                                                                                           \r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 ;\r
 ; Module Name:\r
 ;\r
-;   CpuPause.Asm\r
+;   SetMem.asm\r
 ;\r
 ; Abstract:\r
 ;\r
-;   CpuPause function\r
+;   memset function\r
 ;\r
 ; Notes:\r
 ;\r
 \r
     .686\r
     .model  flat,C\r
-    .xmm\r
     .code\r
 \r
 ;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuPause (\r
-;   VOID\r
-;   );\r
+;  VOID *\r
+;  memset (\r
+;    OUT VOID   *Buffer,\r
+;    IN  UINT8  Value,\r
+;    IN  UINTN  Count\r
+;    )\r
 ;------------------------------------------------------------------------------\r
-CpuPause    PROC\r
-    pause\r
+memset   PROC    USES    edi\r
+    mov         ecx, [esp + 16]\r
+    test        ecx, ecx\r
+    je          @F\r
+    mov         al,  [esp + 12]\r
+    mov         edi, [esp + 8]\r
+    rep stosb\r
+@@:\r
+    mov         eax, [esp + 8]\r
     ret\r
-CpuPause    ENDP\r
+memset   ENDP\r
 \r
     END\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memsetRep4.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/Ia32/memsetRep4.asm
new file mode 100644 (file)
index 0000000..fadee23
--- /dev/null
@@ -0,0 +1,56 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   SetMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   memset function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .686\r
+    .model  flat,C\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID *\r
+;  memset (\r
+;    OUT VOID   *Buffer,\r
+;    IN  UINT8  Value,\r
+;    IN  UINTN  Count\r
+;    )\r
+;------------------------------------------------------------------------------\r
+memset   PROC    USES    edi\r
+    mov         ecx, [esp + 16]\r
+    test        ecx, ecx\r
+    je          @F\r
+    mov         al,  [esp + 12]\r
+    mov         ah,  al\r
+    shrd        edx, eax, 16\r
+    shld        eax, edx, 16\r
+    mov         edx, ecx\r
+    mov         edi, [esp + 8]\r
+    shr         ecx, 2\r
+    rep stosd\r
+    mov         ecx, edx\r
+    and         ecx, 3\r
+    rep stosb\r
+@@:\r
+    mov         eax, [esp + 8]\r
+    ret\r
+memset   ENDP\r
+\r
+    END\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep1.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep1.asm
new file mode 100644 (file)
index 0000000..72b8de3
--- /dev/null
@@ -0,0 +1,59 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   memcpyRep1.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; memcpy (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+memcpy  PROC    USES    rsi rdi\r
+    mov     rax, rcx\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jb      @F                          ; Copy backward if overlapped\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@@:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+memcpy  ENDP\r
+\r
+    END\r
+\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep4.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep4.asm
new file mode 100644 (file)
index 0000000..2cca1c3
--- /dev/null
@@ -0,0 +1,65 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   memcpyRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; memcpy (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+memcpy  PROC    USES    rsi rdi\r
+    mov     rax, rcx\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 3\r
+    shr     rcx, 2\r
+    rep     movsd                       ; Copy as many Dwords as possible\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+memcpy  ENDP\r
+\r
+    END\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep8.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memcpyRep8.asm
new file mode 100644 (file)
index 0000000..27b3ca5
--- /dev/null
@@ -0,0 +1,66 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   memcpyRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; memcpy (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+memcpy  PROC    USES    rsi rdi\r
+    mov     rax, rcx\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 7\r
+    shr     rcx, 3\r
+    rep     movsq                       ; Copy as many Qwords as possible\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+memcpy  ENDP\r
+\r
+    END\r
+\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep1.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep1.asm
new file mode 100644 (file)
index 0000000..9a4d673
--- /dev/null
@@ -0,0 +1,48 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   memsetRep1.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID *\r
+; memset (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+memset   PROC    USES    rdi\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    mov     r9,  rcx\r
+    je      @SetDone\r
+    mov     rax, r8\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    rep     stosb\r
+@SetDone:\r
+    mov     rax, r9\r
+    ret\r
+memset   ENDP\r
+\r
+    END\r
+\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep4.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep4.asm
new file mode 100644 (file)
index 0000000..6ef0036
--- /dev/null
@@ -0,0 +1,55 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   SetMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   memset function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID *\r
+;  memset (\r
+;    OUT VOID   *Buffer,\r
+;    IN  UINT8  Value,\r
+;    IN  UINTN  Count\r
+;    )\r
+;------------------------------------------------------------------------------\r
+memset   PROC    USES    rdi\r
+    cmp     r8, 0                      ; if Size == 0, do nothing\r
+    mov     r9,  rcx\r
+    je      @SetDone\r
+    mov     al,  dl\r
+    mov     ah,  al\r
+    shrd    edx, eax, 16\r
+    shld    eax, edx, 16\r
+    mov     rdi, rcx\r
+    mov     rcx, r8\r
+    shr     rcx, 2\r
+    rep     stosd\r
+    mov     rcx, r8\r
+    and     rcx, 3\r
+    rep     stosb\r
+@SetDone:\r
+    mov     rax, r9\r
+    ret\r
+memset   ENDP\r
+\r
+    END\r
+\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep8.asm b/edk2/EdkCompatibilityPkg/Foundation/Library/CompilerStub/x64/memsetRep8.asm
new file mode 100644 (file)
index 0000000..16cb026
--- /dev/null
@@ -0,0 +1,60 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   memsetRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; memset (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINT8                     Value,\r
+;   IN      UINTN                     Length\r
+;   );\r
+;------------------------------------------------------------------------------\r
+memset   PROC    USES    rdi rbx\r
+    cmp     r8, 0                      ; if Size == 0, do nothing\r
+    mov     r9,  rcx\r
+    je      @SetDone\r
+    mov     rax, rdx\r
+    mov     bl,  al\r
+    mov     bh,  bl\r
+    mov     ax,  bx\r
+    shl     rax, 10h\r
+    mov     ax,  bx\r
+    mov     ebx, eax\r
+    shl     rax, 20h\r
+    mov     eax, ebx\r
+    mov     rdi, rcx\r
+    mov     rcx, r8\r
+    shr     rcx, 3\r
+    rep     stosq\r
+    mov     rcx, rdx\r
+    and     rcx, 7\r
+    rep     stosb\r
+@SetDone:\r
+    mov     rax, r9\r
+    ret\r
+memset   ENDP\r
+\r
+    END\r
+\r
index 49720ec..e31546f 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -24,6 +24,7 @@ Abstract:
 EFI_BOOT_SCRIPT_SAVE_PROTOCOL *mBootScriptSave;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveInitialize (\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
@@ -60,6 +61,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveIoWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -109,6 +111,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveIoReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -158,6 +161,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveMemWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -207,6 +211,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveMemReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -256,6 +261,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSavePciCfgWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -305,6 +311,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSavePciCfgReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -354,6 +361,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveSmbusExecute (\r
   IN  UINT16                            TableName,\r
   IN  EFI_SMBUS_DEVICE_ADDRESS          SlaveAddress,\r
@@ -409,6 +417,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveStall (\r
   IN  UINT16                            TableName,\r
   IN  UINTN                             Duration\r
@@ -449,6 +458,7 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveDispatch (\r
   IN  UINT16                            TableName,\r
   IN  EFI_PHYSICAL_ADDRESS              EntryPoint\r
@@ -486,6 +496,61 @@ Returns:
 \r
 }\r
 \r
+EFI_STATUS\r
+EFIAPI\r
+BootScriptMemPoll (\r
+  IN  UINT16                            TableName,\r
+  IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
+  IN  UINT64                            Address,\r
+  IN  VOID                              *BitMask,\r
+  IN  VOID                              *BitValue,\r
+  IN  UINTN                             Duration,\r
+  IN  UINTN                             LoopTimes\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Save I/O write to boot script \r
+\r
+Arguments:\r
+  TableName - Desired boot script table\r
+\r
+  Width     - The width of the memory operations.\r
+  \r
+  Address   - The base address of the memory operations.\r
+  \r
+  BitMask   - A pointer to the bit mask to be AND-ed with the data read from the register.\r
+\r
+  BitValue  - A pointer to the data value after to be Masked.\r
+\r
+  Duration  - Duration in microseconds of the stall.\r
+  \r
+  LoopTimes - The times of the register polling.\r
+\r
+Returns: \r
+  \r
+  EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
+  \r
+  EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
+\r
+--*/\r
+{\r
+  mBootScriptSave->Write (\r
+                    mBootScriptSave,\r
+                    TableName,\r
+                    EFI_BOOT_SCRIPT_MEM_POLL_OPCODE,\r
+                    Width,\r
+                    Address,\r
+                    BitMask,\r
+                    BitValue,\r
+                    Duration,\r
+                    LoopTimes\r
+                    );\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 BootScriptSaveInformation (\r
index 80d9b72..2a42302 100644 (file)
@@ -100,7 +100,7 @@ Returns:
 {\r
   return GetImageEx (\r
            ImageHandle,\r
-           &gEfiDefaultBmpLogoGuid,\r
+           FileNameGuid,\r
            EFI_SECTION_RAW,\r
            Image,\r
            ImageSize,\r
index 5cbcb53..3b63433 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -59,7 +59,11 @@ Abstract:
 #include "PrintWidth.h"\r
 #include "EfiPrintLib.h"\r
 #include "Print.h"\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+#include EFI_PROTOCOL_DEFINITION (HiiFont)\r
+#else\r
 #include EFI_PROTOCOL_DEFINITION (Hii)\r
+#endif\r
 \r
 STATIC\r
 CHAR_W                *\r
@@ -161,22 +165,26 @@ Returns:
 {\r
   VOID                           *Buffer;\r
   EFI_STATUS                     Status;\r
-  UINT16                         GlyphWidth;\r
-  UINT32                         GlyphStatus;\r
-  UINT16                         StringIndex;\r
   UINTN                          Index;\r
   CHAR16                         *UnicodeWeight;\r
-  EFI_NARROW_GLYPH               *Glyph;\r
-  EFI_HII_PROTOCOL               *Hii;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *LineBuffer;\r
   UINT32                         HorizontalResolution;\r
   UINT32                         VerticalResolution;\r
   UINT32                         ColorDepth;\r
   UINT32                         RefreshRate;\r
   UINTN                          BufferLen;\r
   UINTN                          LineBufferLen;\r
-\r
-  GlyphStatus = 0;\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  EFI_HII_FONT_PROTOCOL          *HiiFont;\r
+  EFI_IMAGE_OUTPUT               *Blt;\r
+  EFI_FONT_DISPLAY_INFO          *FontInfo;  \r
+#else\r
+  EFI_HII_PROTOCOL               *Hii;\r
+  UINT16                         GlyphWidth;\r
+  UINT32                         GlyphStatus;\r
+  UINT16                         StringIndex;\r
+  EFI_NARROW_GLYPH               *Glyph;\r
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *LineBuffer;\r
+#endif\r
 \r
   //\r
   // For now, allocate an arbitrarily long buffer\r
@@ -192,19 +200,29 @@ Returns:
   } else {\r
     UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate);\r
   }\r
-  ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0));\r
-  \r
-  LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * GLYPH_HEIGHT;\r
-  LineBuffer = EfiLibAllocatePool (LineBufferLen);\r
-  if (LineBuffer == NULL) {\r
-    gBS->FreePool (Buffer);\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
+  ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0)); \r
 \r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  Blt      = NULL;\r
+  FontInfo = NULL;\r
+  ASSERT (GraphicsOutput != NULL);\r
+  Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont);\r
+  if (EFI_ERROR (Status)) {\r
+    goto Error;\r
+  }  \r
+#else  \r
+  LineBuffer = NULL;\r
   Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, (VOID**)&Hii);\r
   if (EFI_ERROR (Status)) {\r
     goto Error;\r
   }\r
+  LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * GLYPH_HEIGHT;\r
+  LineBuffer = EfiLibAllocatePool (LineBufferLen);\r
+  if (LineBuffer == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Error;\r
+  }  \r
+#endif\r
 \r
   VSPrint (Buffer, 0x10000, fmt, args);\r
   \r
@@ -219,7 +237,65 @@ Returns:
   }\r
 \r
   BufferLen = EfiStrLen (Buffer);\r
\r
+\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;\r
+  if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {\r
+     Status = EFI_INVALID_PARAMETER;\r
+     goto Error;\r
+  }\r
+\r
+  Blt = (EFI_IMAGE_OUTPUT *) EfiLibAllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT));\r
+  if (Blt == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Error;\r
+  }\r
+\r
+  Blt->Width        = (UINT16) (HorizontalResolution);\r
+  Blt->Height       = (UINT16) (VerticalResolution);\r
+  Blt->Image.Screen = GraphicsOutput;\r
+   \r
+  FontInfo = (EFI_FONT_DISPLAY_INFO *) EfiLibAllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));\r
+  if (FontInfo == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Error;\r
+  }\r
+  if (Foreground != NULL) {\r
+    EfiCopyMem (&FontInfo->ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
+  } else {\r
+    EfiCopyMem (\r
+      &FontInfo->ForegroundColor, \r
+      &mEfiColors[Sto->Mode->Attribute & 0x0f], \r
+      sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+      );\r
+  }\r
+  if (Background != NULL) {\r
+    EfiCopyMem (&FontInfo->BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
+  } else {\r
+    EfiCopyMem (\r
+      &FontInfo->BackgroundColor, \r
+      &mEfiColors[Sto->Mode->Attribute >> 4], \r
+      sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+      );\r
+  }\r
+\r
+  Status = HiiFont->StringToImage (\r
+                       HiiFont,\r
+                       EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN,\r
+                       Buffer,\r
+                       FontInfo,\r
+                       &Blt,\r
+                       X,\r
+                       Y,\r
+                       NULL,\r
+                       NULL,\r
+                       NULL\r
+                       );\r
   \r
+#else\r
+  GlyphStatus = 0;\r
+\r
   if (GLYPH_WIDTH * GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {\r
      Status = EFI_INVALID_PARAMETER;\r
      goto Error;\r
@@ -288,8 +364,15 @@ Returns:
                         );\r
   }\r
 \r
+#endif\r
+\r
 Error:\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  EfiLibSafeFreePool (Blt);\r
+  EfiLibSafeFreePool (FontInfo);\r
+#else\r
   gBS->FreePool (LineBuffer);\r
+#endif  \r
   gBS->FreePool (Buffer);\r
   return Status;\r
 }\r
@@ -417,6 +500,7 @@ Returns:
 }\r
 \r
 UINTN\r
+EFIAPI\r
 VSPrint (\r
   OUT CHAR_W        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
index 0cae8e9..82933a5 100644 (file)
@@ -101,7 +101,7 @@ Returns:
 {\r
   return GetImageEx (\r
            ImageHandle,\r
-           &gEfiDefaultBmpLogoGuid,\r
+           FileNameGuid,\r
            EFI_SECTION_RAW,\r
            Image,\r
            ImageSize,\r
index 94a1adb..2f29293 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -59,7 +59,11 @@ Abstract:
 #include "PrintWidth.h"\r
 #include "EfiPrintLib.h"\r
 #include "Print.h"\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+#include EFI_PROTOCOL_DEFINITION (HiiFont)\r
+#else\r
 #include EFI_PROTOCOL_DEFINITION (Hii)\r
+#endif\r
 \r
 static EFI_GRAPHICS_OUTPUT_BLT_PIXEL  mEfiColors[16] = {\r
   0x00, 0x00, 0x00, 0x00,\r
@@ -128,22 +132,26 @@ Returns:
 {\r
   VOID                           *Buffer;\r
   EFI_STATUS                     Status;\r
-  UINT16                         GlyphWidth;\r
-  UINT32                         GlyphStatus;\r
-  UINT16                         StringIndex;\r
   UINTN                          Index;\r
   CHAR16                         *UnicodeWeight;\r
-  EFI_NARROW_GLYPH               *Glyph;\r
-  EFI_HII_PROTOCOL               *Hii;\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *LineBuffer;\r
   UINT32                         HorizontalResolution;\r
   UINT32                         VerticalResolution;\r
   UINT32                         ColorDepth;\r
   UINT32                         RefreshRate;\r
   UINTN                          BufferLen;\r
   UINTN                          LineBufferLen;\r
-\r
-  GlyphStatus = 0;\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  EFI_HII_FONT_PROTOCOL          *HiiFont;\r
+  EFI_IMAGE_OUTPUT               *Blt;\r
+  EFI_FONT_DISPLAY_INFO          *FontInfo;  \r
+#else\r
+  EFI_HII_PROTOCOL               *Hii;\r
+  UINT16                         GlyphWidth;\r
+  UINT32                         GlyphStatus;\r
+  UINT16                         StringIndex;\r
+  EFI_NARROW_GLYPH               *Glyph;\r
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *LineBuffer;\r
+#endif\r
 \r
   //\r
   // For now, allocate an arbitrarily long buffer\r
@@ -161,17 +169,27 @@ Returns:
   }\r
   ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0));\r
   \r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  Blt      = NULL;\r
+  FontInfo = NULL;\r
+  ASSERT (GraphicsOutput != NULL);\r
+  Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont);\r
+  if (EFI_ERROR (Status)) {\r
+    goto Error;\r
+  }  \r
+#else  \r
+  LineBuffer = NULL;\r
+  Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, (VOID**)&Hii);\r
+  if (EFI_ERROR (Status)) {\r
+    goto Error;\r
+  }\r
   LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * GLYPH_HEIGHT;\r
   LineBuffer = EfiLibAllocatePool (LineBufferLen);\r
   if (LineBuffer == NULL) {\r
-    gBS->FreePool (Buffer);\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);\r
-  if (EFI_ERROR (Status)) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
     goto Error;\r
-  }\r
+  }  \r
+#endif\r
 \r
   VSPrint (Buffer, 0x10000, fmt, args);\r
   \r
@@ -187,6 +205,63 @@ Returns:
 \r
   BufferLen = EfiStrLen (Buffer);\r
 \r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;\r
+  if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {\r
+     Status = EFI_INVALID_PARAMETER;\r
+     goto Error;\r
+  }\r
+\r
+  Blt = (EFI_IMAGE_OUTPUT *) EfiLibAllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT));\r
+  if (Blt == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Error;\r
+  }\r
+\r
+  Blt->Width        = (UINT16) (HorizontalResolution);\r
+  Blt->Height       = (UINT16) (VerticalResolution);\r
+  Blt->Image.Screen = GraphicsOutput;\r
+   \r
+  FontInfo = (EFI_FONT_DISPLAY_INFO *) EfiLibAllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));\r
+  if (FontInfo == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Error;\r
+  }\r
+  if (Foreground != NULL) {\r
+    EfiCopyMem (&FontInfo->ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
+  } else {\r
+    EfiCopyMem (\r
+      &FontInfo->ForegroundColor, \r
+      &mEfiColors[Sto->Mode->Attribute & 0x0f], \r
+      sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+      );\r
+  }\r
+  if (Background != NULL) {\r
+    EfiCopyMem (&FontInfo->BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
+  } else {\r
+    EfiCopyMem (\r
+      &FontInfo->BackgroundColor, \r
+      &mEfiColors[Sto->Mode->Attribute >> 4], \r
+      sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+      );\r
+  }\r
+\r
+  Status = HiiFont->StringToImage (\r
+                       HiiFont,\r
+                       EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN,\r
+                       Buffer,\r
+                       FontInfo,\r
+                       &Blt,\r
+                       X,\r
+                       Y,\r
+                       NULL,\r
+                       NULL,\r
+                       NULL\r
+                       );\r
+  \r
+#else\r
+  GlyphStatus = 0;\r
+\r
   if (GLYPH_WIDTH * GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {\r
      Status = EFI_INVALID_PARAMETER;\r
      goto Error;\r
@@ -255,8 +330,15 @@ Returns:
                         );\r
   }\r
 \r
+#endif\r
+\r
 Error:\r
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
+  EfiLibSafeFreePool (Blt);\r
+  EfiLibSafeFreePool (FontInfo);\r
+#else\r
   gBS->FreePool (LineBuffer);\r
+#endif  \r
   gBS->FreePool (Buffer);\r
   return Status;\r
 }\r
@@ -384,6 +466,7 @@ Returns:
 }\r
 \r
 UINTN\r
+EFIAPI\r
 VSPrint (\r
   OUT CHAR_W        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
index 42a6ec8..c28955b 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -190,6 +190,7 @@ Returns:
 ;\r
 \r
 UINTN\r
+EFIAPI\r
 VSPrint (\r
   OUT CHAR16        *StartOfBuffer,\r
   IN  UINTN         StrLen,\r
index 25b0d6e..1231cff 100644 (file)
@@ -1513,15 +1513,13 @@ EfiFvbSetVolumeAttributes (
 \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
+  input parameter.\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 \r
+  Attributes            - It is a pointer to EFI_FVB_ATTRIBUTES \r
                           containing the desired firmware volume settings.\r
-                          On successful return, it contains the new settings\r
-                          of the firmware volume\r
 \r
 Returns: \r
   Status code\r
index fbf9699..600cbb6 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -28,6 +28,7 @@ Abstract:
 \r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveInitialize (\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
@@ -52,6 +53,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveIoWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -87,6 +89,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveIoReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -122,6 +125,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveMemWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -157,6 +161,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveMemReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -192,6 +197,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSavePciCfgWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -228,6 +234,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSavePciCfgReadWrite (\r
   IN  UINT16                            TableName,\r
   IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
@@ -265,6 +272,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveSmbusExecute (\r
   IN  UINT16                            TableName,\r
   IN  EFI_SMBUS_DEVICE_ADDRESS          SlaveAddress,\r
@@ -303,6 +311,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveStall (\r
   IN  UINT16                            TableName,\r
   IN  UINTN                             Duration\r
@@ -330,6 +339,7 @@ Returns:
 ;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 BootScriptSaveDispatch (\r
   IN  UINT16                            TableName,\r
   IN  EFI_PHYSICAL_ADDRESS              EntryPoint\r
@@ -355,7 +365,45 @@ Returns:
 \r
 --*/\r
 ;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+BootScriptMemPoll (\r
+  IN  UINT16                            TableName,\r
+  IN  EFI_BOOT_SCRIPT_WIDTH             Width,\r
+  IN  UINT64                            Address,\r
+  IN  VOID                              *BitMask,\r
+  IN  VOID                              *BitValue,\r
+  IN  UINTN                             Duration,\r
+  IN  UINTN                             LoopTimes\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Polling one memory mapping register\r
+\r
+Arguments:\r
+  TableName - Desired boot script table\r
+\r
+  Width     - The width of the memory operations.\r
+  \r
+  Address   - The base address of the memory operations.\r
+  \r
+  BitMask   - A pointer to the bit mask to be AND-ed with the data read from the register.\r
+\r
+  BitValue  - A pointer to the data value after to be Masked.\r
+\r
+  Duration  - Duration in microseconds of the stall.\r
   \r
+  LoopTimes - The times of the register polling.\r
+\r
+Returns:\r
+\r
+  EFI_SUCCESS           - The operation was executed successfully\r
+\r
+--*/\r
+;\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 BootScriptSaveInformation (\r
@@ -473,6 +521,21 @@ Returns:
 #define SCRIPT_DISPATCH(TableName, EntryPoint) \\r
           BootScriptSaveDispatch(TableName, EntryPoint)\r
 \r
+#define SCRIPT_MEM_POLL(TableName, Width, Address, BitMask, BitValue, Duration, LoopTimes) \\r
+          BootScriptMemPoll(TableName, Width, Address, BitMask, BitValue, Duration, LoopTimes)\r
+\r
+#define SCRIPT_INFORMATION(TableName, Length, Buffer) \\r
+          BootScriptSaveInformation(TableName, Length, Buffer)\r
+\r
+#define SCRIPT_INFORMATION_UNICODE_STRING(TableName, String) \\r
+          BootScriptSaveInformationUnicodeString(TableName, String)\r
+\r
+#define SCRIPT_INFORMATION_ASCII_STRING(TableName, String) \\r
+          BootScriptSaveInformationAsciiString(TableName, String)\r
+\r
+//\r
+// For backward compatibility\r
+//\r
 #define SCRIPT_INOFRMATION(TableName, Length, Buffer) \\r
           BootScriptSaveInformation(TableName, Length, Buffer)\r
 \r
@@ -506,6 +569,17 @@ Returns:
 \r
 #define SCRIPT_DISPATCH(TableName, EntryPoint) \r
 \r
+#define SCRIPT_MEM_POLL(TableName, Width, Address, BitMask, BitValue, Duration, LoopTimes)\r
+\r
+#define SCRIPT_INFORMATION(TableName, Length, Buffer)\r
+\r
+#define SCRIPT_INFORMATION_UNICODE_STRING(TableName, String)\r
+\r
+#define SCRIPT_INFORMATION_ASCII_STRING(TableName, String)\r
+\r
+//\r
+// For backward compatibility\r
+//\r
 #define SCRIPT_INOFRMATION(TableName, Length, Buffer)\r
 \r
 #define SCRIPT_INOFRMATION_UNICODE_STRING(TableName, String)\r
index d2bea32..69242a1 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -134,6 +134,7 @@ Returns:
 \r
 \r
 UINTN\r
+EFIAPI\r
 VSPrint (\r
   OUT CHAR_W        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
index c648e25..e093260 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -101,6 +101,7 @@ Returns:
 }\r
 \r
 UINTN\r
+EFIAPI\r
 VSPrint (\r
   OUT CHAR_W        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiEfiIfrSupportLib.inf b/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiEfiIfrSupportLib.inf
new file mode 100644 (file)
index 0000000..f5e66c1
--- /dev/null
@@ -0,0 +1,50 @@
+#/*++\r
+#\r
+# Copyright (c) 2007, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#  Module Name:\r
+#\r
+#    UfiIfrSupportLib.inf\r
+#\r
+#  Abstract:\r
+#\r
+#    Component description file.\r
+#\r
+#--*/\r
+\r
+[defines]\r
+BASE_NAME           = UefiEfiIfrSupportLib\r
+COMPONENT_TYPE      = LIBRARY\r
+\r
+[sources.common]\r
+  UefiIfrCommon.c\r
+  UefiIfrForm.c\r
+  UefiIfrString.c\r
+  UefiIfrOpCodeCreation.c\r
+  UefiIfrLibrary.h\r
+\r
+[includes.common]\r
+  $(EDK_SOURCE)\Foundation\Efi\r
+  $(EDK_SOURCE)\Foundation\Framework\r
+  $(EDK_SOURCE)\Foundation\r
+  .\r
+  $(EDK_SOURCE)\Foundation\Include\r
+  $(EDK_SOURCE)\Foundation\Efi\Include\r
+  $(EDK_SOURCE)\Foundation\Framework\Include\r
+  $(EDK_SOURCE)\Foundation\Include\IndustryStandard\r
+  $(EDK_SOURCE)\Foundation\Core\Dxe\r
+  $(EDK_SOURCE)\Foundation\Library\Dxe\Include\r
+  $(EDK_SOURCE)\Foundation\Library\Dxe\EfiDriverLib\r
+\r
+[libraries.common]\r
+  EfiGuidLib\r
+  EdkFrameworkProtocolLib\r
+\r
+[nmake.common]\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c b/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
new file mode 100644 (file)
index 0000000..7e9553f
--- /dev/null
@@ -0,0 +1,618 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  UefiIfrCommon.c\r
+\r
+Abstract:\r
+\r
+  Common Library Routines to assist handle HII elements.\r
+\r
+--*/\r
+\r
+#include "UefiIfrLibrary.h"\r
+\r
+//\r
+// Hii vendor device path template\r
+//\r
+HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePathTemplate = {\r
+  {\r
+    {\r
+      {\r
+        HARDWARE_DEVICE_PATH,\r
+        HW_VENDOR_DP,\r
+        (UINT8) (sizeof (HII_VENDOR_DEVICE_PATH_NODE)),\r
+        (UINT8) ((sizeof (HII_VENDOR_DEVICE_PATH_NODE)) >> 8)\r
+      },\r
+      EFI_IFR_TIANO_GUID,\r
+    },\r
+    0\r
+  },\r
+  {\r
+    END_DEVICE_PATH_TYPE,\r
+    END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+    END_DEVICE_PATH_LENGTH,\r
+    0\r
+  }\r
+};\r
+\r
+//\r
+// Hii relative protocols\r
+//\r
+BOOLEAN  mHiiProtocolsInitialized = FALSE;\r
+\r
+EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;\r
+EFI_HII_STRING_PROTOCOL   *gIfrLibHiiString;\r
+\r
+VOID\r
+LocateHiiProtocols (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  This function locate Hii relative protocols for later usage.\r
+\r
+Arguments:\r
+  None.\r
+\r
+Returns:\r
+  None.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  if (mHiiProtocolsInitialized) {\r
+    return;\r
+  }\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, &gIfrLibHiiDatabase);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, &gIfrLibHiiString);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  mHiiProtocolsInitialized = TRUE;\r
+}\r
+\r
+EFI_HII_PACKAGE_LIST_HEADER *\r
+PreparePackageList (\r
+  IN UINTN                    NumberOfPackages,\r
+  IN EFI_GUID                 *GuidId,\r
+  ...\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Assemble EFI_HII_PACKAGE_LIST according to the passed in packages.\r
+\r
+Arguments:\r
+  NumberOfPackages  -  Number of packages.\r
+  GuidId            -  Package GUID.\r
+\r
+Returns:\r
+  Pointer of EFI_HII_PACKAGE_LIST_HEADER.\r
+\r
+--*/\r
+{\r
+  VA_LIST                     Marker;\r
+  EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;\r
+  UINT8                       *PackageListData;\r
+  UINT32                      PackageListLength;\r
+  UINT32                      PackageLength;\r
+  EFI_HII_PACKAGE_HEADER      PackageHeader;\r
+  UINT8                       *PackageArray;\r
+  UINTN                       Index;\r
+\r
+  PackageListLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+\r
+  VA_START (Marker, GuidId);\r
+  for (Index = 0; Index < NumberOfPackages; Index++) {\r
+    EfiCopyMem (&PackageLength, VA_ARG (Marker, VOID *), sizeof (UINT32));\r
+    PackageListLength += (PackageLength - sizeof (UINT32));\r
+  }\r
+  VA_END (Marker);\r
+\r
+  //\r
+  // Include the lenght of EFI_HII_PACKAGE_END\r
+  //\r
+  PackageListLength += sizeof (EFI_HII_PACKAGE_HEADER);\r
+  PackageListHeader = EfiLibAllocateZeroPool (PackageListLength);\r
+  ASSERT (PackageListHeader != NULL);\r
+  EfiCopyMem (&PackageListHeader->PackageListGuid, GuidId, sizeof (EFI_GUID));\r
+  PackageListHeader->PackageLength = PackageListLength;\r
+\r
+  PackageListData = ((UINT8 *) PackageListHeader) + sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+\r
+  VA_START (Marker, GuidId);\r
+  for (Index = 0; Index < NumberOfPackages; Index++) {\r
+    PackageArray = (UINT8 *) VA_ARG (Marker, VOID *);\r
+    EfiCopyMem (&PackageLength, PackageArray, sizeof (UINT32));\r
+    PackageLength  -= sizeof (UINT32);\r
+    PackageArray += sizeof (UINT32);\r
+    EfiCopyMem (PackageListData, PackageArray, PackageLength);\r
+    PackageListData += PackageLength;\r
+  }\r
+  VA_END (Marker);\r
+\r
+  //\r
+  // Append EFI_HII_PACKAGE_END\r
+  //\r
+  PackageHeader.Type = EFI_HII_PACKAGE_END;\r
+  PackageHeader.Length = sizeof (EFI_HII_PACKAGE_HEADER);\r
+  EfiCopyMem (PackageListData, &PackageHeader, PackageHeader.Length);\r
+\r
+  return PackageListHeader;\r
+}\r
+\r
+EFI_STATUS\r
+CreateHiiDriverHandle (\r
+  OUT EFI_HANDLE               *DriverHandle\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  The HII driver handle passed in for HiiDatabase.NewPackageList() requires\r
+  that there should be DevicePath Protocol installed on it.\r
+  This routine create a virtual Driver Handle by installing a vendor device\r
+  path on it, so as to use it to invoke HiiDatabase.NewPackageList().\r
+\r
+Arguments:\r
+  DriverHandle         - Handle to be returned\r
+\r
+Returns:\r
+  EFI_SUCCESS          - Handle destroy success.\r
+  EFI_OUT_OF_RESOURCES - Not enough memory.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  HII_VENDOR_DEVICE_PATH_NODE  *VendorDevicePath;\r
+  UINT64                       MonotonicCount;\r
+\r
+  VendorDevicePath = EfiLibAllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);\r
+  if (VendorDevicePath == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  gBS->GetNextMonotonicCount (&MonotonicCount);\r
+  VendorDevicePath->MonotonicCount = (UINT32) MonotonicCount;\r
+\r
+  *DriverHandle = NULL;\r
+  Status = gBS->InstallProtocolInterface (\r
+                  DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  EFI_NATIVE_INTERFACE,\r
+                  VendorDevicePath\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+DestroyHiiDriverHandle (\r
+  IN EFI_HANDLE                 DriverHandle\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Destroy the Driver Handle created by CreateHiiDriverHandle().\r
+\r
+Arguments:\r
+  DriverHandle - Handle returned by CreateHiiDriverHandle()\r
+\r
+Returns:\r
+  EFI_SUCCESS - Handle destroy success.\r
+  other       - Handle destroy fail.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  EFI_DEVICE_PATH_PROTOCOL     *DevicePath;\r
+\r
+  Status = gBS->HandleProtocol (\r
+                  DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &DevicePath\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = gBS->UninstallProtocolInterface (\r
+                  DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  DevicePath\r
+                  );\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_HII_HANDLE\r
+DevicePathToHiiHandle (\r
+  IN EFI_HII_DATABASE_PROTOCOL  *HiiDatabase,\r
+  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Find HII Handle associated with given Device Path.\r
+\r
+Arguments:\r
+  HiiDatabase - Point to EFI_HII_DATABASE_PROTOCOL instance.\r
+  DevicePath  - Device Path associated with the HII package list handle.\r
+\r
+Returns:\r
+  Handle - HII package list Handle associated with the Device Path.\r
+  NULL   - Hii Package list handle is not found.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                  Status;\r
+  EFI_DEVICE_PATH_PROTOCOL    *TmpDevicePath;\r
+  UINTN                       BufferSize;\r
+  UINTN                       HandleCount;\r
+  UINTN                       Index;\r
+  EFI_HANDLE                  *Handles;\r
+  EFI_HANDLE                  Handle;\r
+  UINTN                       Size;\r
+  EFI_HANDLE                  DriverHandle;\r
+  EFI_HII_HANDLE              *HiiHandles;\r
+  EFI_HII_HANDLE              HiiHandle;\r
+\r
+  //\r
+  // Locate Device Path Protocol handle buffer\r
+  //\r
+  Status = gBS->LocateHandleBuffer (\r
+                  ByProtocol,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  NULL,\r
+                  &HandleCount,\r
+                  &Handles\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return NULL;\r
+  }\r
+\r
+  //\r
+  // Search Driver Handle by Device Path\r
+  //\r
+  DriverHandle = NULL;\r
+  BufferSize = EfiDevicePathSize (DevicePath);\r
+  for(Index = 0; Index < HandleCount; Index++) {\r
+    Handle = Handles[Index];\r
+    gBS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, &TmpDevicePath);\r
+\r
+    //\r
+    // Check whether DevicePath match\r
+    //\r
+    Size = EfiDevicePathSize (TmpDevicePath);\r
+    if ((Size == BufferSize) && EfiCompareMem (DevicePath, TmpDevicePath, Size) == 0) {\r
+      DriverHandle = Handle;\r
+      break;\r
+    }\r
+  }\r
+  gBS->FreePool (Handles);\r
+\r
+  if (DriverHandle == NULL) {\r
+    return NULL;\r
+  }\r
+\r
+  //\r
+  // Retrieve all Hii Handles from HII database\r
+  //\r
+  BufferSize = 0x1000;\r
+  HiiHandles = EfiLibAllocatePool (BufferSize);\r
+  ASSERT (HiiHandles != NULL);\r
+  Status = HiiDatabase->ListPackageLists (\r
+                          HiiDatabase,\r
+                          EFI_HII_PACKAGE_TYPE_ALL,\r
+                          NULL,\r
+                          &BufferSize,\r
+                          HiiHandles\r
+                          );\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    gBS->FreePool (HiiHandles);\r
+    HiiHandles = EfiLibAllocatePool (BufferSize);\r
+    ASSERT (HiiHandles != NULL);\r
+\r
+    Status = HiiDatabase->ListPackageLists (\r
+                            HiiDatabase,\r
+                            EFI_HII_PACKAGE_TYPE_ALL,\r
+                            NULL,\r
+                            &BufferSize,\r
+                            HiiHandles\r
+                            );\r
+  }\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    gBS->FreePool (HiiHandles);\r
+    return NULL;\r
+  }\r
+\r
+  //\r
+  // Search Hii Handle by Driver Handle\r
+  //\r
+  HiiHandle = NULL;\r
+  HandleCount = BufferSize / sizeof (EFI_HII_HANDLE);\r
+  for (Index = 0; Index < HandleCount; Index++) {\r
+    Status = HiiDatabase->GetPackageListHandle (\r
+                            HiiDatabase,\r
+                            HiiHandles[Index],\r
+                            &Handle\r
+                            );\r
+    if (!EFI_ERROR (Status) && (Handle == DriverHandle)) {\r
+      HiiHandle = HiiHandles[Index];\r
+      break;\r
+    }\r
+  }\r
+\r
+  gBS->FreePool (HiiHandles);\r
+  return HiiHandle;\r
+}\r
+\r
+EFI_STATUS\r
+GetHiiHandles (\r
+  IN OUT UINTN                     *HandleBufferLength,\r
+  OUT    EFI_HII_HANDLE            **HiiHandleBuffer\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Determines the handles that are currently active in the database.\r
+  It's the caller's responsibility to free handle buffer.\r
+\r
+Arguments:\r
+  HiiDatabase           - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
+  HandleBufferLength    - On input, a pointer to the length of the handle buffer. On output,\r
+                          the length of the handle buffer that is required for the handles found.\r
+  HiiHandleBuffer       - Pointer to an array of Hii Handles returned.\r
+\r
+Returns:\r
+  EFI_SUCCESS           - Get an array of Hii Handles successfully.\r
+  EFI_INVALID_PARAMETER - Hii is NULL.\r
+  EFI_NOT_FOUND         - Database not found.\r
+\r
+--*/\r
+{\r
+  UINTN       BufferLength;\r
+  EFI_STATUS  Status;\r
+\r
+  BufferLength = 0;\r
+\r
+  LocateHiiProtocols ();\r
+\r
+  //\r
+  // Try to find the actual buffer size for HiiHandle Buffer.\r
+  //\r
+  Status = gIfrLibHiiDatabase->ListPackageLists (\r
+                                 gIfrLibHiiDatabase,\r
+                                 EFI_HII_PACKAGE_TYPE_ALL,\r
+                                 NULL,\r
+                                 &BufferLength,\r
+                                 *HiiHandleBuffer\r
+                                 );\r
+\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+      *HiiHandleBuffer = EfiLibAllocateZeroPool (BufferLength);\r
+      Status = gIfrLibHiiDatabase->ListPackageLists (\r
+                                     gIfrLibHiiDatabase,\r
+                                     EFI_HII_PACKAGE_TYPE_ALL,\r
+                                     NULL,\r
+                                     &BufferLength,\r
+                                     *HiiHandleBuffer\r
+                                     );\r
+      //\r
+      // we should not fail here.\r
+      //\r
+      ASSERT_EFI_ERROR (Status);\r
+  }\r
+\r
+  *HandleBufferLength = BufferLength;\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+ExtractGuidFromHiiHandle (\r
+  IN      EFI_HII_HANDLE      Handle,\r
+  OUT     EFI_GUID            *Guid\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Extract Hii package list GUID for given HII handle.\r
+\r
+Arguments:\r
+  HiiHandle     - Hii handle\r
+  Guid          - Package list GUID\r
+\r
+Returns:\r
+  EFI_SUCCESS   - Successfully extract GUID from Hii database.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  UINTN                        BufferSize;\r
+  EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;\r
+\r
+  //\r
+  // Locate HII Database protocol\r
+  //\r
+  Status = gBS->LocateProtocol (\r
+                  &gEfiHiiDatabaseProtocolGuid,\r
+                  NULL,\r
+                  &HiiDatabase\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Get HII PackageList\r
+  //\r
+  BufferSize = 0;\r
+  HiiPackageList = NULL;\r
+  Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    HiiPackageList = EfiLibAllocatePool (BufferSize);\r
+    ASSERT (HiiPackageList != NULL);\r
+\r
+    Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  }\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Extract GUID\r
+  //\r
+  EfiCopyMem (Guid, &HiiPackageList->PackageListGuid, sizeof (EFI_GUID));\r
+\r
+  gBS->FreePool (HiiPackageList);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+ExtractClassFromHiiHandle (\r
+  IN      EFI_HII_HANDLE      Handle,\r
+  OUT     UINT16              *Class,\r
+  OUT     EFI_STRING_ID       *FormSetTitle,\r
+  OUT     EFI_STRING_ID       *FormSetHelp\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Extract formset class for given HII handle.\r
+\r
+Arguments:\r
+  HiiHandle       - Hii handle\r
+  Class           - Class of the formset\r
+  FormSetTitle    - Formset title string\r
+  FormSetHelp     - Formset help string\r
+\r
+Returns:\r
+  EFI_SUCCESS     - Successfully extract Class for specified Hii handle.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  UINTN                        BufferSize;\r
+  EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;\r
+  UINT8                        *Package;\r
+  UINT8                        *FormSet;\r
+  UINT8                        *OpCodeData;\r
+  UINT32                       Offset;\r
+  UINT32                       Offset2;\r
+  UINT32                       PackageListLength;\r
+  EFI_HII_PACKAGE_HEADER       PackageHeader;\r
+\r
+  *Class = EFI_NON_DEVICE_CLASS;\r
+  *FormSetTitle = 0;\r
+  *FormSetHelp = 0;\r
+\r
+  //\r
+  // Locate HII Database protocol\r
+  //\r
+  Status = gBS->LocateProtocol (\r
+                  &gEfiHiiDatabaseProtocolGuid,\r
+                  NULL,\r
+                  &HiiDatabase\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Get HII PackageList\r
+  //\r
+  BufferSize = 0;\r
+  HiiPackageList = NULL;\r
+  Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    HiiPackageList = EfiLibAllocatePool (BufferSize);\r
+    ASSERT (HiiPackageList != NULL);\r
+\r
+    Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  }\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Get Form package from this HII package List\r
+  //\r
+  Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+  Offset2 = 0;\r
+  FormSet = NULL;\r
+  EfiCopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));\r
+\r
+  while (Offset < PackageListLength) {\r
+    Package = ((UINT8 *) HiiPackageList) + Offset;\r
+    EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+\r
+    if (PackageHeader.Type == EFI_HII_PACKAGE_FORM) {\r
+      //\r
+      // Search Class Opcode in this Form Package\r
+      //\r
+      Offset2 = sizeof (EFI_HII_PACKAGE_HEADER);\r
+      while (Offset2 < PackageHeader.Length) {\r
+        OpCodeData = Package + Offset2;\r
+\r
+        if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) {\r
+          //\r
+          // Find FormSet OpCode\r
+          //\r
+          EfiCopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));\r
+          EfiCopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));\r
+        }\r
+\r
+        if ((((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_GUID_OP) &&\r
+            (EfiCompareGuid (&mIfrVendorGuid, &((EFI_IFR_GUID *) OpCodeData)->Guid)) &&\r
+            (((EFI_IFR_GUID_CLASS *) OpCodeData)->ExtendOpCode == EFI_IFR_EXTEND_OP_CLASS)\r
+           ) {\r
+          //\r
+          // Find GUIDed Class OpCode\r
+          //\r
+          EfiCopyMem (Class, &((EFI_IFR_GUID_CLASS *) OpCodeData)->Class, sizeof (UINT16));\r
+\r
+          //\r
+          // Till now, we ought to have found the formset Opcode\r
+          //\r
+          break;\r
+        }\r
+\r
+        Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;\r
+      }\r
+\r
+      if (Offset2 < PackageHeader.Length) {\r
+        //\r
+        // Target formset found\r
+        //\r
+        break;\r
+      }\r
+    }\r
+\r
+    Offset += PackageHeader.Length;\r
+  }\r
+\r
+  gBS->FreePool (HiiPackageList);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c b/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
new file mode 100644 (file)
index 0000000..381e9d2
--- /dev/null
@@ -0,0 +1,1141 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  UefiIfrForm.c\r
+\r
+Abstract:\r
+\r
+  Common Library Routines to assist handle HII elements.\r
+\r
+--*/\r
+\r
+#include "UefiIfrLibrary.h"\r
+\r
+//\r
+// Fake <ConfigHdr>\r
+//\r
+UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH=0";\r
+\r
+STATIC\r
+EFI_STATUS\r
+GetPackageDataFromPackageList (\r
+  IN  EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList,\r
+  IN  UINT32                      PackageIndex,\r
+  OUT UINT32                      *BufferLen,\r
+  OUT EFI_HII_PACKAGE_HEADER      **Buffer\r
+  )\r
+{\r
+  UINT32                        Index;\r
+  EFI_HII_PACKAGE_HEADER        *Package;\r
+  UINT32                        Offset;\r
+  UINT32                        PackageListLength;\r
+  EFI_HII_PACKAGE_HEADER        PackageHeader = {0, 0};\r
+\r
+  ASSERT(HiiPackageList != NULL);\r
+\r
+  if ((BufferLen == NULL) || (Buffer == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  Package = NULL;\r
+  Index   = 0;\r
+  Offset  = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+  EfiCopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));\r
+  while (Offset < PackageListLength) {\r
+    Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset);\r
+    EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+    if (Index == PackageIndex) {\r
+      break;\r
+    }\r
+    Offset += PackageHeader.Length;\r
+    Index++;\r
+  }\r
+  if (Offset >= PackageListLength) {\r
+    //\r
+    // no package found in this Package List\r
+    //\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  *BufferLen = PackageHeader.Length;\r
+  *Buffer    = Package;\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+UpdateFormPackageData (\r
+  IN  EFI_GUID               *FormSetGuid,\r
+  IN  EFI_FORM_ID            FormId,\r
+  IN  EFI_HII_PACKAGE_HEADER *Package,\r
+  IN  UINT32                 PackageLength,\r
+  IN  UINT16                 Label,\r
+  IN  BOOLEAN                Insert,\r
+  IN  EFI_HII_UPDATE_DATA    *Data,\r
+  OUT UINT8                  **TempBuffer,\r
+  OUT UINT32                 *TempBufferSize\r
+  )\r
+{\r
+  UINTN                     AddSize;\r
+  UINT8                     *BufferPos;\r
+  EFI_HII_PACKAGE_HEADER    PackageHeader;\r
+  UINTN                     Offset;\r
+  EFI_IFR_OP_HEADER         *IfrOpHdr;\r
+  BOOLEAN                   GetFormSet;\r
+  BOOLEAN                   GetForm;\r
+  UINT8                     ExtendOpCode;\r
+  UINT16                    LabelNumber;\r
+  BOOLEAN                   Updated;\r
+  EFI_IFR_OP_HEADER         *AddOpCode;\r
+\r
+  if ((TempBuffer == NULL) || (TempBufferSize == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  *TempBufferSize = PackageLength;\r
+  if (Data != NULL) {\r
+    *TempBufferSize += Data->Offset;\r
+  }\r
+  *TempBuffer = EfiLibAllocateZeroPool (*TempBufferSize);\r
+  if (*TempBuffer == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  EfiCopyMem (*TempBuffer, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+  *TempBufferSize = sizeof (EFI_HII_PACKAGE_HEADER);\r
+  BufferPos = *TempBuffer + sizeof (EFI_HII_PACKAGE_HEADER);\r
+\r
+  EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+  IfrOpHdr   = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));\r
+  Offset     = sizeof (EFI_HII_PACKAGE_HEADER);\r
+  GetFormSet = (FormSetGuid == NULL) ? TRUE : FALSE;\r
+  GetForm    = FALSE;\r
+  Updated    = FALSE;\r
+\r
+  while (Offset < PackageHeader.Length) {\r
+    EfiCopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);\r
+    BufferPos += IfrOpHdr->Length;\r
+    *TempBufferSize += IfrOpHdr->Length;\r
+\r
+    switch (IfrOpHdr->OpCode) {\r
+    case EFI_IFR_FORM_SET_OP :\r
+      if (FormSetGuid != NULL) {\r
+        if (EfiCompareMem (&((EFI_IFR_FORM_SET *) IfrOpHdr)->Guid, FormSetGuid, sizeof (EFI_GUID)) == 0) {\r
+          GetFormSet = TRUE;\r
+        }\r
+      }\r
+      break;\r
+\r
+    case EFI_IFR_FORM_OP:\r
+      if (EfiCompareMem (&((EFI_IFR_FORM *) IfrOpHdr)->FormId, &FormId, sizeof (EFI_FORM_ID)) == 0) {\r
+        GetForm = TRUE;\r
+      }\r
+      break;\r
+\r
+    case EFI_IFR_GUID_OP :\r
+      if (!GetFormSet || !GetForm || Updated) {\r
+        //\r
+        // Go to the next Op-Code\r
+        //\r
+        Offset   += IfrOpHdr->Length;\r
+        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+        continue;\r
+      }\r
+\r
+      ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;\r
+      EfiCopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));\r
+      if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {\r
+        //\r
+        // Go to the next Op-Code\r
+        //\r
+        Offset   += IfrOpHdr->Length;\r
+        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+        continue;\r
+      }\r
+\r
+      if (Insert && (Data != NULL)) {\r
+        //\r
+        // insert the DataCount amount of opcodes to TempBuffer if Data is NULL remove\r
+        // DataCount amount of opcodes unless runing into a label.\r
+        //\r
+        AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;\r
+        AddSize   = 0;\r
+        while (AddSize < Data->Offset) {\r
+          EfiCopyMem (BufferPos, AddOpCode, AddOpCode->Length);\r
+          BufferPos += AddOpCode->Length;\r
+          *TempBufferSize += AddOpCode->Length;\r
+\r
+          AddSize += AddOpCode->Length;\r
+          AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);\r
+        }\r
+      } else {\r
+        //\r
+        // Search the next Label.\r
+        //\r
+        while (TRUE) {\r
+          Offset   += IfrOpHdr->Length;\r
+          //\r
+          // Search the next label and Fail if not label found.\r
+          //\r
+          if (Offset >= PackageHeader.Length) {\r
+            goto Fail;\r
+          }\r
+          IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+          if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {\r
+            ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;\r
+            if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) {\r
+              break;\r
+            }\r
+          }\r
+        }\r
+\r
+        if (Data != NULL) {\r
+          AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;\r
+          AddSize   = 0;\r
+          while (AddSize < Data->Offset) {\r
+            EfiCopyMem (BufferPos, AddOpCode, AddOpCode->Length);\r
+            BufferPos += AddOpCode->Length;\r
+            *TempBufferSize += AddOpCode->Length;\r
+\r
+            AddSize   += AddOpCode->Length;\r
+            AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);\r
+          }\r
+        }\r
+\r
+        //\r
+        // copy the next label\r
+        //\r
+        EfiCopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);\r
+        BufferPos += IfrOpHdr->Length;\r
+        *TempBufferSize += IfrOpHdr->Length;\r
+      }\r
+\r
+      Updated = TRUE;\r
+      break;\r
+    default :\r
+      break;\r
+    }\r
+\r
+    //\r
+    // Go to the next Op-Code\r
+    //\r
+    Offset   += IfrOpHdr->Length;\r
+    IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+  }\r
+\r
+  //\r
+  // Update the package length.\r
+  //\r
+  PackageHeader.Length = *TempBufferSize;\r
+  EfiCopyMem (*TempBuffer, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));\r
+\r
+Fail:\r
+  if (!Updated) {\r
+    gBS->FreePool (*TempBuffer);\r
+    *TempBufferSize = 0;\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+IfrLibUpdateForm (\r
+  IN EFI_HII_HANDLE            Handle,\r
+  IN EFI_GUID                  *FormSetGuid, OPTIONAL\r
+  IN EFI_FORM_ID               FormId,\r
+  IN UINT16                    Label,\r
+  IN BOOLEAN                   Insert,\r
+  IN EFI_HII_UPDATE_DATA       *Data\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  This function allows the caller to update a form that has\r
+  previously been registered with the EFI HII database.\r
+\r
+Arguments:\r
+  Handle       - Hii Handle\r
+  FormSetGuid  - The formset should be updated.\r
+  FormId       - The form should be updated.\r
+  Label        - Update information starting immediately after this label in the IFR\r
+  Insert       - If TRUE and Data is not NULL, insert data after Label.\r
+                 If FALSE, replace opcodes between two labels with Data\r
+  Data         - The adding data; If NULL, remove opcodes between two Label.\r
+\r
+Returns:\r
+  EFI_SUCCESS  - Update success.\r
+  Other        - Update fail.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;\r
+  UINT32                       Index;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *UpdateBuffer;\r
+  UINTN                        BufferSize;\r
+  UINT8                        *UpdateBufferPos;\r
+  EFI_HII_PACKAGE_HEADER       PackageHeader;\r
+  EFI_HII_PACKAGE_HEADER       *Package;\r
+  UINT32                       PackageLength;\r
+  EFI_HII_PACKAGE_HEADER       *TempBuffer;\r
+  UINT32                       TempBufferSize;\r
+  BOOLEAN                      Updated;\r
+\r
+  if (Data == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  LocateHiiProtocols ();\r
+  HiiDatabase = gIfrLibHiiDatabase;\r
+\r
+  //\r
+  // Get the orginal package list\r
+  //\r
+  BufferSize = 0;\r
+  HiiPackageList   = NULL;\r
+  Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    HiiPackageList = EfiLibAllocatePool (BufferSize);\r
+    ASSERT (HiiPackageList != NULL);\r
+\r
+    Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+    if (EFI_ERROR (Status)) {\r
+      gBS->FreePool (HiiPackageList);\r
+      return Status;\r
+    }\r
+  }\r
+\r
+  //\r
+  // Calculate and allocate space for retrieval of IFR data\r
+  //\r
+  BufferSize += Data->Offset;\r
+  UpdateBuffer = EfiLibAllocateZeroPool (BufferSize);\r
+  if (UpdateBuffer == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  UpdateBufferPos = (UINT8 *) UpdateBuffer;\r
+\r
+  //\r
+  // copy the package list header\r
+  //\r
+  EfiCopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));\r
+  UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+\r
+  Updated = FALSE;\r
+  for (Index = 0; ; Index++) {\r
+    Status = GetPackageDataFromPackageList (HiiPackageList, Index, &PackageLength, &Package);\r
+    if (Status == EFI_SUCCESS) {\r
+      EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+      if ((PackageHeader.Type == EFI_HII_PACKAGE_FORM) && !Updated) {\r
+        Status = UpdateFormPackageData (FormSetGuid, FormId, Package, PackageLength, Label, Insert, Data, (UINT8 **)&TempBuffer, &TempBufferSize);\r
+        if (!EFI_ERROR(Status)) {\r
+          if (FormSetGuid == NULL) {\r
+            Updated = TRUE;\r
+          }\r
+          EfiCopyMem (UpdateBufferPos, TempBuffer, TempBufferSize);\r
+          UpdateBufferPos += TempBufferSize;\r
+          gBS->FreePool (TempBuffer);\r
+          continue;\r
+        }\r
+      }\r
+\r
+      EfiCopyMem (UpdateBufferPos, Package, PackageLength);\r
+      UpdateBufferPos += PackageLength;\r
+    } else if (Status == EFI_NOT_FOUND) {\r
+      break;\r
+    } else {\r
+      gBS->FreePool (HiiPackageList);\r
+      return Status;\r
+    }\r
+  }\r
+\r
+  //\r
+  // Update package list length\r
+  //\r
+  BufferSize = UpdateBufferPos - (UINT8 *) UpdateBuffer;\r
+  EfiCopyMem (&UpdateBuffer->PackageLength, &BufferSize, sizeof (UINT32));\r
+\r
+  gBS->FreePool (HiiPackageList);\r
+\r
+  return HiiDatabase->UpdatePackageList (HiiDatabase, Handle, UpdateBuffer);\r
+}\r
+\r
+EFI_STATUS\r
+IfrLibCreatePopUp (\r
+  IN  UINTN                       NumberOfLines,\r
+  OUT EFI_INPUT_KEY               *KeyValue,\r
+  IN  CHAR16                      *String,\r
+  ...\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Draw a dialog and return the selected key.\r
+\r
+Arguments:\r
+  NumberOfLines     - The number of lines for the dialog box\r
+  KeyValue          - The EFI_KEY value returned if HotKey is TRUE..\r
+  String            - Pointer to the first string in the list\r
+  ...               - A series of (quantity == NumberOfLines) text strings which\r
+                      will be used to construct the dialog box\r
+\r
+Returns:\r
+  EFI_SUCCESS           - Displayed dialog and received user interaction\r
+  EFI_INVALID_PARAMETER - One of the parameters was invalid.\r
+\r
+--*/\r
+{\r
+  UINTN                         Index;\r
+  UINTN                         Count;\r
+  UINTN                         Start;\r
+  UINTN                         End;\r
+  UINTN                         Top;\r
+  UINTN                         Bottom;\r
+  CHAR16                        *StringPtr;\r
+  UINTN                         LeftColumn;\r
+  UINTN                         RightColumn;\r
+  UINTN                         TopRow;\r
+  UINTN                         BottomRow;\r
+  UINTN                         DimensionsWidth;\r
+  UINTN                         DimensionsHeight;\r
+  VA_LIST                       Marker;\r
+  EFI_INPUT_KEY                 Key;\r
+  UINTN                         LargestString;\r
+  CHAR16                        *StackString;\r
+  EFI_STATUS                    Status;\r
+  UINTN                         StringLen;\r
+  CHAR16                        *LineBuffer;\r
+  CHAR16                        **StringArray;\r
+  EFI_EVENT                     TimerEvent;\r
+  EFI_EVENT                     WaitList[2];\r
+  UINTN                         CurrentAttribute;\r
+  EFI_SIMPLE_TEXT_OUT_PROTOCOL  *ConOut;\r
+\r
+  if ((KeyValue == NULL) || (String == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  TopRow      = 0;\r
+  BottomRow   = 0;\r
+  LeftColumn  = 0;\r
+  RightColumn = 0;\r
+\r
+  ConOut = gST->ConOut;\r
+  ConOut->QueryMode (ConOut, ConOut->Mode->Mode, &RightColumn, &BottomRow);\r
+\r
+  DimensionsWidth  = RightColumn - LeftColumn;\r
+  DimensionsHeight = BottomRow - TopRow;\r
+\r
+  CurrentAttribute = ConOut->Mode->Attribute;\r
+\r
+  LineBuffer = EfiLibAllocateZeroPool (DimensionsWidth * sizeof (CHAR16));\r
+  ASSERT (LineBuffer != NULL);\r
+\r
+  //\r
+  // Determine the largest string in the dialog box\r
+  // Notice we are starting with 1 since String is the first string\r
+  //\r
+  StringArray = EfiLibAllocateZeroPool (NumberOfLines * sizeof (CHAR16 *));\r
+  LargestString = EfiStrLen (String);\r
+  StringArray[0] = String;\r
+\r
+  VA_START (Marker, String);\r
+  for (Index = 1; Index < NumberOfLines; Index++) {\r
+    StackString = VA_ARG (Marker, CHAR16 *);\r
+\r
+    if (StackString == NULL) {\r
+      return EFI_INVALID_PARAMETER;\r
+    }\r
+\r
+    StringArray[Index] = StackString;\r
+    StringLen = EfiStrLen (StackString);\r
+    if (StringLen > LargestString) {\r
+      LargestString = StringLen;\r
+    }\r
+  }\r
+\r
+  if ((LargestString + 2) > DimensionsWidth) {\r
+    LargestString = DimensionsWidth - 2;\r
+  }\r
+\r
+  //\r
+  // Subtract the PopUp width from total Columns, allow for one space extra on\r
+  // each end plus a border.\r
+  //\r
+  Start     = (DimensionsWidth - LargestString - 2) / 2 + LeftColumn + 1;\r
+  End       = Start + LargestString + 1;\r
+\r
+  Top       = ((DimensionsHeight - NumberOfLines - 2) / 2) + TopRow - 1;\r
+  Bottom    = Top + NumberOfLines + 2;\r
+\r
+  //\r
+  // Disable cursor\r
+  //\r
+  ConOut->EnableCursor (ConOut, FALSE);\r
+  ConOut->SetAttribute (ConOut, EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE);\r
+\r
+  StringPtr = &LineBuffer[0];\r
+  *StringPtr++ = BOXDRAW_DOWN_RIGHT;\r
+  for (Index = 0; Index < LargestString; Index++) {\r
+    *StringPtr++ = BOXDRAW_HORIZONTAL;\r
+  }\r
+  *StringPtr++ = BOXDRAW_DOWN_LEFT;\r
+  *StringPtr = L'\0';\r
+\r
+  ConOut->SetCursorPosition (ConOut, Start, Top);\r
+  ConOut->OutputString (ConOut, LineBuffer);\r
+\r
+  for (Index = 0; Index < NumberOfLines; Index++) {\r
+    StringPtr = &LineBuffer[0];\r
+    *StringPtr++ = BOXDRAW_VERTICAL;\r
+\r
+    for (Count = 0; Count < LargestString; Count++) {\r
+      StringPtr[Count] = L' ';\r
+    }\r
+\r
+    StringLen = EfiStrLen (StringArray[Index]);\r
+    if (StringLen > LargestString) {\r
+      StringLen = LargestString;\r
+    }\r
+    EfiCopyMem (\r
+      StringPtr + ((LargestString - StringLen) / 2),\r
+      StringArray[Index],\r
+      StringLen * sizeof (CHAR16)\r
+      );\r
+    StringPtr += LargestString;\r
+\r
+    *StringPtr++ = BOXDRAW_VERTICAL;\r
+    *StringPtr = L'\0';\r
+\r
+    ConOut->SetCursorPosition (ConOut, Start, Top + 1 + Index);\r
+    ConOut->OutputString (ConOut, LineBuffer);\r
+  }\r
+\r
+  StringPtr = &LineBuffer[0];\r
+  *StringPtr++ = BOXDRAW_UP_RIGHT;\r
+  for (Index = 0; Index < LargestString; Index++) {\r
+    *StringPtr++ = BOXDRAW_HORIZONTAL;\r
+  }\r
+  *StringPtr++ = BOXDRAW_UP_LEFT;\r
+  *StringPtr = L'\0';\r
+\r
+  ConOut->SetCursorPosition (ConOut, Start, Top + NumberOfLines + 1);\r
+  ConOut->OutputString (ConOut, LineBuffer);\r
+\r
+  do {\r
+    Status = gBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent);\r
+\r
+    //\r
+    // Set a timer event of 1 second expiration\r
+    //\r
+    gBS->SetTimer (\r
+          TimerEvent,\r
+          TimerRelative,\r
+          10000000\r
+          );\r
+\r
+    //\r
+    // Wait for the keystroke event or the timer\r
+    //\r
+    WaitList[0] = gST->ConIn->WaitForKey;\r
+    WaitList[1] = TimerEvent;\r
+    Status      = gBS->WaitForEvent (2, WaitList, &Index);\r
+\r
+    //\r
+    // Check for the timer expiration\r
+    //\r
+    if (!EFI_ERROR (Status) && Index == 1) {\r
+      Status = EFI_TIMEOUT;\r
+    }\r
+\r
+    gBS->CloseEvent (TimerEvent);\r
+  } while (Status == EFI_TIMEOUT);\r
+\r
+  Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
+  EfiCopyMem (KeyValue, &Key, sizeof (EFI_INPUT_KEY));\r
+\r
+  ConOut->SetAttribute (ConOut, CurrentAttribute);\r
+  ConOut->EnableCursor (ConOut, TRUE);\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+ExtractDefault(\r
+  IN VOID                         *Buffer,\r
+  IN UINTN                        *BufferSize,\r
+  UINTN                           Number,\r
+  ...\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+\r
+    Configure the buffer accrording to ConfigBody strings.\r
+\r
+  Arguments:\r
+    DefaultId             - the ID of default.\r
+    Buffer                - the start address of buffer.\r
+    BufferSize            - the size of buffer.\r
+    Number                - the number of the strings.\r
+\r
+  Returns:\r
+    EFI_BUFFER_TOO_SMALL  - the BufferSize is too small to operate.\r
+    EFI_INVALID_PARAMETER - Buffer is NULL or BufferSize is 0.\r
+    EFI_SUCCESS           - Operation successful.\r
+\r
+--*/\r
+{\r
+  VA_LIST                         Args;\r
+  UINTN                           Index;\r
+  UINT32                          TotalLen;\r
+  UINT8                           *BufCfgArray;\r
+  UINT8                           *BufferPos;\r
+  UINT16                          Offset;\r
+  UINT16                          Width;\r
+  UINT8                           *Value;\r
+\r
+  if ((Buffer == NULL) || (BufferSize == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  Offset = 0;\r
+  Width  = 0;\r
+  Value  = NULL;\r
+\r
+  VA_START (Args, Number);\r
+  for (Index = 0; Index < Number; Index++) {\r
+    BufCfgArray = (UINT8 *) VA_ARG (Args, VOID *);\r
+    EfiCopyMem (&TotalLen, BufCfgArray, sizeof (UINT32));\r
+    BufferPos = BufCfgArray + sizeof (UINT32);\r
+\r
+    while ((UINT32)(BufferPos - BufCfgArray) < TotalLen) {\r
+      EfiCopyMem (&Offset, BufferPos, sizeof (UINT16));\r
+      BufferPos += sizeof (UINT16);\r
+      EfiCopyMem (&Width, BufferPos, sizeof (UINT16));\r
+      BufferPos += sizeof (UINT16);\r
+      Value = BufferPos;\r
+      BufferPos += Width;\r
+\r
+      if ((UINTN)(Offset + Width) > *BufferSize) {\r
+        return EFI_BUFFER_TOO_SMALL;\r
+      }\r
+\r
+      EfiCopyMem ((UINT8 *)Buffer + Offset, Value, Width);\r
+    }\r
+  }\r
+  VA_END (Args);\r
+\r
+  *BufferSize = (UINTN)Offset;\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+VOID\r
+SwapBuffer (\r
+  IN OUT UINT8     *Buffer,\r
+  IN UINTN         BufferSize\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Swap bytes in the buffer.\r
+\r
+Arguments:\r
+  Buffer     -  Binary buffer.\r
+  BufferSize -  Size of the buffer in bytes.\r
+\r
+Returns:\r
+  None.\r
+\r
+--*/\r
+{\r
+  UINTN  Index;\r
+  UINT8  Temp;\r
+  UINTN  SwapCount;\r
+\r
+  SwapCount = (BufferSize - 1) / 2;\r
+  for (Index = 0; Index < SwapCount; Index++) {\r
+    Temp = Buffer[Index];\r
+    Buffer[Index] = Buffer[BufferSize - 1 - Index];\r
+    Buffer[BufferSize - 1 - Index] = Temp;\r
+  }\r
+}\r
+\r
+EFI_STATUS\r
+BufferToHexString (\r
+  IN OUT CHAR16    *Str,\r
+  IN UINT8         *Buffer,\r
+  IN UINTN         BufferSize\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Converts binary buffer to Unicode string in reversed byte order from BufToHexString().\r
+\r
+Arguments:\r
+  Str        -  String for output\r
+  Buffer     -  Binary buffer.\r
+  BufferSize -  Size of the buffer in bytes.\r
+\r
+Returns:\r
+  EFI_SUCCESS  -  The function completed successfully.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  UINT8       *NewBuffer;\r
+  UINTN       StrBufferLen;\r
+\r
+  NewBuffer = EfiLibAllocateCopyPool (BufferSize, Buffer);\r
+  SwapBuffer (NewBuffer, BufferSize);\r
+\r
+  StrBufferLen = (BufferSize + 1) * sizeof (CHAR16);\r
+  Status = BufToHexString (Str, &StrBufferLen, NewBuffer, BufferSize);\r
+\r
+  gBS->FreePool (NewBuffer);\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+HexStringToBuffer (\r
+  IN OUT UINT8         *Buffer,\r
+  IN OUT UINTN         *BufferSize,\r
+  IN CHAR16            *Str\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Converts Hex String to binary buffer in reversed byte order from HexStringToBuf().\r
+\r
+Arguments:\r
+    Buffer     - Pointer to buffer that receives the data.\r
+    BufferSize - Length in bytes of the buffer to hold converted data.\r
+                 If routine return with EFI_SUCCESS, containing length of converted data.\r
+                 If routine return with EFI_BUFFER_TOO_SMALL, containg length of buffer desired.\r
+    Str        - String to be converted from.\r
+\r
+Returns:\r
+  EFI_SUCCESS    -  The function completed successfully.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  UINTN       ConvertedStrLen;\r
+\r
+  ConvertedStrLen = 0;\r
+  Status = HexStringToBuf (Buffer, BufferSize, Str, &ConvertedStrLen);\r
+  if (!EFI_ERROR (Status)) {\r
+    SwapBuffer (Buffer, ConvertedStrLen);\r
+  }\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+ConstructConfigHdr (\r
+  IN OUT CHAR16                *ConfigHdr,\r
+  IN OUT UINTN                 *StrBufferLen,\r
+  IN EFI_GUID                  *Guid,\r
+  IN CHAR16                    *Name, OPTIONAL\r
+  IN EFI_HANDLE                *DriverHandle\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Construct <ConfigHdr> using routing information GUID/NAME/PATH.\r
+\r
+Arguments:\r
+  ConfigHdr    - Pointer to the ConfigHdr string.\r
+  StrBufferLen - On input: Length in bytes of buffer to hold the ConfigHdr string.\r
+                 Includes tailing '\0' character.\r
+                 On output:\r
+                    If return EFI_SUCCESS, containing length of ConfigHdr string buffer.\r
+                    If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.\r
+  Guid         - Routing information: GUID.\r
+  Name         - Routing information: NAME.\r
+  DriverHandle - Driver handle which contains the routing information: PATH.\r
+\r
+Returns:\r
+  EFI_SUCCESS          - Routine success.\r
+  EFI_BUFFER_TOO_SMALL - The ConfigHdr string buffer is too small.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                Status;\r
+  UINTN                     NameStrLen;\r
+  UINTN                     DevicePathSize;\r
+  UINTN                     BufferSize;\r
+  CHAR16                    *StrPtr;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+\r
+  if (Name == NULL) {\r
+    //\r
+    // There will be no "NAME" in <ConfigHdr> for  Name/Value storage\r
+    //\r
+    NameStrLen = 0;\r
+  } else {\r
+    //\r
+    // For buffer storage\r
+    //\r
+    NameStrLen = EfiStrLen (Name);\r
+  }\r
+\r
+  //\r
+  // Retrieve DevicePath Protocol associated with this HiiPackageList\r
+  //\r
+  Status = gBS->HandleProtocol (\r
+                  DriverHandle,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  &DevicePath\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  DevicePathSize = EfiDevicePathSize (DevicePath);\r
+\r
+  //\r
+  // GUID=<HexCh>32&NAME=<Alpha>NameStrLen&PATH=<HexChar>DevicePathStrLen <NULL>\r
+  // | 5  |   32   |  6  |   NameStrLen   |  6  |    DevicePathStrLen   |\r
+  //\r
+  BufferSize = (5 + 32 + 6 + NameStrLen + 6 + DevicePathSize * 2 + 1) * sizeof (CHAR16);\r
+  if (*StrBufferLen < BufferSize) {\r
+    *StrBufferLen = BufferSize;\r
+    return EFI_BUFFER_TOO_SMALL;\r
+  }\r
+\r
+  *StrBufferLen = BufferSize;\r
+\r
+  StrPtr = ConfigHdr;\r
+\r
+  EfiStrCpy (StrPtr, L"GUID=");\r
+  StrPtr += 5;\r
+  BufferToHexString (StrPtr, (UINT8 *) Guid, sizeof (EFI_GUID));\r
+  StrPtr += 32;\r
+\r
+  EfiStrCpy (StrPtr, L"&NAME=");\r
+  StrPtr += 6;\r
+  if (Name != NULL) {\r
+    EfiStrCpy (StrPtr, Name);\r
+    StrPtr += NameStrLen;\r
+  }\r
+\r
+  EfiStrCpy (StrPtr, L"&PATH=");\r
+  StrPtr += 6;\r
+  BufferToHexString (StrPtr, (UINT8 *) DevicePath, DevicePathSize);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+BOOLEAN\r
+FindBlockName (\r
+  IN OUT CHAR16                *String,\r
+  UINTN                        Offset,\r
+  UINTN                        Width\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string.\r
+\r
+Arguments:\r
+  String       - The string to be searched in.\r
+  Offset       - Offset in BlockName.\r
+  Width        - Width in BlockName.\r
+\r
+Returns:\r
+  TRUE         - Block name found.\r
+  FALSE        - Block name not found.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  UINTN       Data;\r
+  UINTN       BufferSize;\r
+  UINTN       ConvertedStrLen;\r
+\r
+  while ((String = EfiStrStr (String, L"&OFFSET=")) != NULL) {\r
+    //\r
+    // Skip '&OFFSET='\r
+    //\r
+    String = String + 8;\r
+\r
+    Data = 0;\r
+    BufferSize = sizeof (UINTN);\r
+    Status = HexStringToBuf ((UINT8 *) &Data, &BufferSize, String, &ConvertedStrLen);\r
+    if (EFI_ERROR (Status)) {\r
+      return FALSE;\r
+    }\r
+    String = String + ConvertedStrLen;\r
+\r
+    if (Data != Offset) {\r
+      continue;\r
+    }\r
+\r
+    if (EfiStrnCmp (String, L"&WIDTH=", 7) != 0) {\r
+      return FALSE;\r
+    }\r
+    String = String + 7;\r
+\r
+    Data = 0;\r
+    BufferSize = sizeof (UINTN);\r
+    Status = HexStringToBuf ((UINT8 *) &Data, &BufferSize, String, &ConvertedStrLen);\r
+    if (EFI_ERROR (Status)) {\r
+      return FALSE;\r
+    }\r
+    if (Data == Width) {\r
+      return TRUE;\r
+    }\r
+\r
+    String = String + ConvertedStrLen;\r
+  }\r
+\r
+  return FALSE;\r
+}\r
+\r
+EFI_STATUS\r
+GetBrowserData (\r
+  EFI_GUID                   *VariableGuid, OPTIONAL\r
+  CHAR16                     *VariableName, OPTIONAL\r
+  UINTN                      *BufferSize,\r
+  UINT8                      *Buffer\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser.\r
+\r
+Arguments:\r
+  VariableGuid  - An optional field to indicate the target variable GUID name to use.\r
+  VariableName  - An optional field to indicate the target human-readable variable name.\r
+  BufferSize    - On input: Length in bytes of buffer to hold retrived data.\r
+                  On output:\r
+                    If return EFI_BUFFER_TOO_SMALL, containg length of buffer desired.\r
+  Buffer        - Buffer to hold retrived data.\r
+\r
+Returns:\r
+  EFI_SUCCESS          - Routine success.\r
+  EFI_BUFFER_TOO_SMALL - The intput buffer is too small.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                      Status;\r
+  CHAR16                          *ConfigHdr;\r
+  CHAR16                          *ConfigResp;\r
+  CHAR16                          *StringPtr;\r
+  UINTN                           HeaderLen;\r
+  UINTN                           BufferLen;\r
+  CHAR16                          *Progress;\r
+  EFI_FORM_BROWSER2_PROTOCOL      *FormBrowser2;\r
+  EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r
+\r
+  //\r
+  // Locate protocols for use\r
+  //\r
+  Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, &FormBrowser2);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, &HiiConfigRouting);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Retrive formset storage data from Form Browser\r
+  //\r
+  ConfigHdr = mFakeConfigHdr;\r
+  HeaderLen = EfiStrLen (ConfigHdr);\r
+\r
+  BufferLen = 0x4000;\r
+  ConfigResp = EfiLibAllocateZeroPool (BufferLen + HeaderLen);\r
+\r
+  StringPtr = ConfigResp + HeaderLen;\r
+  *StringPtr = L'&';\r
+  StringPtr++;\r
+\r
+  Status = FormBrowser2->BrowserCallback (\r
+                           FormBrowser2,\r
+                           &BufferLen,\r
+                           StringPtr,\r
+                           TRUE,\r
+                           VariableGuid,\r
+                           VariableName\r
+                           );\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    gBS->FreePool (ConfigResp);\r
+    ConfigResp = EfiLibAllocateZeroPool (BufferLen + HeaderLen);\r
+\r
+    StringPtr = ConfigResp + HeaderLen;\r
+    *StringPtr = L'&';\r
+    StringPtr++;\r
+\r
+    Status = FormBrowser2->BrowserCallback (\r
+                             FormBrowser2,\r
+                             &BufferLen,\r
+                             StringPtr,\r
+                             TRUE,\r
+                             VariableGuid,\r
+                             VariableName\r
+                             );\r
+  }\r
+  if (EFI_ERROR (Status)) {\r
+    gBS->FreePool (ConfigResp);\r
+    return Status;\r
+  }\r
+  EfiCopyMem (ConfigResp, ConfigHdr, HeaderLen * sizeof (UINT16));\r
+\r
+  //\r
+  // Convert <ConfigResp> to buffer data\r
+  //\r
+  Status = HiiConfigRouting->ConfigToBlock (\r
+                               HiiConfigRouting,\r
+                               ConfigResp,\r
+                               Buffer,\r
+                               BufferSize,\r
+                               &Progress\r
+                               );\r
+  gBS->FreePool (ConfigResp);\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+SetBrowserData (\r
+  EFI_GUID                   *VariableGuid, OPTIONAL\r
+  CHAR16                     *VariableName, OPTIONAL\r
+  UINTN                      BufferSize,\r
+  UINT8                      *Buffer,\r
+  CHAR16                     *RequestElement  OPTIONAL\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser.\r
+\r
+Arguments:\r
+  VariableGuid   - An optional field to indicate the target variable GUID name to use.\r
+  VariableName   - An optional field to indicate the target human-readable variable name.\r
+  BufferSize     - Length in bytes of buffer to hold retrived data.\r
+  Buffer         - Buffer to hold retrived data.\r
+  RequestElement - An optional field to specify which part of the buffer data\r
+                   will be send back to Browser. If NULL, the whole buffer of\r
+                   data will be committed to Browser.\r
+                   <RequestElement> ::= &OFFSET=<Number>&WIDTH=<Number>*\r
+\r
+Returns:\r
+  EFI_SUCCESS  - Routine success.\r
+  Other        - Updating Browser uncommitted data failed.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                      Status;\r
+  CHAR16                          *ConfigHdr;\r
+  CHAR16                          *ConfigResp;\r
+  CHAR16                          *StringPtr;\r
+  UINTN                           HeaderLen;\r
+  UINTN                           BufferLen;\r
+  CHAR16                          *Progress;\r
+  EFI_FORM_BROWSER2_PROTOCOL      *FormBrowser2;\r
+  EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r
+  CHAR16                          BlockName[33];\r
+  CHAR16                          *ConfigRequest;\r
+  CHAR16                          *Request;\r
+\r
+  //\r
+  // Locate protocols for use\r
+  //\r
+  Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, &FormBrowser2);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, &HiiConfigRouting);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Prepare <ConfigRequest>\r
+  //\r
+  ConfigHdr = mFakeConfigHdr;\r
+  HeaderLen = EfiStrLen (ConfigHdr);\r
+\r
+  if (RequestElement == NULL) {\r
+    //\r
+    // RequestElement not specified, use "&OFFSET=0&WIDTH=<BufferSize>" as <BlockName>\r
+    //\r
+    BlockName[0] = L'\0';\r
+    EfiStrCpy (BlockName, L"&OFFSET=0&WIDTH=");\r
+\r
+    //\r
+    // String lenghth of L"&OFFSET=0&WIDTH=" is 16\r
+    //\r
+    StringPtr = BlockName + 16;\r
+    BufferLen = sizeof (BlockName) - (16 * sizeof (CHAR16));\r
+    BufToHexString (StringPtr, &BufferLen, (UINT8 *) &BufferSize, sizeof (UINTN));\r
+\r
+    Request = BlockName;\r
+  } else {\r
+    Request = RequestElement;\r
+  }\r
+\r
+  BufferLen = HeaderLen * sizeof (CHAR16) + EfiStrSize (Request);\r
+  ConfigRequest = EfiLibAllocateZeroPool (BufferLen);\r
+\r
+  EfiCopyMem (ConfigRequest, ConfigHdr, HeaderLen * sizeof (CHAR16));\r
+  StringPtr = ConfigRequest + HeaderLen;\r
+  EfiStrCpy (StringPtr, Request);\r
+\r
+  //\r
+  // Convert buffer to <ConfigResp>\r
+  //\r
+  Status = HiiConfigRouting->BlockToConfig (\r
+                                HiiConfigRouting,\r
+                                ConfigRequest,\r
+                                Buffer,\r
+                                BufferSize,\r
+                                &ConfigResp,\r
+                                &Progress\r
+                                );\r
+  if (EFI_ERROR (Status)) {\r
+    gBS->FreePool (ConfigResp);\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Skip <ConfigHdr> and '&'\r
+  //\r
+  StringPtr = ConfigResp + HeaderLen + 1;\r
+\r
+  //\r
+  // Change uncommitted data in Browser\r
+  //\r
+  Status = FormBrowser2->BrowserCallback (\r
+                           FormBrowser2,\r
+                           &BufferSize,\r
+                           StringPtr,\r
+                           FALSE,\r
+                           NULL,\r
+                           NULL\r
+                           );\r
+  gBS->FreePool (ConfigResp);\r
+  return Status;\r
+}\r
diff --git a/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrLibrary.h b/edk2/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrLibrary.h
new file mode 100644 (file)
index 0000000..9c65215
--- /dev/null
@@ -0,0 +1,1127 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  UefiIfrLibrary.h\r
+\r
+Abstract:\r
+\r
+  The file contain all library function for Ifr Operations.\r
+\r
+--*/\r
+\r
+#ifndef _IFRLIBRARY_H\r
+#define _IFRLIBRARY_H\r
+\r
+#include "Tiano.h"\r
+#include "EfiDriverLib.h"\r
+#include "TianoHii.h"\r
+\r
+#include EFI_PROTOCOL_DEFINITION (HiiFont)\r
+#include EFI_PROTOCOL_DEFINITION (HiiImage)\r
+#include EFI_PROTOCOL_DEFINITION (HiiString)\r
+#include EFI_PROTOCOL_DEFINITION (HiiDatabase)\r
+#include EFI_PROTOCOL_DEFINITION (HiiConfigRouting)\r
+#include EFI_PROTOCOL_DEFINITION (HiiConfigAccess)\r
+#include EFI_PROTOCOL_DEFINITION (FormBrowser2)\r
+#include EFI_PROTOCOL_DEFINITION (SimpleTextOut)\r
+\r
+#include EFI_GUID_DEFINITION (GlobalVariable)\r
+\r
+#define IFR_LIB_DEFAULT_STRING_SIZE     0x200\r
+\r
+//\r
+// The architectural variable "Lang" and "LangCodes" are deprecated in UEFI\r
+// specification. While, UEFI specification also states that these deprecated\r
+// variables may be provided for backwards compatibility.\r
+// If "LANG_SUPPORT" is defined, "Lang" and "LangCodes" will be produced;\r
+// If "LANG_SUPPORT" is undefined, "Lang" and "LangCodes" will not be produced.\r
+//\r
+#define LANG_SUPPORT\r
+\r
+#define EFI_LANGUAGE_VARIABLE           L"Lang"\r
+#define EFI_LANGUAGE_CODES_VARIABLE     L"LangCodes"\r
+\r
+#define UEFI_LANGUAGE_VARIABLE          L"PlatformLang"\r
+#define UEFI_LANGUAGE_CODES_VARIABLE    L"PlatformLangCodes"\r
+\r
+//\r
+// Limited buffer size recommended by RFC4646 (4.3.  Length Considerations)\r
+// (42 characters plus a NULL terminator)\r
+//\r
+#define RFC_3066_ENTRY_SIZE             (42 + 1)\r
+#define ISO_639_2_ENTRY_SIZE            3\r
+\r
+#define INVALID_VARSTORE_ID             0\r
+\r
+#define QUESTION_FLAGS              (EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY)\r
+#define QUESTION_FLAGS_MASK         (~QUESTION_FLAGS)\r
+\r
+extern EFI_GUID                  mIfrVendorGuid;\r
+extern EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;\r
+extern EFI_HII_STRING_PROTOCOL   *gIfrLibHiiString;\r
+\r
+#pragma pack(1)\r
+typedef struct {\r
+  EFI_STRING_ID       StringToken;\r
+  EFI_IFR_TYPE_VALUE  Value;\r
+  UINT8               Flags;\r
+} IFR_OPTION;\r
+#pragma pack()\r
+\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  UINT32                         MonotonicCount;\r
+} HII_VENDOR_DEVICE_PATH_NODE;\r
+\r
+typedef struct {\r
+  HII_VENDOR_DEVICE_PATH_NODE    Node;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+typedef struct {\r
+  //\r
+  // Buffer size allocated for Data.\r
+  //\r
+  UINT32                BufferSize;\r
+\r
+  //\r
+  // Offset in Data to append the newly created opcode binary.\r
+  // It will be adjusted automatically in Create***OpCode(), and should be\r
+  // initialized to 0 before invocation of a serial of Create***OpCode()\r
+  //\r
+  UINT32                Offset;\r
+\r
+  //\r
+  // The destination buffer for created op-codes\r
+  //\r
+  UINT8                 *Data;\r
+} EFI_HII_UPDATE_DATA;\r
+\r
+VOID\r
+LocateHiiProtocols (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  This function locate Hii relative protocols for later usage.\r
+\r
+Arguments:\r
+  None.\r
+\r
+Returns:\r
+  None.\r
+\r
+--*/\r
+;\r
+\r
+//\r
+// Exported Library functions\r
+//\r
+EFI_STATUS\r
+CreateEndOpCode (\r
+  IN OUT EFI_HII_UPDATE_DATA *Data