Remove the dependence to MdePkg
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Jun 2006 08:07:19 +0000 (08:07 +0000)
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Jun 2006 08:07:19 +0000 (08:07 +0000)
1. add Include folder which contain the *.h file which used by Tiano tools.
2. Change ${evn.WORKSPACE}/MdePkg to ${PACKAGE_DIR} in build.xml.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@509 6f19259b-4bc3-4df7-8a09-765794883524

190 files changed:
Tools/Source/TianoTools/Common/build.xml
Tools/Source/TianoTools/CompressDll/build.xml
Tools/Source/TianoTools/CreateMtFile/build.xml
Tools/Source/TianoTools/CustomizedCompress/build.xml
Tools/Source/TianoTools/EfiCompress/build.xml
Tools/Source/TianoTools/EfiRom/build.xml
Tools/Source/TianoTools/FlashMap/build.xml
Tools/Source/TianoTools/FwImage/build.xml
Tools/Source/TianoTools/GenAcpiTable/build.xml
Tools/Source/TianoTools/GenCRC32Section/build.xml
Tools/Source/TianoTools/GenCapsuleHdr/build.xml
Tools/Source/TianoTools/GenDepex/build.xml
Tools/Source/TianoTools/GenFfsFile/build.xml
Tools/Source/TianoTools/GenFvImage/build.xml
Tools/Source/TianoTools/GenSection/build.xml
Tools/Source/TianoTools/GenTEImage/build.xml
Tools/Source/TianoTools/GuidChk/build.xml
Tools/Source/TianoTools/Include/Base.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/BaseTypes.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/BootMode.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/BootScript.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/Capsule.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/DataHubRecords.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/Dependency.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/EfiImage.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/FirmwareFileSystem.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/FirmwareVolumeHeader.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/FirmwareVolumeImageFormat.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/Hob.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/InternalFormRepresentation.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/MultiPhase.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/StatusCode.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/StatusCodeDataTypeId.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Common/UefiBaseTypes.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Bds.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Cpu.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Metronome.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/MonotonicCounter.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/RealTimeClock.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Reset.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Runtime.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Security.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/SecurityPolicy.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/StatusCode.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Timer.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Variable.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/VariableWrite.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/ArchProtocol/WatchdogTimer.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/DxeCis.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Dxe/SmmCis.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/Acpi.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/AcpiTableStorage.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/Apriori.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/Capsule.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/DataHubRecords.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/DebugImageInfoTable.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/DxeServices.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/EventGroup.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/EventLegacyBios.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/FirmwareFileSystem.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/FrameworkDevicePath.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/GlobalVariable.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/Gpt.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/HobList.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/MemoryAllocationHob.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/PcAnsi.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/SalSystemTable.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/SmBios.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/SmmCommunicate.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/SmramMemoryReserve.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Guid/StatusCodeDataTypeId.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Ia32/ProcessorBind.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/IndustryStandard/Usb.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/IndustryStandard/pci22.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Library/BaseLib.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Library/BaseMemoryLib.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Library/PcdLib.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Library/PeCoffLib.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Library/PrintLib.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/AcpiSupport.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Arp.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/AuthenticationInfo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Bis.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/BlockIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/BootScriptSave.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/BusSpecificDriverOverride.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ComponentName.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/CpuIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DataHub.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DebugPort.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DebugSupport.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Decompress.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DevicePath.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DevicePathFromText.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DevicePathToText.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DevicePathUtilities.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Dhcp4.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DiskIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DriverBinding.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DriverConfiguration.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/DriverDiagnostics.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Ebc.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/EdidActive.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/EdidDiscovered.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/EdidOverride.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/EfiNetworkInterfaceIdentifier.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FileInfo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FileSystemInfo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FileSystemVolumeLabelInfo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FirmwareVolume.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FirmwareVolumeBlock.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FirmwareVolumeDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FormBrowser.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/FormCallback.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/GraphicsOutput.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/GuidedSectionExtraction.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Hash.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Hii.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/IP4.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/IP4Config.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/IScsiInitatorName.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/IdeControllerInit.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/IncompatiblePciDeviceSupport.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Legacy8259.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LegacyBios.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LegacyBiosPlatform.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LegacyInterrupt.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LegacyRegion.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LoadFile.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/LoadedImage.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ManagedNetwork.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Mtftp4.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Pcd.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PciHostBridgeResourceAllocation.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PciHotPlugInit.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PciIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PciPlatform.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PciRootBridgeIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PlatformDriverOverride.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PxeBaseCode.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/PxeBaseCodeCallBack.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ScsiIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ScsiPassThru.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ScsiPassThruExt.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SectionExtraction.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SerialIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/ServiceBinding.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SimpleFileSystem.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SimpleNetwork.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SimplePointer.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SimpleTextIn.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SimpleTextOut.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Smbus.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmAccess.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmBase.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmControl.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmGpiDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmIchnDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmPeriodicTimerDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmPowerButtonDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmStandbyButtonDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmStatusCode.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmSwDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmSxDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/SmmUsbDispatch.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/TapeIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Tcp4.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Udp4.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/UgaDraw.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/UnicodeCollation.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/Usb2HostController.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/UsbHostController.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Protocol/UsbIo.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/ToBeRemoved/Variable.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/ToBeRemoved/WorkingBlockHeader.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Uefi/EfiPxe.h [new file with mode: 0644]
Tools/Source/TianoTools/Include/Uefi/UefiSpec.h [new file with mode: 0644]
Tools/Source/TianoTools/MakeDeps/build.xml
Tools/Source/TianoTools/PeCoffLoader/build.xml
Tools/Source/TianoTools/PeiRebase/build.xml
Tools/Source/TianoTools/SecApResetVectorFixup/build.xml
Tools/Source/TianoTools/SecFixup/build.xml
Tools/Source/TianoTools/SetStamp/build.xml
Tools/Source/TianoTools/SplitFile/build.xml
Tools/Source/TianoTools/StrGather/build.xml
Tools/Source/TianoTools/String/build.xml
Tools/Source/TianoTools/Strip/build.xml
Tools/Source/TianoTools/VfrCompile/build.xml
Tools/Source/TianoTools/ZeroDebugData/build.xml

index a8cec23ded25c34f3f8ea7205855186747c50657..56535944a047ec9b2ea522b4e754839c3f3fce57 100644 (file)
@@ -82,9 +82,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outtype="static"\r
         optimize="speed">\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
 \r
       <fileset dir="${basedir}/Common" \r
         includes="*.c" />\r
index 40df87f92e746823897abe78db8d19473e8aadc5..3e0d78f12e8d187806e40dbb8d8b4b061625b499 100644 (file)
@@ -81,9 +81,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       outputfileproperty="result"\r
       >\r
       <fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <includepath path="${env.JAVA_HOME}/include"/>\r
       <includepath path="${env.JAVA_HOME}/include/win32" if="windows"/>\r
index 56cff1fdb38728e10653c442a3b15651358f19a3..8d96e394b8139b87846142f1525c6a96ae69f7e4 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index 388550a651e76c24721f2c2fbe1266ee47b504c4..07e55950d5d976bb6a0254c336fb898918b0cdd5 100644 (file)
@@ -90,9 +90,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
     </cc>\r
     <if>\r
       <os family="dos"/>\r
index adf40d9586b48f6077d2c8a037f7ef2663a9d94c..b8bf7f54152b91985a48d47eb663bf45e30cd59f 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index 619e9fc280b6eb5344afefe3c3ffe2637dfa7d26..956614fcab52b9500433b4bd3e9c6a6b21772369 100644 (file)
@@ -91,11 +91,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/IndustryStandard"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/IndustryStandard"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index d2bfdd55684a823c822b4de3457737bb08302237..169ca6bc6862d2e4b2d79f92a4e69021c1be5bab 100644 (file)
@@ -96,10 +96,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index 13ecb1f9aa2d38ea116c74bed4175b29710cc659..dc493855ab4a7597a351b3c1aced2df3965bd116 100644 (file)
@@ -90,9 +90,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index b6f242715751fd6cb374d05fd0472abdb6229c9c..c5179bfe20ac58ee6f24d3a26651cddbd59e269f 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index a432c86cc09cbec7b9dbd053bc1acc0f70066f75..c581605352c9c4bd8b2f7bc4cafde6428d5966e0 100644 (file)
@@ -88,9 +88,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
 \r
index 88623078ce72cf2e8683ebd7f5c40e3f37a45ff4..b8265154029b07a3534b00ac0697552261b3203b 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index 9b4b8952dbf097b9c66c93a77f979f7348d35d0b..4cccca4f35361669ef9b579f49333a7da2efd740 100644 (file)
@@ -89,9 +89,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" />\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index 00a1266e5d4468471e0bf542ca97659e9be84164..595523342544108fcc1d4ea92f165b11547c76c6 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index c57ec2968e17e9cb7fefeed2e92b1ad3c1160a78..cc2141d3bb8c5a8351f8a4fa1bb1c4c3b3f42093 100644 (file)
@@ -122,13 +122,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         includes="${FileSet}"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/${ToolName}"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Library"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/ToBeRemoved"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Library"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/ToBeRemoved"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
       <linkerarg value="/nodefaultlib:libc.lib" unless="gcc"/>\r
index 34be36eaa094d6550b24f635ae973fc227c01ebf..18935d3ce8796c73354d8ce856d1548a6901dbd7 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index c0e2c82c74cdd0b07270e63bc30a92005b5f8f27..472160f6733c822cb7fa1db2ea514447ad1c1f97 100644 (file)
@@ -91,10 +91,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index d7b7fba63236a511bdb37d3f6995214f9ae5c16a..478edc6189966d66849a5be9407926a449c2464f 100644 (file)
@@ -91,11 +91,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         defaultexcludes="TRUE" \r
         excludes="*.xml *.inf"/>\r
 \r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Guid"/>\r
-      <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Common"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Guid"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/Protocol"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
                        <linkerarg value="${LIB_DIR}/CommonTools.lib"/>\r
                        <linkerarg value="${LIB_DIR}/CustomizedCompress.lib"/>\r
diff --git a/Tools/Source/TianoTools/Include/Base.h b/Tools/Source/TianoTools/Include/Base.h
new file mode 100644 (file)
index 0000000..99ed686
--- /dev/null
@@ -0,0 +1,28 @@
+/** @file\r
+\r
+  Root include file for Mde Package Base type modules\r
+\r
+  This is the include file for any module of type base. Base modules only use \r
+  types defined via this include file and can be ported easily to any \r
+  environment. There are a set of base libraries in the Mde Package that can\r
+  be used to implement base modules.\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+#ifndef __BASE_H__\r
+#define __BASE_H__\r
+\r
+#include <Common/BaseTypes.h>\r
+#include <Common/EfiImage.h>\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/BaseTypes.h b/Tools/Source/TianoTools/Include/Common/BaseTypes.h
new file mode 100644 (file)
index 0000000..86c3c71
--- /dev/null
@@ -0,0 +1,206 @@
+/** @file\r
+  Processor or Compiler specific defines for all supported processors.\r
+\r
+  This file is stand alone self consistent set of definitions. \r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  BaseTypes.h\r
+\r
+**/\r
+\r
+#ifndef __BASE_TYPES_H__\r
+#define __BASE_TYPES_H__\r
+\r
+//\r
+// Include processor specific binding\r
+//\r
+#include <ProcessorBind.h>\r
+\r
+#define MEMORY_FENCE()  MemoryFence ()\r
+#define BREAKPOINT()    CpuBreakpoint ()\r
+#define DEADLOOP()      CpuDeadLoop ()\r
+\r
+typedef struct {\r
+  UINT32  Data1;\r
+  UINT16  Data2;\r
+  UINT16  Data3;\r
+  UINT8   Data4[8];\r
+} GUID;\r
+\r
+\r
+//\r
+// Modifiers to absract standard types to aid in debug of problems\r
+//\r
+#define CONST     const\r
+#define STATIC    static\r
+#define VOID      void\r
+\r
+//\r
+// Modifiers for Data Types used to self document code.\r
+// This concept is borrowed for UEFI specification.\r
+//\r
+#ifndef IN\r
+//\r
+// Some other envirnments use this construct, so #ifndef to prevent\r
+// mulitple definition.\r
+//\r
+#define IN\r
+#define OUT\r
+#define OPTIONAL\r
+#endif\r
+\r
+//\r
+// Constants. They may exist in other build structures, so #ifndef them.\r
+//\r
+#ifndef TRUE\r
+//\r
+// BugBug: UEFI specification claims 1 and 0. We are concerned about the \r
+//  complier portability so we did it this way.\r
+//\r
+#define TRUE  ((BOOLEAN)(1==1))\r
+#endif\r
+\r
+#ifndef FALSE\r
+#define FALSE ((BOOLEAN)(0==1))\r
+#endif\r
+\r
+#ifndef NULL\r
+#define NULL  ((VOID *) 0)\r
+#endif\r
+\r
+//\r
+//  Support for variable length argument lists using the ANSI standard.\r
+//  \r
+//  Since we are using the ANSI standard we used the standard nameing and\r
+//  did not folow the coding convention\r
+//\r
+//  VA_LIST  - typedef for argument list.\r
+//  VA_START (VA_LIST Marker, argument before the ...) - Init Marker for use.\r
+//  VA_END (VA_LIST Marker) - Clear Marker\r
+//  VA_ARG (VA_LIST Marker, var arg size) - Use Marker to get an argumnet from\r
+//    the ... list. You must know the size and pass it in this macro.\r
+//\r
+//  example:\r
+//\r
+//  UINTN\r
+//  ExampleVarArg (\r
+//    IN UINTN  NumberOfArgs,\r
+//    ...\r
+//    )\r
+//  {\r
+//    VA_LIST Marker;\r
+//    UINTN   Index;\r
+//    UINTN   Result;\r
+//\r
+//    //\r
+//    // Initialize the Marker\r
+//    //\r
+//    VA_START (Marker, NumberOfArgs);\r
+//    for (Index = 0, Result = 0; Index < NumberOfArgs; Index++) {\r
+//      //\r
+//      // The ... list is a series of UINTN values, so average them up.\r
+//      //\r
+//      Result += VA_ARG (Marker, UINTN);\r
+//    }\r
+//\r
+//    VA_END (Marker);\r
+//    return Result\r
+//  }\r
+//\r
+\r
+#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))\r
+\r
+//\r
+// Also support coding convention rules for var arg macros\r
+//\r
+#ifndef VA_START\r
+\r
+typedef CHAR8 *VA_LIST;\r
+#define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))\r
+#define VA_ARG(ap, t)   (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))\r
+#define VA_END(ap)      (ap = (VA_LIST) 0)\r
+\r
+#endif\r
+\r
+///\r
+///  CONTAINING_RECORD - returns a pointer to the structure\r
+///      from one of it's elements.\r
+///\r
+#define _CR(Record, TYPE, Field)  ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))\r
+\r
+///\r
+///  ALIGN_POINTER - aligns a pointer to the lowest boundry\r
+///\r
+#define ALIGN_POINTER(p, s) ((VOID *) ((p) + (((s) - ((UINTN) (p))) & ((s) - 1))))\r
+\r
+///\r
+///  ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor\r
+///\r
+#define ALIGN_VARIABLE(Value, Adjustment) \\r
+  Adjustment = 0U; \\r
+  if ((UINTN) (Value) % sizeof (UINTN)) { \\r
+    (Adjustment) = (UINTN)(sizeof (UINTN) - ((UINTN) (Value) % sizeof (UINTN))); \\r
+  } \\r
+  (Value) = (UINTN)((UINTN) (Value) + (UINTN) (Adjustment))\r
+\r
+//\r
+// EFI Error Codes common to all execution phases\r
+//\r
+\r
+typedef INTN RETURN_STATUS;\r
+\r
+///\r
+/// Set the upper bit to indicate EFI Error.\r
+///\r
+#define ENCODE_ERROR(a)              (MAX_BIT | (a))\r
+\r
+#define ENCODE_WARNING(a)            (a)\r
+#define RETURN_ERROR(a)              ((a) < 0)\r
+\r
+#define RETURN_SUCCESS               0\r
+#define RETURN_LOAD_ERROR            ENCODE_ERROR (1)\r
+#define RETURN_INVALID_PARAMETER     ENCODE_ERROR (2)\r
+#define RETURN_UNSUPPORTED           ENCODE_ERROR (3)\r
+#define RETURN_BAD_BUFFER_SIZE       ENCODE_ERROR (4)\r
+#define RETURN_BUFFER_TOO_SMALL      ENCODE_ERROR (5)\r
+#define RETURN_NOT_READY             ENCODE_ERROR (6)\r
+#define RETURN_DEVICE_ERROR          ENCODE_ERROR (7)\r
+#define RETURN_WRITE_PROTECTED       ENCODE_ERROR (8)\r
+#define RETURN_OUT_OF_RESOURCES      ENCODE_ERROR (9)\r
+#define RETURN_VOLUME_CORRUPTED      ENCODE_ERROR (10)\r
+#define RETURN_VOLUME_FULL           ENCODE_ERROR (11)\r
+#define RETURN_NO_MEDIA              ENCODE_ERROR (12)\r
+#define RETURN_MEDIA_CHANGED         ENCODE_ERROR (13)\r
+#define RETURN_NOT_FOUND             ENCODE_ERROR (14)\r
+#define RETURN_ACCESS_DENIED         ENCODE_ERROR (15)\r
+#define RETURN_NO_RESPONSE           ENCODE_ERROR (16)\r
+#define RETURN_NO_MAPPING            ENCODE_ERROR (17)\r
+#define RETURN_TIMEOUT               ENCODE_ERROR (18)\r
+#define RETURN_NOT_STARTED           ENCODE_ERROR (19)\r
+#define RETURN_ALREADY_STARTED       ENCODE_ERROR (20)\r
+#define RETURN_ABORTED               ENCODE_ERROR (21)\r
+#define RETURN_ICMP_ERROR            ENCODE_ERROR (22)\r
+#define RETURN_TFTP_ERROR            ENCODE_ERROR (23)\r
+#define RETURN_PROTOCOL_ERROR        ENCODE_ERROR (24)\r
+#define RETURN_INCOMPATIBLE_VERSION  ENCODE_ERROR (25)\r
+#define RETURN_SECURITY_VIOLATION    ENCODE_ERROR (26)\r
+#define RETURN_CRC_ERROR             ENCODE_ERROR (27)\r
+#define RETURN_END_OF_MEDIA          ENCODE_ERROR (28)\r
+#define RETURN_END_OF_FILE           ENCODE_ERROR (31)\r
+\r
+#define RETURN_WARN_UNKNOWN_GLYPH    ENCODE_WARNING (1)\r
+#define RETURN_WARN_DELETE_FAILURE   ENCODE_WARNING (2)\r
+#define RETURN_WARN_WRITE_FAILURE    ENCODE_WARNING (3)\r
+#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)\r
+\r
+typedef UINT64 PHYSICAL_ADDRESS;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/BootMode.h b/Tools/Source/TianoTools/Include/Common/BootMode.h
new file mode 100644 (file)
index 0000000..2f2c516
--- /dev/null
@@ -0,0 +1,37 @@
+/** @file\r
+  This includes for the Boot mode information.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  BootMode.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from PeiCis 0.91 spec.\r
+\r
+**/\r
+\r
+#ifndef __EFI_BOOT_MODE_H__\r
+#define __EFI_BOOT_MODE_H__\r
+\r
+#define BOOT_WITH_FULL_CONFIGURATION                  0x00\r
+#define BOOT_WITH_MINIMAL_CONFIGURATION               0x01\r
+#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES        0x02\r
+#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03\r
+#define BOOT_WITH_DEFAULT_SETTINGS                    0x04\r
+#define BOOT_ON_S4_RESUME                             0x05\r
+#define BOOT_ON_S5_RESUME                             0x06\r
+#define BOOT_ON_S2_RESUME                             0x10\r
+#define BOOT_ON_S3_RESUME                             0x11\r
+#define BOOT_ON_FLASH_UPDATE                          0x12\r
+#define BOOT_IN_RECOVERY_MODE                         0x20\r
+#define BOOT_IN_RECOVERY_MODE_MASK                    0x40\r
+#define BOOT_SPECIAL_MASK                             0x80\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/BootScript.h b/Tools/Source/TianoTools/Include/Common/BootScript.h
new file mode 100644 (file)
index 0000000..12bcc5b
--- /dev/null
@@ -0,0 +1,198 @@
+/** @file\r
+  This file declares the related BootScript definitions and some SMBus definitions.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  BootScript.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are defined in BootScript Spec 0.91 and SmBus PPI spec 0.9.\r
+\r
+**/\r
+\r
+#ifndef _EFI_SCRIPT_H_\r
+#define _EFI_SCRIPT_H_\r
+\r
+#define EFI_ACPI_S3_RESUME_SCRIPT_TABLE               0x00\r
+\r
+//\r
+// Boot Script Opcode Definitions\r
+//\r
+\r
+#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE               0x00\r
+#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE          0x01\r
+#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE              0x02\r
+#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE         0x03\r
+#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE       0x04\r
+#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE  0x05\r
+#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE          0x06\r
+#define EFI_BOOT_SCRIPT_STALL_OPCODE                  0x07\r
+#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE               0x08\r
+\r
+#define EFI_BOOT_SCRIPT_TABLE_OPCODE                  0xAA\r
+#define EFI_BOOT_SCRIPT_TERMINATE_OPCODE              0xFF\r
+\r
+//\r
+// EFI Boot Script Width\r
+//\r
+typedef enum {\r
+  EfiBootScriptWidthUint8,\r
+  EfiBootScriptWidthUint16,\r
+  EfiBootScriptWidthUint32,\r
+  EfiBootScriptWidthUint64,\r
+  EfiBootScriptWidthFifoUint8,\r
+  EfiBootScriptWidthFifoUint16,\r
+  EfiBootScriptWidthFifoUint32,\r
+  EfiBootScriptWidthFifoUint64,\r
+  EfiBootScriptWidthFillUint8,\r
+  EfiBootScriptWidthFillUint16,\r
+  EfiBootScriptWidthFillUint32,\r
+  EfiBootScriptWidthFillUint64,\r
+  EfiBootScriptWidthMaximum\r
+} EFI_BOOT_SCRIPT_WIDTH;\r
+\r
+//\r
+// EFI Smbus Device Address, Smbus Device Command, Smbus Operation\r
+//\r
+typedef struct {\r
+  UINTN SmbusDeviceAddress : 7;\r
+} EFI_SMBUS_DEVICE_ADDRESS;\r
+\r
+typedef UINTN EFI_SMBUS_DEVICE_COMMAND;\r
+\r
+typedef enum _EFI_SMBUS_OPERATION\r
+{\r
+  EfiSmbusQuickRead,\r
+  EfiSmbusQuickWrite,\r
+  EfiSmbusReceiveByte,\r
+  EfiSmbusSendByte,\r
+  EfiSmbusReadByte,\r
+  EfiSmbusWriteByte,\r
+  EfiSmbusReadWord,\r
+  EfiSmbusWriteWord,\r
+  EfiSmbusReadBlock,\r
+  EfiSmbusWriteBlock,\r
+  EfiSmbusProcessCall,\r
+  EfiSmbusBWBRProcessCall\r
+} EFI_SMBUS_OPERATION;\r
+\r
+//\r
+// Boot Script Opcode Header Structure Definitions\r
+//\r
+\r
+typedef struct {\r
+  UINT16  OpCode;\r
+  UINT8   Length;\r
+} EFI_BOOT_SCRIPT_GENERIC_HEADER;\r
+\r
+typedef struct {\r
+  UINT16  OpCode;\r
+  UINT8   Length;\r
+  UINT16  Version;\r
+  UINT32  TableLength;\r
+  UINT16  Reserved[2];\r
+} EFI_BOOT_SCRIPT_TABLE_HEADER;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+} EFI_BOOT_SCRIPT_COMMON_HEADER;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINTN                 Count;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_IO_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_IO_READ_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINTN                 Count;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_MEM_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_MEM_READ_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINTN                 Count;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_BOOT_SCRIPT_WIDTH Width;\r
+  UINT64                Address;\r
+} EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE;\r
+\r
+typedef struct {\r
+  UINT16                    OpCode;\r
+  UINT8                     Length;\r
+  EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress;\r
+  EFI_SMBUS_DEVICE_COMMAND  Command;\r
+  EFI_SMBUS_OPERATION       Operation;\r
+  BOOLEAN                   PecCheck;\r
+  UINTN                     DataSize;\r
+} EFI_BOOT_SCRIPT_SMBUS_EXECUTE;\r
+\r
+typedef struct {\r
+  UINT16  OpCode;\r
+  UINT8   Length;\r
+  UINTN   Duration;\r
+} EFI_BOOT_SCRIPT_STALL;\r
+\r
+typedef struct {\r
+  UINT16                OpCode;\r
+  UINT8                 Length;\r
+  EFI_PHYSICAL_ADDRESS  EntryPoint;\r
+} EFI_BOOT_SCRIPT_DISPATCH;\r
+\r
+typedef struct {\r
+  UINT16  OpCode;\r
+  UINT8   Length;\r
+} EFI_BOOT_SCRIPT_TERMINATE;\r
+\r
+typedef union {\r
+  EFI_BOOT_SCRIPT_GENERIC_HEADER        *Header;\r
+  EFI_BOOT_SCRIPT_TABLE_HEADER          *TableInfo;\r
+  EFI_BOOT_SCRIPT_IO_WRITE              *IoWrite;\r
+  EFI_BOOT_SCRIPT_IO_READ_WRITE         *IoReadWrite;\r
+  EFI_BOOT_SCRIPT_MEM_WRITE             *MemWrite;\r
+  EFI_BOOT_SCRIPT_MEM_READ_WRITE        *MemReadWrite;\r
+  EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE      *PciWrite;\r
+  EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE *PciReadWrite;\r
+  EFI_BOOT_SCRIPT_SMBUS_EXECUTE         *SmbusExecute;\r
+  EFI_BOOT_SCRIPT_STALL                 *Stall;\r
+  EFI_BOOT_SCRIPT_DISPATCH              *Dispatch;\r
+  EFI_BOOT_SCRIPT_TERMINATE             *Terminate;\r
+  EFI_BOOT_SCRIPT_COMMON_HEADER         *CommonHeader;\r
+  UINT8                                 *Raw;\r
+} BOOT_SCRIPT_POINTERS;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/Capsule.h b/Tools/Source/TianoTools/Include/Common/Capsule.h
new file mode 100644 (file)
index 0000000..0434fdf
--- /dev/null
@@ -0,0 +1,67 @@
+/** @file\r
+  Defines for the EFI Capsule functionality.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  Capsule.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Capsule Spec Version 0.9.\r
+\r
+**/\r
+\r
+#ifndef _EFI_CAPSULE_H_\r
+#define _EFI_CAPSULE_H_\r
+\r
+//\r
+// Bits in the flags field of the capsule header\r
+//\r
+#define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001  // supports setup changes\r
+\r
+\r
+#define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE  EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')\r
+\r
+//\r
+// An array of these describe the blocks that make up a capsule for\r
+// a capsule update.\r
+//\r
+typedef struct {\r
+  UINT64                Length;     // length of the data block\r
+  EFI_PHYSICAL_ADDRESS  Data;       // physical address of the data block\r
+  UINT32                Signature;  // CBDS\r
+  UINT32                CheckSum;   // to sum this structure to 0\r
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
+\r
+typedef struct {\r
+  EFI_GUID  OemGuid;\r
+  UINT32    HeaderSize;\r
+  //\r
+  // UINT8                       OemHdrData[];\r
+  //\r
+} EFI_CAPSULE_OEM_HEADER;\r
+\r
+typedef struct {\r
+  EFI_GUID  CapsuleGuid;\r
+  UINT32    HeaderSize;\r
+  UINT32    Flags;\r
+  UINT32    CapsuleImageSize;\r
+  UINT32    SequenceNumber;\r
+  EFI_GUID  InstanceId;\r
+  UINT32    OffsetToSplitInformation;\r
+  UINT32    OffsetToCapsuleBody;\r
+  UINT32    OffsetToOemDefinedHeader;\r
+  UINT32    OffsetToAuthorInformation;\r
+  UINT32    OffsetToRevisionInformation;\r
+  UINT32    OffsetToShortDescription;\r
+  UINT32    OffsetToLongDescription;\r
+  UINT32    OffsetToApplicableDevices;\r
+} EFI_CAPSULE_HEADER;\r
+\r
+#endif // #ifndef _EFI_CAPSULE_H_\r
diff --git a/Tools/Source/TianoTools/Include/Common/DataHubRecords.h b/Tools/Source/TianoTools/Include/Common/DataHubRecords.h
new file mode 100644 (file)
index 0000000..0bc8f23
--- /dev/null
@@ -0,0 +1,1847 @@
+/** @file\r
+  This file defines GUIDs and associated data structures for records \r
+  posted to the Data Hub. \r
+  The producers of these records use these definitions to construct \r
+  records.\r
+  The consumers of these records use these definitions to retrieve,\r
+  filter and parse records.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  DataHubRecords.h\r
+\r
+  @par Revision Reference:\r
+  DataHubRecord.h include all data hub sub class defitions from Cache subclass \r
+  spec 0.9, DataHub SubClass spec 0.9, Memory SubClass Spec 0.9, Processor \r
+  Subclass spec 0.9,Misc SubClass spec 0.9.\r
+\r
+**/\r
+\r
+#ifndef _DATAHUB_RECORDS_H_\r
+#define _DATAHUB_RECORDS_H_\r
+\r
+#define EFI_PROCESSOR_SUBCLASS_VERSION    0x00010000\r
+\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct _USB_PORT_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} USB_PORT_DEVICE_PATH;\r
+\r
+//\r
+// IDE\r
+//\r
+typedef struct _IDE_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} IDE_DEVICE_PATH;\r
+\r
+//\r
+// RMC Connector\r
+//\r
+typedef struct _RMC_CONN_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} RMC_CONN_DEVICE_PATH;\r
+\r
+//\r
+// RIDE\r
+//\r
+typedef struct _RIDE_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} RIDE_DEVICE_PATH;\r
+\r
+//\r
+// Gigabit NIC\r
+//\r
+typedef struct _GB_NIC_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciXBridgeDevicePath;\r
+  PCI_DEVICE_PATH           PciXBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} GB_NIC_DEVICE_PATH;\r
+\r
+//\r
+// P/S2 Connector\r
+//\r
+typedef struct _PS2_CONN_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           LpcBridgeDevicePath;\r
+  ACPI_HID_DEVICE_PATH      LpcBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} PS2_CONN_DEVICE_PATH;\r
+\r
+//\r
+// Serial Port Connector\r
+//\r
+typedef struct _SERIAL_CONN_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           LpcBridgeDevicePath;\r
+  ACPI_HID_DEVICE_PATH      LpcBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} SERIAL_CONN_DEVICE_PATH;\r
+\r
+//\r
+// Parallel Port Connector\r
+//\r
+typedef struct _PARALLEL_CONN_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           LpcBridgeDevicePath;\r
+  ACPI_HID_DEVICE_PATH      LpcBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} PARALLEL_CONN_DEVICE_PATH;\r
+\r
+//\r
+// Floopy Connector\r
+//\r
+typedef struct _FLOOPY_CONN_DEVICE_PATH {\r
+  ACPI_HID_DEVICE_PATH      PciRootBridgeDevicePath;\r
+  PCI_DEVICE_PATH           LpcBridgeDevicePath;\r
+  ACPI_HID_DEVICE_PATH      LpcBusDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL  EndDevicePath;\r
+} FLOOPY_CONN_DEVICE_PATH;\r
+\r
+typedef union _EFI_MISC_PORT_DEVICE_PATH {\r
+  USB_PORT_DEVICE_PATH      UsbDevicePath;\r
+  IDE_DEVICE_PATH           IdeDevicePath;\r
+  RMC_CONN_DEVICE_PATH      RmcConnDevicePath;\r
+  RIDE_DEVICE_PATH          RideDevicePath;\r
+  GB_NIC_DEVICE_PATH        GbNicDevicePath;\r
+  PS2_CONN_DEVICE_PATH      Ps2ConnDevicePath;\r
+  SERIAL_CONN_DEVICE_PATH   SerialConnDevicePath;\r
+  PARALLEL_CONN_DEVICE_PATH ParallelConnDevicePath;\r
+  FLOOPY_CONN_DEVICE_PATH   FloppyConnDevicePath;\r
+} EFI_MISC_PORT_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
+//\r
+// String Token Definition\r
+//\r
+#define EFI_STRING_TOKEN    UINT16\r
+\r
+typedef struct {\r
+  UINT32    Version;\r
+  UINT32    HeaderSize;\r
+  UINT16    Instance;\r
+  UINT16    SubInstance;\r
+  UINT32    RecordType;    \r
+} EFI_SUBCLASS_TYPE1_HEADER;\r
+\r
+typedef struct {\r
+  EFI_GUID    ProducerName;\r
+  UINT16      Instance;\r
+  UINT16      SubInstance;\r
+} EFI_INTER_LINK_DATA;\r
+\r
+\r
+//\r
+// EXP data\r
+//\r
+\r
+typedef struct {\r
+  UINT16    Value;\r
+  UINT16    Exponent;\r
+} EFI_EXP_BASE2_DATA;\r
+\r
+\r
+typedef EFI_EXP_BASE10_DATA   EFI_PROCESSOR_MAX_CORE_FREQUENCY_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA   EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA   EFI_PROCESSOR_CORE_FREQUENCY_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA  *EFI_PROCESSOR_CORE_FREQUENCY_LIST_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA  *EFI_PROCESSOR_FSB_FREQUENCY_LIST_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA   EFI_PROCESSOR_FSB_FREQUENCY_DATA;\r
+\r
+typedef STRING_REF            EFI_PROCESSOR_VERSION_DATA;\r
+\r
+typedef STRING_REF            EFI_PROCESSOR_MANUFACTURER_DATA;\r
+\r
+typedef STRING_REF            EFI_PROCESSOR_SERIAL_NUMBER_DATA;\r
+\r
+typedef STRING_REF            EFI_PROCESSOR_ASSET_TAG_DATA;\r
+\r
+typedef struct {\r
+  UINT32  ProcessorSteppingId:4;\r
+  UINT32  ProcessorModel:     4;\r
+  UINT32  ProcessorFamily:    4;\r
+  UINT32  ProcessorType:      2;\r
+  UINT32  ProcessorReserved1: 2;\r
+  UINT32  ProcessorXModel:    4;\r
+  UINT32  ProcessorXFamily:   8;\r
+  UINT32  ProcessorReserved2: 4;\r
+} EFI_PROCESSOR_SIGNATURE;\r
+\r
+typedef struct {\r
+  UINT32  ProcessorBrandIndex :8;\r
+  UINT32  ProcessorClflush    :8;\r
+  UINT32  ProcessorReserved   :8;\r
+  UINT32  ProcessorDfltApicId :8;\r
+} EFI_PROCESSOR_MISC_INFO;\r
+\r
+typedef struct {\r
+  UINT32  ProcessorFpu:       1;\r
+  UINT32  ProcessorVme:       1;\r
+  UINT32  ProcessorDe:        1;\r
+  UINT32  ProcessorPse:       1;\r
+  UINT32  ProcessorTsc:       1;\r
+  UINT32  ProcessorMsr:       1;\r
+  UINT32  ProcessorPae:       1;\r
+  UINT32  ProcessorMce:       1;\r
+  UINT32  ProcessorCx8:       1;\r
+  UINT32  ProcessorApic:      1;\r
+  UINT32  ProcessorReserved1: 1;\r
+  UINT32  ProcessorSep:       1;\r
+  UINT32  ProcessorMtrr:      1;\r
+  UINT32  ProcessorPge:       1;\r
+  UINT32  ProcessorMca:       1;\r
+  UINT32  ProcessorCmov:      1;\r
+  UINT32  ProcessorPat:       1;\r
+  UINT32  ProcessorPse36:     1;\r
+  UINT32  ProcessorPsn:       1;\r
+  UINT32  ProcessorClfsh:     1;\r
+  UINT32  ProcessorReserved2: 1;\r
+  UINT32  ProcessorDs:        1;\r
+  UINT32  ProcessorAcpi:      1;\r
+  UINT32  ProcessorMmx:       1;\r
+  UINT32  ProcessorFxsr:      1;\r
+  UINT32  ProcessorSse:       1;\r
+  UINT32  ProcessorSse2:      1;\r
+  UINT32  ProcessorSs:        1;\r
+  UINT32  ProcessorReserved3: 1;\r
+  UINT32  ProcessorTm:        1;\r
+  UINT32  ProcessorReserved4: 2;\r
+} EFI_PROCESSOR_FEATURE_FLAGS;\r
+\r
+typedef struct {\r
+  EFI_PROCESSOR_SIGNATURE     Signature;\r
+  EFI_PROCESSOR_MISC_INFO     MiscInfo;\r
+  UINT32                      Reserved;\r
+  EFI_PROCESSOR_FEATURE_FLAGS FeatureFlags;\r
+} EFI_PROCESSOR_ID_DATA;\r
+\r
+typedef enum {\r
+  EfiProcessorOther    = 1,\r
+  EfiProcessorUnknown  = 2,\r
+  EfiCentralProcessor  = 3,\r
+  EfiMathProcessor     = 4,\r
+  EfiDspProcessor      = 5,\r
+  EfiVideoProcessor    = 6\r
+} EFI_PROCESSOR_TYPE_DATA;\r
+\r
+typedef enum {\r
+  EfiProcessorFamilyOther               = 1,\r
+  EfiProcessorFamilyUnknown             = 2,\r
+  EfiProcessorFamily8086                = 3,\r
+  EfiProcessorFamily80286               = 4,\r
+  EfiProcessorFamilyIntel386            = 5,\r
+  EfiProcessorFamilyIntel486            = 6,\r
+  EfiProcessorFamily8087                = 7,\r
+  EfiProcessorFamily80287               = 8,\r
+  EfiProcessorFamily80387               = 9,\r
+  EfiProcessorFamily80487               = 0x0A,\r
+  EfiProcessorFamilyPentium             = 0x0B,\r
+  EfiProcessorFamilyPentiumPro          = 0x0C,\r
+  EfiProcessorFamilyPentiumII           = 0x0D,\r
+  EfiProcessorFamilyPentiumMMX          = 0x0E,\r
+  EfiProcessorFamilyCeleron             = 0x0F,\r
+  EfiProcessorFamilyPentiumIIXeon       = 0x10,\r
+  EfiProcessorFamilyPentiumIII          = 0x11,\r
+  EfiProcessorFamilyM1                  = 0x12,\r
+  EfiProcessorFamilyM1Reserved1         = 0x13,\r
+  EfiProcessorFamilyM1Reserved2         = 0x14,\r
+  EfiProcessorFamilyM1Reserved3         = 0x15,\r
+  EfiProcessorFamilyM1Reserved4         = 0x16,\r
+  EfiProcessorFamilyM1Reserved5         = 0x17,\r
+  EfiProcessorFamilyM1Reserved6         = 0x18,\r
+  EfiProcessorFamilyK5                  = 0x19,\r
+  EfiProcessorFamilyK5Reserved1         = 0x1A,\r
+  EfiProcessorFamilyK5Reserved2         = 0x1B,\r
+  EfiProcessorFamilyK5Reserved3         = 0x1C,\r
+  EfiProcessorFamilyK5Reserved4         = 0x1D,\r
+  EfiProcessorFamilyK5Reserved5         = 0x1E,\r
+  EfiProcessorFamilyK5Reserved6         = 0x1F,\r
+  EfiProcessorFamilyPowerPC             = 0x20,\r
+  EfiProcessorFamilyPowerPC601          = 0x21,\r
+  EfiProcessorFamilyPowerPC603          = 0x22,\r
+  EfiProcessorFamilyPowerPC603Plus      = 0x23,\r
+  EfiProcessorFamilyPowerPC604          = 0x24,\r
+  EfiProcessorFamilyAlpha2              = 0x30,\r
+  EfiProcessorFamilyMips                = 0x40,\r
+  EfiProcessorFamilySparc               = 0x50,\r
+  EfiProcessorFamily68040               = 0x60,\r
+  EfiProcessorFamily68xxx               = 0x61,\r
+  EfiProcessorFamily68000               = 0x62,\r
+  EfiProcessorFamily68010               = 0x63,\r
+  EfiProcessorFamily68020               = 0x64,\r
+  EfiProcessorFamily68030               = 0x65,\r
+  EfiProcessorFamilyHobbit              = 0x70,\r
+  EfiProcessorFamilyWeitek              = 0x80,\r
+  EfiProcessorFamilyPARISC              = 0x90,\r
+  EfiProcessorFamilyV30                 = 0xA0,\r
+  EfiProcessorFamilyPentiumIIIXeon      = 0xB0,\r
+  EfiProcessorFamilyPentiumIIISpeedStep = 0xB1,\r
+  EfiProcessorFamilyPentium4            = 0xB2,\r
+  EfiProcessorFamilyIntelXeon           = 0xB3,\r
+  EfiProcessorFamilyAS400               = 0xB4,\r
+  EfiProcessorFamilyIntelXeonMP         = 0xB5,\r
+  EfiProcessorFamilyAMDAthlonXP         = 0xB6,\r
+  EfiProcessorFamilyAMDAthlonMP         = 0xB7,\r
+  EfiProcessorFamilyIBM390              = 0xC8,\r
+  EfiProcessorFamilyG4                  = 0xC9,\r
+  EfiProcessorFamilyG5                  = 0xCA,\r
+  EfiProcessorFamilyi860                = 0xFA,\r
+  EfiProcessorFamilyi960                = 0xFB\r
+} EFI_PROCESSOR_FAMILY_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_VOLTAGE_DATA;\r
+\r
+typedef EFI_PHYSICAL_ADDRESS EFI_PROCESSOR_APIC_BASE_ADDRESS_DATA;\r
+\r
+typedef UINT32 EFI_PROCESSOR_APIC_ID_DATA;\r
+\r
+typedef UINT32 EFI_PROCESSOR_APIC_VERSION_NUMBER_DATA;\r
+\r
+typedef enum {\r
+  EfiProcessorIa32Microcode    = 1,\r
+  EfiProcessorIpfPalAMicrocode = 2,\r
+  EfiProcessorIpfPalBMicrocode = 3\r
+} EFI_PROCESSOR_MICROCODE_TYPE;\r
+\r
+typedef struct {\r
+  EFI_PROCESSOR_MICROCODE_TYPE  ProcessorMicrocodeType;\r
+  UINT32                        ProcessorMicrocodeRevisionNumber;\r
+} EFI_PROCESSOR_MICROCODE_REVISION_DATA;\r
+\r
+typedef struct {\r
+  UINT32      CpuStatus                 :3;\r
+  UINT32      Reserved1                 :3;\r
+  UINT32      SocketPopulated           :1;\r
+  UINT32      Reserved2                 :1;\r
+  UINT32      ApicEnable                :1;\r
+  UINT32      BootApplicationProcessor  :1;\r
+  UINT32      Reserved3                 :22;\r
+} EFI_PROCESSOR_STATUS_DATA;\r
+\r
+typedef enum {\r
+  EfiCpuStatusUnknown        = 0,\r
+  EfiCpuStatusEnabled        = 1,\r
+  EfiCpuStatusDisabledByUser = 2,\r
+  EfiCpuStatusDisabledbyBios = 3,\r
+  EfiCpuStatusIdle           = 4,\r
+  EfiCpuStatusOther          = 7\r
+} EFI_CPU_STATUS;\r
+\r
+typedef enum {\r
+  EfiProcessorSocketOther            = 1,\r
+  EfiProcessorSocketUnknown          = 2,\r
+  EfiProcessorSocketDaughterBoard    = 3,\r
+  EfiProcessorSocketZIF              = 4,\r
+  EfiProcessorSocketReplacePiggyBack = 5,\r
+  EfiProcessorSocketNone             = 6,\r
+  EfiProcessorSocketLIF              = 7,\r
+  EfiProcessorSocketSlot1            = 8,\r
+  EfiProcessorSocketSlot2            = 9,\r
+  EfiProcessorSocket370Pin           = 0xA,\r
+  EfiProcessorSocketSlotA            = 0xB,\r
+  EfiProcessorSocketSlotM            = 0xC,\r
+  EfiProcessorSocket423              = 0xD,\r
+  EfiProcessorSocketA462             = 0xE,\r
+  EfiProcessorSocket478              = 0xF,\r
+  EfiProcessorSocket754              = 0x10,\r
+  EfiProcessorSocket940              = 0x11,\r
+  EfiProcessorSocketLG775            = 0x12\r
+\r
+} EFI_PROCESSOR_SOCKET_TYPE_DATA;\r
+\r
+typedef STRING_REF EFI_PROCESSOR_SOCKET_NAME_DATA;\r
+\r
+typedef EFI_INTER_LINK_DATA EFI_CACHE_ASSOCIATION_DATA;\r
+\r
+typedef enum {\r
+  EfiProcessorHealthy        = 1,\r
+  EfiProcessorPerfRestricted = 2,\r
+  EfiProcessorFuncRestricted = 3\r
+} EFI_PROCESSOR_HEALTH_STATUS;  \r
+\r
+typedef UINTN   EFI_PROCESSOR_PACKAGE_NUMBER_DATA;\r
+\r
+\r
+typedef enum {\r
+  ProcessorCoreFrequencyRecordType     = 1,\r
+  ProcessorFsbFrequencyRecordType      = 2,\r
+  ProcessorVersionRecordType           = 3,\r
+  ProcessorManufacturerRecordType      = 4,\r
+  ProcessorSerialNumberRecordType      = 5,\r
+  ProcessorIdRecordType                = 6,\r
+  ProcessorTypeRecordType              = 7,\r
+  ProcessorFamilyRecordType            = 8,\r
+  ProcessorVoltageRecordType           = 9,\r
+  ProcessorApicBaseAddressRecordType   = 10,\r
+  ProcessorApicIdRecordType            = 11,\r
+  ProcessorApicVersionNumberRecordType = 12,\r
+  CpuUcodeRevisionDataRecordType       = 13,\r
+  ProcessorStatusRecordType            = 14,\r
+  ProcessorSocketTypeRecordType        = 15,\r
+  ProcessorSocketNameRecordType        = 16,\r
+  CacheAssociationRecordType           = 17,\r
+  ProcessorMaxCoreFrequencyRecordType  = 18,\r
+  ProcessorAssetTagRecordType          = 19,\r
+  ProcessorMaxFsbFrequencyRecordType   = 20,\r
+  ProcessorPackageNumberRecordType     = 21,\r
+  ProcessorCoreFrequencyListRecordType = 22,\r
+  ProcessorFsbFrequencyListRecordType  = 23,\r
+  ProcessorHealthStatusRecordType      = 24\r
+} EFI_CPU_VARIABLE_RECORD_TYPE;\r
+\r
+typedef union {\r
+  EFI_PROCESSOR_CORE_FREQUENCY_LIST_DATA  ProcessorCoreFrequencyList;\r
+  EFI_PROCESSOR_FSB_FREQUENCY_LIST_DATA   ProcessorFsbFrequencyList;\r
+  EFI_PROCESSOR_SERIAL_NUMBER_DATA        ProcessorSerialNumber;\r
+  EFI_PROCESSOR_CORE_FREQUENCY_DATA       ProcessorCoreFrequency;\r
+  EFI_PROCESSOR_FSB_FREQUENCY_DATA        ProcessorFsbFrequency;\r
+  EFI_PROCESSOR_MAX_CORE_FREQUENCY_DATA   ProcessorMaxCoreFrequency;\r
+  EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA    ProcessorMaxFsbFrequency;\r
+  EFI_PROCESSOR_VERSION_DATA              ProcessorVersion;\r
+  EFI_PROCESSOR_MANUFACTURER_DATA         ProcessorManufacturer;\r
+  EFI_PROCESSOR_ID_DATA                   ProcessorId;\r
+  EFI_PROCESSOR_TYPE_DATA                 ProcessorType;\r
+  EFI_PROCESSOR_FAMILY_DATA               ProcessorFamily;\r
+  EFI_PROCESSOR_VOLTAGE_DATA              ProcessorVoltage;\r
+  EFI_PROCESSOR_APIC_BASE_ADDRESS_DATA    ProcessorApicBase;\r
+  EFI_PROCESSOR_APIC_ID_DATA              ProcessorApicId;\r
+  EFI_PROCESSOR_APIC_VERSION_NUMBER_DATA  ProcessorApicVersionNumber;\r
+  EFI_PROCESSOR_MICROCODE_REVISION_DATA   CpuUcodeRevisionData;\r
+  EFI_PROCESSOR_STATUS_DATA               ProcessorStatus;\r
+  EFI_PROCESSOR_SOCKET_TYPE_DATA          ProcessorSocketType;\r
+  EFI_PROCESSOR_SOCKET_NAME_DATA          ProcessorSocketName;\r
+  EFI_PROCESSOR_ASSET_TAG_DATA            ProcessorAssetTag;\r
+  EFI_PROCESSOR_HEALTH_STATUS             ProcessorHealthStatus;\r
+  EFI_PROCESSOR_PACKAGE_NUMBER_DATA       ProcessorPackageNumber;\r
+} EFI_CPU_VARIABLE_RECORD;\r
+\r
+typedef struct {\r
+  EFI_SUBCLASS_TYPE1_HEADER      DataRecordHeader;\r
+  EFI_CPU_VARIABLE_RECORD        VariableRecord;\r
+} EFI_CPU_DATA_RECORD;\r
+\r
+#define EFI_CACHE_SUBCLASS_VERSION    0x00010000\r
+\r
+\r
+typedef EFI_EXP_BASE2_DATA  EFI_CACHE_SIZE_DATA;\r
+\r
+typedef EFI_EXP_BASE2_DATA  EFI_MAXIMUM_CACHE_SIZE_DATA;\r
+\r
+typedef EFI_EXP_BASE10_DATA EFI_CACHE_SPEED_DATA;\r
+\r
+typedef STRING_REF          EFI_CACHE_SOCKET_DATA;\r
+\r
+typedef struct {\r
+  UINT32  Other         :1;\r
+  UINT32  Unknown       :1;\r
+  UINT32  NonBurst      :1;\r
+  UINT32  Burst         :1;\r
+  UINT32  PipelineBurst :1;\r
+  UINT32  Asynchronous  :1;\r
+  UINT32  Synchronous   :1;\r
+  UINT32  Reserved      :25;\r
+} EFI_CACHE_SRAM_TYPE_DATA;\r
+\r
+typedef enum {  \r
+  EfiCacheErrorOther     = 1,\r
+  EfiCacheErrorUnknown   = 2,\r
+  EfiCacheErrorNone      = 3,\r
+  EfiCacheErrorParity    = 4,\r
+  EfiCacheErrorSingleBit = 5,\r
+  EfiCacheErrorMultiBit  = 6\r
+} EFI_CACHE_ERROR_TYPE_DATA;\r
+\r
+typedef enum {  \r
+  EfiCacheTypeOther       = 1,\r
+  EfiCacheTypeUnknown     = 2,\r
+  EfiCacheTypeInstruction = 3,\r
+  EfiCacheTypeData        = 4,\r
+  EfiCacheTypeUnified     = 5\r
+} EFI_CACHE_TYPE_DATA;\r
+\r
+typedef enum {  \r
+  EfiCacheAssociativityOther        = 1,\r
+  EfiCacheAssociativityUnknown      = 2,\r
+  EfiCacheAssociativityDirectMapped = 3,\r
+  EfiCacheAssociativity2Way         = 4,\r
+  EfiCacheAssociativity4Way         = 5,\r
+  EfiCacheAssociativityFully        = 6,\r
+  EfiCacheAssociativity8Way         = 7,\r
+  EfiCacheAssociativity16Way        = 8\r
+} EFI_CACHE_ASSOCIATIVITY_DATA;\r
+\r
+typedef struct {  \r
+  UINT32    Level           :3;\r
+  UINT32    Socketed        :1;\r
+  UINT32    Reserved2       :1;\r
+  UINT32    Location        :2;\r
+  UINT32    Enable          :1;\r
+  UINT32    OperationalMode :2;\r
+  UINT32    Reserved1       :22;\r
+} EFI_CACHE_CONFIGURATION_DATA;\r
+\r
+#define EFI_CACHE_L1      1\r
+#define EFI_CACHE_L2      2\r
+#define EFI_CACHE_L3      3\r
+#define EFI_CACHE_L4      4\r
+#define EFI_CACHE_LMAX    EFI_CACHE_L4\r
+\r
+#define EFI_CACHE_SOCKETED      1\r
+#define EFI_CACHE_NOT_SOCKETED  0\r
+\r
+typedef enum {\r
+  EfiCacheInternal = 0,\r
+  EfiCacheExternal = 1,\r
+  EfiCacheReserved = 2,\r
+  EfiCacheUnknown  = 3\r
+} EFI_CACHE_LOCATION;\r
+  \r
+#define EFI_CACHE_ENABLED    1\r
+#define EFI_CACHE_DISABLED   0\r
+\r
+typedef enum {\r
+  EfiCacheWriteThrough = 0,\r
+  EfiCacheWriteBack    = 1,\r
+  EfiCacheDynamicMode  = 2,\r
+  EfiCacheUnknownMode  = 3\r
+} EFI_CACHE_OPERATIONAL_MODE;\r
+\r
+\r
+\r
+typedef enum {\r
+  CacheSizeRecordType              = 1,\r
+  MaximumSizeCacheRecordType       = 2,\r
+  CacheSpeedRecordType             = 3,\r
+  CacheSocketRecordType            = 4,\r
+  CacheSramTypeRecordType          = 5,\r
+  CacheInstalledSramTypeRecordType = 6,\r
+  CacheErrorTypeRecordType         = 7,\r
+  CacheTypeRecordType              = 8,\r
+  CacheAssociativityRecordType     = 9,\r
+  CacheConfigRecordType            = 10\r
+} EFI_CACHE_VARIABLE_RECORD_TYPE;\r
+\r
+\r
+typedef union {\r
+  EFI_CACHE_SIZE_DATA             CacheSize;\r
+  EFI_MAXIMUM_CACHE_SIZE_DATA     MaximumCacheSize;\r
+  EFI_CACHE_SPEED_DATA            CacheSpeed;\r
+  EFI_CACHE_SOCKET_DATA           CacheSocket;\r
+  EFI_CACHE_SRAM_TYPE_DATA        CacheSramType;\r
+  EFI_CACHE_SRAM_TYPE_DATA        CacheInstalledSramType;\r
+  EFI_CACHE_ERROR_TYPE_DATA       CacheErrorType;\r
+  EFI_CACHE_TYPE_DATA             CacheType;\r
+  EFI_CACHE_ASSOCIATIVITY_DATA    CacheAssociativity;\r
+  EFI_CACHE_CONFIGURATION_DATA    CacheConfig;\r
+  EFI_CACHE_ASSOCIATION_DATA      CacheAssociation;\r
+} EFI_CACHE_VARIABLE_RECORD;\r
+\r
+typedef struct {\r
+   EFI_SUBCLASS_TYPE1_HEADER      DataRecordHeader;\r
+   EFI_CACHE_VARIABLE_RECORD      VariableRecord;  \r
+} EFI_CACHE_DATA_RECORD;\r
+  \r
+#define EFI_MEMORY_SUBCLASS_VERSION     0x0100\r
+\r
+\r
+#define EFI_MEMORY_SIZE_RECORD_NUMBER                 0x00000001\r
+\r
+typedef enum _EFI_MEMORY_REGION_TYPE {\r
+  EfiMemoryRegionMemory                       = 0x01,\r
+  EfiMemoryRegionReserved                     = 0x02,\r
+  EfiMemoryRegionAcpi                         = 0x03,\r
+  EfiMemoryRegionNvs                          = 0x04\r
+} EFI_MEMORY_REGION_TYPE;\r
+\r
+typedef struct {\r
+  UINT32                      ProcessorNumber;\r
+  UINT16                      StartBusNumber;\r
+  UINT16                      EndBusNumber;\r
+  EFI_MEMORY_REGION_TYPE      MemoryRegionType;\r
+  EFI_EXP_BASE2_DATA          MemorySize;\r
+  EFI_PHYSICAL_ADDRESS        MemoryStartAddress;\r
+} EFI_MEMORY_SIZE_DATA;\r
+\r
+\r
+#define EFI_MEMORY_ARRAY_LOCATION_RECORD_NUMBER       0x00000002\r
+\r
+typedef enum _EFI_MEMORY_ARRAY_LOCATION {\r
+  EfiMemoryArrayLocationOther                 = 0x01,\r
+  EfiMemoryArrayLocationUnknown               = 0x02,\r
+  EfiMemoryArrayLocationSystemBoard           = 0x03,\r
+  EfiMemoryArrayLocationIsaAddonCard          = 0x04,\r
+  EfiMemoryArrayLocationEisaAddonCard         = 0x05,\r
+  EfiMemoryArrayLocationPciAddonCard          = 0x06,\r
+  EfiMemoryArrayLocationMcaAddonCard          = 0x07,\r
+  EfiMemoryArrayLocationPcmciaAddonCard       = 0x08,\r
+  EfiMemoryArrayLocationProprietaryAddonCard  = 0x09,\r
+  EfiMemoryArrayLocationNuBus                 = 0x0A,\r
+  EfiMemoryArrayLocationPc98C20AddonCard      = 0xA0,\r
+  EfiMemoryArrayLocationPc98C24AddonCard      = 0xA1,\r
+  EfiMemoryArrayLocationPc98EAddonCard        = 0xA2,\r
+  EfiMemoryArrayLocationPc98LocalBusAddonCard = 0xA3\r
+} EFI_MEMORY_ARRAY_LOCATION;\r
+\r
+typedef enum _EFI_MEMORY_ARRAY_USE {\r
+  EfiMemoryArrayUseOther                      = 0x01,\r
+  EfiMemoryArrayUseUnknown                    = 0x02,\r
+  EfiMemoryArrayUseSystemMemory               = 0x03,\r
+  EfiMemoryArrayUseVideoMemory                = 0x04,\r
+  EfiMemoryArrayUseFlashMemory                = 0x05,\r
+  EfiMemoryArrayUseNonVolatileRam             = 0x06,\r
+  EfiMemoryArrayUseCacheMemory                = 0x07,\r
+} EFI_MEMORY_ARRAY_USE;\r
+\r
+typedef enum _EFI_MEMORY_ERROR_CORRECTION {\r
+  EfiMemoryErrorCorrectionOther               = 0x01,\r
+  EfiMemoryErrorCorrectionUnknown             = 0x02,\r
+  EfiMemoryErrorCorrectionNone                = 0x03,\r
+  EfiMemoryErrorCorrectionParity              = 0x04,\r
+  EfiMemoryErrorCorrectionSingleBitEcc        = 0x05,\r
+  EfiMemoryErrorCorrectionMultiBitEcc         = 0x06,\r
+  EfiMemoryErrorCorrectionCrc                 = 0x07,\r
+} EFI_MEMORY_ERROR_CORRECTION;\r
+\r
+typedef struct {\r
+  EFI_MEMORY_ARRAY_LOCATION   MemoryArrayLocation;\r
+  EFI_MEMORY_ARRAY_USE        MemoryArrayUse;\r
+  EFI_MEMORY_ERROR_CORRECTION MemoryErrorCorrection;\r
+  EFI_EXP_BASE2_DATA          MaximumMemoryCapacity;\r
+  UINT16                      NumberMemoryDevices;\r
+} EFI_MEMORY_ARRAY_LOCATION_DATA;\r
+\r
+\r
+#define EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER           0x00000003\r
+\r
+typedef enum _EFI_MEMORY_FORM_FACTOR {\r
+  EfiMemoryFormFactorOther                    = 0x01,\r
+  EfiMemoryFormFactorUnknown                  = 0x02,\r
+  EfiMemoryFormFactorSimm                     = 0x03,\r
+  EfiMemoryFormFactorSip                      = 0x04,\r
+  EfiMemoryFormFactorChip                     = 0x05,\r
+  EfiMemoryFormFactorDip                      = 0x06,\r
+  EfiMemoryFormFactorZip                      = 0x07,\r
+  EfiMemoryFormFactorProprietaryCard          = 0x08,\r
+  EfiMemoryFormFactorDimm                     = 0x09,\r
+  EfiMemoryFormFactorTsop                     = 0x0A,\r
+  EfiMemoryFormFactorRowOfChips               = 0x0B,\r
+  EfiMemoryFormFactorRimm                     = 0x0C,\r
+  EfiMemoryFormFactorSodimm                   = 0x0D,\r
+  EfiMemoryFormFactorSrimm                    = 0x0E\r
+} EFI_MEMORY_FORM_FACTOR;\r
+\r
+typedef enum _EFI_MEMORY_ARRAY_TYPE {\r
+  EfiMemoryTypeOther                          = 0x01,\r
+  EfiMemoryTypeUnknown                        = 0x02,\r
+  EfiMemoryTypeDram                           = 0x03,\r
+  EfiMemoryTypeEdram                          = 0x04,\r
+  EfiMemoryTypeVram                           = 0x05,\r
+  EfiMemoryTypeSram                           = 0x06,\r
+  EfiMemoryTypeRam                            = 0x07,\r
+  EfiMemoryTypeRom                            = 0x08,\r
+  EfiMemoryTypeFlash                          = 0x09,\r
+  EfiMemoryTypeEeprom                         = 0x0A,\r
+  EfiMemoryTypeFeprom                         = 0x0B,\r
+  EfiMemoryTypeEprom                          = 0x0C,\r
+  EfiMemoryTypeCdram                          = 0x0D,\r
+  EfiMemoryType3Dram                          = 0x0E,\r
+  EfiMemoryTypeSdram                          = 0x0F,\r
+  EfiMemoryTypeSgram                          = 0x10,\r
+  EfiMemoryTypeRdram                          = 0x11,\r
+  EfiMemoryTypeDdr                            = 0x12\r
+} EFI_MEMORY_ARRAY_TYPE;\r
+\r
+typedef struct {\r
+  UINT32                      Reserved        :1;\r
+  UINT32                      Other           :1;\r
+  UINT32                      Unknown         :1;\r
+  UINT32                      FastPaged       :1;\r
+  UINT32                      StaticColumn    :1;\r
+  UINT32                      PseudoStatic    :1;\r
+  UINT32                      Rambus          :1;\r
+  UINT32                      Synchronous     :1;\r
+  UINT32                      Cmos            :1;\r
+  UINT32                      Edo             :1;\r
+  UINT32                      WindowDram      :1;\r
+  UINT32                      CacheDram       :1;\r
+  UINT32                      Nonvolatile     :1;\r
+  UINT32                      Reserved1       :19;\r
+} EFI_MEMORY_TYPE_DETAIL;\r
+\r
+typedef enum {\r
+  EfiMemoryStateEnabled      = 0,\r
+  EfiMemoryStateUnknown      = 1,\r
+  EfiMemoryStateUnsupported  = 2,\r
+  EfiMemoryStateError        = 3,\r
+  EfiMemoryStateAbsent       = 4,\r
+  EfiMemoryStateDisabled     = 5,\r
+  EfiMemoryStatePartial      = 6\r
+} EFI_MEMORY_STATE;\r
+\r
+typedef struct {\r
+  STRING_REF                  MemoryDeviceLocator;\r
+  STRING_REF                  MemoryBankLocator;\r
+  STRING_REF                  MemoryManufacturer;\r
+  STRING_REF                  MemorySerialNumber;\r
+  STRING_REF                  MemoryAssetTag;\r
+  STRING_REF                  MemoryPartNumber;\r
+  EFI_INTER_LINK_DATA         MemoryArrayLink;\r
+  EFI_INTER_LINK_DATA         MemorySubArrayLink;\r
+  UINT16                      MemoryTotalWidth;\r
+  UINT16                      MemoryDataWidth;\r
+  EFI_EXP_BASE2_DATA          MemoryDeviceSize;\r
+  EFI_MEMORY_FORM_FACTOR      MemoryFormFactor;\r
+  UINT8                       MemoryDeviceSet;\r
+  EFI_MEMORY_ARRAY_TYPE       MemoryType;\r
+  EFI_MEMORY_TYPE_DETAIL      MemoryTypeDetail;\r
+  EFI_EXP_BASE10_DATA         MemorySpeed;\r
+  EFI_MEMORY_STATE            MemoryState;\r
+} EFI_MEMORY_ARRAY_LINK_DATA;\r
+\r
+\r
+#define EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER  0x00000004\r
+\r
+typedef struct {\r
+  EFI_PHYSICAL_ADDRESS        MemoryArrayStartAddress;\r
+  EFI_PHYSICAL_ADDRESS        MemoryArrayEndAddress;\r
+  EFI_INTER_LINK_DATA         PhysicalMemoryArrayLink;\r
+  UINT16                      MemoryArrayPartitionWidth;\r
+} EFI_MEMORY_ARRAY_START_ADDRESS_DATA;\r
+\r
+\r
+#define EFI_MEMORY_DEVICE_START_ADDRESS_RECORD_NUMBER 0x00000005\r
+\r
+typedef struct {\r
+  EFI_PHYSICAL_ADDRESS        MemoryDeviceStartAddress;\r
+  EFI_PHYSICAL_ADDRESS        MemoryDeviceEndAddress;\r
+  EFI_INTER_LINK_DATA         PhysicalMemoryDeviceLink;\r
+  EFI_INTER_LINK_DATA         PhysicalMemoryArrayLink;\r
+  UINT8                       MemoryDevicePartitionRowPosition;\r
+  UINT8                       MemoryDeviceInterleavePosition;\r
+  UINT8                       MemoryDeviceInterleaveDataDepth;\r
+} EFI_MEMORY_DEVICE_START_ADDRESS_DATA;\r
+\r
+\r
+//\r
+//  Memory. Channel Device Type -  SMBIOS Type 37\r
+//\r
+\r
+#define EFI_MEMORY_CHANNEL_TYPE_RECORD_NUMBER         0x00000006\r
+\r
+typedef enum _EFI_MEMORY_CHANNEL_TYPE {\r
+  EfiMemoryChannelTypeOther                   = 1,\r
+  EfiMemoryChannelTypeUnknown                 = 2,\r
+  EfiMemoryChannelTypeRambus                  = 3,\r
+  EfiMemoryChannelTypeSyncLink                = 4\r
+} EFI_MEMORY_CHANNEL_TYPE;\r
+\r
+typedef struct {\r
+  EFI_MEMORY_CHANNEL_TYPE     MemoryChannelType;\r
+  UINT8                       MemoryChannelMaximumLoad;\r
+  UINT8                       MemoryChannelDeviceCount;\r
+} EFI_MEMORY_CHANNEL_TYPE_DATA;\r
+\r
+#define EFI_MEMORY_CHANNEL_DEVICE_RECORD_NUMBER       0x00000007\r
+\r
+typedef struct {\r
+  UINT8                       DeviceId;\r
+  EFI_INTER_LINK_DATA         DeviceLink;\r
+  UINT8                       MemoryChannelDeviceLoad;\r
+} EFI_MEMORY_CHANNEL_DEVICE_DATA;\r
+\r
+\r
+\r
+typedef union _EFI_MEMORY_SUBCLASS_RECORDS {\r
+  EFI_MEMORY_SIZE_DATA                  SizeData;\r
+  EFI_MEMORY_ARRAY_LOCATION_DATA        ArrayLocationData;\r
+  EFI_MEMORY_ARRAY_LINK_DATA            ArrayLink;\r
+  EFI_MEMORY_ARRAY_START_ADDRESS_DATA   ArrayStartAddress;\r
+  EFI_MEMORY_DEVICE_START_ADDRESS_DATA  DeviceStartAddress;\r
+  EFI_MEMORY_CHANNEL_TYPE_DATA          ChannelTypeData;\r
+  EFI_MEMORY_CHANNEL_DEVICE_DATA        ChannelDeviceData;\r
+} EFI_MEMORY_SUBCLASS_RECORDS;\r
+\r
+typedef struct {\r
+  EFI_SUBCLASS_TYPE1_HEADER             Header;\r
+  EFI_MEMORY_SUBCLASS_RECORDS           Record;\r
+} EFI_MEMORY_SUBCLASS_DRIVER_DATA;\r
+\r
+#define EFI_MISC_SUBCLASS_VERSION     0x0100\r
+\r
+#pragma pack(1)\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Last PCI Bus Number\r
+//\r
+#define EFI_MISC_LAST_PCI_BUS_RECORD_NUMBER  0x00000001\r
+\r
+typedef struct {\r
+  UINT8   LastPciBus;\r
+} EFI_MISC_LAST_PCI_BUS_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. BIOS Vendor - SMBIOS Type 0\r
+//\r
+#define EFI_MISC_BIOS_VENDOR_RECORD_NUMBER  0x00000002\r
+\r
+typedef struct {\r
+  UINT32  Reserved1                         :2;\r
+  UINT32  Unknown                           :1;\r
+  UINT32  BiosCharacteristicsNotSupported   :1;\r
+  UINT32  IsaIsSupported                    :1;\r
+  UINT32  McaIsSupported                    :1;\r
+  UINT32  EisaIsSupported                   :1;\r
+  UINT32  PciIsSupported                    :1;\r
+  UINT32  PcmciaIsSupported                 :1;\r
+  UINT32  PlugAndPlayIsSupported            :1;\r
+  UINT32  ApmIsSupported                    :1;\r
+  UINT32  BiosIsUpgradable                  :1;\r
+  UINT32  BiosShadowingAllowed              :1;\r
+  UINT32  VlVesaIsSupported                 :1;\r
+  UINT32  EscdSupportIsAvailable            :1;\r
+  UINT32  BootFromCdIsSupported             :1;\r
+  UINT32  SelectableBootIsSupported         :1;\r
+  UINT32  RomBiosIsSocketed                 :1;\r
+  UINT32  BootFromPcmciaIsSupported         :1;\r
+  UINT32  EDDSpecificationIsSupported       :1;\r
+  UINT32  JapaneseNecFloppyIsSupported      :1;\r
+  UINT32  JapaneseToshibaFloppyIsSupported  :1;\r
+  UINT32  Floppy525_360IsSupported          :1;\r
+  UINT32  Floppy525_12IsSupported           :1;\r
+  UINT32  Floppy35_720IsSupported           :1;\r
+  UINT32  Floppy35_288IsSupported           :1;\r
+  UINT32  PrintScreenIsSupported            :1;\r
+  UINT32  Keyboard8042IsSupported           :1;\r
+  UINT32  SerialIsSupported                 :1;\r
+  UINT32  PrinterIsSupported                :1;\r
+  UINT32  CgaMonoIsSupported                :1;\r
+  UINT32  NecPc98                           :1;\r
+  UINT32  AcpiIsSupported                   :1;\r
+  UINT32  UsbLegacyIsSupported              :1;\r
+  UINT32  AgpIsSupported                    :1;\r
+  UINT32  I20BootIsSupported                :1;\r
+  UINT32  Ls120BootIsSupported              :1;\r
+  UINT32  AtapiZipDriveBootIsSupported      :1;\r
+  UINT32  Boot1394IsSupported               :1;\r
+  UINT32  SmartBatteryIsSupported           :1;\r
+  UINT32  BiosBootSpecIsSupported           :1;\r
+  UINT32  FunctionKeyNetworkBootIsSupported :1;\r
+  UINT32  Reserved                          :22;\r
+} EFI_MISC_BIOS_CHARACTERISTICS;\r
+\r
+typedef struct {\r
+  UINT32  BiosReserved                      :16;\r
+  UINT32  SystemReserved                    :16;\r
+  UINT32  Reserved                          :32;\r
+} EFI_MISC_BIOS_CHARACTERISTICS_EXTENSION;\r
+\r
+typedef struct {\r
+  STRING_REF                      BiosVendor;\r
+  STRING_REF                      BiosVersion;\r
+  STRING_REF                      BiosReleaseDate;\r
+  EFI_PHYSICAL_ADDRESS            BiosStartingAddress;\r
+  EFI_EXP_BASE2_DATA              BiosPhysicalDeviceSize;\r
+  EFI_MISC_BIOS_CHARACTERISTICS   BiosCharacteristics1;\r
+  EFI_MISC_BIOS_CHARACTERISTICS_EXTENSION  BiosCharacteristics2;\r
+} EFI_MISC_BIOS_VENDOR_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. System Manufacturer - SMBIOS Type 1\r
+//\r
+#define EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER 0x00000003\r
+\r
+typedef enum {  \r
+  EfiSystemWakeupTypeReserved        = 0,\r
+  EfiSystemWakeupTypeOther           = 1,\r
+  EfiSystemWakeupTypeUnknown         = 2,\r
+  EfiSystemWakeupTypeApmTimer        = 3,\r
+  EfiSystemWakeupTypeModemRing       = 4,\r
+  EfiSystemWakeupTypeLanRemote       = 5,\r
+  EfiSystemWakeupTypePowerSwitch     = 6,\r
+  EfiSystemWakeupTypePciPme          = 7,\r
+  EfiSystemWakeupTypeAcPowerRestored = 8,\r
+} EFI_MISC_SYSTEM_WAKEUP_TYPE;\r
+\r
+typedef struct {\r
+  STRING_REF                      SystemManufacturer;\r
+  STRING_REF                      SystemProductName;\r
+  STRING_REF                      SystemVersion;\r
+  STRING_REF                      SystemSerialNumber;\r
+  EFI_GUID                        SystemUuid;\r
+  EFI_MISC_SYSTEM_WAKEUP_TYPE     SystemWakeupType;\r
+} EFI_MISC_SYSTEM_MANUFACTURER_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Base Board Manufacturer - SMBIOS Type 2\r
+//\r
+#define EFI_MISC_BASE_BOARD_MANUFACTURER_RECORD_NUMBER 0x00000004\r
+\r
+typedef struct {\r
+  UINT32  Motherboard           :1;\r
+  UINT32  RequiresDaughterCard  :1;\r
+  UINT32  Removable             :1;\r
+  UINT32  Replaceable           :1;\r
+  UINT32  HotSwappable          :1;\r
+  UINT32  Reserved              :27;\r
+} EFI_BASE_BOARD_FEATURE_FLAGS;\r
+\r
+typedef enum {  \r
+  EfiBaseBoardTypeUnknown                = 1,\r
+  EfiBaseBoardTypeOther                  = 2,\r
+  EfiBaseBoardTypeServerBlade            = 3,\r
+  EfiBaseBoardTypeConnectivitySwitch     = 4,\r
+  EfiBaseBoardTypeSystemManagementModule = 5,\r
+  EfiBaseBoardTypeProcessorModule        = 6,\r
+  EfiBaseBoardTypeIOModule               = 7,\r
+  EfiBaseBoardTypeMemoryModule           = 8,\r
+  EfiBaseBoardTypeDaughterBoard          = 9,\r
+  EfiBaseBoardTypeMotherBoard            = 0xA,\r
+  EfiBaseBoardTypeProcessorMemoryModule  = 0xB,\r
+  EfiBaseBoardTypeProcessorIOModule      = 0xC,\r
+  EfiBaseBoardTypeInterconnectBoard      = 0xD,\r
+} EFI_BASE_BOARD_TYPE;\r
+\r
+typedef struct {\r
+  STRING_REF                      BaseBoardManufacturer;\r
+  STRING_REF                      BaseBoardProductName;\r
+  STRING_REF                      BaseBoardVersion;\r
+  STRING_REF                      BaseBoardSerialNumber;\r
+  STRING_REF                      BaseBoardAssetTag;\r
+  STRING_REF                      BaseBoardChassisLocation;\r
+  EFI_BASE_BOARD_FEATURE_FLAGS    BaseBoardFeatureFlags;\r
+  EFI_BASE_BOARD_TYPE             BaseBoardType;\r
+  EFI_INTER_LINK_DATA             BaseBoardChassisLink;\r
+  UINT32                          BaseBoardNumberLinks;\r
+  EFI_INTER_LINK_DATA             LinkN;\r
+} EFI_MISC_BASE_BOARD_MANUFACTURER_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. System/Chassis Enclosure - SMBIOS Type 3\r
+//\r
+#define EFI_MISC_CHASSIS_MANUFACTURER_RECORD_NUMBER  0x00000005\r
+\r
+typedef enum {  \r
+  EfiMiscChassisTypeOther               = 0x1,\r
+  EfiMiscChassisTypeUnknown             = 0x2,\r
+  EfiMiscChassisTypeDeskTop             = 0x3,\r
+  EfiMiscChassisTypeLowProfileDesktop   = 0x4,\r
+  EfiMiscChassisTypePizzaBox            = 0x5,\r
+  EfiMiscChassisTypeMiniTower           = 0x6,\r
+  EfiMiscChassisTypeTower               = 0x7,\r
+  EfiMiscChassisTypePortable            = 0x8,\r
+  EfiMiscChassisTypeLapTop              = 0x9,\r
+  EfiMiscChassisTypeNotebook            = 0xA,\r
+  EfiMiscChassisTypeHandHeld            = 0xB,\r
+  EfiMiscChassisTypeDockingStation      = 0xC,\r
+  EfiMiscChassisTypeAllInOne            = 0xD,\r
+  EfiMiscChassisTypeSubNotebook         = 0xE,\r
+  EfiMiscChassisTypeSpaceSaving         = 0xF,\r
+  EfiMiscChassisTypeLunchBox            = 0x10,\r
+  EfiMiscChassisTypeMainServerChassis   = 0x11,\r
+  EfiMiscChassisTypeExpansionChassis    = 0x12,\r
+  EfiMiscChassisTypeSubChassis          = 0x13,\r
+  EfiMiscChassisTypeBusExpansionChassis = 0x14,\r
+  EfiMiscChassisTypePeripheralChassis   = 0x15,\r
+  EfiMiscChassisTypeRaidChassis         = 0x16,\r
+  EfiMiscChassisTypeRackMountChassis    = 0x17,\r
+  EfiMiscChassisTypeSealedCasePc        = 0x18,\r
+  EfiMiscChassisMultiSystemChassis      = 0x19,\r
+} EFI_MISC_CHASSIS_TYPE;\r
+\r
+typedef struct {\r
+  UINT32  ChassisType       :16;\r
+  UINT32  ChassisLockPresent:1;\r
+  UINT32  Reserved          :15;\r
+} EFI_MISC_CHASSIS_STATUS;\r
+\r
+typedef enum {  \r
+  EfiChassisStateOther           = 0x01,\r
+  EfiChassisStateUnknown         = 0x02,\r
+  EfiChassisStateSafe            = 0x03,\r
+  EfiChassisStateWarning         = 0x04,\r
+  EfiChassisStateCritical        = 0x05,\r
+  EfiChassisStateNonRecoverable  = 0x06,\r
+} EFI_MISC_CHASSIS_STATE;\r
+\r
+typedef enum {  \r
+  EfiChassisSecurityStatusOther                          = 0x01,\r
+  EfiChassisSecurityStatusUnknown                        = 0x02,\r
+  EfiChassisSecurityStatusNone                           = 0x03,\r
+  EfiChassisSecurityStatusExternalInterfaceLockedOut     = 0x04,\r
+  EfiChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05,\r
+} EFI_MISC_CHASSIS_SECURITY_STATE;\r
+\r
+typedef struct {\r
+  UINT32  RecordType  :1;\r
+  UINT32  Reserved    :24;\r
+} EFI_MISC_ELEMENT_TYPE;\r
+\r
+typedef struct {\r
+  EFI_MISC_ELEMENT_TYPE   ChassisElementType;\r
+  EFI_INTER_LINK_DATA     ChassisElementStructure;\r
+  EFI_BASE_BOARD_TYPE     ChassisBaseBoard;\r
+  UINT32                  ChassisElementMinimum;\r
+  UINT32                  ChassisElementMaximum;\r
+} EFI_MISC_ELEMENTS; \r
+\r
+typedef struct {\r
+  STRING_REF                      ChassisManufacturer;\r
+  STRING_REF                      ChassisVersion;\r
+  STRING_REF                      ChassisSerialNumber;\r
+  STRING_REF                      ChassisAssetTag;\r
+  EFI_MISC_CHASSIS_STATUS         ChassisType;\r
+  EFI_MISC_CHASSIS_STATE          ChassisBootupState;\r
+  EFI_MISC_CHASSIS_STATE          ChassisPowerSupplyState;\r
+  EFI_MISC_CHASSIS_STATE          ChassisThermalState;\r
+  EFI_MISC_CHASSIS_SECURITY_STATE ChassisSecurityState;\r
+  UINT32                          ChassisOemDefined;\r
+  UINT32                          ChassisHeight;\r
+  UINT32                          ChassisNumberPowerCords;\r
+  UINT32                          ChassisElementCount;\r
+  UINT32                          ChassisElementRecordLength;//\r
+  EFI_MISC_ELEMENTS               ChassisElements;\r
+} EFI_MISC_CHASSIS_MANUFACTURER_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Port Connector Information - SMBIOS Type 8\r
+//\r
+#define EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_RECORD_NUMBER 0x00000006\r
+\r
+typedef enum {  \r
+  EfiPortConnectorTypeNone                   = 0x00,\r
+  EfiPortConnectorTypeCentronics             = 0x01,\r
+  EfiPortConnectorTypeMiniCentronics         = 0x02,\r
+  EfiPortConnectorTypeProprietary            = 0x03,\r
+  EfiPortConnectorTypeDB25Male               = 0x04,\r
+  EfiPortConnectorTypeDB25Female             = 0x05,\r
+  EfiPortConnectorTypeDB15Male               = 0x06,\r
+  EfiPortConnectorTypeDB15Female             = 0x07,\r
+  EfiPortConnectorTypeDB9Male                = 0x08,\r
+  EfiPortConnectorTypeDB9Female              = 0x09,\r
+  EfiPortConnectorTypeRJ11                   = 0x0A,\r
+  EfiPortConnectorTypeRJ45                   = 0x0B,\r
+  EfiPortConnectorType50PinMiniScsi          = 0x0C,\r
+  EfiPortConnectorTypeMiniDin                = 0x0D,\r
+  EfiPortConnectorTypeMicriDin               = 0x0E,\r
+  EfiPortConnectorTypePS2                    = 0x0F,\r
+  EfiPortConnectorTypeInfrared               = 0x10,\r
+  EfiPortConnectorTypeHpHil                  = 0x11,\r
+  EfiPortConnectorTypeUsb                    = 0x12,\r
+  EfiPortConnectorTypeSsaScsi                = 0x13,\r
+  EfiPortConnectorTypeCircularDin8Male       = 0x14,\r
+  EfiPortConnectorTypeCircularDin8Female     = 0x15,\r
+  EfiPortConnectorTypeOnboardIde             = 0x16,\r
+  EfiPortConnectorTypeOnboardFloppy          = 0x17,\r
+  EfiPortConnectorType9PinDualInline         = 0x18,\r
+  EfiPortConnectorType25PinDualInline        = 0x19,\r
+  EfiPortConnectorType50PinDualInline        = 0x1A,\r
+  EfiPortConnectorType68PinDualInline        = 0x1B,\r
+  EfiPortConnectorTypeOnboardSoundInput      = 0x1C,\r
+  EfiPortConnectorTypeMiniCentronicsType14   = 0x1D,\r
+  EfiPortConnectorTypeMiniCentronicsType26   = 0x1E,\r
+  EfiPortConnectorTypeHeadPhoneMiniJack      = 0x1F,\r
+  EfiPortConnectorTypeBNC                    = 0x20,\r
+  EfiPortConnectorType1394                   = 0x21,\r
+  EfiPortConnectorTypePC98                   = 0xA0,\r
+  EfiPortConnectorTypePC98Hireso             = 0xA1,\r
+  EfiPortConnectorTypePCH98                  = 0xA2,\r
+  EfiPortConnectorTypePC98Note               = 0xA3,\r
+  EfiPortConnectorTypePC98Full               = 0xA4,\r
+  EfiPortConnectorTypeOther                  = 0xFF,\r
+} EFI_MISC_PORT_CONNECTOR_TYPE;\r
+\r
+typedef enum {  \r
+  EfiPortTypeNone                      = 0x00,\r
+  EfiPortTypeParallelXtAtCompatible    = 0x01,\r
+  EfiPortTypeParallelPortPs2           = 0x02,\r
+  EfiPortTypeParallelPortEcp           = 0x03,\r
+  EfiPortTypeParallelPortEpp           = 0x04,\r
+  EfiPortTypeParallelPortEcpEpp        = 0x05,\r
+  EfiPortTypeSerialXtAtCompatible      = 0x06,\r
+  EfiPortTypeSerial16450Compatible     = 0x07,\r
+  EfiPortTypeSerial16550Compatible     = 0x08,\r
+  EfiPortTypeSerial16550ACompatible    = 0x09,\r
+  EfiPortTypeScsi                      = 0x0A,\r
+  EfiPortTypeMidi                      = 0x0B,\r
+  EfiPortTypeJoyStick                  = 0x0C,\r
+  EfiPortTypeKeyboard                  = 0x0D,\r
+  EfiPortTypeMouse                     = 0x0E,\r
+  EfiPortTypeSsaScsi                   = 0x0F,\r
+  EfiPortTypeUsb                       = 0x10,\r
+  EfiPortTypeFireWire                  = 0x11,\r
+  EfiPortTypePcmciaTypeI               = 0x12,\r
+  EfiPortTypePcmciaTypeII              = 0x13,\r
+  EfiPortTypePcmciaTypeIII             = 0x14,\r
+  EfiPortTypeCardBus                   = 0x15,\r
+  EfiPortTypeAccessBusPort             = 0x16,\r
+  EfiPortTypeScsiII                    = 0x17,\r
+  EfiPortTypeScsiWide                  = 0x18,\r
+  EfiPortTypePC98                      = 0x19,\r
+  EfiPortTypePC98Hireso                = 0x1A,\r
+  EfiPortTypePCH98                     = 0x1B,\r
+  EfiPortTypeVideoPort                 = 0x1C,\r
+  EfiPortTypeAudioPort                 = 0x1D,\r
+  EfiPortTypeModemPort                 = 0x1E,\r
+  EfiPortTypeNetworkPort               = 0x1F,\r
+  EfiPortType8251Compatible            = 0xA0,\r
+  EfiPortType8251FifoCompatible        = 0xA1,\r
+  EfiPortTypeOther                     = 0xFF,\r
+} EFI_MISC_PORT_TYPE;\r
+\r
+typedef struct {\r
+  STRING_REF                    PortInternalConnectorDesignator;\r
+  STRING_REF                    PortExternalConnectorDesignator;\r
+  EFI_MISC_PORT_CONNECTOR_TYPE  PortInternalConnectorType;\r
+  EFI_MISC_PORT_CONNECTOR_TYPE  PortExternalConnectorType;\r
+  EFI_MISC_PORT_TYPE            PortType;\r
+  EFI_MISC_PORT_DEVICE_PATH     PortPath;\r
+} EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA;      \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. System Slots - SMBIOS Type 9\r
+//\r
+#define EFI_MISC_SYSTEM_SLOT_DESIGNATION_RECORD_NUMBER 0x00000007\r
+\r
+typedef enum {  \r
+  EfiSlotTypeOther                        = 0x01,\r
+  EfiSlotTypeUnknown                      = 0x02,\r
+  EfiSlotTypeIsa                          = 0x03,\r
+  EfiSlotTypeMca                          = 0x04,\r
+  EfiSlotTypeEisa                         = 0x05,\r
+  EfiSlotTypePci                          = 0x06,\r
+  EfiSlotTypePcmcia                       = 0x07,\r
+  EfiSlotTypeVlVesa                       = 0x08,\r
+  EfiSlotTypeProprietary                  = 0x09,\r
+  EfiSlotTypeProcessorCardSlot            = 0x0A,\r
+  EfiSlotTypeProprietaryMemoryCardSlot    = 0x0B,\r
+  EfiSlotTypeIORiserCardSlot              = 0x0C,\r
+  EfiSlotTypeNuBus                        = 0x0D,\r
+  EfiSlotTypePci66MhzCapable              = 0x0E,\r
+  EfiSlotTypeAgp                          = 0x0F,\r
+  EfiSlotTypeApg2X                        = 0x10,\r
+  EfiSlotTypeAgp4X                        = 0x11,\r
+  EfiSlotTypePciX                         = 0x12,\r
+  EfiSlotTypeAgp4x                        = 0x13,\r
+  EfiSlotTypePC98C20                      = 0xA0,\r
+  EfiSlotTypePC98C24                      = 0xA1,\r
+  EfiSlotTypePC98E                        = 0xA2,\r
+  EfiSlotTypePC98LocalBus                 = 0xA3,\r
+  EfiSlotTypePC98Card                     = 0xA4,\r
+} EFI_MISC_SLOT_TYPE;\r
+\r
+typedef enum {  \r
+  EfiSlotDataBusWidthOther      = 0x01,\r
+  EfiSlotDataBusWidthUnknown    = 0x02,\r
+  EfiSlotDataBusWidth8Bit       = 0x03,\r
+  EfiSlotDataBusWidth16Bit      = 0x04,\r
+  EfiSlotDataBusWidth32Bit      = 0x05,\r
+  EfiSlotDataBusWidth64Bit      = 0x06,\r
+  EfiSlotDataBusWidth128Bit     = 0x07,\r
+} EFI_MISC_SLOT_DATA_BUS_WIDTH;\r
+\r
+typedef enum {  \r
+  EfiSlotUsageOther     = 1,\r
+  EfiSlotUsageUnknown   = 2,\r
+  EfiSlotUsageAvailable = 3,\r
+  EfiSlotUsageInUse     = 4,\r
+} EFI_MISC_SLOT_USAGE;\r
+  \r
+typedef enum {  \r
+  EfiSlotLengthOther   = 1,\r
+  EfiSlotLengthUnknown = 2,\r
+  EfiSlotLengthShort   = 3,\r
+  EfiSlotLengthLong    = 4\r
+} EFI_MISC_SLOT_LENGTH;\r
+\r
+typedef struct {\r
+  UINT32  CharacteristicsUnknown  :1;\r
+  UINT32  Provides50Volts         :1;\r
+  UINT32  Provides33Volts         :1;\r
+  UINT32  SharedSlot              :1;\r
+  UINT32  PcCard16Supported       :1;\r
+  UINT32  CardBusSupported        :1;\r
+  UINT32  ZoomVideoSupported      :1;\r
+  UINT32  ModemRingResumeSupported:1;\r
+  UINT32  PmeSignalSupported      :1;\r
+  UINT32  HotPlugDevicesSupported :1;\r
+  UINT32  SmbusSignalSupported    :1;\r
+  UINT32  Reserved                :21;\r
+} EFI_MISC_SLOT_CHARACTERISTICS;\r
+\r
+typedef struct {\r
+  STRING_REF                    SlotDesignation;\r
+  EFI_MISC_SLOT_TYPE            SlotType;\r
+  EFI_MISC_SLOT_DATA_BUS_WIDTH  SlotDataBusWidth;\r
+  EFI_MISC_SLOT_USAGE           SlotUsage;\r
+  EFI_MISC_SLOT_LENGTH          SlotLength;\r
+  UINT16                        SlotId;\r
+  EFI_MISC_SLOT_CHARACTERISTICS SlotCharacteristics;\r
+  EFI_DEVICE_PATH_PROTOCOL      SlotDevicePath;\r
+} EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA;      \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Onboard Device - SMBIOS Type 10\r
+//\r
+#define EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER 0x00000008\r
+\r
+typedef enum {  \r
+  EfiOnBoardDeviceTypeOther          = 1,\r
+  EfiOnBoardDeviceTypeUnknown        = 2,\r
+  EfiOnBoardDeviceTypeVideo          = 3,\r
+  EfiOnBoardDeviceTypeScsiController = 4,\r
+  EfiOnBoardDeviceTypeEthernet       = 5,\r
+  EfiOnBoardDeviceTypeTokenRing      = 6,\r
+  EfiOnBoardDeviceTypeSound          = 7,\r
+} EFI_MISC_ONBOARD_DEVICE_TYPE;\r
+\r
+typedef struct {\r
+  UINT32  DeviceType    :16;\r
+  UINT32  DeviceEnabled :1;\r
+  UINT32  Reserved      :15;\r
+} EFI_MISC_ONBOARD_DEVICE_STATUS;\r
+\r
+typedef struct {\r
+  STRING_REF                           OnBoardDeviceDescription;\r
+  EFI_MISC_ONBOARD_DEVICE_STATUS       OnBoardDeviceStatus;\r
+  EFI_DEVICE_PATH_PROTOCOL             OnBoardDevicePath;\r
+} EFI_MISC_ONBOARD_DEVICE_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. BIOS Language Information - SMBIOS Type 11\r
+//\r
+#define EFI_MISC_OEM_STRING_RECORD_NUMBER 0x00000009\r
+\r
+typedef struct {\r
+  STRING_REF                          OemStringRef[1];\r
+} EFI_MISC_OEM_STRING_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. System Options - SMBIOS Type 12\r
+//\r
+typedef struct {\r
+  STRING_REF                          SystemOptionStringRef[1];\r
+} EFI_MISC_SYSTEM_OPTION_STRING_DATA;      \r
+\r
+#define EFI_MISC_SYSTEM_OPTION_STRING_RECORD_NUMBER 0x0000000A\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Number of Installable Languages - SMBIOS Type 13\r
+//\r
+#define EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_RECORD_NUMBER 0x0000000B\r
+\r
+typedef struct {\r
+  UINT32                              AbbreviatedLanguageFormat :1;\r
+  UINT32                              Reserved                  :31;\r
+} EFI_MISC_LANGUAGE_FLAGS;\r
+\r
+typedef struct {\r
+  UINT16                              NumberOfInstallableLanguages;\r
+  EFI_MISC_LANGUAGE_FLAGS             LanguageFlags;\r
+  UINT16                              CurrentLanguageNumber;\r
+} EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. System Language String\r
+//\r
+#define EFI_MISC_SYSTEM_LANGUAGE_STRING_RECORD_NUMBER 0x0000000C\r
+\r
+typedef struct {\r
+  UINT16                              LanguageId;\r
+  STRING_REF                          SystemLanguageString;\r
+} EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA;      \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Group Associations - SMBIOS Type 14\r
+//\r
+#define EFI_MISC_GROUP_NAME_RECORD_NUMBER          0x0000000D\r
+\r
+typedef struct {\r
+  STRING_REF               GroupName;\r
+  UINT16                   NumberGroupItems;\r
+  UINT16                   GroupId;\r
+} EFI_MISC_GROUP_NAME_DATA;  \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Group Item Set Element\r
+//\r
+#define EFI_MISC_GROUP_ITEM_SET_RECORD_NUMBER      0x0000000E\r
+\r
+typedef struct {\r
+  EFI_GUID                 SubClass;         \r
+  EFI_INTER_LINK_DATA      GroupLink;\r
+  UINT16                   GroupId;\r
+  UINT16                   GroupElementId;\r
+} EFI_MISC_GROUP_ITEM_SET_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+//  Misc. Pointing Device Type - SMBIOS Type 21\r
+//\r
+#define EFI_MISC_POINTING_DEVICE_TYPE_RECORD_NUMBER 0x0000000F\r
+\r
+typedef enum { \r
+  EfiPointingDeviceTypeOther         = 0x01,\r
+  EfiPointingDeviceTypeUnknown       = 0x02,\r
+  EfiPointingDeviceTypeMouse         = 0x03,\r
+  EfiPointingDeviceTypeTrackBall     = 0x04,\r
+  EfiPointingDeviceTypeTrackPoint    = 0x05,\r
+  EfiPointingDeviceTypeGlidePoint    = 0x06,\r
+  EfiPointingDeviceTouchPad          = 0x07,\r
+  EfiPointingDeviceTouchScreen       = 0x08,\r
+  EfiPointingDeviceOpticalSensor     = 0x09,\r
+} EFI_MISC_POINTING_DEVICE_TYPE;\r
+\r
+typedef enum {  \r
+  EfiPointingDeviceInterfaceOther              = 0x01,\r
+  EfiPointingDeviceInterfaceUnknown            = 0x02,\r
+  EfiPointingDeviceInterfaceSerial             = 0x03,\r
+  EfiPointingDeviceInterfacePs2                = 0x04,\r
+  EfiPointingDeviceInterfaceInfrared           = 0x05,\r
+  EfiPointingDeviceInterfaceHpHil              = 0x06,\r
+  EfiPointingDeviceInterfaceBusMouse           = 0x07,\r
+  EfiPointingDeviceInterfaceADB                = 0x08,\r
+  EfiPointingDeviceInterfaceBusMouseDB9        = 0xA0,\r
+  EfiPointingDeviceInterfaceBusMouseMicroDin   = 0xA1,\r
+  EfiPointingDeviceInterfaceUsb                = 0xA2,\r
+} EFI_MISC_POINTING_DEVICE_INTERFACE;\r
+\r
+typedef struct {\r
+  EFI_MISC_POINTING_DEVICE_TYPE       PointingDeviceType;\r
+  EFI_MISC_POINTING_DEVICE_INTERFACE  PointingDeviceInterface;\r
+  UINT16                              NumberPointingDeviceButtons;\r
+  EFI_DEVICE_PATH_PROTOCOL            PointingDevicePath;\r
+} EFI_MISC_PORTING_DEVICE_TYPE_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Portable Battery - SMBIOS Type 22\r
+//\r
+#define EFI_MISC_BATTERY_LOCATION_RECORD_NUMBER  0x00000010\r
+\r
+typedef enum { \r
+  EfiBatteryDeviceChemistryTypeOther               = 0x01,\r
+  EfiBatteryDeviceChemistryTypeUnknown             = 0x02,\r
+  EfiBatteryDeviceChemistryTypeLeadAcid            = 0x03,\r
+  EfiBatteryDeviceChemistryTypeNickelCadmium       = 0x04,\r
+  EfiBatteryDeviceChemistryTypeNickelMetalHydride  = 0x05,\r
+  EfiBatteryDeviceChemistryTypeLithiumIon          = 0x06,\r
+  EfiBatteryDeviceChemistryTypeZincAir             = 0x07,\r
+  EfiBatteryDeviceChemistryTypeLithiumPolymer      = 0x08,\r
+} EFI_MISC_BATTERY_DEVICE_CHEMISTRY;\r
+\r
+typedef struct  {\r
+  UINT32 Date              :5;\r
+  UINT32 Month             :4;\r
+  UINT32 Year              :7;\r
+  UINT32 Reserved          :16;\r
+} EFI_MISC_BATTERY_SBDS_MANUFACTURE_DATE;\r
+\r
+typedef struct {\r
+  STRING_REF                         BatteryLocation;\r
+  STRING_REF                         BatteryManufacturer;\r
+  STRING_REF                         BatteryManufactureDate;\r
+  STRING_REF                         BatterySerialNumber;\r
+  STRING_REF                         BatteryDeviceName;\r
+  STRING_REF                         BatterySbdsVersionNumber;\r
+  STRING_REF                         BatterySbdsDeviceChemistry;\r
+  EFI_MISC_BATTERY_DEVICE_CHEMISTRY  BatteryDeviceChemistry;\r
+  EFI_EXP_BASE10_DATA                BatteryDesignCapacity;\r
+  EFI_EXP_BASE10_DATA                BatteryDesignVoltage;\r
+  UINT16                             BatteryMaximumError;\r
+  UINT16                             BatterySbdsSerialNumber;\r
+  EFI_MISC_BATTERY_SBDS_MANUFACTURE_DATE\r
+                                     BatterySbdsManufacturingDate;\r
+  UINT32                             BatteryOemSpecific;\r
+} EFI_MISC_BATTERY_LOCATION_DATA;   \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Reset Capabilities - SMBIOS Type 23\r
+//\r
+#define EFI_MISC_RESET_CAPABILITIES_RECORD_NUMBER 0x00000011\r
+\r
+typedef struct {\r
+  UINT32  Status              :1;\r
+  UINT32  BootOption          :2;\r
+  UINT32  BootOptionOnLimit   :2;\r
+  UINT32  WatchdogTimerPresent:1;\r
+  UINT32  Reserved            :26;\r
+} EFI_MISC_RESET_CAPABILITIES_TYPE;\r
+\r
+typedef struct {\r
+  EFI_MISC_RESET_CAPABILITIES_TYPE  ResetCapabilities;\r
+  UINT16                            ResetCount;\r
+  UINT16                            ResetLimit;\r
+  UINT16                            ResetTimerInterval;\r
+  UINT16                            ResetTimeout;\r
+} EFI_MISC_RESET_CAPABILITIES;\r
\r
+typedef struct {\r
+    EFI_MISC_RESET_CAPABILITIES   ResetCapabilities;\r
+    UINT16                        ResetCount;\r
+    UINT16                        ResetLimit;\r
+    UINT16                        ResetTimerInterval;\r
+    UINT16                        ResetTimeout;\r
+} EFI_MISC_RESET_CAPABILITIES_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Hardware Security - SMBIOS Type 24\r
+//\r
+#define EFI_MISC_HARDWARE_SECURITY_RECORD_NUMBER 0x00000012\r
+\r
+typedef enum {\r
+  EfiHardwareSecurityStatusDisabled       = 0,\r
+  EfiHardwareSecurityStatusEnabled        = 1,\r
+  EfiHardwareSecurityStatusNotImplemented = 2,\r
+  EfiHardwareSecurityStatusUnknown        = 3\r
+} EFI_MISC_HARDWARE_SECURITY_STATUS; \r
+\r
+typedef struct {\r
+  EFI_MISC_HARDWARE_SECURITY_STATUS   FrontPanelResetStatus       :2;  \r
+  EFI_MISC_HARDWARE_SECURITY_STATUS   AdministratorPasswordStatus :2;  \r
+  EFI_MISC_HARDWARE_SECURITY_STATUS   KeyboardPasswordStatus      :2;  \r
+  EFI_MISC_HARDWARE_SECURITY_STATUS   PowerOnPasswordStatus       :2;  \r
+  EFI_MISC_HARDWARE_SECURITY_STATUS   Reserved                    :24;  \r
+} EFI_MISC_HARDWARE_SECURITY_SETTINGS;\r
+\r
+typedef struct {\r
+  EFI_MISC_HARDWARE_SECURITY_SETTINGS HardwareSecuritySettings;\r
+} EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA;       \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// System Power Controls - SMBIOS Type 25\r
+//\r
+#define EFI_MISC_SCHEDULED_POWER_ON_MONTH_RECORD_NUMBER  0x00000013\r
+\r
+typedef struct {\r
+  UINT16             ScheduledPoweronMonth;\r
+  UINT16             ScheduledPoweronDayOfMonth;\r
+  UINT16             ScheduledPoweronHour;\r
+  UINT16             ScheduledPoweronMinute;\r
+  UINT16             ScheduledPoweronSecond;\r
+} EFI_MISC_SCHEDULED_POWER_ON_MONTH_DATA;  \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Voltage Probe - SMBIOS Type 26\r
+//\r
+#define EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_RECORD_NUMBER  0x00000014\r
+\r
+typedef struct {\r
+  UINT32 VoltageProbeSite        :5;\r
+  UINT32 VoltageProbeStatus      :3;\r
+  UINT32 Reserved                :24;\r
+} EFI_MISC_VOLTAGE_PROBE_LOCATION;\r
+\r
+typedef struct {\r
+  STRING_REF                      VoltageProbeDescription;\r
+  EFI_MISC_VOLTAGE_PROBE_LOCATION VoltageProbeLocation;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeMaximumValue;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeMinimumValue;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeResolution;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeTolerance;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeAccuracy;\r
+  EFI_EXP_BASE10_DATA             VoltageProbeNominalValue;\r
+  EFI_EXP_BASE10_DATA             MDLowerNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA             MDUpperNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA             MDLowerCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA             MDUpperCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA             MDLowerNonrecoverableThreshold;\r
+  EFI_EXP_BASE10_DATA             MDUpperNonrecoverableThreshold;\r
+  UINT32                          VoltageProbeOemDefined;\r
+} EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_DATA; \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Cooling Device - SMBIOS Type 27\r
+//\r
+#define EFI_MISC_COOLING_DEVICE_TEMP_LINK_RECORD_NUMBER   0x00000015\r
+\r
+typedef struct {\r
+  UINT32 CoolingDevice                 :5;\r
+  UINT32 CoolingDeviceStatus           :3;\r
+  UINT32 Reserved                      :24;\r
+} EFI_MISC_COOLING_DEVICE_TYPE;\r
+\r
+typedef struct {\r
+  EFI_MISC_COOLING_DEVICE_TYPE   CoolingDeviceType;\r
+  EFI_INTER_LINK_DATA            CoolingDeviceTemperatureLink;\r
+  UINT16                         CoolingDeviceUnitGroup;\r
+  EFI_EXP_BASE10_DATA            CoolingDeviceNominalSpeed;\r
+  UINT32                         CoolingDeviceOemDefined;\r
+} EFI_MISC_COOLING_DEVICE_TEMP_LINK_DATA; \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Temperature Probe - SMBIOS Type 28\r
+//\r
+#define EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_RECORD_NUMBER   0x00000016\r
+\r
+typedef struct {\r
+  UINT32 TemperatureProbeSite          :5;\r
+  UINT32 TemperatureProbeStatus        :3;\r
+  UINT32 Reserved                      :24;\r
+} EFI_MISC_TEMPERATURE_PROBE_LOCATION;\r
+\r
+typedef struct {\r
+  STRING_REF               TemperatureProbeDescription;\r
+  EFI_MISC_TEMPERATURE_PROBE_LOCATION\r
+                           TemperatureProbeLocation;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeMaximumValue;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeMinimumValue;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeResolution;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeTolerance;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeAccuracy;\r
+  EFI_EXP_BASE10_DATA      TemperatureProbeNominalValue; \r
+  EFI_EXP_BASE10_DATA      MDLowerNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDLowerCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDLowerNonrecoverableThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperNonrecoverableThreshold;\r
+  UINT32                   TemperatureProbeOemDefined;\r
+} EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_DATA;  \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Electrical Current Probe - SMBIOS Type 29\r
+//\r
+\r
+#define EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_RECORD_NUMBER  0x00000017\r
+\r
+typedef struct {\r
+  UINT32 ElectricalCurrentProbeSite    :5;\r
+  UINT32 ElectricalCurrentProbeStatus  :3;\r
+  UINT32 Reserved                      :24;\r
+} EFI_MISC_ELECTRICAL_CURRENT_PROBE_LOCATION;\r
+\r
+typedef struct {\r
+  STRING_REF               ElectricalCurrentProbeDescription;\r
+  EFI_MISC_ELECTRICAL_CURRENT_PROBE_LOCATION\r
+                           ElectricalCurrentProbeLocation;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeMaximumValue;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeMinimumValue;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeResolution;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeTolerance;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeAccuracy;\r
+  EFI_EXP_BASE10_DATA      ElectricalCurrentProbeNominalValue;\r
+  EFI_EXP_BASE10_DATA      MDLowerNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperNoncriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDLowerCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperCriticalThreshold;\r
+  EFI_EXP_BASE10_DATA      MDLowerNonrecoverableThreshold;\r
+  EFI_EXP_BASE10_DATA      MDUpperNonrecoverableThreshold;\r
+  UINT32                   ElectricalCurrentProbeOemDefined;\r
+} EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Out-of-Band Remote Access - SMBIOS Type 30\r
+//\r
+\r
+#define EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_RECORD_NUMBER  0x00000018\r
+\r
+typedef struct  {\r
+  UINT32 InboundConnectionEnabled            :1;\r
+  UINT32 OutboundConnectionEnabled           :1;\r
+  UINT32 Reserved                            :30;\r
+} EFI_MISC_REMOTE_ACCESS_CONNECTIONS;\r
+\r
+typedef struct {\r
+  STRING_REF                             RemoteAccessManufacturerNameDescription;\r
+  EFI_MISC_REMOTE_ACCESS_CONNECTIONS     RemoteAccessConnections;\r
+} EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. BIS Entry Point - SMBIOS Type 31\r
+//\r
+#define EFI_MISC_BIS_ENTRY_POINT_RECORD_NUMBER          0x00000019\r
+\r
+typedef struct {\r
+  EFI_PHYSICAL_ADDRESS       BisEntryPoint;\r
+} EFI_MISC_BIS_ENTRY_POINT_DATA;    \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Misc. Boot Information - SMBIOS Type 32\r
+//\r
+#define EFI_MISC_BOOT_INFORMATION_STATUS_RECORD_NUMBER  0x0000001A\r
+\r
+typedef enum {  \r
+  EfiBootInformationStatusNoError                  = 0x00,\r
+  EfiBootInformationStatusNoBootableMedia          = 0x01,\r
+  EfiBootInformationStatusNormalOSFailedLoading    = 0x02,\r
+  EfiBootInformationStatusFirmwareDetectedFailure  = 0x03,\r
+  EfiBootInformationStatusOSDetectedFailure        = 0x04,\r
+  EfiBootInformationStatusUserRequestedBoot        = 0x05,\r
+  EfiBootInformationStatusSystemSecurityViolation  = 0x06,\r
+  EfiBootInformationStatusPreviousRequestedImage   = 0x07,\r
+  EfiBootInformationStatusWatchdogTimerExpired     = 0x08,\r
+  EfiBootInformationStatusStartReserved            = 0x09,\r
+  EfiBootInformationStatusStartOemSpecific         = 0x80,\r
+  EfiBootInformationStatusStartProductSpecific     = 0xC0,\r
+} EFI_MISC_BOOT_INFORMATION_STATUS_DATA_TYPE;\r
+\r
+typedef struct {\r
+  EFI_MISC_BOOT_INFORMATION_STATUS_DATA_TYPE BootInformationStatus;\r
+  UINT8                                      BootInformationData[9];\r
+} EFI_MISC_BOOT_INFORMATION_STATUS_DATA;\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Management Device - SMBIOS Type 34\r
+//\r
+#define EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_RECORD_NUMBER   0x0000001B\r
+\r
+typedef enum { \r
+  EfiManagementDeviceTypeOther      = 0x01,\r
+  EfiManagementDeviceTypeUnknown    = 0x02,\r
+  EfiManagementDeviceTypeLm75       = 0x03,\r
+  EfiManagementDeviceTypeLm78       = 0x04,\r
+  EfiManagementDeviceTypeLm79       = 0x05,\r
+  EfiManagementDeviceTypeLm80       = 0x06,\r
+  EfiManagementDeviceTypeLm81       = 0x07,\r
+  EfiManagementDeviceTypeAdm9240    = 0x08,\r
+  EfiManagementDeviceTypeDs1780     = 0x09,\r
+  EfiManagementDeviceTypeMaxim1617  = 0x0A,\r
+  EfiManagementDeviceTypeGl518Sm    = 0x0B,\r
+  EfiManagementDeviceTypeW83781D    = 0x0C,\r
+  EfiManagementDeviceTypeHt82H791   = 0x0D,\r
+} EFI_MISC_MANAGEMENT_DEVICE_TYPE;\r
+\r
+typedef enum { \r
+  EfiManagementDeviceAddressTypeOther   = 1,\r
+  EfiManagementDeviceAddressTypeUnknown = 2,\r
+  EfiManagementDeviceAddressTypeIOPort  = 3,\r
+  EfiManagementDeviceAddressTypeMemory  = 4,\r
+  EfiManagementDeviceAddressTypeSmbus   = 5\r
+} EFI_MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE;\r
+\r
+typedef struct {\r
+  STRING_REF                       ManagementDeviceDescription;\r
+  EFI_MISC_MANAGEMENT_DEVICE_TYPE  ManagementDeviceType;\r
+  UINTN                            ManagementDeviceAddress;\r
+  EFI_MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE\r
+                                   ManagementDeviceAddressType;\r
+} EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_DATA; \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Management Device Component - SMBIOS Type 35\r
+//\r
+\r
+#define EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_RECORD_NUMBER  0x0000001C\r
+\r
+typedef struct {\r
+  STRING_REF               ManagementDeviceComponentDescription;\r
+  EFI_INTER_LINK_DATA      ManagementDeviceLink;\r
+  EFI_INTER_LINK_DATA      ManagementDeviceComponentLink; \r
+} EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_DATA; \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// IPMI Data Record - SMBIOS Type 38\r
+//\r
+typedef enum {  \r
+  EfiIpmiOther = 0,\r
+  EfiIpmiKcs   = 1,\r
+  EfiIpmiSmic  = 2,\r
+  EfiIpmiBt    = 3,\r
+} EFI_MISC_IPMI_INTERFACE_TYPE;\r
+\r
+typedef struct {\r
+  UINT16  IpmiSpecLeastSignificantDigit:4;\r
+  UINT16  IpmiSpecMostSignificantDigit: 4;\r
+  UINT16  Reserved:                     8;\r
+} EFI_MISC_IPMI_SPECIFICATION_REVISION;\r
+\r
+typedef struct {\r
+  EFI_MISC_IPMI_INTERFACE_TYPE          IpmiInterfaceType;\r
+  EFI_MISC_IPMI_SPECIFICATION_REVISION  IpmiSpecificationRevision;\r
+  UINT16                                IpmiI2CSlaveAddress;\r
+  UINT16                                IpmiNvDeviceAddress;\r
+  UINT64                                IpmiBaseAddress;\r
+  EFI_DEVICE_PATH_PROTOCOL              IpmiDevicePath;\r
+} EFI_MISC_IPMI_INTERFACE_TYPE_DATA;\r
+       \r
+#define EFI_MISC_IPMI_INTERFACE_TYPE_RECORD_NUMBER  0x0000001D\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+//System Power supply Record - SMBIOS Type 39\r
+//\r
+typedef struct {\r
+  UINT16  PowerSupplyHotReplaceable  :1;\r
+  UINT16  PowerSupplyPresent         :1;\r
+  UINT16  PowerSupplyUnplugged       :1;\r
+  UINT16  InputVoltageRangeSwitch    :4;\r
+  UINT16  PowerSupplyStatus          :3;\r
+  UINT16  PowerSupplyType            :4;\r
+  UINT16  Reserved                   :2;\r
+} POWER_SUPPLY_CHARACTERISTICS;\r
+\r
+typedef struct {\r
+  UINT16                          PowerUnitGroup;\r
+  STRING_REF                      PowerSupplyLocation;\r
+  STRING_REF                      PowerSupplyDeviceName;\r
+  STRING_REF                      PowerSupplyManufacturer;\r
+  STRING_REF                      PowerSupplySerialNumber;\r
+  STRING_REF                      PowerSupplyAssetTagNumber;\r
+  STRING_REF                      PowerSupplyModelPartNumber;\r
+  STRING_REF                      PowerSupplyRevisionLevel;\r
+  UINT16                          PowerSupplyMaxPowerCapacity;\r
+  POWER_SUPPLY_CHARACTERISTICS    PowerSupplyCharacteristics;\r
+  EFI_INTER_LINK_DATA             PowerSupplyInputVoltageProbeLink;\r
+  EFI_INTER_LINK_DATA             PowerSupplyCoolingDeviceLink;\r
+  EFI_INTER_LINK_DATA             PowerSupplyInputCurrentProbeLink;\r
+} EFI_MISC_SYSTEM_POWER_SUPPLY_DATA;\r
+\r
+#define EFI_MISC_SYSTEM_POWER_SUPPLY_RECORD_NUMBER 0x0000001E\r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+// OEM Data Record - SMBIOS Type 0x80-0xFF\r
+//\r
+typedef struct {\r
+  UINT8       Type;\r
+  UINT8       Length;\r
+  UINT16      Handle;\r
+} SMBIOS_STRUCTURE_HDR;\r
+\r
+typedef struct {\r
+  SMBIOS_STRUCTURE_HDR          Header;\r
+  UINT8                         RawData[1];\r
+} EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION_DATA; \r
+\r
+#define EFI_MISC_SMBIOS_STRUCT_ENCAP_RECORD_NUMBER  0x0000001F \r
+\r
+//\r
+//////////////////////////////////////////////////////////////////////////////\r
+//\r
+typedef union {\r
+  EFI_MISC_LAST_PCI_BUS_DATA                         LastPciBus;\r
+  EFI_MISC_BIOS_VENDOR_DATA                          MiscBiosVendor;\r
+  EFI_MISC_SYSTEM_MANUFACTURER_DATA                  MiscSystemManufacturer;\r
+  EFI_MISC_BASE_BOARD_MANUFACTURER_DATA              MiscBaseBoardManufacturer;\r
+  EFI_MISC_CHASSIS_MANUFACTURER_DATA                 MiscChassisManufacturer;  \r
+  EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA   MiscPortInternalConnectorDesignator;\r
+  EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA              MiscSystemSlotDesignation;\r
+  EFI_MISC_ONBOARD_DEVICE_DATA                       MiscOnboardDevice;\r
+  EFI_MISC_OEM_STRING_DATA                           MiscOemString;\r
+  EFI_MISC_SYSTEM_OPTION_STRING_DATA                 MiscOptionString;\r
+  EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA      NumberOfInstallableLanguages;\r
+  EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA               MiscSystemLanguageString;  \r
+  EFI_MISC_GROUP_NAME_DATA                           MiscGroupNameData;\r
+  EFI_MISC_GROUP_ITEM_SET_DATA                       MiscGroupItemSetData;\r
+  EFI_MISC_PORTING_DEVICE_TYPE_DATA                  MiscPortingDeviceTypeData;\r
+  EFI_MISC_RESET_CAPABILITIES_DATA                   MiscResetCapablilitiesData;\r
+  EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA           MiscHardwareSecuritySettingsData;  \r
+  EFI_MISC_SCHEDULED_POWER_ON_MONTH_DATA             MiscScheduledPowerOnMonthData;\r
+  EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_DATA            MiscVoltagePorbeDescriptionData;\r
+  EFI_MISC_COOLING_DEVICE_TEMP_LINK_DATA             MiscCoolingDeviceTempLinkData;\r
+  EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_DATA        MiscTemperatureProbeDescriptionData;   \r
+  EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_DATA MiscElectricalCurrentProbeDescriptionData;\r
+  EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_DATA\r
+                                                     MiscRemoteAccessManufacturerDescriptionData;\r
+  EFI_MISC_BIS_ENTRY_POINT_DATA                      MiscBisEntryPoint;\r
+  EFI_MISC_BOOT_INFORMATION_STATUS_DATA              MiscBootInformationStatus;\r
+  EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_DATA        MiscMangementDeviceDescriptionData;\r
+  EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_DATA\r
+                                                     MiscmangementDeviceComponentDescriptionData;\r
+  EFI_MISC_IPMI_INTERFACE_TYPE_DATA                  MiscIpmiInterfaceTypeData;\r
+  EFI_MISC_SYSTEM_POWER_SUPPLY_DATA                  MiscPowerSupplyInfo;\r
+  EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION_DATA          MiscSmbiosStructEncapsulation;  \r
+} EFI_MISC_SUBCLASS_RECORDS;\r
+\r
+//\r
+//\r
+//\r
+typedef struct {\r
+  EFI_SUBCLASS_TYPE1_HEADER       Header;\r
+  EFI_MISC_SUBCLASS_RECORDS       Record;\r
+} EFI_MISC_SUBCLASS_DRIVER_DATA;\r
+\r
+#pragma pack()\r
+\r
+//\r
+// Sub Class Header type1\r
+//\r
+\r
+#define EFI_SUBCLASS_INSTANCE_RESERVED       0\r
+#define EFI_SUBCLASS_INSTANCE_NON_APPLICABLE 0xFFFF  //16 bit\r
+\r
+#endif\r
+\r
diff --git a/Tools/Source/TianoTools/Include/Common/Dependency.h b/Tools/Source/TianoTools/Include/Common/Dependency.h
new file mode 100644 (file)
index 0000000..744027d
--- /dev/null
@@ -0,0 +1,50 @@
+/** @file\r
+  This module contains data specific to dependency expressions\r
+  and local function prototypes.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  Dependency.h\r
+\r
+**/\r
+\r
+#ifndef __DEPENDENCY_H__\r
+#define __DEPENDENCY_H__\r
+\r
+/// EFI_DEP_BEFORE       - If present, this must be the first and only opcode\r
+#define EFI_DEP_BEFORE        0x00\r
+\r
+/// EFI_DEP_AFTER        - If present, this must be the first and only opcode\r
+#define EFI_DEP_AFTER         0x01\r
+\r
+#define EFI_DEP_PUSH          0x02\r
+#define EFI_DEP_AND           0x03\r
+#define EFI_DEP_OR            0x04\r
+#define EFI_DEP_NOT           0x05\r
+#define EFI_DEP_TRUE          0x06\r
+#define EFI_DEP_FALSE         0x07\r
+#define EFI_DEP_END           0x08\r
+\r
+/// EFI_DEP_SOR          - If present, this must be the first opcode\r
+#define EFI_DEP_SOR           0x09\r
+\r
+///\r
+/// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression\r
+///                        to save time.  A EFI_DEP_PUSH is evauated one an\r
+///                        replaced with EFI_DEP_REPLACE_TRUE\r
+///\r
+#define EFI_DEP_REPLACE_TRUE  0xff\r
+\r
+///\r
+/// Define the initial size of the dependency expression evaluation stack\r
+///\r
+#define DEPEX_STACK_SIZE_INCREMENT  0x1000\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/EfiImage.h b/Tools/Source/TianoTools/Include/Common/EfiImage.h
new file mode 100644 (file)
index 0000000..ebe251e
--- /dev/null
@@ -0,0 +1,698 @@
+/** @file\r
+  EFI image format for PE32+. Please note some data structures are different\r
+  for IA-32 and Itanium-based images, look for UINTN and the #ifdef EFI_IA64\r
+\r
+  @bug Fix text - doc as defined in MSFT EFI specification.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  EfiImage.h\r
+\r
+**/\r
+\r
+#ifndef __EFI_IMAGE_H__\r
+#define __EFI_IMAGE_H__\r
+\r
+//\r
+// PE32+ Subsystem type for EFI images\r
+//\r
+#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION         10\r
+#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11\r
+#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER      12\r
+#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER      13\r
+\r
+//\r
+// BugBug: Need to get a real answer for this problem. This is not in the\r
+//         PE specification.\r
+//\r
+//         A SAL runtime driver does not get fixed up when a transition to\r
+//         virtual mode is made. In all other cases it should be treated\r
+//         like a EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER image\r
+//\r
+#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER  13\r
+\r
+//\r
+// PE32+ Machine type for EFI images\r
+//\r
+#define IMAGE_FILE_MACHINE_I386     0x014c\r
+#define IMAGE_FILE_MACHINE_IA64     0x0200\r
+#define IMAGE_FILE_MACHINE_EBC      0x0EBC\r
+#define IMAGE_FILE_MACHINE_X64      0x8664\r
+//\r
+// Support old names for backward compatible\r
+//\r
+#define EFI_IMAGE_MACHINE_IA32      IMAGE_FILE_MACHINE_I386 \r
+#define EFI_IMAGE_MACHINE_IA64      IMAGE_FILE_MACHINE_IA64  \r
+#define EFI_IMAGE_MACHINE_IPF       IMAGE_FILE_MACHINE_IA64  \r
+#define EFI_IMAGE_MACHINE_EBC       IMAGE_FILE_MACHINE_EBC  \r
+#define EFI_IMAGE_MACHINE_X64       IMAGE_FILE_MACHINE_X64\r
+\r
+#define EFI_IMAGE_DOS_SIGNATURE     0x5A4D      // MZ\r
+#define EFI_IMAGE_OS2_SIGNATURE     0x454E      // NE\r
+#define EFI_IMAGE_OS2_SIGNATURE_LE  0x454C      // LE\r
+#define EFI_IMAGE_NT_SIGNATURE      0x00004550  // PE00\r
+#define EFI_IMAGE_EDOS_SIGNATURE    0x44454550  // PEED\r
+\r
+///\r
+/// PE images can start with an optional DOS header, so if an image is run\r
+///  under DOS it can print an error message.\r
+///\r
+typedef struct {\r
+  UINT16  e_magic;    // Magic number\r
+  UINT16  e_cblp;     // Bytes on last page of file\r
+  UINT16  e_cp;       // Pages in file\r
+  UINT16  e_crlc;     // Relocations\r
+  UINT16  e_cparhdr;  // Size of header in paragraphs\r
+  UINT16  e_minalloc; // Minimum extra paragraphs needed\r
+  UINT16  e_maxalloc; // Maximum extra paragraphs needed\r
+  UINT16  e_ss;       // Initial (relative) SS value\r
+  UINT16  e_sp;       // Initial SP value\r
+  UINT16  e_csum;     // Checksum\r
+  UINT16  e_ip;       // Initial IP value\r
+  UINT16  e_cs;       // Initial (relative) CS value\r
+  UINT16  e_lfarlc;   // File address of relocation table\r
+  UINT16  e_ovno;     // Overlay number\r
+  UINT16  e_res[4];   // Reserved words\r
+  UINT16  e_oemid;    // OEM identifier (for e_oeminfo)\r
+  UINT16  e_oeminfo;  // OEM information; e_oemid specific\r
+  UINT16  e_res2[10]; // Reserved words\r
+  UINT32  e_lfanew;   // File address of new exe header\r
+} EFI_IMAGE_DOS_HEADER;\r
+\r
+///\r
+/// File header format.\r
+///\r
+typedef struct {\r
+  UINT16  Machine;\r
+  UINT16  NumberOfSections;\r
+  UINT32  TimeDateStamp;\r
+  UINT32  PointerToSymbolTable;\r
+  UINT32  NumberOfSymbols;\r
+  UINT16  SizeOfOptionalHeader;\r
+  UINT16  Characteristics;\r
+} EFI_IMAGE_FILE_HEADER;\r
+\r
+#define EFI_IMAGE_SIZEOF_FILE_HEADER        20\r
+\r
+#define EFI_IMAGE_FILE_RELOCS_STRIPPED      0x0001  // Relocation info stripped from file.\r
+#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE     0x0002  // File is executable  (i.e. no unresolved externel references).\r
+#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED   0x0004  // Line nunbers stripped from file.\r
+#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED  0x0008  // Local symbols stripped from file.\r
+#define EFI_IMAGE_FILE_BYTES_REVERSED_LO    0x0080  // Bytes of machine word are reversed.\r
+#define EFI_IMAGE_FILE_32BIT_MACHINE        0x0100  // 32 bit word machine.\r
+#define EFI_IMAGE_FILE_DEBUG_STRIPPED       0x0200  // Debugging info stripped from file in .DBG file\r
+#define EFI_IMAGE_FILE_SYSTEM               0x1000  // System File.\r
+#define EFI_IMAGE_FILE_DLL                  0x2000  // File is a DLL.\r
+#define EFI_IMAGE_FILE_BYTES_REVERSED_HI    0x8000  // Bytes of machine word are reversed.\r
+#define EFI_IMAGE_FILE_MACHINE_UNKNOWN      0\r
+#define EFI_IMAGE_FILE_MACHINE_I386         0x14c   // Intel 386.\r
+#define EFI_IMAGE_FILE_MACHINE_R3000        0x162   // MIPS* little-endian, 0540 big-endian\r
+#define EFI_IMAGE_FILE_MACHINE_R4000        0x166   // MIPS* little-endian\r
+#define EFI_IMAGE_FILE_MACHINE_ALPHA        0x184   // Alpha_AXP*\r
+#define EFI_IMAGE_FILE_MACHINE_POWERPC      0x1F0   // IBM* PowerPC Little-Endian\r
+#define EFI_IMAGE_FILE_MACHINE_TAHOE        0x7cc   // Intel EM machine\r
+//\r
+// * Other names and brands may be claimed as the property of others.\r
+//\r
+\r
+///\r
+/// Directory format.\r
+///\r
+typedef struct {\r
+  UINT32  VirtualAddress;\r
+  UINT32  Size;\r
+} EFI_IMAGE_DATA_DIRECTORY;\r
+\r
+#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16\r
+\r
+typedef struct {\r
+  UINT16  Magic;\r
+  UINT8   MajorLinkerVersion;\r
+  UINT8   MinorLinkerVersion;\r
+  UINT32  SizeOfCode;\r
+  UINT32  SizeOfInitializedData;\r
+  UINT32  SizeOfUninitializedData;\r
+  UINT32  AddressOfEntryPoint;\r
+  UINT32  BaseOfCode;\r
+  UINT32  BaseOfData;\r
+  UINT32  BaseOfBss;\r
+  UINT32  GprMask;\r
+  UINT32  CprMask[4];\r
+  UINT32  GpValue;\r
+} EFI_IMAGE_ROM_OPTIONAL_HEADER;\r
+\r
+#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC      0x107\r
+#define EFI_IMAGE_SIZEOF_ROM_OPTIONAL_HEADER  sizeof (EFI_IMAGE_ROM_OPTIONAL_HEADER)\r
+\r
+typedef struct {\r
+  EFI_IMAGE_FILE_HEADER         FileHeader;\r
+  EFI_IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;\r
+} EFI_IMAGE_ROM_HEADERS;\r
+\r
+///\r
+/// @attention\r
+/// EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64\r
+/// are for use ONLY by tools.  All proper EFI code MUST use\r
+/// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!\r
+///\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b\r
+\r
+typedef struct {\r
+  //\r
+  // Standard fields.\r
+  //\r
+  UINT16                    Magic;\r
+  UINT8                     MajorLinkerVersion;\r
+  UINT8                     MinorLinkerVersion;\r
+  UINT32                    SizeOfCode;\r
+  UINT32                    SizeOfInitializedData;\r
+  UINT32                    SizeOfUninitializedData;\r
+  UINT32                    AddressOfEntryPoint;\r
+  UINT32                    BaseOfCode;\r
+  UINT32                    BaseOfData;\r
+  //\r
+  // NT additional fields.\r
+  //\r
+  UINT32                    ImageBase;\r
+  UINT32                    SectionAlignment;\r
+  UINT32                    FileAlignment;\r
+  UINT16                    MajorOperatingSystemVersion;\r
+  UINT16                    MinorOperatingSystemVersion;\r
+  UINT16                    MajorImageVersion;\r
+  UINT16                    MinorImageVersion;\r
+  UINT16                    MajorSubsystemVersion;\r
+  UINT16                    MinorSubsystemVersion;\r
+  UINT32                    Win32VersionValue;\r
+  UINT32                    SizeOfImage;\r
+  UINT32                    SizeOfHeaders;\r
+  UINT32                    CheckSum;\r
+  UINT16                    Subsystem;\r
+  UINT16                    DllCharacteristics;\r
+  UINT32                    SizeOfStackReserve;\r
+  UINT32                    SizeOfStackCommit;\r
+  UINT32                    SizeOfHeapReserve;\r
+  UINT32                    SizeOfHeapCommit;\r
+  UINT32                    LoaderFlags;\r
+  UINT32                    NumberOfRvaAndSizes;\r
+  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];\r
+} EFI_IMAGE_OPTIONAL_HEADER32;\r
+\r
+///\r
+/// @attention\r
+/// EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64\r
+/// are for use ONLY by tools.  All proper EFI code MUST use\r
+/// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!\r
+///\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b\r
+\r
+typedef struct {\r
+  //\r
+  // Standard fields.\r
+  //\r
+  UINT16                    Magic;\r
+  UINT8                     MajorLinkerVersion;\r
+  UINT8                     MinorLinkerVersion;\r
+  UINT32                    SizeOfCode;\r
+  UINT32                    SizeOfInitializedData;\r
+  UINT32                    SizeOfUninitializedData;\r
+  UINT32                    AddressOfEntryPoint;\r
+  UINT32                    BaseOfCode;\r
+  //\r
+  // NT additional fields.\r
+  //\r
+  UINT64                    ImageBase;\r
+  UINT32                    SectionAlignment;\r
+  UINT32                    FileAlignment;\r
+  UINT16                    MajorOperatingSystemVersion;\r
+  UINT16                    MinorOperatingSystemVersion;\r
+  UINT16                    MajorImageVersion;\r
+  UINT16                    MinorImageVersion;\r
+  UINT16                    MajorSubsystemVersion;\r
+  UINT16                    MinorSubsystemVersion;\r
+  UINT32                    Win32VersionValue;\r
+  UINT32                    SizeOfImage;\r
+  UINT32                    SizeOfHeaders;\r
+  UINT32                    CheckSum;\r
+  UINT16                    Subsystem;\r
+  UINT16                    DllCharacteristics;\r
+  UINT64                    SizeOfStackReserve;\r
+  UINT64                    SizeOfStackCommit;\r
+  UINT64                    SizeOfHeapReserve;\r
+  UINT64                    SizeOfHeapCommit;\r
+  UINT32                    LoaderFlags;\r
+  UINT32                    NumberOfRvaAndSizes;\r
+  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];\r
+} EFI_IMAGE_OPTIONAL_HEADER64;\r
+\r
+///\r
+/// @attention\r
+/// EFI_IMAGE_NT_HEADERS32 and EFI_IMAGE_HEADERS64 are for use ONLY\r
+/// by tools.  All proper EFI code MUST use EFI_IMAGE_NT_HEADERS ONLY!!!\r
+///\r
+typedef struct {\r
+  UINT32                      Signature;\r
+  EFI_IMAGE_FILE_HEADER       FileHeader;\r
+  EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader;\r
+} EFI_IMAGE_NT_HEADERS32;\r
+\r
+#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)\r
+\r
+typedef struct {\r
+  UINT32                      Signature;\r
+  EFI_IMAGE_FILE_HEADER       FileHeader;\r
+  EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader;\r
+} EFI_IMAGE_NT_HEADERS64;\r
+\r
+#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)\r
+\r
+//\r
+// Processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the\r
+// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build.  Same for\r
+// EFI_IMAGE_NT_HEADERS.  These definitions MUST be used by ALL EFI code.\r
+//\r
+#if   defined (MDE_CPU_IA32)\r
+\r
+typedef EFI_IMAGE_OPTIONAL_HEADER32     EFI_IMAGE_OPTIONAL_HEADER;\r
+typedef EFI_IMAGE_NT_HEADERS32          EFI_IMAGE_NT_HEADERS;\r
+\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \\r
+  (((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC))\r
+\r
+#elif defined (MDE_CPU_IPF)\r
+\r
+typedef EFI_IMAGE_OPTIONAL_HEADER64     EFI_IMAGE_OPTIONAL_HEADER;\r
+typedef EFI_IMAGE_NT_HEADERS64          EFI_IMAGE_NT_HEADERS;\r
+\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \\r
+  (((Machine) == EFI_IMAGE_MACHINE_IPF) || ((Machine) == EFI_IMAGE_MACHINE_EBC))\r
+\r
+#elif defined (MDE_CPU_X64)\r
+\r
+typedef EFI_IMAGE_OPTIONAL_HEADER64     EFI_IMAGE_OPTIONAL_HEADER;\r
+typedef EFI_IMAGE_NT_HEADERS64          EFI_IMAGE_NT_HEADERS;\r
+\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \\r
+  (((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))\r
+\r
+#elif defined (MDE_CPU_EBC)\r
+\r
+//\r
+// This is just to make sure you can cross compile with the EBC compiiler.\r
+// It does not make sense to have a PE loader coded in EBC. You need to \r
+// understand the basic \r
+//\r
+typedef EFI_IMAGE_OPTIONAL_HEADER64     EFI_IMAGE_OPTIONAL_HEADER;\r
+typedef EFI_IMAGE_NT_HEADERS64          EFI_IMAGE_NT_HEADERS;\r
+\r
+#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)\r
+\r
+#else\r
+#error Unknown Processor Type\r
+#endif\r
+\r
+\r
+#define EFI_IMAGE_FIRST_SECTION(ntheader) \\r
+    ( \\r
+      (EFI_IMAGE_SECTION_HEADER *) \\r
+        ( \\r
+          (UINT32) ntheader + \\r
+          FIELD_OFFSET (EFI_IMAGE_NT_HEADERS, OptionalHeader) + \\r
+          ((EFI_IMAGE_NT_HEADERS *) (ntheader))->FileHeader.SizeOfOptionalHeader \\r
+        ) \\r
+    )\r
+\r
+//\r
+// Subsystem Values\r
+//\r
+#define EFI_IMAGE_SUBSYSTEM_UNKNOWN     0\r
+#define EFI_IMAGE_SUBSYSTEM_NATIVE      1\r
+#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2\r
+#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3.\r
+#define EFI_IMAGE_SUBSYSTEM_OS2_CUI     5\r
+#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI   7\r
+\r
+//\r
+// Directory Entries\r
+//\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT      0\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT      1\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE    2\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION   3\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY    4\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC   5\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG       6\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT   7\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR   8\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_TLS         9\r
+#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10\r
+\r
+//\r
+// Section header format.\r
+//\r
+#define EFI_IMAGE_SIZEOF_SHORT_NAME 8\r
+\r
+typedef struct {\r
+  UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];\r
+  union {\r
+    UINT32  PhysicalAddress;\r
+    UINT32  VirtualSize;\r
+  } Misc;\r
+  UINT32  VirtualAddress;\r
+  UINT32  SizeOfRawData;\r
+  UINT32  PointerToRawData;\r
+  UINT32  PointerToRelocations;\r
+  UINT32  PointerToLinenumbers;\r
+  UINT16  NumberOfRelocations;\r
+  UINT16  NumberOfLinenumbers;\r
+  UINT32  Characteristics;\r
+} EFI_IMAGE_SECTION_HEADER;\r
+\r
+#define EFI_IMAGE_SIZEOF_SECTION_HEADER       40\r
+\r
+#define EFI_IMAGE_SCN_TYPE_NO_PAD             0x00000008  // Reserved.\r
+#define EFI_IMAGE_SCN_CNT_CODE                0x00000020\r
+#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA    0x00000040\r
+#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA  0x00000080\r
+\r
+#define EFI_IMAGE_SCN_LNK_OTHER               0x00000100  // Reserved.\r
+#define EFI_IMAGE_SCN_LNK_INFO                0x00000200  // Section contains comments or some other type of information.\r
+#define EFI_IMAGE_SCN_LNK_REMOVE              0x00000800  // Section contents will not become part of image.\r
+#define EFI_IMAGE_SCN_LNK_COMDAT              0x00001000\r
+\r
+#define EFI_IMAGE_SCN_ALIGN_1BYTES            0x00100000\r
+#define EFI_IMAGE_SCN_ALIGN_2BYTES            0x00200000\r
+#define EFI_IMAGE_SCN_ALIGN_4BYTES            0x00300000\r
+#define EFI_IMAGE_SCN_ALIGN_8BYTES            0x00400000\r
+#define EFI_IMAGE_SCN_ALIGN_16BYTES           0x00500000\r
+#define EFI_IMAGE_SCN_ALIGN_32BYTES           0x00600000\r
+#define EFI_IMAGE_SCN_ALIGN_64BYTES           0x00700000\r
+\r
+#define EFI_IMAGE_SCN_MEM_DISCARDABLE         0x02000000\r
+#define EFI_IMAGE_SCN_MEM_NOT_CACHED          0x04000000\r
+#define EFI_IMAGE_SCN_MEM_NOT_PAGED           0x08000000\r
+#define EFI_IMAGE_SCN_MEM_SHARED              0x10000000\r
+#define EFI_IMAGE_SCN_MEM_EXECUTE             0x20000000\r
+#define EFI_IMAGE_SCN_MEM_READ                0x40000000\r
+#define EFI_IMAGE_SCN_MEM_WRITE               0x80000000\r
+\r
+///\r
+/// Symbol format.\r
+///\r
+#define EFI_IMAGE_SIZEOF_SYMBOL 18\r
+\r
+//\r
+// Section values.\r
+//\r
+// Symbols have a section number of the section in which they are\r
+// defined. Otherwise, section numbers have the following meanings:\r
+//\r
+#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0  // Symbol is undefined or is common.\r
+#define EFI_IMAGE_SYM_ABSOLUTE  (UINT16) -1 // Symbol is an absolute value.\r
+#define EFI_IMAGE_SYM_DEBUG     (UINT16) -2 // Symbol is a special debug item.\r
+//\r
+// Type (fundamental) values.\r
+//\r
+#define EFI_IMAGE_SYM_TYPE_NULL   0   // no type.\r
+#define EFI_IMAGE_SYM_TYPE_VOID   1   //\r
+#define EFI_IMAGE_SYM_TYPE_CHAR   2   // type character.\r
+#define EFI_IMAGE_SYM_TYPE_SHORT  3   // type short integer.\r
+#define EFI_IMAGE_SYM_TYPE_INT    4\r
+#define EFI_IMAGE_SYM_TYPE_LONG   5\r
+#define EFI_IMAGE_SYM_TYPE_FLOAT  6\r
+#define EFI_IMAGE_SYM_TYPE_DOUBLE 7\r
+#define EFI_IMAGE_SYM_TYPE_STRUCT 8\r
+#define EFI_IMAGE_SYM_TYPE_UNION  9\r
+#define EFI_IMAGE_SYM_TYPE_ENUM   10  // enumeration.\r
+#define EFI_IMAGE_SYM_TYPE_MOE    11  // member of enumeration.\r
+#define EFI_IMAGE_SYM_TYPE_BYTE   12\r
+#define EFI_IMAGE_SYM_TYPE_WORD   13\r
+#define EFI_IMAGE_SYM_TYPE_UINT   14\r
+#define EFI_IMAGE_SYM_TYPE_DWORD  15\r
+\r
+//\r
+// Type (derived) values.\r
+//\r
+#define EFI_IMAGE_SYM_DTYPE_NULL      0 // no derived type.\r
+#define EFI_IMAGE_SYM_DTYPE_POINTER   1\r
+#define EFI_IMAGE_SYM_DTYPE_FUNCTION  2\r
+#define EFI_IMAGE_SYM_DTYPE_ARRAY     3\r
+\r
+//\r
+// Storage classes.\r
+//\r
+#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION   (UINT8) -1\r
+#define EFI_IMAGE_SYM_CLASS_NULL              0\r
+#define EFI_IMAGE_SYM_CLASS_AUTOMATIC         1\r
+#define EFI_IMAGE_SYM_CLASS_EXTERNAL          2\r
+#define EFI_IMAGE_SYM_CLASS_STATIC            3\r
+#define EFI_IMAGE_SYM_CLASS_REGISTER          4\r
+#define EFI_IMAGE_SYM_CLASS_EXTERNAL_DEF      5\r
+#define EFI_IMAGE_SYM_CLASS_LABEL             6\r
+#define EFI_IMAGE_SYM_CLASS_UNDEFINED_LABEL   7\r
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_STRUCT  8\r
+#define EFI_IMAGE_SYM_CLASS_ARGUMENT          9\r
+#define EFI_IMAGE_SYM_CLASS_STRUCT_TAG        10\r
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_UNION   11\r
+#define EFI_IMAGE_SYM_CLASS_UNION_TAG         12\r
+#define EFI_IMAGE_SYM_CLASS_TYPE_DEFINITION   13\r
+#define EFI_IMAGE_SYM_CLASS_UNDEFINED_STATIC  14\r
+#define EFI_IMAGE_SYM_CLASS_ENUM_TAG          15\r
+#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_ENUM    16\r
+#define EFI_IMAGE_SYM_CLASS_REGISTER_PARAM    17\r
+#define EFI_IMAGE_SYM_CLASS_BIT_FIELD         18\r
+#define EFI_IMAGE_SYM_CLASS_BLOCK             100\r
+#define EFI_IMAGE_SYM_CLASS_FUNCTION          101\r
+#define EFI_IMAGE_SYM_CLASS_END_OF_STRUCT     102\r
+#define EFI_IMAGE_SYM_CLASS_FILE              103\r
+#define EFI_IMAGE_SYM_CLASS_SECTION           104\r
+#define EFI_IMAGE_SYM_CLASS_WEAK_EXTERNAL     105\r
+\r
+//\r
+// type packing constants\r
+//\r
+#define EFI_IMAGE_N_BTMASK  017\r
+#define EFI_IMAGE_N_TMASK   060\r
+#define EFI_IMAGE_N_TMASK1  0300\r
+#define EFI_IMAGE_N_TMASK2  0360\r
+#define EFI_IMAGE_N_BTSHFT  4\r
+#define EFI_IMAGE_N_TSHIFT  2\r
+\r
+//\r
+// Communal selection types.\r
+//\r
+#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES    1\r
+#define EFI_IMAGE_COMDAT_SELECT_ANY             2\r
+#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE       3\r
+#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH     4\r
+#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE     5\r
+\r
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY  1\r
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY    2\r
+#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS      3\r
+\r
+///\r
+/// Relocation format.\r
+///\r
+typedef struct {\r
+  UINT32  VirtualAddress;\r
+  UINT32  SymbolTableIndex;\r
+  UINT16  Type;\r
+} EFI_IMAGE_RELOCATION;\r
+\r
+#define EFI_IMAGE_SIZEOF_RELOCATION 10\r
+\r
+//\r
+// I386 relocation types.\r
+//\r
+#define EFI_IMAGE_REL_I386_ABSOLUTE 0   // Reference is absolute, no relocation is necessary\r
+#define EFI_IMAGE_REL_I386_DIR16    01  // Direct 16-bit reference to the symbols virtual address\r
+#define EFI_IMAGE_REL_I386_REL16    02  // PC-relative 16-bit reference to the symbols virtual address\r
+#define EFI_IMAGE_REL_I386_DIR32    06  // Direct 32-bit reference to the symbols virtual address\r
+#define EFI_IMAGE_REL_I386_DIR32NB  07  // Direct 32-bit reference to the symbols virtual address, base not included\r
+#define EFI_IMAGE_REL_I386_SEG12    011 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address\r
+#define EFI_IMAGE_REL_I386_SECTION  012\r
+#define EFI_IMAGE_REL_I386_SECREL   013\r
+#define EFI_IMAGE_REL_I386_REL32    024 // PC-relative 32-bit reference to the symbols virtual address\r
+\r
+///\r
+/// Based relocation format.\r
+///\r
+typedef struct {\r
+  UINT32  VirtualAddress;\r
+  UINT32  SizeOfBlock;\r
+} EFI_IMAGE_BASE_RELOCATION;\r
+\r
+#define EFI_IMAGE_SIZEOF_BASE_RELOCATION  8\r
+\r
+//\r
+// Based relocation types.\r
+//\r
+#define EFI_IMAGE_REL_BASED_ABSOLUTE      0\r
+#define EFI_IMAGE_REL_BASED_HIGH          1\r
+#define EFI_IMAGE_REL_BASED_LOW           2\r
+#define EFI_IMAGE_REL_BASED_HIGHLOW       3\r
+#define EFI_IMAGE_REL_BASED_HIGHADJ       4\r
+#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR  5\r
+#define EFI_IMAGE_REL_BASED_IA64_IMM64    9\r
+#define EFI_IMAGE_REL_BASED_DIR64         10\r
+\r
+///\r
+/// Line number format.\r
+///\r
+typedef struct {\r
+  union {\r
+    UINT32  SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.\r
+    UINT32  VirtualAddress;   // Virtual address of line number.\r
+  } Type;\r
+  UINT16  Linenumber;         // Line number.\r
+} EFI_IMAGE_LINENUMBER;\r
+\r
+#define EFI_IMAGE_SIZEOF_LINENUMBER 6\r
+\r
+//\r
+// Archive format.\r
+//\r
+#define EFI_IMAGE_ARCHIVE_START_SIZE        8\r
+#define EFI_IMAGE_ARCHIVE_START             "!<arch>\n"\r
+#define EFI_IMAGE_ARCHIVE_END               "`\n"\r
+#define EFI_IMAGE_ARCHIVE_PAD               "\n"\r
+#define EFI_IMAGE_ARCHIVE_LINKER_MEMBER     "/               "\r
+#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER  "//              "\r
+\r
+typedef struct {\r
+  UINT8 Name[16];     // File member name - `/' terminated.\r
+  UINT8 Date[12];     // File member date - decimal.\r
+  UINT8 UserID[6];    // File member user id - decimal.\r
+  UINT8 GroupID[6];   // File member group id - decimal.\r
+  UINT8 Mode[8];      // File member mode - octal.\r
+  UINT8 Size[10];     // File member size - decimal.\r
+  UINT8 EndHeader[2]; // String to end header.\r
+} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;\r
+\r
+#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60\r
+\r
+//\r
+// DLL support.\r
+//\r
+\r
+///\r
+/// DLL Export Format\r
+///\r
+typedef struct {\r
+  UINT32  Characteristics;\r
+  UINT32  TimeDateStamp;\r
+  UINT16  MajorVersion;\r
+  UINT16  MinorVersion;\r
+  UINT32  Name;\r
+  UINT32  Base;\r
+  UINT32  NumberOfFunctions;\r
+  UINT32  NumberOfNames;\r
+  UINT32  AddressOfFunctions;\r
+  UINT32  AddressOfNames;\r
+  UINT32  AddressOfNameOrdinals;\r
+} EFI_IMAGE_EXPORT_DIRECTORY;\r
+\r
+///\r
+/// DLL support.\r
+/// Import Format\r
+///\r
+typedef struct {\r
+  UINT16  Hint;\r
+  UINT8   Name[1];\r
+} EFI_IMAGE_IMPORT_BY_NAME;\r
+\r
+typedef struct {\r
+  union {\r
+    UINT32                    Function;\r
+    UINT32                    Ordinal;\r
+    EFI_IMAGE_IMPORT_BY_NAME  *AddressOfData;\r
+  } u1;\r
+} EFI_IMAGE_THUNK_DATA;\r
+\r
+#define EFI_IMAGE_ORDINAL_FLAG              0x80000000\r
+#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal)  ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)\r
+#define EFI_IMAGE_ORDINAL(Ordinal)          (Ordinal & 0xffff)\r
+\r
+typedef struct {\r
+  UINT32                Characteristics;\r
+  UINT32                TimeDateStamp;\r
+  UINT32                ForwarderChain;\r
+  UINT32                Name;\r
+  EFI_IMAGE_THUNK_DATA  *FirstThunk;\r
+} EFI_IMAGE_IMPORT_DESCRIPTOR;\r
+\r
+///\r
+/// Debug Format\r
+///\r
+#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2\r
+\r
+typedef struct {\r
+  UINT32  Characteristics;\r
+  UINT32  TimeDateStamp;\r
+  UINT16  MajorVersion;\r
+  UINT16  MinorVersion;\r
+  UINT32  Type;\r
+  UINT32  SizeOfData;\r
+  UINT32  RVA;\r
+  UINT32  FileOffset;\r
+} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;\r
+\r
+#define CODEVIEW_SIGNATURE_NB10 0x3031424E  // "NB10"\r
+typedef struct {\r
+  UINT32  Signature;                        // "NB10"\r
+  UINT32  Unknown;\r
+  UINT32  Unknown2;\r
+  UINT32  Unknown3;\r
+  //\r
+  // Filename of .PDB goes here\r
+  //\r
+} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;\r
+\r
+#define CODEVIEW_SIGNATURE_RSDS 0x53445352  // "RSDS"\r
+typedef struct {\r
+  UINT32  Signature;                        // "RSDS"\r
+  UINT32  Unknown;\r
+  UINT32  Unknown2;\r
+  UINT32  Unknown3;\r
+  UINT32  Unknown4;\r
+  UINT32  Unknown5;\r
+  //\r
+  // Filename of .PDB goes here\r
+  //\r
+} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;\r
+\r
+///\r
+/// Header format for TE images\r
+///\r
+typedef struct {\r
+  UINT16                    Signature;            // signature for TE format = "VZ"\r
+  UINT16                    Machine;              // from the original file header\r
+  UINT8                     NumberOfSections;     // from the original file header\r
+  UINT8                     Subsystem;            // from original optional header\r
+  UINT16                    StrippedSize;         // how many bytes we removed from the header\r
+  UINT32                    AddressOfEntryPoint;  // offset to entry point -- from original optional header\r
+  UINT32                    BaseOfCode;           // from original image -- required for ITP debug\r
+  UINT64                    ImageBase;            // from original file header\r
+  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[2];     // only base relocation and debug directory\r
+} EFI_TE_IMAGE_HEADER;\r
+\r
+#define EFI_TE_IMAGE_HEADER_SIGNATURE 0x5A56      // "VZ"\r
+\r
+//\r
+// Data directory indexes in our TE image header\r
+//\r
+#define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC  0\r
+#define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG      1\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/FirmwareFileSystem.h b/Tools/Source/TianoTools/Include/Common/FirmwareFileSystem.h
new file mode 100644 (file)
index 0000000..5678a95
--- /dev/null
@@ -0,0 +1,98 @@
+/** @file\r
+  This file defines the data structures that comprise the FFS file system.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  FirmwareFileSystem.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Firmware File System Spec 0.9.\r
+\r
+**/\r
+\r
+#ifndef __EFI_FFS_FILE_SYSTEM_H__\r
+#define __EFI_FFS_FILE_SYSTEM_H__\r
+\r
+///\r
+/// FFS specific file types\r
+///\r
+#define EFI_FV_FILETYPE_FFS_PAD 0xF0\r
+\r
+//\r
+// FFS File Attributes\r
+//\r
+#define FFS_ATTRIB_TAIL_PRESENT     0x01\r
+#define FFS_ATTRIB_RECOVERY         0x02\r
+#define FFS_ATTRIB_HEADER_EXTENSION 0x04\r
+#define FFS_ATTRIB_DATA_ALIGNMENT   0x38\r
+#define FFS_ATTRIB_CHECKSUM         0x40\r
+\r
+///\r
+/// FFS_FIXED_CHECKSUM is the default checksum value used when the\r
+/// FFS_ATTRIB_CHECKSUM attribute bit is clear\r
+/// note this is NOT an architecturally defined value, but is in this file for\r
+/// implementation convenience\r
+///\r
+#define FFS_FIXED_CHECKSUM  0x5A\r
+\r
+//\r
+// File state definitions\r
+//\r
+#define EFI_FILE_HEADER_CONSTRUCTION  0x01\r
+#define EFI_FILE_HEADER_VALID         0x02\r
+#define EFI_FILE_DATA_VALID           0x04\r
+#define EFI_FILE_MARKED_FOR_UPDATE    0x08\r
+#define EFI_FILE_DELETED              0x10\r
+#define EFI_FILE_HEADER_INVALID       0x20\r
+\r
+#define EFI_FILE_ALL_STATE_BITS       (EFI_FILE_HEADER_CONSTRUCTION | \\r
+                                 EFI_FILE_HEADER_VALID | \\r
+                                 EFI_FILE_DATA_VALID | \\r
+                                 EFI_FILE_MARKED_FOR_UPDATE | \\r
+                                 EFI_FILE_DELETED | \\r
+                                 EFI_FILE_HEADER_INVALID \\r
+          )\r
+\r
+#define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes, TestAttributes, Bit) \\r
+    ( \\r
+      (BOOLEAN) ( \\r
+          (FvbAttributes & EFI_FVB_ERASE_POLARITY) ? (((~TestAttributes) & Bit) == Bit) : ((TestAttributes & Bit) == Bit) \\r
+        ) \\r
+    )\r
+\r
+typedef UINT16  EFI_FFS_FILE_TAIL;\r
+\r
+///\r
+/// FFS file integrity check structure\r
+///\r
+typedef union {\r
+  struct {\r
+    UINT8 Header;\r
+    UINT8 File;\r
+  } Checksum;\r
+  UINT16  TailReference;\r
+} EFI_FFS_INTEGRITY_CHECK;\r
+\r
+//\r
+// FFS file header definition\r
+//\r
+typedef UINT8 EFI_FFS_FILE_ATTRIBUTES;\r
+typedef UINT8 EFI_FFS_FILE_STATE;\r
+\r
+typedef struct {\r
+  EFI_GUID                Name;\r
+  EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r
+  EFI_FV_FILETYPE         Type;\r
+  EFI_FFS_FILE_ATTRIBUTES Attributes;\r
+  UINT8                   Size[3];\r
+  EFI_FFS_FILE_STATE      State;\r
+} EFI_FFS_FILE_HEADER;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/FirmwareVolumeHeader.h b/Tools/Source/TianoTools/Include/Common/FirmwareVolumeHeader.h
new file mode 100644 (file)
index 0000000..038dce6
--- /dev/null
@@ -0,0 +1,109 @@
+/** @file\r
+  Defines data structure that is the volume header found at the beginning of\r
+  all firmware volumes that are either memory mapped, or have an\r
+  associated FirmwareVolumeBlock protocol.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  FirmwareVolumeHeader.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Firmware Volume Block Spec 0.9.\r
+\r
+**/\r
+\r
+#ifndef __EFI_FIRMWARE_VOLUME_HEADER_H__\r
+#define __EFI_FIRMWARE_VOLUME_HEADER_H__\r
+\r
+//\r
+// Firmware Volume Block Attributes definition\r
+//\r
+typedef UINT32  EFI_FVB_ATTRIBUTES;\r
+\r
+//\r
+// Firmware Volume Block Attributes bit definitions\r
+//\r
+#define EFI_FVB_READ_DISABLED_CAP   0x00000001\r
+#define EFI_FVB_READ_ENABLED_CAP    0x00000002\r
+#define EFI_FVB_READ_STATUS         0x00000004\r
+\r
+#define EFI_FVB_WRITE_DISABLED_CAP  0x00000008\r
+#define EFI_FVB_WRITE_ENABLED_CAP   0x00000010\r
+#define EFI_FVB_WRITE_STATUS        0x00000020\r
+\r
+#define EFI_FVB_LOCK_CAP            0x00000040\r
+#define EFI_FVB_LOCK_STATUS         0x00000080\r
+\r
+#define EFI_FVB_STICKY_WRITE        0x00000200\r
+#define EFI_FVB_MEMORY_MAPPED       0x00000400\r
+#define EFI_FVB_ERASE_POLARITY      0x00000800\r
+\r
+#define EFI_FVB_ALIGNMENT_CAP       0x00008000\r
+#define EFI_FVB_ALIGNMENT_2         0x00010000\r
+#define EFI_FVB_ALIGNMENT_4         0x00020000\r
+#define EFI_FVB_ALIGNMENT_8         0x00040000\r
+#define EFI_FVB_ALIGNMENT_16        0x00080000\r
+#define EFI_FVB_ALIGNMENT_32        0x00100000\r
+#define EFI_FVB_ALIGNMENT_64        0x00200000\r
+#define EFI_FVB_ALIGNMENT_128       0x00400000\r
+#define EFI_FVB_ALIGNMENT_256       0x00800000\r
+#define EFI_FVB_ALIGNMENT_512       0x01000000\r
+#define EFI_FVB_ALIGNMENT_1K        0x02000000\r
+#define EFI_FVB_ALIGNMENT_2K        0x04000000\r
+#define EFI_FVB_ALIGNMENT_4K        0x08000000\r
+#define EFI_FVB_ALIGNMENT_8K        0x10000000\r
+#define EFI_FVB_ALIGNMENT_16K       0x20000000\r
+#define EFI_FVB_ALIGNMENT_32K       0x40000000\r
+#define EFI_FVB_ALIGNMENT_64K       0x80000000\r
+\r
+#define EFI_FVB_CAPABILITIES  (EFI_FVB_READ_DISABLED_CAP | \\r
+                              EFI_FVB_READ_ENABLED_CAP | \\r
+                              EFI_FVB_WRITE_DISABLED_CAP | \\r
+                              EFI_FVB_WRITE_ENABLED_CAP | \\r
+                              EFI_FVB_LOCK_CAP \\r
+                              )\r
+\r
+#define EFI_FVB_STATUS    (EFI_FVB_READ_STATUS | EFI_FVB_WRITE_STATUS | EFI_FVB_LOCK_STATUS)\r
+\r
+///\r
+/// Firmware Volume Header Revision definition\r
+///\r
+#define EFI_FVH_REVISION  0x01\r
+\r
+///\r
+/// Firmware Volume Header Signature definition\r
+///\r
+#define EFI_FVH_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', 'H')\r
+\r
+///\r
+/// Firmware Volume Header Block Map Entry definition\r
+///\r
+typedef struct {\r
+  UINT32  NumBlocks;\r
+  UINT32  BlockLength;\r
+} EFI_FV_BLOCK_MAP_ENTRY;\r
+\r
+///\r
+/// Firmware Volume Header definition\r
+///\r
+typedef struct {\r
+  UINT8                   ZeroVector[16];\r
+  EFI_GUID                FileSystemGuid;\r
+  UINT64                  FvLength;\r
+  UINT32                  Signature;\r
+  EFI_FVB_ATTRIBUTES      Attributes;\r
+  UINT16                  HeaderLength;\r
+  UINT16                  Checksum;\r
+  UINT8                   Reserved[3];\r
+  UINT8                   Revision;\r
+  EFI_FV_BLOCK_MAP_ENTRY  FvBlockMap[1];\r
+} EFI_FIRMWARE_VOLUME_HEADER;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/FirmwareVolumeImageFormat.h b/Tools/Source/TianoTools/Include/Common/FirmwareVolumeImageFormat.h
new file mode 100644 (file)
index 0000000..14fa41b
--- /dev/null
@@ -0,0 +1,277 @@
+/** @file\r
+  This file defines the data structures that are architecturally defined for file\r
+  images loaded via the FirmwareVolume protocol.  The Firmware Volume specification\r
+  is the basis for these definitions.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  FimrwareVolumeImageFormat.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Firmware Volume Spec 0.9.\r
+\r
+**/\r
+\r
+#ifndef __FIRMWARE_VOLUME_IMAGE_FORMAT_H__\r
+#define __FIRMWARE_VOLUME_IMAGE_FORMAT_H__\r
+\r
+//\r
+// pack all data structures since this is actually a binary format and we cannot\r
+// allow internal padding in the data structures because of some compilerism..\r
+//\r
+#pragma pack(1)\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Architectural file types\r
+//\r
+typedef UINT8 EFI_FV_FILETYPE;\r
+\r
+#define EFI_FV_FILETYPE_ALL                   0x00\r
+#define EFI_FV_FILETYPE_RAW                   0x01\r
+#define EFI_FV_FILETYPE_FREEFORM              0x02\r
+#define EFI_FV_FILETYPE_SECURITY_CORE         0x03\r
+#define EFI_FV_FILETYPE_PEI_CORE              0x04\r
+#define EFI_FV_FILETYPE_DXE_CORE              0x05\r
+#define EFI_FV_FILETYPE_PEIM                  0x06\r
+#define EFI_FV_FILETYPE_DRIVER                0x07\r
+#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER  0x08\r
+#define EFI_FV_FILETYPE_APPLICATION           0x09\r
+//\r
+// File type 0x0A is reserved and should not be used\r
+//\r
+#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Section types\r
+//\r
+typedef UINT8 EFI_SECTION_TYPE;\r
+\r
+//\r
+// ************************************************************\r
+// The section type EFI_SECTION_ALL is a psuedo type.  It is\r
+// used as a wildcard when retrieving sections.  The section\r
+// type EFI_SECTION_ALL matches all section types.\r
+// ************************************************************\r
+//\r
+#define EFI_SECTION_ALL 0x00\r
+\r
+//\r
+// ************************************************************\r
+// Encapsulation section Type values\r
+// ************************************************************\r
+//\r
+#define EFI_SECTION_COMPRESSION   0x01\r
+#define EFI_SECTION_GUID_DEFINED  0x02\r
+\r
+//\r
+// ************************************************************\r
+// Leaf section Type values\r
+// ************************************************************\r
+//\r
+#define EFI_SECTION_FIRST_LEAF_SECTION_TYPE 0x10\r
+\r
+#define EFI_SECTION_PE32                    0x10\r
+#define EFI_SECTION_PIC                     0x11\r
+#define EFI_SECTION_TE                      0x12\r
+#define EFI_SECTION_DXE_DEPEX               0x13\r
+#define EFI_SECTION_VERSION                 0x14\r
+#define EFI_SECTION_USER_INTERFACE          0x15\r
+#define EFI_SECTION_COMPATIBILITY16         0x16\r
+#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE   0x17\r
+#define EFI_SECTION_FREEFORM_SUBTYPE_GUID   0x18\r
+#define EFI_SECTION_RAW                     0x19\r
+#define EFI_SECTION_PEI_DEPEX               0x1B\r
+\r
+#define EFI_SECTION_LAST_LEAF_SECTION_TYPE  0x1B\r
+#define EFI_SECTION_LAST_SECTION_TYPE       0x1B\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Common section header\r
+//\r
+typedef struct {\r
+  UINT8 Size[3];\r
+  UINT8 Type;\r
+} EFI_COMMON_SECTION_HEADER;\r
+\r
+#define SECTION_SIZE(SectionHeaderPtr) \\r
+    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) SectionHeaderPtr)->Size) & 0x00ffffff))\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Compression section\r
+//\r
+//\r
+// CompressionType values\r
+//\r
+#define EFI_NOT_COMPRESSED          0x00\r
+#define EFI_STANDARD_COMPRESSION    0x01\r
+#define EFI_CUSTOMIZED_COMPRESSION  0x02\r
+\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+  UINT32                    UncompressedLength;\r
+  UINT8                     CompressionType;\r
+} EFI_COMPRESSION_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// GUID defined section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+  EFI_GUID                  SectionDefinitionGuid;\r
+  UINT16                    DataOffset;\r
+  UINT16                    Attributes;\r
+} EFI_GUID_DEFINED_SECTION;\r
+\r
+//\r
+// Bit values for Attributes\r
+//\r
+#define EFI_GUIDED_SECTION_PROCESSING_REQUIRED  0x01\r
+#define EFI_GUIDED_SECTION_AUTH_STATUS_VALID    0x02\r
+\r
+//\r
+// Bit values for AuthenticationStatus\r
+//\r
+#define EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE 0x000001\r
+#define EFI_AGGREGATE_AUTH_STATUS_IMAGE_SIGNED      0x000002\r
+#define EFI_AGGREGATE_AUTH_STATUS_NOT_TESTED        0x000004\r
+#define EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED       0x000008\r
+#define EFI_AGGREGATE_AUTH_STATUS_ALL               0x00000f\r
+\r
+#define EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE     0x010000\r
+#define EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED          0x020000\r
+#define EFI_LOCAL_AUTH_STATUS_NOT_TESTED            0x040000\r
+#define EFI_LOCAL_AUTH_STATUS_TEST_FAILED           0x080000\r
+#define EFI_LOCAL_AUTH_STATUS_ALL                   0x0f0000\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// PE32+ section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_PE32_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// PIC section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_PIC_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// PEIM header section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_PEIM_HEADER_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// DEPEX section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_DEPEX_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Version section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+  UINT16                    BuildNumber;\r
+  INT16                     VersionString[1];\r
+} EFI_VERSION_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// User interface section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+  INT16                     FileNameString[1];\r
+} EFI_USER_INTERFACE_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Code16 section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_CODE16_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Firmware Volume Image section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_FIRMWARE_VOLUME_IMAGE_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Freeform subtype GUID section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+  EFI_GUID                  SubTypeGuid;\r
+} EFI_FREEFORM_SUBTYPE_GUID_SECTION;\r
+\r
+//\r
+// ////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Raw section\r
+//\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER CommonHeader;\r
+} EFI_RAW_SECTION;\r
+\r
+//\r
+// undo the pragma from the beginning...\r
+//\r
+#pragma pack()\r
+\r
+typedef union {\r
+  EFI_COMMON_SECTION_HEADER         *CommonHeader;\r
+  EFI_COMPRESSION_SECTION           *CompressionSection;\r
+  EFI_GUID_DEFINED_SECTION          *GuidDefinedSection;\r
+  EFI_PE32_SECTION                  *Pe32Section;\r
+  EFI_PIC_SECTION                   *PicSection;\r
+  EFI_PEIM_HEADER_SECTION           *PeimHeaderSection;\r
+  EFI_DEPEX_SECTION                 *DependencySection;\r
+  EFI_VERSION_SECTION               *VersionSection;\r
+  EFI_USER_INTERFACE_SECTION        *UISection;\r
+  EFI_CODE16_SECTION                *Code16Section;\r
+  EFI_FIRMWARE_VOLUME_IMAGE_SECTION *FVImageSection;\r
+  EFI_FREEFORM_SUBTYPE_GUID_SECTION *FreeformSubtypeSection;\r
+  EFI_RAW_SECTION                   *RawSection;\r
+} EFI_FILE_SECTION_POINTER;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/Hob.h b/Tools/Source/TianoTools/Include/Common/Hob.h
new file mode 100644 (file)
index 0000000..b6ae6de
--- /dev/null
@@ -0,0 +1,235 @@
+/** @file\r
+  Hand Off Block (HOB) definition.\r
+\r
+  The HOB is a memory data structure used to hand-off system information from\r
+  PEI to DXE (the next phase).\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  Hob.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Hand Off Block (HOB) Spec Version 0.9.\r
+\r
+**/\r
+\r
+#ifndef __HOB_H__\r
+#define __HOB_H__\r
+\r
+\r
+//\r
+// Every Hob must start with this data structure.\r
+//\r
+typedef struct {\r
+  UINT16  HobType;\r
+  UINT16  HobLength;\r
+  UINT32  Reserved;\r
+} EFI_HOB_GENERIC_HEADER;\r
+\r
+//\r
+// End of HOB List HOB\r
+//\r
+#define EFI_HOB_TYPE_END_OF_HOB_LIST  0xffff\r
+\r
+//\r
+// Handoff Information Table HOB\r
+//\r
+#define EFI_HOB_TYPE_HANDOFF          0x0001\r
+\r
+#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009\r
+\r
+typedef UINT32  EFI_BOOT_MODE;\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+  UINT32                  Version;\r
+  EFI_BOOT_MODE           BootMode;\r
+  EFI_PHYSICAL_ADDRESS    EfiMemoryTop;\r
+  EFI_PHYSICAL_ADDRESS    EfiMemoryBottom;\r
+  EFI_PHYSICAL_ADDRESS    EfiFreeMemoryTop;\r
+  EFI_PHYSICAL_ADDRESS    EfiFreeMemoryBottom;\r
+  EFI_PHYSICAL_ADDRESS    EfiEndOfHobList;\r
+} EFI_HOB_HANDOFF_INFO_TABLE;\r
+\r
+//\r
+// Memory Descriptor HOB\r
+//\r
+#define EFI_HOB_TYPE_MEMORY_ALLOCATION  0x0002\r
+\r
+typedef struct {\r
+  EFI_GUID              Name;\r
+  EFI_PHYSICAL_ADDRESS  MemoryBaseAddress;\r
+  UINT64                MemoryLength;\r
+  EFI_MEMORY_TYPE       MemoryType;\r
+  UINT8                 Reserved[4];\r
+} EFI_HOB_MEMORY_ALLOCATION_HEADER;\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER            Header;\r
+  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
+  //\r
+  // Additional data pertaining to the "Name" Guid memory\r
+  // may go here.\r
+  //\r
+} EFI_HOB_MEMORY_ALLOCATION;\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER            Header;\r
+  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
+} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER            Header;\r
+  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
+} EFI_HOB_MEMORY_ALLOCATION_STACK;\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER            Header;\r
+  EFI_HOB_MEMORY_ALLOCATION_HEADER  MemoryAllocationHeader;\r
+  EFI_GUID                          ModuleName;\r
+  EFI_PHYSICAL_ADDRESS              EntryPoint;\r
+} EFI_HOB_MEMORY_ALLOCATION_MODULE;\r
+\r
+#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR  0x0003\r
+\r
+typedef UINT32  EFI_RESOURCE_TYPE;\r
+\r
+#define EFI_RESOURCE_SYSTEM_MEMORY          0\r
+#define EFI_RESOURCE_MEMORY_MAPPED_IO       1\r
+#define EFI_RESOURCE_IO                     2\r
+#define EFI_RESOURCE_FIRMWARE_DEVICE        3\r
+#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT  4\r
+#define EFI_RESOURCE_MEMORY_RESERVED        5\r
+#define EFI_RESOURCE_IO_RESERVED            6\r
+#define EFI_RESOURCE_MAX_MEMORY_TYPE        7\r
+\r
+typedef UINT32  EFI_RESOURCE_ATTRIBUTE_TYPE;\r
+\r
+#define EFI_RESOURCE_ATTRIBUTE_PRESENT                  0x00000001\r
+#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002\r
+#define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004\r
+#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC           0x00000008\r
+#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC         0x00000010\r
+#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1           0x00000020\r
+#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2           0x00000040\r
+#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080\r
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100\r
+#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200\r
+#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE              0x00000400\r
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE        0x00000800\r
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE  0x00001000\r
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE     0x00002000\r
+#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO                0x00004000\r
+#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO                0x00008000\r
+#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO                0x00010000\r
+#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED        0x00020000\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER      Header;\r
+  EFI_GUID                    Owner;\r
+  EFI_RESOURCE_TYPE           ResourceType;\r
+  EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;\r
+  EFI_PHYSICAL_ADDRESS        PhysicalStart;\r
+  UINT64                      ResourceLength;\r
+} EFI_HOB_RESOURCE_DESCRIPTOR;\r
+\r
+//\r
+// GUID Extension HOB\r
+// The HobLength is variable as it includes the GUID specific data.\r
+//\r
+#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+  EFI_GUID                Name;\r
+\r
+  //\r
+  // Guid specific data goes here\r
+  //\r
+} EFI_HOB_GUID_TYPE;\r
+\r
+//\r
+// Firmware Volume HOB\r
+//\r
+#define EFI_HOB_TYPE_FV 0x0005\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+  EFI_PHYSICAL_ADDRESS    BaseAddress;\r
+  UINT64                  Length;\r
+} EFI_HOB_FIRMWARE_VOLUME;\r
+\r
+//\r
+// CPU HOB\r
+//\r
+#define EFI_HOB_TYPE_CPU  0x0006\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+  UINT8                   SizeOfMemorySpace;\r
+  UINT8                   SizeOfIoSpace;\r
+  UINT8                   Reserved[6];\r
+} EFI_HOB_CPU;\r
+\r
+//\r
+// PEI Core Memory Pool HOB\r
+// The HobLength is variable as the HOB contains pool allocations by\r
+// the PeiServices AllocatePool function\r
+//\r
+#define EFI_HOB_TYPE_PEI_MEMORY_POOL  0x0007\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+} EFI_HOB_MEMORY_POOL;\r
+\r
+//\r
+// Capsule volume HOB -- identical to a firmware volume\r
+//\r
+#define EFI_HOB_TYPE_CV 0x0008\r
+\r
+typedef struct {\r
+  EFI_HOB_GENERIC_HEADER  Header;\r
+  EFI_PHYSICAL_ADDRESS    BaseAddress;\r
+  UINT64                  Length;\r
+} EFI_HOB_CAPSULE_VOLUME;\r
+\r
+#define EFI_HOB_TYPE_UNUSED 0xFFFE\r
+\r
+//\r
+// Union of all the possible HOB Types\r
+//\r
+typedef union {\r
+  EFI_HOB_GENERIC_HEADER              *Header;\r
+  EFI_HOB_HANDOFF_INFO_TABLE          *HandoffInformationTable;\r
+  EFI_HOB_MEMORY_ALLOCATION           *MemoryAllocation;\r
+  EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;\r
+  EFI_HOB_MEMORY_ALLOCATION_STACK     *MemoryAllocationStack;\r
+  EFI_HOB_MEMORY_ALLOCATION_MODULE    *MemoryAllocationModule;\r
+  EFI_HOB_RESOURCE_DESCRIPTOR         *ResourceDescriptor;\r
+  EFI_HOB_GUID_TYPE                   *Guid;\r
+  EFI_HOB_FIRMWARE_VOLUME             *FirmwareVolume;\r
+  EFI_HOB_CPU                         *Cpu;\r
+  EFI_HOB_MEMORY_POOL                 *Pool;\r
+  EFI_HOB_CAPSULE_VOLUME              *CapsuleVolume;\r
+  UINT8                               *Raw;\r
+} EFI_PEI_HOB_POINTERS;\r
+\r
+#define GET_HOB_TYPE(Hob)     ((Hob).Header->HobType)\r
+#define GET_HOB_LENGTH(Hob)   ((Hob).Header->HobLength)\r
+#define GET_NEXT_HOB(Hob)     ((Hob).Raw + GET_HOB_LENGTH (Hob))\r
+#define END_OF_HOB_LIST(Hob)  (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)\r
+\r
+//\r
+// Get the data and data size field of GUID \r
+//\r
+#define GET_GUID_HOB_DATA(GuidHob)      ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))\r
+#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/InternalFormRepresentation.h b/Tools/Source/TianoTools/Include/Common/InternalFormRepresentation.h
new file mode 100644 (file)
index 0000000..bf3d824
--- /dev/null
@@ -0,0 +1,422 @@
+/** @file\r
+  This file defines the encoding for the VFR (Visual Form Representation) language.\r
+  IFR is primarily consumed by the EFI presentation engine, and produced by EFI\r
+  internal application and drivers as well as all add-in card option-ROM drivers\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  InternalFormRepresentation.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Human Interface Infrastructure Spec Version 0.92.\r
+\r
+**/\r
+\r
+#ifndef __EFI_INTERNAL_FORM_REPRESENTATION_H__\r
+#define __EFI_INTERNAL_FORM_REPRESENTATION_H__\r
+\r
+//\r
+// The following types are currently defined:\r
+//\r
+typedef UINT32  RELOFST;\r
+typedef CHAR16  *EFI_STRING;\r
+\r
+//\r
+// IFR Op codes\r
+//\r
+#define EFI_IFR_FORM_OP                 0x01\r
+#define EFI_IFR_SUBTITLE_OP             0x02\r
+#define EFI_IFR_TEXT_OP                 0x03\r
+#define EFI_IFR_GRAPHIC_OP              0x04\r
+#define EFI_IFR_ONE_OF_OP               0x05\r
+#define EFI_IFR_CHECKBOX_OP             0x06\r
+#define EFI_IFR_NUMERIC_OP              0x07\r
+#define EFI_IFR_PASSWORD_OP             0x08\r
+#define EFI_IFR_ONE_OF_OPTION_OP        0x09  // ONEOF OPTION field\r
+#define EFI_IFR_SUPPRESS_IF_OP          0x0A\r
+#define EFI_IFR_END_FORM_OP             0x0B\r
+#define EFI_IFR_HIDDEN_OP               0x0C\r
+#define EFI_IFR_END_FORM_SET_OP         0x0D\r
+#define EFI_IFR_FORM_SET_OP             0x0E\r
+#define EFI_IFR_REF_OP                  0x0F\r
+#define EFI_IFR_END_ONE_OF_OP           0x10\r
+#define EFI_IFR_END_OP                  EFI_IFR_END_ONE_OF_OP\r
+#define EFI_IFR_INCONSISTENT_IF_OP      0x11\r
+#define EFI_IFR_EQ_ID_VAL_OP            0x12\r
+#define EFI_IFR_EQ_ID_ID_OP             0x13\r
+#define EFI_IFR_EQ_ID_LIST_OP           0x14\r
+#define EFI_IFR_AND_OP                  0x15\r
+#define EFI_IFR_OR_OP                   0x16\r
+#define EFI_IFR_NOT_OP                  0x17\r
+#define EFI_IFR_END_IF_OP               0x18  // for endif of inconsistentif, suppressif, grayoutif\r
+#define EFI_IFR_GRAYOUT_IF_OP           0x19\r
+#define EFI_IFR_DATE_OP                 0x1A\r
+#define EFI_IFR_TIME_OP                 0x1B\r
+#define EFI_IFR_STRING_OP               0x1C\r
+#define EFI_IFR_LABEL_OP                0x1D\r
+#define EFI_IFR_SAVE_DEFAULTS_OP        0x1E\r
+#define EFI_IFR_RESTORE_DEFAULTS_OP     0x1F\r
+#define EFI_IFR_BANNER_OP               0x20\r
+#define EFI_IFR_INVENTORY_OP            0x21\r
+#define EFI_IFR_EQ_VAR_VAL_OP           0x22\r
+#define EFI_IFR_ORDERED_LIST_OP         0x23\r
+#define EFI_IFR_VARSTORE_OP             0x24\r
+#define EFI_IFR_VARSTORE_SELECT_OP      0x25\r
+#define EFI_IFR_VARSTORE_SELECT_PAIR_OP 0x26\r
+#define EFI_IFR_TRUE_OP                 0x27\r
+#define EFI_IFR_FALSE_OP                0x28\r
+#define EFI_IFR_GT_OP                   0x29\r
+#define EFI_IFR_GE_OP                   0x2A\r
+#define EFI_IFR_OEM_DEFINED_OP          0x2B\r
+#define EFI_IFR_LAST_OPCODE             EFI_IFR_OEM_DEFINED_OP\r
+#define EFI_IFR_OEM_OP                  0xFE\r
+#define EFI_IFR_NV_ACCESS_COMMAND       0xFF\r
+\r
+//\r
+// Define values for the flags fields in some VFR opcodes. These are\r
+// bitmasks.\r
+//\r
+#define EFI_IFR_FLAG_DEFAULT              0x01\r
+#define EFI_IFR_FLAG_MANUFACTURING        0x02\r
+#define EFI_IFR_FLAG_INTERACTIVE          0x04\r
+#define EFI_IFR_FLAG_NV_ACCESS            0x08\r
+#define EFI_IFR_FLAG_RESET_REQUIRED       0x10\r
+#define EFI_IFR_FLAG_LATE_CHECK           0x20\r
+\r
+#define EFI_NON_DEVICE_CLASS              0x00  // Useful when you do not want something in the Device Manager\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
+#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  // Used to display a single entity and then exit\r
+\r
+//\r
+// Used to flag dynamically created op-codes. This is meaningful to the IFR Library set\r
+// and the browser since we need to distinguish between compiled NV map data and created data.\r
+// We do not allow new entries to be created in the NV map dynamically however we still need\r
+// to display this information correctly.  To dynamically create op-codes and assume that their\r
+// data will be saved, ensure that the NV starting location they refer to is pre-defined in the\r
+// NV map.\r
+//\r
+#define EFI_IFR_FLAG_CREATED  128\r
+\r
+#pragma pack(1)\r
+//\r
+// IFR Structure definitions\r
+//\r
+typedef struct {\r
+  UINT8 OpCode;\r
+  UINT8 Length;\r
+} EFI_IFR_OP_HEADER;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER     Header;\r
+  EFI_GUID              Guid;\r
+  STRING_REF            FormSetTitle;\r
+  STRING_REF            Help;\r
+  EFI_PHYSICAL_ADDRESS  CallbackHandle;\r
+  UINT16                Class;\r
+  UINT16                SubClass;\r
+  UINT16                NvDataSize; // set once, size of the NV data as defined in the script\r
+} EFI_IFR_FORM_SET;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            FormId;\r
+  STRING_REF        FormTitle;\r
+} EFI_IFR_FORM;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            LabelId;\r
+} EFI_IFR_LABEL;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        SubTitle;\r
+} EFI_IFR_SUBTITLE;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        Help;\r
+  STRING_REF        Text;\r
+  STRING_REF        TextTwo;\r
+  UINT8             Flags;          // This is included solely for purposes of interactive/dynamic support.\r
+  UINT16            Key;            // Value to be passed to caller to identify this particular op-code\r
+} EFI_IFR_TEXT;\r
+\r
+//\r
+// goto\r
+//\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            FormId;\r
+  STRING_REF        Prompt;\r
+  STRING_REF        Help;   // The string Token for the context-help\r
+  UINT8             Flags;  // This is included solely for purposes of interactive/dynamic support.\r
+  UINT16            Key;    // Value to be passed to caller to identify this particular op-code\r
+} EFI_IFR_REF;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_END_FORM;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_END_FORM_SET;\r
+\r
+//\r
+// Also notice that the IFR_ONE_OF and IFR_CHECK_BOX are identical in structure......code assumes this to be true, if this ever\r
+// changes we need to revisit the InitializeTagStructures code\r
+//\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name\r
+  UINT8             Width;      // The Size of the Data being saved\r
+  STRING_REF        Prompt;     // The String Token for the Prompt\r
+  STRING_REF        Help;       // The string Token for the context-help\r
+} EFI_IFR_ONE_OF;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId; // The offset in NV for storage of the data\r
+  UINT8             MaxEntries; // The maximum number of options in the ordered list (=size of NVStore)\r
+  STRING_REF        Prompt;     // The string token for the prompt\r
+  STRING_REF        Help;       // The string token for the context-help\r
+} EFI_IFR_ORDERED_LIST;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name\r
+  UINT8             Width;      // The Size of the Data being saved\r
+  STRING_REF        Prompt;     // The String Token for the Prompt\r
+  STRING_REF        Help;       // The string Token for the context-help\r
+  UINT8             Flags;      // For now, if non-zero, means that it is the default option, - further definition likely\r
+  UINT16            Key;        // Value to be passed to caller to identify this particular op-code\r
+} EFI_IFR_CHECKBOX, EFI_IFR_CHECK_BOX;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        Option;     // The string token describing the option\r
+  UINT16            Value;      // The value associated with this option that is stored in the NVRAM if chosen\r
+  UINT8             Flags;      // For now, if non-zero, means that it is the default option, - further definition likely above\r
+  UINT16            Key;        // Value to be passed to caller to identify this particular op-code\r
+} EFI_IFR_ONE_OF_OPTION;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId; // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name\r
+  UINT8             Width;      // The Size of the Data being saved\r
+  STRING_REF        Prompt;     // The String Token for the Prompt\r
+  STRING_REF        Help;       // The string Token for the context-help\r
+  UINT8             Flags;      // This is included solely for purposes of interactive/dynamic support.\r
+  UINT16            Key;        // Value to be passed to caller to identify this particular op-code\r
+  UINT16            Minimum;\r
+  UINT16            Maximum;\r
+  UINT16            Step;       // If step is 0, then manual input is specified, otherwise, left/right arrow selection is called for\r
+  UINT16            Default;\r
+} EFI_IFR_NUMERIC;\r
+\r
+//\r
+// There is an interesting twist with regards to Time and Date.  This is one of the few items which can accept input from\r
+// a user, however may or may not need to use storage in the NVRAM space.  The decided method for determining if NVRAM space\r
+// will be used (only for a TimeOp or DateOp) is:  If .QuestionId == 0 && .Width == 0 (normally an impossibility) then use system\r
+// resources to store the data away and not NV resources.  In other words, the setup engine will call gRT->SetTime, and gRT->SetDate\r
+// for the saving of data, and the values displayed will be from the gRT->GetXXXX series of calls.\r
+//\r
+typedef struct {\r
+  EFI_IFR_NUMERIC Hour;\r
+  EFI_IFR_NUMERIC Minute;\r
+  EFI_IFR_NUMERIC Second;\r
+} EFI_IFR_TIME;\r
+\r
+typedef struct {\r
+  EFI_IFR_NUMERIC Year;\r
+  EFI_IFR_NUMERIC Month;\r
+  EFI_IFR_NUMERIC Day;\r
+} EFI_IFR_DATE;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId;   // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name\r
+  UINT8             Width;        // The Size of the Data being saved -- BUGBUG -- remove someday\r
+  STRING_REF        Prompt;       // The String Token for the Prompt\r
+  STRING_REF        Help;         // The string Token for the context-help\r
+  UINT8             Flags;        // This is included solely for purposes of interactive/dynamic support.\r
+  UINT16            Key;          // Value to be passed to caller to identify this particular op-code\r
+  UINT8             MinSize;      // Minimum allowable sized password\r
+  UINT8             MaxSize;      // Maximum allowable sized password\r
+  UINT16            Encoding;\r
+} EFI_IFR_PASSWORD;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId;   // The ID designating what the question is about...sucked in from a #define, likely in the form of a variable name\r
+  UINT8             Width;        // The Size of the Data being saved -- BUGBUG -- remove someday\r
+  STRING_REF        Prompt;       // The String Token for the Prompt\r
+  STRING_REF        Help;         // The string Token for the context-help\r
+  UINT8             Flags;        // This is included solely for purposes of interactive/dynamic support.\r
+  UINT16            Key;          // Value to be passed to caller to identify this particular op-code\r
+  UINT8             MinSize;      // Minimum allowable sized password\r
+  UINT8             MaxSize;      // Maximum allowable sized password\r
+} EFI_IFR_STRING;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_END_ONE_OF;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            Value;\r
+  UINT16            Key;\r
+} EFI_IFR_HIDDEN;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT8             Flags;\r
+} EFI_IFR_SUPPRESS;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT8             Flags;\r
+} EFI_IFR_GRAY_OUT;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        Popup;\r
+  UINT8             Flags;\r
+} EFI_IFR_INCONSISTENT;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId;   // offset into variable storage\r
+  UINT8             Width;        // size of variable storage\r
+  UINT16            Value;        // value to compare against\r
+} EFI_IFR_EQ_ID_VAL;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId;   // offset into variable storage\r
+  UINT8             Width;        // size of variable storage\r
+  UINT16            ListLength;\r
+  UINT16            ValueList[1];\r
+} EFI_IFR_EQ_ID_LIST;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            QuestionId1;  // offset into variable storage for first value to compare\r
+  UINT8             Width;        // size of variable storage (must be same for both)\r
+  UINT16            QuestionId2;  // offset into variable storage for second value to compare\r
+} EFI_IFR_EQ_ID_ID;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            VariableId;   // offset into variable storage\r
+  UINT16            Value;        // value to compare against\r
+} EFI_IFR_EQ_VAR_VAL;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_AND;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_OR;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_NOT;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_END_EXPR, EFI_IFR_END_IF;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            FormId;\r
+  STRING_REF        Prompt;\r
+  STRING_REF        Help;\r
+  UINT8             Flags;\r
+  UINT16            Key;\r
+} EFI_IFR_SAVE_DEFAULTS;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        Help;\r
+  STRING_REF        Text;\r
+  STRING_REF        TextTwo;      // optional text\r
+} EFI_IFR_INVENTORY;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  EFI_GUID          Guid;         // GUID for the variable\r
+  UINT16            VarId;        // variable store ID, as referenced elsewhere in the form\r
+  UINT16            Size;         // size of the variable storage\r
+} EFI_IFR_VARSTORE;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            VarId;        // variable store ID, as referenced elsewhere in the form\r
+} EFI_IFR_VARSTORE_SELECT;\r
+\r
+//\r
+// Used for the ideqid VFR statement where two variable stores may be referenced in the\r
+// same VFR statement.\r
+// A browser should treat this as an EFI_IFR_VARSTORE_SELECT statement and assume that all following\r
+// IFR opcodes use the VarId as defined here.\r
+//\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  UINT16            VarId;          // variable store ID, as referenced elsewhere in the form\r
+  UINT16            SecondaryVarId; // variable store ID, as referenced elsewhere in the form\r
+} EFI_IFR_VARSTORE_SELECT_PAIR;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_TRUE;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_FALSE;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_GT;\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+} EFI_IFR_GE;\r
+\r
+//\r
+// Save defaults and restore defaults have same structure\r
+//\r
+#define EFI_IFR_RESTORE_DEFAULTS  EFI_IFR_SAVE_DEFAULTS\r
+\r
+typedef struct {\r
+  EFI_IFR_OP_HEADER Header;\r
+  STRING_REF        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_BANNER;\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
+#define EFI_IFR_BANNER_TIMEOUT      0xFF\r
+\r
+#pragma pack()\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/MultiPhase.h b/Tools/Source/TianoTools/Include/Common/MultiPhase.h
new file mode 100644 (file)
index 0000000..93867a5
--- /dev/null
@@ -0,0 +1,84 @@
+/** @file\r
+  This includes some definitions that will be used in both PEI and DXE phases.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  MultiPhase.h\r
+\r
+**/\r
+\r
+#ifndef __MULTI_PHASE_H__\r
+#define __MULTI_PHASE_H__\r
+\r
+//\r
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+//\r
+// Needed EFI defines for PEI\r
+//\r
+typedef UINT64  EFI_PHYSICAL_ADDRESS;\r
+\r
+typedef enum {\r
+  EfiReservedMemoryType,\r
+  EfiLoaderCode,\r
+  EfiLoaderData,\r
+  EfiBootServicesCode,\r
+  EfiBootServicesData,\r
+  EfiRuntimeServicesCode,\r
+  EfiRuntimeServicesData,\r
+  EfiConventionalMemory,\r
+  EfiUnusableMemory,\r
+  EfiACPIReclaimMemory,\r
+  EfiACPIMemoryNVS,\r
+  EfiMemoryMappedIO,\r
+  EfiMemoryMappedIOPortSpace,\r
+  EfiPalCode,\r
+  EfiMaxMemoryType\r
+} EFI_MEMORY_TYPE;\r
+\r
+typedef UINT32  EFI_STATUS_CODE_TYPE;\r
+typedef UINT32  EFI_STATUS_CODE_VALUE;\r
+\r
+typedef struct {\r
+  UINT16    HeaderSize;\r
+  UINT16    Size;\r
+  EFI_GUID  Type;\r
+} EFI_STATUS_CODE_DATA;\r
+\r
+typedef struct {\r
+  UINT64  Signature;\r
+  UINT32  Revision;\r
+  UINT32  HeaderSize;\r
+  UINT32  CRC32;\r
+  UINT32  Reserved;\r
+} EFI_TABLE_HEADER;\r
+\r
+#define EFI_PAGE_SIZE         4096\r
+\r
+\r
+typedef VOID    *EFI_HANDLE;\r
+typedef UINT16  EFI_HII_HANDLE;\r
+typedef UINT16  STRING_REF;\r
+typedef struct {\r
+  INT16     Value;\r
+  INT16     Exponent;\r
+} EFI_EXP_BASE10_DATA;\r
+\r
+//\r
+// Define macros to build data structure signatures from characters.\r
+//\r
+#define EFI_SIGNATURE_16(A, B)        ((A) | (B << 8))\r
+#define EFI_SIGNATURE_32(A, B, C, D)  (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))\r
+#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \\r
+    (EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))\r
+\r
+\r
+#include <Protocol/DevicePath.h>\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/StatusCode.h b/Tools/Source/TianoTools/Include/Common/StatusCode.h
new file mode 100644 (file)
index 0000000..474ed10
--- /dev/null
@@ -0,0 +1,912 @@
+/** @file\r
+  Status Code Definitions, according to Intel Platform Innovation Framework \r
+  for EFI Status Codes Specification\r
+\r
+  The file is divided into sections for ease of use.\r
+\r
+<pre>\r
+  Section:    Contents:\r
+  1           General Status Code Definitions\r
+  2           Class definitions\r
+  3           Computing Unit Subclasses, Progress and Error Codes\r
+  4           Peripheral Subclasses, Progress and Error Codes.\r
+  5           IO Bus Subclasses, Progress and Error Codes.\r
+  6           Software Subclasses, Progress and Error Codes.\r
+  7           Debug Codes\r
+</pre>\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  StatusCode.h\r
+\r
+  @par Revision Reference:\r
+  Version 0.92.\r
+\r
+**/\r
+\r
+#ifndef _EFI_STATUS_CODE_H_\r
+#define _EFI_STATUS_CODE_H_\r
+\r
+\r
+//\r
+// /////////////////////////////////////////////////////////////////////////////\r
+// Section 1\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+//\r
+// A Status Code Type is made up of the code type and severity\r
+// All values masked by EFI_STATUS_CODE_RESERVED_MASK are\r
+// reserved for use by this specification.\r
+//\r
+#define EFI_STATUS_CODE_TYPE_MASK     0x000000FF\r
+#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000\r
+#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00\r
+\r
+//\r
+// Definition of code types, all other values masked by\r
+// EFI_STATUS_CODE_TYPE_MASK are reserved for use by\r
+// this specification.\r
+//\r
+#define EFI_PROGRESS_CODE 0x00000001\r
+#define EFI_ERROR_CODE    0x00000002\r
+#define EFI_DEBUG_CODE    0x00000003\r
+\r
+//\r
+// Definitions of severities, all other values masked by\r
+// EFI_STATUS_CODE_SEVERITY_MASK are reserved for use by\r
+// this specification.\r
+//\r
+#define EFI_ERROR_MINOR       0x40000000\r
+#define EFI_ERROR_MAJOR       0x80000000\r
+#define EFI_ERROR_UNRECOVERED 0x90000000\r
+#define EFI_ERROR_UNCONTAINED 0xA0000000\r
+\r
+//\r
+// A Status Code Value is made up of the class, subclass, and\r
+// an operation.  Classes, subclasses, and operations are defined\r
+// in the following sections.\r
+//\r
+#define EFI_STATUS_CODE_CLASS_MASK      0xFF000000\r
+#define EFI_STATUS_CODE_SUBCLASS_MASK   0x00FF0000\r
+#define EFI_STATUS_CODE_OPERATION_MASK  0x0000FFFF\r
+\r
+//\r
+// Data Hub Status Code class record definition\r
+//\r
+typedef struct {\r
+  EFI_STATUS_CODE_TYPE  CodeType;\r
+  EFI_STATUS_CODE_VALUE Value;\r
+  UINT32                Instance;\r
+  EFI_GUID              CallerId;\r
+  EFI_STATUS_CODE_DATA  Data;\r
+} DATA_HUB_STATUS_CODE_DATA_RECORD;\r
+\r
+//\r
+// /////////////////////////////////////////////////////////////////////////////\r
+// Section 2\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Class definitions\r
+// Values of 4-127 are reserved for future use by this\r
+// specification.\r
+// Values in the range 127-255 are reserved for OEM use.\r
+//\r
+#define EFI_COMPUTING_UNIT  0x00000000\r
+#define EFI_PERIPHERAL      0x01000000\r
+#define EFI_IO_BUS          0x02000000\r
+#define EFI_SOFTWARE        0x03000000\r
+\r
+//\r
+// General partitioning scheme for Progress and Error Codes are\r
+// 0x0000-0x0FFF  - Shared by all sub-classes in a given class\r
+// 0x1000-0x7FFF  - Subclass Specific\r
+// 0x8000-0xFFFF  - OEM specific\r
+//\r
+#define EFI_SUBCLASS_SPECIFIC 0x1000\r
+#define EFI_OEM_SPECIFIC      0x8000\r
+\r
+//\r
+// /////////////////////////////////////////////////////////////////////////////\r
+// Section 3\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Computing Unit Subclass definitions.\r
+// Values of 8-127 are reserved for future use by this\r
+// specification.\r
+// Values of 128-255 are reserved for OEM use.\r
+//\r
+#define EFI_COMPUTING_UNIT_UNSPECIFIED        (EFI_COMPUTING_UNIT | 0x00000000)\r
+#define EFI_COMPUTING_UNIT_HOST_PROCESSOR     (EFI_COMPUTING_UNIT | 0x00010000)\r
+#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR (EFI_COMPUTING_UNIT | 0x00020000)\r
+#define EFI_COMPUTING_UNIT_IO_PROCESSOR       (EFI_COMPUTING_UNIT | 0x00030000)\r
+#define EFI_COMPUTING_UNIT_CACHE              (EFI_COMPUTING_UNIT | 0x00040000)\r
+#define EFI_COMPUTING_UNIT_MEMORY             (EFI_COMPUTING_UNIT | 0x00050000)\r
+#define EFI_COMPUTING_UNIT_CHIPSET            (EFI_COMPUTING_UNIT | 0x00060000)\r
+\r
+//\r
+// Computing Unit Class Progress Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_CU_PC_INIT_BEGIN  0x00000000\r
+#define EFI_CU_PC_INIT_END    0x00000001\r
+\r
+//\r
+// Computing Unit Unspecified Subclass Progress Code definitions.\r
+//\r
+//\r
+// Computing Unit Host Processor Subclass Progress Code definitions.\r
+//\r
+#define EFI_CU_HP_PC_POWER_ON_INIT          (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_HP_PC_CACHE_INIT             (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_HP_PC_RAM_INIT               (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_CU_HP_PC_IO_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_CU_HP_PC_BSP_SELECT             (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_CU_HP_PC_BSP_RESELECT           (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_CU_HP_PC_AP_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_CU_HP_PC_SMM_INIT               (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+\r
+//\r
+// Computing Unit Firmware Processor Subclass Progress Code definitions.\r
+//\r
+//\r
+// Computing Unit IO Processor Subclass Progress Code definitions.\r
+//\r
+//\r
+// Computing Unit Cache Subclass Progress Code definitions.\r
+//\r
+#define EFI_CU_CACHE_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_CACHE_PC_CONFIGURATION   (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Computing Unit Memory Subclass Progress Code definitions.\r
+//\r
+#define EFI_CU_MEMORY_PC_SPD_READ         (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_MEMORY_PC_PRESENCE_DETECT  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_MEMORY_PC_TIMING           (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_CU_MEMORY_PC_CONFIGURING      (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_CU_MEMORY_PC_OPTIMIZING       (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_CU_MEMORY_PC_INIT             (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_CU_MEMORY_PC_TEST             (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+\r
+//\r
+// Computing Unit Chipset Subclass Progress Code definitions.\r
+//\r
+//\r
+// Computing Unit Class Error Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_CU_EC_NON_SPECIFIC    0x00000000\r
+#define EFI_CU_EC_DISABLED        0x00000001\r
+#define EFI_CU_EC_NOT_SUPPORTED   0x00000002\r
+#define EFI_CU_EC_NOT_DETECTED    0x00000003\r
+#define EFI_CU_EC_NOT_CONFIGURED  0x00000004\r
+\r
+//\r
+// Computing Unit Unspecified Subclass Error Code definitions.\r
+//\r
+//\r
+// Computing Unit Host Processor Subclass Error Code definitions.\r
+//\r
+#define EFI_CU_HP_EC_INVALID_TYPE         (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_HP_EC_INVALID_SPEED        (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_HP_EC_MISMATCH             (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_CU_HP_EC_TIMER_EXPIRED        (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_CU_HP_EC_SELF_TEST            (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_CU_HP_EC_INTERNAL             (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_CU_HP_EC_THERMAL              (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_CU_HP_EC_LOW_VOLTAGE          (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_CU_HP_EC_HIGH_VOLTAGE         (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_CU_HP_EC_CACHE                (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_CU_HP_EC_MICROCODE_UPDATE     (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+#define EFI_CU_HP_EC_CORRECTABLE          (EFI_SUBCLASS_SPECIFIC | 0x0000000B)\r
+#define EFI_CU_HP_EC_UNCORRECTABLE        (EFI_SUBCLASS_SPECIFIC | 0x0000000C)\r
+#define EFI_CU_HP_EC_NO_MICROCODE_UPDATE  (EFI_SUBCLASS_SPECIFIC | 0x0000000D)\r
+\r
+//\r
+// Computing Unit Firmware Processor Subclass Error Code definitions.\r
+//\r
+#define EFI_CU_FP_EC_HARD_FAIL  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_FP_EC_SOFT_FAIL  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_FP_EC_COMM_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+\r
+//\r
+// Computing Unit IO Processor Subclass Error Code definitions.\r
+//\r
+//\r
+// Computing Unit Cache Subclass Error Code definitions.\r
+//\r
+#define EFI_CU_CACHE_EC_INVALID_TYPE  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_CACHE_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_CACHE_EC_INVALID_SIZE  (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_CU_CACHE_EC_MISMATCH      (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+\r
+//\r
+// Computing Unit Memory Subclass Error Code definitions.\r
+//\r
+#define EFI_CU_MEMORY_EC_INVALID_TYPE   (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_CU_MEMORY_EC_INVALID_SPEED  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_CU_MEMORY_EC_CORRECTABLE    (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_CU_MEMORY_EC_UNCORRECTABLE  (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_CU_MEMORY_EC_SPD_FAIL       (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_CU_MEMORY_EC_INVALID_SIZE   (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_CU_MEMORY_EC_MISMATCH       (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_CU_MEMORY_EC_UPDATE_FAIL    (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_CU_MEMORY_EC_NONE_DETECTED  (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_CU_MEMORY_EC_NONE_USEFUL    (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+\r
+//\r
+// Computing Unit Chipset Subclass Error Code definitions.\r
+//\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// Section 4\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Peripheral Subclass definitions.\r
+// Values of 12-127 are reserved for future use by this\r
+// specification.\r
+// Values of 128-255 are reserved for OEM use.\r
+//\r
+#define EFI_PERIPHERAL_UNSPECIFIED      (EFI_PERIPHERAL | 0x00000000)\r
+#define EFI_PERIPHERAL_KEYBOARD         (EFI_PERIPHERAL | 0x00010000)\r
+#define EFI_PERIPHERAL_MOUSE            (EFI_PERIPHERAL | 0x00020000)\r
+#define EFI_PERIPHERAL_LOCAL_CONSOLE    (EFI_PERIPHERAL | 0x00030000)\r
+#define EFI_PERIPHERAL_REMOTE_CONSOLE   (EFI_PERIPHERAL | 0x00040000)\r
+#define EFI_PERIPHERAL_SERIAL_PORT      (EFI_PERIPHERAL | 0x00050000)\r
+#define EFI_PERIPHERAL_PARALLEL_PORT    (EFI_PERIPHERAL | 0x00060000)\r
+#define EFI_PERIPHERAL_FIXED_MEDIA      (EFI_PERIPHERAL | 0x00070000)\r
+#define EFI_PERIPHERAL_REMOVABLE_MEDIA  (EFI_PERIPHERAL | 0x00080000)\r
+#define EFI_PERIPHERAL_AUDIO_INPUT      (EFI_PERIPHERAL | 0x00090000)\r
+#define EFI_PERIPHERAL_AUDIO_OUTPUT     (EFI_PERIPHERAL | 0x000A0000)\r
+#define EFI_PERIPHERAL_LCD_DEVICE       (EFI_PERIPHERAL | 0x000B0000)\r
+#define EFI_PERIPHERAL_NETWORK          (EFI_PERIPHERAL | 0x000C0000)\r
+\r
+//\r
+// Peripheral Class Progress Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_P_PC_INIT             0x00000000\r
+#define EFI_P_PC_RESET            0x00000001\r
+#define EFI_P_PC_DISABLE          0x00000002\r
+#define EFI_P_PC_PRESENCE_DETECT  0x00000003\r
+#define EFI_P_PC_ENABLE           0x00000004\r
+#define EFI_P_PC_RECONFIG         0x00000005\r
+#define EFI_P_PC_DETECTED         0x00000006\r
+\r
+//\r
+// Peripheral Class Unspecified Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Keyboard Subclass Progress Code definitions.\r
+//\r
+#define EFI_P_KEYBOARD_PC_CLEAR_BUFFER  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_P_KEYBOARD_PC_SELF_TEST     (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Peripheral Class Mouse Subclass Progress Code definitions.\r
+//\r
+#define EFI_P_MOUSE_PC_SELF_TEST  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+\r
+//\r
+// Peripheral Class Local Console Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Remote Console Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Serial Port Subclass Progress Code definitions.\r
+//\r
+#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+\r
+//\r
+// Peripheral Class Parallel Port Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Fixed Media Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Removable Media Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Audio Input Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Audio Output Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class LCD Device Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Network Subclass Progress Code definitions.\r
+//\r
+//\r
+// Peripheral Class Error Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_P_EC_NON_SPECIFIC       0x00000000\r
+#define EFI_P_EC_DISABLED           0x00000001\r
+#define EFI_P_EC_NOT_SUPPORTED      0x00000002\r
+#define EFI_P_EC_NOT_DETECTED       0x00000003\r
+#define EFI_P_EC_NOT_CONFIGURED     0x00000004\r
+#define EFI_P_EC_INTERFACE_ERROR    0x00000005\r
+#define EFI_P_EC_CONTROLLER_ERROR   0x00000006\r
+#define EFI_P_EC_INPUT_ERROR        0x00000007\r
+#define EFI_P_EC_OUTPUT_ERROR       0x00000008\r
+#define EFI_P_EC_RESOURCE_CONFLICT  0x00000009\r
+\r
+//\r
+// Peripheral Class Unspecified Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Keyboard Subclass Error Code definitions.\r
+//\r
+#define EFI_P_KEYBOARD_EC_LOCKED    (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Peripheral Class Mouse Subclass Error Code definitions.\r
+//\r
+#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+\r
+//\r
+// Peripheral Class Local Console Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Remote Console Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Serial Port Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Parallel Port Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Fixed Media Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Removable Media Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Audio Input Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Audio Output Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class LCD Device Subclass Error Code definitions.\r
+//\r
+//\r
+// Peripheral Class Network Subclass Error Code definitions.\r
+//\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// Section 5\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// IO Bus Subclass definitions.\r
+// Values of 14-127 are reserved for future use by this\r
+// specification.\r
+// Values of 128-255 are reserved for OEM use.\r
+//\r
+#define EFI_IO_BUS_UNSPECIFIED  (EFI_IO_BUS | 0x00000000)\r
+#define EFI_IO_BUS_PCI          (EFI_IO_BUS | 0x00010000)\r
+#define EFI_IO_BUS_USB          (EFI_IO_BUS | 0x00020000)\r
+#define EFI_IO_BUS_IBA          (EFI_IO_BUS | 0x00030000)\r
+#define EFI_IO_BUS_AGP          (EFI_IO_BUS | 0x00040000)\r
+#define EFI_IO_BUS_PC_CARD      (EFI_IO_BUS | 0x00050000)\r
+#define EFI_IO_BUS_LPC          (EFI_IO_BUS | 0x00060000)\r
+#define EFI_IO_BUS_SCSI         (EFI_IO_BUS | 0x00070000)\r
+#define EFI_IO_BUS_ATA_ATAPI    (EFI_IO_BUS | 0x00080000)\r
+#define EFI_IO_BUS_FC           (EFI_IO_BUS | 0x00090000)\r
+#define EFI_IO_BUS_IP_NETWORK   (EFI_IO_BUS | 0x000A0000)\r
+#define EFI_IO_BUS_SMBUS        (EFI_IO_BUS | 0x000B0000)\r
+#define EFI_IO_BUS_I2C          (EFI_IO_BUS | 0x000C0000)\r
+\r
+//\r
+// IO Bus Class Progress Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_IOB_PC_INIT     0x00000000\r
+#define EFI_IOB_PC_RESET    0x00000001\r
+#define EFI_IOB_PC_DISABLE  0x00000002\r
+#define EFI_IOB_PC_DETECT   0x00000003\r
+#define EFI_IOB_PC_ENABLE   0x00000004\r
+#define EFI_IOB_PC_RECONFIG 0x00000005\r
+#define EFI_IOB_PC_HOTPLUG  0x00000006\r
+\r
+//\r
+// IO Bus Class Unspecified Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class PCI Subclass Progress Code definitions.\r
+//\r
+#define EFI_IOB_PCI_PC_BUS_ENUM   (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_IOB_PCI_PC_RES_ALLOC  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_IOB_PCI_PC_HPC_INIT   (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+\r
+//\r
+// IO Bus Class USB Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class IBA Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class AGP Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class PC Card Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class LPC Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class SCSI Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class ATA/ATAPI Subclass Progress Code definitions.\r
+//\r
+#define EFI_IOB_ATA_BUS_SMART_ENABLE          (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_IOB_ATA_BUS_SMART_DISABLE         (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_IOB_ATA_BUS_SMART_OVERTHRESHOLD   (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_IOB_ATA_BUS_SMART_UNDERTHRESHOLD  (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+\r
+//\r
+// IO Bus Class FC Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class IP Network Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class SMBUS Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class I2C Subclass Progress Code definitions.\r
+//\r
+//\r
+// IO Bus Class Error Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_IOB_EC_NON_SPECIFIC       0x00000000\r
+#define EFI_IOB_EC_DISABLED           0x00000001\r
+#define EFI_IOB_EC_NOT_SUPPORTED      0x00000002\r
+#define EFI_IOB_EC_NOT_DETECTED       0x00000003\r
+#define EFI_IOB_EC_NOT_CONFIGURED     0x00000004\r
+#define EFI_IOB_EC_INTERFACE_ERROR    0x00000005\r
+#define EFI_IOB_EC_CONTROLLER_ERROR   0x00000006\r
+#define EFI_IOB_EC_READ_ERROR         0x00000007\r
+#define EFI_IOB_EC_WRITE_ERROR        0x00000008\r
+#define EFI_IOB_EC_RESOURCE_CONFLICT  0x00000009\r
+\r
+//\r
+// IO Bus Class Unspecified Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class PCI Subclass Error Code definitions.\r
+//\r
+#define EFI_IOB_PCI_EC_PERR (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_IOB_PCI_EC_SERR (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// IO Bus Class USB Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class IBA Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class AGP Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class PC Card Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class LPC Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class SCSI Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class ATA/ATAPI Subclass Error Code definitions.\r
+//\r
+#define EFI_IOB_ATA_BUS_SMART_NOTSUPPORTED  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_IOB_ATA_BUS_SMART_DISABLED      (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// IO Bus Class FC Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class IP Network Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class SMBUS Subclass Error Code definitions.\r
+//\r
+//\r
+// IO Bus Class I2C Subclass Error Code definitions.\r
+//\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// Section 6\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Software Subclass definitions.\r
+// Values of 14-127 are reserved for future use by this\r
+// specification.\r
+// Values of 128-255 are reserved for OEM use.\r
+//\r
+#define EFI_SOFTWARE_UNSPECIFIED          (EFI_SOFTWARE | 0x00000000)\r
+#define EFI_SOFTWARE_SEC                  (EFI_SOFTWARE | 0x00010000)\r
+#define EFI_SOFTWARE_PEI_CORE             (EFI_SOFTWARE | 0x00020000)\r
+#define EFI_SOFTWARE_PEI_MODULE           (EFI_SOFTWARE | 0x00030000)\r
+#define EFI_SOFTWARE_DXE_CORE             (EFI_SOFTWARE | 0x00040000)\r
+#define EFI_SOFTWARE_DXE_BS_DRIVER        (EFI_SOFTWARE | 0x00050000)\r
+#define EFI_SOFTWARE_DXE_RT_DRIVER        (EFI_SOFTWARE | 0x00060000)\r
+#define EFI_SOFTWARE_SMM_DRIVER           (EFI_SOFTWARE | 0x00070000)\r
+#define EFI_SOFTWARE_EFI_APPLICATION      (EFI_SOFTWARE | 0x00080000)\r
+#define EFI_SOFTWARE_EFI_OS_LOADER        (EFI_SOFTWARE | 0x00090000)\r
+#define EFI_SOFTWARE_RT                   (EFI_SOFTWARE | 0x000A0000)\r
+#define EFI_SOFTWARE_AL                   (EFI_SOFTWARE | 0x000B0000)\r
+#define EFI_SOFTWARE_EBC_EXCEPTION        (EFI_SOFTWARE | 0x000C0000)\r
+#define EFI_SOFTWARE_IA32_EXCEPTION       (EFI_SOFTWARE | 0x000D0000)\r
+#define EFI_SOFTWARE_IPF_EXCEPTION        (EFI_SOFTWARE | 0x000E0000)\r
+#define EFI_SOFTWARE_PEI_SERVICE          (EFI_SOFTWARE | 0x000F0000)\r
+#define EFI_SOFTWARE_EFI_BOOT_SERVICE     (EFI_SOFTWARE | 0x00100000)\r
+#define EFI_SOFTWARE_EFI_RUNTIME_SERVICE  (EFI_SOFTWARE | 0x00110000)\r
+#define EFI_SOFTWARE_EFI_DXE_SERVICE      (EFI_SOFTWARE | 0x00120000)\r
+\r
+//\r
+// Software Class Progress Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_SW_PC_INIT                0x00000000\r
+#define EFI_SW_PC_LOAD                0x00000001\r
+#define EFI_SW_PC_INIT_BEGIN          0x00000002\r
+#define EFI_SW_PC_INIT_END            0x00000003\r
+#define EFI_SW_PC_AUTHENTICATE_BEGIN  0x00000004\r
+#define EFI_SW_PC_AUTHENTICATE_END    0x00000005\r
+#define EFI_SW_PC_INPUT_WAIT          0x00000006\r
+#define EFI_SW_PC_USER_SETUP          0x00000007\r
+\r
+//\r
+// Software Class Unspecified Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class SEC Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_SEC_PC_ENTRY_POINT     (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Software Class PEI Core Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_PEI_CORE_PC_ENTRY_POINT      (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_PEI_CORE_PC_HANDOFF_TO_NEXT  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_PEI_CORE_PC_RETURN_TO_LAST   (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+\r
+//\r
+// Software Class PEI Module Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_PEIM_PC_CAPSULE_LOAD   (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_PEIM_PC_CAPSULE_START  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_PEIM_PC_RECOVERY_USER  (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_PEIM_PC_RECOVERY_AUTO  (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+\r
+//\r
+// Software Class DXE Core Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_DXE_CORE_PC_ENTRY_POINT      (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_DXE_CORE_PC_HANDOFF_TO_NEXT  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_DXE_CORE_PC_RETURN_TO_LAST   (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_DXE_CORE_PC_START_DRIVER     (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+\r
+//\r
+// Software Class DXE BS Driver Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT            (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT          (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT            (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT     (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS     (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD           (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+\r
+//\r
+// Software Class DXE RT Driver Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_DXE_RT_PC_S0 (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_DXE_RT_PC_S1 (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_DXE_RT_PC_S2 (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_DXE_RT_PC_S3 (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_DXE_RT_PC_S4 (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_DXE_RT_PC_S5 (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+\r
+//\r
+// Software Class SMM Driver Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class EFI Application Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class EFI OS Loader Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class EFI RT Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_RT_PC_ENTRY_POINT      (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_RT_PC_HANDOFF_TO_NEXT  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_RT_PC_RETURN_TO_LAST   (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+\r
+//\r
+// Software Class EFI AL Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_AL_PC_ENTRY_POINT    (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_AL_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Software Class EBC Exception Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class IA32 Exception Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class IPF Exception Subclass Progress Code definitions.\r
+//\r
+//\r
+// Software Class PEI Services Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_PS_PC_INSTALL_PPI            (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_PS_PC_REINSTALL_PPI          (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_PS_PC_LOCATE_PPI             (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_PS_PC_NOTIFY_PPI             (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_PS_PC_GET_BOOT_MODE          (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_PS_PC_SET_BOOT_MODE          (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_SW_PS_PC_GET_HOB_LIST           (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_SW_PS_PC_CREATE_HOB             (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_SW_PS_PC_FFS_FIND_NEXT_VOLUME   (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_SW_PS_PC_FFS_FIND_NEXT_FILE     (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_SW_PS_PC_FFS_FIND_SECTION_DATA  (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+#define EFI_SW_PS_PC_INSTALL_PEI_MEMORY     (EFI_SUBCLASS_SPECIFIC | 0x0000000B)\r
+#define EFI_SW_PS_PC_ALLOCATE_PAGES         (EFI_SUBCLASS_SPECIFIC | 0x0000000C)\r
+#define EFI_SW_PS_PC_ALLOCATE_POOL          (EFI_SUBCLASS_SPECIFIC | 0x0000000D)\r
+#define EFI_SW_PS_PC_COPY_MEM               (EFI_SUBCLASS_SPECIFIC | 0x0000000E)\r
+#define EFI_SW_PS_PC_SET_MEM                (EFI_SUBCLASS_SPECIFIC | 0x0000000F)\r
+\r
+//\r
+// Software Class EFI Boot Services Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_BS_PC_RAISE_TPL                      (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_BS_PC_RESTORE_TPL                    (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_BS_PC_ALLOCATE_PAGES                 (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_BS_PC_FREE_PAGES                     (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_BS_PC_GET_MEMORY_MAP                 (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_BS_PC_ALLOCATE_POOL                  (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_SW_BS_PC_FREE_POOL                      (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_SW_BS_PC_CREATE_EVENT                   (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_SW_BS_PC_SET_TIMER                      (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_SW_BS_PC_WAIT_FOR_EVENT                 (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_SW_BS_PC_SIGNAL_EVENT                   (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+#define EFI_SW_BS_PC_CLOSE_EVENT                    (EFI_SUBCLASS_SPECIFIC | 0x0000000B)\r
+#define EFI_SW_BS_PC_CHECK_EVENT                    (EFI_SUBCLASS_SPECIFIC | 0x0000000C)\r
+#define EFI_SW_BS_PC_INSTALL_PROTOCOL_INTERFACE     (EFI_SUBCLASS_SPECIFIC | 0x0000000D)\r
+#define EFI_SW_BS_PC_REINSTALL_PROTOCOL_INTERFACE   (EFI_SUBCLASS_SPECIFIC | 0x0000000E)\r
+#define EFI_SW_BS_PC_UNINSTALL_PROTOCOL_INTERFACE   (EFI_SUBCLASS_SPECIFIC | 0x0000000F)\r
+#define EFI_SW_BS_PC_HANDLE_PROTOCOL                (EFI_SUBCLASS_SPECIFIC | 0x00000010)\r
+#define EFI_SW_BS_PC_PC_HANDLE_PROTOCOL             (EFI_SUBCLASS_SPECIFIC | 0x00000011)\r
+#define EFI_SW_BS_PC_REGISTER_PROTOCOL_NOTIFY       (EFI_SUBCLASS_SPECIFIC | 0x00000012)\r
+#define EFI_SW_BS_PC_LOCATE_HANDLE                  (EFI_SUBCLASS_SPECIFIC | 0x00000013)\r
+#define EFI_SW_BS_PC_INSTALL_CONFIGURATION_TABLE    (EFI_SUBCLASS_SPECIFIC | 0x00000014)\r
+#define EFI_SW_BS_PC_LOAD_IMAGE                     (EFI_SUBCLASS_SPECIFIC | 0x00000015)\r
+#define EFI_SW_BS_PC_START_IMAGE                    (EFI_SUBCLASS_SPECIFIC | 0x00000016)\r
+#define EFI_SW_BS_PC_EXIT                           (EFI_SUBCLASS_SPECIFIC | 0x00000017)\r
+#define EFI_SW_BS_PC_UNLOAD_IMAGE                   (EFI_SUBCLASS_SPECIFIC | 0x00000018)\r
+#define EFI_SW_BS_PC_EXIT_BOOT_SERVICES             (EFI_SUBCLASS_SPECIFIC | 0x00000019)\r
+#define EFI_SW_BS_PC_GET_NEXT_MONOTONIC_COUNT       (EFI_SUBCLASS_SPECIFIC | 0x0000001A)\r
+#define EFI_SW_BS_PC_STALL                          (EFI_SUBCLASS_SPECIFIC | 0x0000001B)\r
+#define EFI_SW_BS_PC_SET_WATCHDOG_TIMER             (EFI_SUBCLASS_SPECIFIC | 0x0000001C)\r
+#define EFI_SW_BS_PC_CONNECT_CONTROLLER             (EFI_SUBCLASS_SPECIFIC | 0x0000001D)\r
+#define EFI_SW_BS_PC_DISCONNECT_CONTROLLER          (EFI_SUBCLASS_SPECIFIC | 0x0000001E)\r
+#define EFI_SW_BS_PC_OPEN_PROTOCOL                  (EFI_SUBCLASS_SPECIFIC | 0x0000001F)\r
+#define EFI_SW_BS_PC_CLOSE_PROTOCOL                 (EFI_SUBCLASS_SPECIFIC | 0x00000020)\r
+#define EFI_SW_BS_PC_OPEN_PROTOCOL_INFORMATION      (EFI_SUBCLASS_SPECIFIC | 0x00000021)\r
+#define EFI_SW_BS_PC_PROTOCOLS_PER_HANDLE           (EFI_SUBCLASS_SPECIFIC | 0x00000022)\r
+#define EFI_SW_BS_PC_LOCATE_HANDLE_BUFFER           (EFI_SUBCLASS_SPECIFIC | 0x00000023)\r
+#define EFI_SW_BS_PC_LOCATE_PROTOCOL                (EFI_SUBCLASS_SPECIFIC | 0x00000024)\r
+#define EFI_SW_BS_PC_INSTALL_MULTIPLE_INTERFACES    (EFI_SUBCLASS_SPECIFIC | 0x00000025)\r
+#define EFI_SW_BS_PC_UNINSTALL_MULTIPLE_INTERFACES  (EFI_SUBCLASS_SPECIFIC | 0x00000026)\r
+#define EFI_SW_BS_PC_CALCULATE_CRC_32               (EFI_SUBCLASS_SPECIFIC | 0x00000027)\r
+#define EFI_SW_BS_PC_COPY_MEM                       (EFI_SUBCLASS_SPECIFIC | 0x00000028)\r
+#define EFI_SW_BS_PC_SET_MEM                        (EFI_SUBCLASS_SPECIFIC | 0x00000029)\r
+\r
+//\r
+// Software Class EFI Runtime Services Subclass Progress Code definitions.\r
+//\r
+#define EFI_SW_RS_PC_GET_TIME                       (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_RS_PC_SET_TIME                       (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_RS_PC_GET_WAKEUP_TIME                (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_RS_PC_SET_WAKEUP_TIME                (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP        (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_RS_PC_CONVERT_POINTER                (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_SW_RS_PC_GET_VARIABLE                   (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_SW_RS_PC_GET_NEXT_VARIABLE_NAME         (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_SW_RS_PC_SET_VARIABLE                   (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_SW_RS_PC_GET_NEXT_HIGH_MONOTONIC_COUNT  (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_SW_RS_PC_RESET_SYSTEM                   (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+\r
+//\r
+// Software Class EFI DXE Services Subclass Progress Code definitions\r
+//\r
+#define EFI_SW_DS_PC_ADD_MEMORY_SPACE             (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_DS_PC_ALLOCATE_MEMORY_SPACE        (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_DS_PC_FREE_MEMORY_SPACE            (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
+#define EFI_SW_DS_PC_REMOVE_MEMORY_SPACE          (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
+#define EFI_SW_DS_PC_GET_MEMORY_SPACE_DESCRIPTOR  (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
+#define EFI_SW_DS_PC_SET_MEMORY_SPACE_ATTRIBUTES  (EFI_SUBCLASS_SPECIFIC | 0x00000005)\r
+#define EFI_SW_DS_PC_GET_MEMORY_SPACE_MAP         (EFI_SUBCLASS_SPECIFIC | 0x00000006)\r
+#define EFI_SW_DS_PC_ADD_IO_SPACE                 (EFI_SUBCLASS_SPECIFIC | 0x00000007)\r
+#define EFI_SW_DS_PC_ALLOCATE_IO_SPACE            (EFI_SUBCLASS_SPECIFIC | 0x00000008)\r
+#define EFI_SW_DS_PC_FREE_IO_SPACE                (EFI_SUBCLASS_SPECIFIC | 0x00000009)\r
+#define EFI_SW_DS_PC_REMOVE_IO_SPACE              (EFI_SUBCLASS_SPECIFIC | 0x0000000A)\r
+#define EFI_SW_DS_PC_GET_IO_SPACE_DESCRIPTOR      (EFI_SUBCLASS_SPECIFIC | 0x0000000B)\r
+#define EFI_SW_DS_PC_GET_IO_SPACE_MAP             (EFI_SUBCLASS_SPECIFIC | 0x0000000C)\r
+#define EFI_SW_DS_PC_DISPATCH                     (EFI_SUBCLASS_SPECIFIC | 0x0000000D)\r
+#define EFI_SW_DS_PC_SCHEDULE                     (EFI_SUBCLASS_SPECIFIC | 0x0000000E)\r
+#define EFI_SW_DS_PC_TRUST                        (EFI_SUBCLASS_SPECIFIC | 0x0000000F)\r
+#define EFI_SW_DS_PC_PROCESS_FIRMWARE_VOLUME      (EFI_SUBCLASS_SPECIFIC | 0x00000010)\r
+\r
+//\r
+// Software Class Error Code definitions.\r
+// These are shared by all subclasses.\r
+//\r
+#define EFI_SW_EC_NON_SPECIFIC            0x00000000\r
+#define EFI_SW_EC_LOAD_ERROR              0x00000001\r
+#define EFI_SW_EC_INVALID_PARAMETER       0x00000002\r
+#define EFI_SW_EC_UNSUPPORTED             0x00000003\r
+#define EFI_SW_EC_INVALID_BUFFER          0x00000004\r
+#define EFI_SW_EC_OUT_OF_RESOURCES        0x00000005\r
+#define EFI_SW_EC_ABORTED                 0x00000006\r
+#define EFI_SW_EC_ILLEGAL_SOFTWARE_STATE  0x00000007\r
+#define EFI_SW_EC_ILLEGAL_HARDWARE_STATE  0x00000008\r
+#define EFI_SW_EC_START_ERROR             0x00000009\r
+#define EFI_SW_EC_BAD_DATE_TIME           0x0000000A\r
+#define EFI_SW_EC_CFG_INVALID             0x0000000B\r
+#define EFI_SW_EC_CFG_CLR_REQUEST         0x0000000C\r
+#define EFI_SW_EC_CFG_DEFAULT             0x0000000D\r
+#define EFI_SW_EC_PWD_INVALID             0x0000000E\r
+#define EFI_SW_EC_PWD_CLR_REQUEST         0x0000000F\r
+#define EFI_SW_EC_PWD_CLEARED             0x00000010\r
+#define EFI_SW_EC_EVENT_LOG_FULL          0x00000011\r
+\r
+//\r
+// Software Class Unspecified Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class SEC Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class PEI Core Subclass Error Code definitions.\r
+//\r
+#define EFI_SW_PEI_CORE_EC_DXE_CORRUPT  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+\r
+//\r
+// Software Class PEI Module Subclass Error Code definitions.\r
+//\r
+#define EFI_SW_PEIM_EC_NO_RECOVERY_CAPSULE        (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+#define EFI_SW_PEIM_EC_INVALID_CAPSULE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+\r
+//\r
+// Software Class DXE Core Subclass Error Code definitions.\r
+//\r
+#define EFI_SW_CSM_LEGACY_ROM_INIT  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+//\r
+// Software Class DXE Boot Service Driver Subclass Error Code definitions.\r
+//\r
+#define EFI_SW_DXE_BS_EC_LEGACY_OPROM_NO_SPACE  (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
+\r
+//\r
+// Software Class DXE Runtime Service Driver Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class SMM Driver Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI Application Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI OS Loader Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI RT Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI AL Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EBC Exception Subclass Error Code definitions.\r
+// These exceptions are derived from the debug protocol definitions in the EFI\r
+// specification.\r
+//\r
+#define EFI_SW_EC_EBC_UNDEFINED             0x00000000\r
+#define EFI_SW_EC_EBC_DIVIDE_ERROR          EXCEPT_EBC_DIVIDE_ERROR\r
+#define EFI_SW_EC_EBC_DEBUG                 EXCEPT_EBC_DEBUG\r
+#define EFI_SW_EC_EBC_BREAKPOINT            EXCEPT_EBC_BREAKPOINT\r
+#define EFI_SW_EC_EBC_OVERFLOW              EXCEPT_EBC_OVERFLOW\r
+#define EFI_SW_EC_EBC_INVALID_OPCODE        EXCEPT_EBC_INVALID_OPCODE\r
+#define EFI_SW_EC_EBC_STACK_FAULT           EXCEPT_EBC_STACK_FAULT\r
+#define EFI_SW_EC_EBC_ALIGNMENT_CHECK       EXCEPT_EBC_ALIGNMENT_CHECK\r
+#define EFI_SW_EC_EBC_INSTRUCTION_ENCODING  EXCEPT_EBC_INSTRUCTION_ENCODING\r
+#define EFI_SW_EC_EBC_BAD_BREAK             EXCEPT_EBC_BAD_BREAK\r
+#define EFI_SW_EC_EBC_STEP                  EXCEPT_EBC_STEP\r
+\r
+//\r
+// Software Class IA32 Exception Subclass Error Code definitions.\r
+// These exceptions are derived from the debug protocol definitions in the EFI\r
+// specification.\r
+//\r
+#define EFI_SW_EC_IA32_DIVIDE_ERROR     EXCEPT_IA32_DIVIDE_ERROR\r
+#define EFI_SW_EC_IA32_DEBUG            EXCEPT_IA32_DEBUG\r
+#define EFI_SW_EC_IA32_NMI              EXCEPT_IA32_NMI\r
+#define EFI_SW_EC_IA32_BREAKPOINT       EXCEPT_IA32_BREAKPOINT\r
+#define EFI_SW_EC_IA32_OVERFLOW         EXCEPT_IA32_OVERFLOW\r
+#define EFI_SW_EC_IA32_BOUND            EXCEPT_IA32_BOUND\r
+#define EFI_SW_EC_IA32_INVALID_OPCODE   EXCEPT_IA32_INVALID_OPCODE\r
+#define EFI_SW_EC_IA32_DOUBLE_FAULT     EXCEPT_IA32_DOUBLE_FAULT\r
+#define EFI_SW_EC_IA32_INVALID_TSS      EXCEPT_IA32_INVALID_TSS\r
+#define EFI_SW_EC_IA32_SEG_NOT_PRESENT  EXCEPT_IA32_SEG_NOT_PRESENT\r
+#define EFI_SW_EC_IA32_STACK_FAULT      EXCEPT_IA32_STACK_FAULT\r
+#define EFI_SW_EC_IA32_GP_FAULT         EXCEPT_IA32_GP_FAULT\r
+#define EFI_SW_EC_IA32_PAGE_FAULT       EXCEPT_IA32_PAGE_FAULT\r
+#define EFI_SW_EC_IA32_FP_ERROR         EXCEPT_IA32_FP_ERROR\r
+#define EFI_SW_EC_IA32_ALIGNMENT_CHECK  EXCEPT_IA32_ALIGNMENT_CHECK\r
+#define EFI_SW_EC_IA32_MACHINE_CHECK    EXCEPT_IA32_MACHINE_CHECK\r
+#define EFI_SW_EC_IA32_SIMD             EXCEPT_IA32_SIMD\r
+\r
+//\r
+// Software Class IPF Exception Subclass Error Code definitions.\r
+// These exceptions are derived from the debug protocol definitions in the EFI\r
+// specification.\r
+//\r
+#define EFI_SW_EC_IPF_ALT_DTLB            EXCEPT_IPF_ALT_DTLB\r
+#define EFI_SW_EC_IPF_DNESTED_TLB         EXCEPT_IPF_DNESTED_TLB\r
+#define EFI_SW_EC_IPF_BREAKPOINT          EXCEPT_IPF_BREAKPOINT\r
+#define EFI_SW_EC_IPF_EXTERNAL_INTERRUPT  EXCEPT_IPF_EXTERNAL_INTERRUPT\r
+#define EFI_SW_EC_IPF_GEN_EXCEPT          EXCEPT_IPF_GEN_EXCEPT\r
+#define EFI_SW_EC_IPF_NAT_CONSUMPTION     EXCEPT_IPF_NAT_CONSUMPTION\r
+#define EFI_SW_EC_IPF_DEBUG_EXCEPT        EXCEPT_IPF_DEBUG_EXCEPT\r
+#define EFI_SW_EC_IPF_UNALIGNED_ACCESS    EXCEPT_IPF_UNALIGNED_ACCESS\r
+#define EFI_SW_EC_IPF_FP_FAULT            EXCEPT_IPF_FP_FAULT\r
+#define EFI_SW_EC_IPF_FP_TRAP             EXCEPT_IPF_FP_TRAP\r
+#define EFI_SW_EC_IPF_TAKEN_BRANCH        EXCEPT_IPF_TAKEN_BRANCH\r
+#define EFI_SW_EC_IPF_SINGLE_STEP         EXCEPT_IPF_SINGLE_STEP\r
+\r
+//\r
+// Software Class PEI Service Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI Boot Service Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI Runtime Service Subclass Error Code definitions.\r
+//\r
+//\r
+// Software Class EFI DXE Service Subclass Error Code definitions.\r
+//\r
+\r
+///////////////////////////////////////////////////////////////////////////////\r
+// Section 7\r
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Debug Code definitions for all classes and subclass\r
+// Only one debug code is defined at this point and should\r
+// be used for anything that gets sent to debug stream.\r
+//\r
+#define EFI_DC_UNSPECIFIED  0x0\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/StatusCodeDataTypeId.h b/Tools/Source/TianoTools/Include/Common/StatusCodeDataTypeId.h
new file mode 100644 (file)
index 0000000..49bea61
--- /dev/null
@@ -0,0 +1,336 @@
+/** @file\r
+  This file defines the data structures to support Status Code Data.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  StatusCodeDataTypeId.h\r
+\r
+  @par Revision Reference:\r
+  These definitions are from Framework of EFI Status Code Spec\r
+  Version 0.92.\r
+\r
+**/\r
+\r
+#ifndef __STATUS_CODE_DATA_TYPE_ID_H__\r
+#define __STATUS_CODE_DATA_TYPE_ID_H__\r
+\r
+\r
+///\r
+/// The size of string\r
+///\r
+#define EFI_STATUS_CODE_DATA_MAX_STRING_SIZE  150\r
+\r
+///\r
+/// This is the max data size including all the headers which can be passed\r
+/// as Status Code data. This data should be multiple of 8 byte\r
+/// to avoid any kind of boundary issue. Also, sum of this data size (inclusive\r
+/// of size of EFI_STATUS_CODE_DATA should not exceed the max record size of\r
+/// data hub\r
+///\r
+#define EFI_STATUS_CODE_DATA_MAX_SIZE 200\r
+\r
+#pragma pack(1)\r
+typedef enum {\r
+  EfiStringAscii,\r
+  EfiStringUnicode,\r
+  EfiStringToken\r
+} EFI_STRING_TYPE;\r
+\r
+typedef struct {\r
+  EFI_HII_HANDLE  Handle;\r
+  STRING_REF      Token;\r
+} EFI_STATUS_CODE_STRING_TOKEN;\r
+\r
+typedef union {\r
+  CHAR8                         *Ascii;\r
+  CHAR16                        *Unicode;\r
+  EFI_STATUS_CODE_STRING_TOKEN  Hii;\r
+} EFI_STATUS_CODE_STRING;\r
+\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA                          DataHeader;\r
+  EFI_STRING_TYPE                               StringType;\r
+  EFI_STATUS_CODE_STRING                        String;\r
+} EFI_STATUS_CODE_STRING_DATA;\r
+\r
+#pragma pack()\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+  UINT32  ErrorLevel;\r
+  //\r
+  // 12 * sizeof (UINT64) Var Arg stack\r
+  //\r
+  // ascii DEBUG () Format string\r
+  //\r
+} EFI_DEBUG_INFO;\r
+\r
+#pragma pack()\r
+\r
+//\r
+// declaration for EFI_EXP_DATA. This may change\r
+//\r
+// typedef UINTN   EFI_EXP_DATA;\r
+\r
+///\r
+/// Voltage Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_EXP_BASE10_DATA   Voltage;\r
+  EFI_EXP_BASE10_DATA   Threshold;\r
+} EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;\r
+\r
+///\r
+/// Microcode Update Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  UINT32                Version;\r
+} EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;\r
+\r
+///\r
+/// Asynchronous Timer Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_EXP_BASE10_DATA   TimerLimit;\r
+} EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;\r
+\r
+///\r
+/// Host Processor Mismatch Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  UINT32                Instance;\r
+  UINT16                Attributes;\r
+} EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;\r
+\r
+//\r
+// EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES\r
+// All other attributes are reserved for future use and\r
+// must be initialized to 0.\r
+//\r
+#define EFI_COMPUTING_UNIT_MISMATCH_SPEED       0x0001\r
+#define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED   0x0002\r
+#define EFI_COMPUTING_UNIT_MISMATCH_FAMILY      0x0004\r
+#define EFI_COMPUTING_UNIT_MISMATCH_MODEL       0x0008\r
+#define EFI_COMPUTING_UNIT_MISMATCH_STEPPING    0x0010\r
+#define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE  0x0020\r
+#define EFI_COMPUTING_UNIT_MISMATCH_OEM1        0x1000\r
+#define EFI_COMPUTING_UNIT_MISMATCH_OEM2        0x2000\r
+#define EFI_COMPUTING_UNIT_MISMATCH_OEM3        0x4000\r
+#define EFI_COMPUTING_UNIT_MISMATCH_OEM4        0x8000\r
+\r
+///\r
+/// Thermal Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_EXP_BASE10_DATA   Temperature;\r
+  EFI_EXP_BASE10_DATA   Threshold;\r
+} EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;\r
+\r
+///\r
+/// Processor Disabled Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  UINT32                Cause;\r
+  BOOLEAN               SoftwareDisabled;\r
+} EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;\r
+\r
+typedef enum {\r
+  EfiInitCacheDataOnly,\r
+  EfiInitCacheInstrOnly,\r
+  EfiInitCacheBoth,\r
+  EfiInitCacheUnspecified\r
+} EFI_INIT_CACHE_TYPE;\r
+\r
+///\r
+/// Embedded cache init extended data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  UINT32                Level;\r
+  EFI_INIT_CACHE_TYPE   Type;\r
+} EFI_CACHE_INIT_DATA;\r
+\r
+//\r
+// Memory Extended Error Data\r
+//\r
+\r
+///\r
+/// Memory Error Granularity Definition\r
+///\r
+typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;\r
+\r
+///\r
+/// Memory Error Operation Definition\r
+///\r
+typedef UINT8 EFI_MEMORY_ERROR_OPERATION;\r
+\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA          DataHeader;\r
+  EFI_MEMORY_ERROR_GRANULARITY  Granularity;\r
+  EFI_MEMORY_ERROR_OPERATION    Operation;\r
+  UINTN                         Syndrome;\r
+  EFI_PHYSICAL_ADDRESS          Address;\r
+  UINTN                         Resolution;\r
+} EFI_MEMORY_EXTENDED_ERROR_DATA;\r
+\r
+//\r
+// Memory Error Granularities\r
+//\r
+#define EFI_MEMORY_ERROR_OTHER      0x01\r
+#define EFI_MEMORY_ERROR_UNKNOWN    0x02\r
+#define EFI_MEMORY_ERROR_DEVICE     0x03\r
+#define EFI_MEMORY_ERROR_PARTITION  0x04\r
+\r
+//\r
+// Memory Error Operations\r
+//\r
+#define EFI_MEMORY_OPERATION_OTHER          0x01\r
+#define EFI_MEMORY_OPERATION_UNKNOWN        0x02\r
+#define EFI_MEMORY_OPERATION_READ           0x03\r
+#define EFI_MEMORY_OPERATION_WRITE          0x04\r
+#define EFI_MEMORY_OPERATION_PARTIAL_WRITE  0x05\r
+\r
+//\r
+// Define shorthands to describe Group Operations\r
+// Many memory init operations are essentially group\r
+// operations.\r
+\r
+/// A shorthand to describe that the operation is performed\r
+/// on multiple devices within the array\r
+///\r
+#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION  0xfffe\r
+///\r
+/// A shorthand to describe that the operation is performed on all devices within the array\r
+///\r
+#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff\r
+///\r
+/// A shorthand to describe that the operation is performed on multiple arrays\r
+///\r
+#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe\r
+///\r
+/// A shorthand to describe that the operation is performed on all the arrays\r
+///\r
+#define EFI_ALL_MEMORY_ARRAY_OPERATION  0xffff\r
+\r
+//\r
+// DIMM number\r
+//\r
+#pragma pack(1)\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  UINT16                Array;\r
+  UINT16                Device;\r
+} EFI_STATUS_CODE_DIMM_NUMBER;\r
+#pragma pack()\r
+\r
+///\r
+/// Memory Module Mismatch Extended Error Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA        DataHeader;\r
+  EFI_STATUS_CODE_DIMM_NUMBER Instance;\r
+} EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;\r
+\r
+///\r
+/// Memory Range Extended Data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_PHYSICAL_ADDRESS  Start;\r
+  EFI_PHYSICAL_ADDRESS  Length;\r
+} EFI_MEMORY_RANGE_EXTENDED_DATA;\r
+\r
+///\r
+/// Device handle Extended Data. Used for many\r
+/// errors and progress codes to point to the device.\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_HANDLE            Handle;\r
+} EFI_DEVICE_HANDLE_EXTENDED_DATA;\r
+\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA                 DataHeader;\r
+  UINT8                                *DevicePath;\r
+} EFI_DEVICE_PATH_EXTENDED_DATA;\r
+\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA           DataHeader;  \r
+  EFI_HANDLE                     ControllerHandle;\r
+  EFI_HANDLE                     DriverBindingHandle;\r
+  UINT16                         DevicePathSize;\r
+  UINT8                          *RemainingDevicePath;\r
+} EFI_STATUS_CODE_START_EXTENDED_DATA;\r
+\r
+///\r
+/// Resource Allocation Failure Extended Error Data\r
+///\r
+\r
+/*\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA      DataHeader;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+  UINT32                    Bar;\r
+  VOID                      *ReqRes;\r
+  VOID                      *AllocRes;\r
+} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;\r
+*/\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA               DataHeader;\r
+  UINT32                             Bar;\r
+  UINT16                             DevicePathSize;\r
+  UINT16                             ReqResSize;\r
+  UINT16                             AllocResSize;\r
+  UINT8                              *DevicePath;\r
+  UINT8                              *ReqRes;\r
+  UINT8                              *AllocRes;\r
+} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;\r
+\r
+///\r
+/// Extended Error Data for Assert\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA        DataHeader;\r
+  UINT32                      LineNumber;\r
+  UINT32                      FileNameSize;\r
+  EFI_STATUS_CODE_STRING_DATA *FileName;\r
+} EFI_DEBUG_ASSERT_DATA;\r
+\r
+///\r
+/// System Context Data EBC/IA32/IPF\r
+///\r
+typedef union {\r
+  EFI_SYSTEM_CONTEXT_EBC  SystemContextEbc;\r
+  EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;\r
+  EFI_SYSTEM_CONTEXT_IPF  SystemContextIpf;\r
+} EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;\r
+\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA                  DataHeader;\r
+  EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT  Context;\r
+} EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;\r
+\r
+///\r
+/// Legacy Oprom extended data\r
+///\r
+typedef struct {\r
+  EFI_STATUS_CODE_DATA  DataHeader;\r
+  EFI_HANDLE            DeviceHandle;\r
+  EFI_PHYSICAL_ADDRESS  RomImageBase;\r
+} EFI_LEGACY_OPROM_EXTENDED_DATA;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Common/UefiBaseTypes.h b/Tools/Source/TianoTools/Include/Common/UefiBaseTypes.h
new file mode 100644 (file)
index 0000000..4954c10
--- /dev/null
@@ -0,0 +1,85 @@
+/** @file\r
+  This file makes the BaseTypes.h backward compatible with the ones used in the \r
+  past for EFI and Tiano development. It's mostly just prepending an EFI_ on the \r
+  definitions.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  UefiBaseTypes.h\r
+\r
+**/\r
+\r
+#ifndef __UEFI_BASE_TYPES_H__\r
+#define __UEFI_BASE_TYPES_H__\r
+\r
+#include <Common/BaseTypes.h>\r
+\r
+typedef UINT64    EFI_LBA;\r
+\r
+#define EFIERR(_a)                    ENCODE_ERROR(_a)\r
+\r
+#define EFI_MAX_BIT                   MAX_BIT\r
+#define EFI_MAX_ADDRESS               MAX_ADDRESS\r
+#define EFI_BREAKPOINT()              CpuBreakpoint ()\r
+#define EFI_DEADLOOP()                CpuDeadLoop ()\r
+#define EFI_ERROR(A)                  RETURN_ERROR(A)\r
+\r
+typedef GUID          EFI_GUID;\r
+typedef RETURN_STATUS EFI_STATUS;\r
+\r
+#define EFI_SUCCESS               RETURN_SUCCESS              \r
+#define EFI_LOAD_ERROR            RETURN_LOAD_ERROR           \r
+#define EFI_INVALID_PARAMETER     RETURN_INVALID_PARAMETER    \r
+#define EFI_UNSUPPORTED           RETURN_UNSUPPORTED          \r
+#define EFI_BAD_BUFFER_SIZE       RETURN_BAD_BUFFER_SIZE      \r
+#define EFI_BUFFER_TOO_SMALL      RETURN_BUFFER_TOO_SMALL     \r
+#define EFI_NOT_READY             RETURN_NOT_READY            \r
+#define EFI_DEVICE_ERROR          RETURN_DEVICE_ERROR         \r
+#define EFI_WRITE_PROTECTED       RETURN_WRITE_PROTECTED      \r
+#define EFI_OUT_OF_RESOURCES      RETURN_OUT_OF_RESOURCES     \r
+#define EFI_VOLUME_CORRUPTED      RETURN_VOLUME_CORRUPTED     \r
+#define EFI_VOLUME_FULL           RETURN_VOLUME_FULL          \r
+#define EFI_NO_MEDIA              RETURN_NO_MEDIA             \r
+#define EFI_MEDIA_CHANGED         RETURN_MEDIA_CHANGED        \r
+#define EFI_NOT_FOUND             RETURN_NOT_FOUND            \r
+#define EFI_ACCESS_DENIED         RETURN_ACCESS_DENIED        \r
+#define EFI_NO_RESPONSE           RETURN_NO_RESPONSE          \r
+#define EFI_NO_MAPPING            RETURN_NO_MAPPING           \r
+#define EFI_TIMEOUT               RETURN_TIMEOUT              \r
+#define EFI_NOT_STARTED           RETURN_NOT_STARTED          \r
+#define EFI_ALREADY_STARTED       RETURN_ALREADY_STARTED      \r
+#define EFI_ABORTED               RETURN_ABORTED              \r
+#define EFI_ICMP_ERROR            RETURN_ICMP_ERROR           \r
+#define EFI_TFTP_ERROR            RETURN_TFTP_ERROR           \r
+#define EFI_PROTOCOL_ERROR        RETURN_PROTOCOL_ERROR       \r
+#define EFI_INCOMPATIBLE_VERSION  RETURN_INCOMPATIBLE_VERSION \r
+#define EFI_SECURITY_VIOLATION    RETURN_SECURITY_VIOLATION   \r
+#define EFI_CRC_ERROR             RETURN_CRC_ERROR   \r
+#define EFI_END_OF_MEDIA          RETURN_END_OF_MEDIA\r
+#define EFI_END_OF_FILE           RETURN_END_OF_FILE\r
+\r
+#define EFI_WARN_UNKNOWN_GLYPH    RETURN_WARN_UNKNOWN_GLYPH   \r
+#define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE  \r
+#define EFI_WARN_WRITE_FAILURE    RETURN_WARN_WRITE_FAILURE   \r
+#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL\r
+\r
+//\r
+// The EFI memory allocation functions work in units of EFI_PAGEs that are\r
+// 4K. This should in no way be confused with the page size of the processor.\r
+// An EFI_PAGE is just the quanta of memory in EFI.\r
+//\r
+#define EFI_PAGE_MASK         0xFFF\r
+#define EFI_PAGE_SHIFT        12\r
+\r
+#define EFI_SIZE_TO_PAGES(a)  (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))\r
+\r
+#define EFI_PAGES_TO_SIZE(a)   ( (a) << EFI_PAGE_SHIFT)\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Dxe.h b/Tools/Source/TianoTools/Include/Dxe.h
new file mode 100644 (file)
index 0000000..d97209d
--- /dev/null
@@ -0,0 +1,50 @@
+/** @file\r
+\r
+  Root include file for Mde Package DXE modules\r
+\r
+  DXE modules follow the public Framework specifications and the UEFI \r
+  specifiations. The build infrastructure must set \r
+  EFI_SPECIFICATION_VERSION  before including  this file. To support \r
+  R9/UEFI2.0 set EFI_SPECIFIATION_VERSION to 0x00020000. To support \r
+  R8.5/EFI 1.10 set EFI_SPECIFIATION_VERSION to 0x00010010. \r
+  EDK_RELEASE_VERSION must be set to a non zero value.\r
+  EFI_SPECIFIATION_VERSION and EDK_RELEASE_VERSION are set automatically\r
+  by the build infrastructure for every module.\r
+\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __DXE_H__\r
+#define __DXE_H__\r
+\r
+//\r
+// Check to make sure EFI_SPECIFICATION_VERSION and EDK_RELEASE_VERSION are defined.\r
+//\r
+#if !defined(EFI_SPECIFICATION_VERSION)\r
+  #error EFI_SPECIFICATION_VERSION not defined\r
+#elif !defined(EDK_RELEASE_VERSION)\r
+  #error EDK_RELEASE_VERSION not defined\r
+#elif (EDK_RELEASE_VERSION == 0)\r
+  #error EDK_RELEASE_VERSION can not be zero\r
+#endif\r
+\r
+\r
+#include <Common/UefiBaseTypes.h>\r
+#include <Dxe/DxeCis.h>\r
+#include <Dxe/SmmCis.h>\r
+\r
+#include <Common/DataHubRecords.h>\r
+#include <Guid/DataHubRecords.h>\r
+\r
+#include <Protocol/Pcd.h>\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Bds.h b/Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Bds.h
new file mode 100644 (file)
index 0000000..f6b72d2
--- /dev/null
@@ -0,0 +1,87 @@
+/** @file\r
+  Boot Device Selection Architectural Protocol as defined in DXE CIS\r
+\r
+  When the DXE core is done it calls the BDS via this protocol.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  Bds.h\r
+\r
+  @par Revision Reference:\r
+  Version 0.91B.\r
+\r
+**/\r
+\r
+#ifndef __ARCH_PROTOCOL_BDS_H__\r
+#define __ARCH_PROTOCOL_BDS_H__\r
+\r
+//\r
+// Global ID for the BDS Architectural Protocol\r
+//\r
+#define EFI_BDS_ARCH_PROTOCOL_GUID \\r
+  { 0x665E3FF6, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }\r
+\r
+//\r
+// Declare forward reference for the BDS Architectural Protocol\r
+//\r
+typedef struct _EFI_BDS_ARCH_PROTOCOL   EFI_BDS_ARCH_PROTOCOL;\r
+\r
+/**\r
+  This function uses policy data from the platform to determine what operating \r
+  system or system utility should be loaded and invoked.  This function call \r
+  also optionally make the use of user input to determine the operating system \r
+  or system utility to be loaded and invoked.  When the DXE Core has dispatched \r
+  all the drivers on the dispatch queue, this function is called.  This \r
+  function will attempt to connect the boot devices required to load and invoke \r
+  the selected operating system or system utility.  During this process, \r
+  additional firmware volumes may be discovered that may contain addition DXE \r
+  drivers that can be dispatched by the DXE Core.   If a boot device cannot be \r
+  fully connected, this function calls the DXE Service Dispatch() to allow the \r
+  DXE drivers from any newly discovered firmware volumes to be dispatched.  \r
+  Then the boot device connection can be attempted again.  If the same boot \r
+  device connection operation fails twice in a row, then that boot device has \r
+  failed, and should be skipped.  This function should never return.\r
+\r
+  @param  This The EFI_BDS_ARCH_PROTOCOL instance.\r
+\r
+  @return None.\r
+\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_BDS_ENTRY) (\r
+  IN EFI_BDS_ARCH_PROTOCOL  *This\r
+  );\r
+\r
+/**\r
+  Interface stucture for the BDS Architectural Protocol.\r
+\r
+  @par Protocol Description:\r
+  The EFI_BDS_ARCH_PROTOCOL transfers control from DXE to an operating \r
+  system or a system utility.  If there are not enough drivers initialized \r
+  when this protocol is used to access the required boot device(s), then \r
+  this protocol should add drivers to the dispatch queue and return control \r
+  back to the dispatcher.  Once the required boot devices are available, then \r
+  the boot device can be used to load and invoke an OS or a system utility.\r
+\r
+  @par Protocol Parameters:\r
+  Entry - The entry point to BDS.  This call does not take any parameters, \r
+  and the return value can be ignored.  If it returns, then the \r
+  dispatcher must be invoked again, if it never returns, then an \r
+  operating system or a system utility have been invoked.\r
+\r
+**/\r
+struct _EFI_BDS_ARCH_PROTOCOL {\r
+  EFI_BDS_ENTRY Entry;\r
+};\r
+\r
+extern EFI_GUID gEfiBdsArchProtocolGuid;\r
+\r
+#endif\r
diff --git a/Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Cpu.h b/Tools/Source/TianoTools/Include/Dxe/ArchProtocol/Cpu.h
new file mode 100644 (file)
index 0000000..975a816
--- /dev/null
@@ -0,0 +1,326 @@
+/** @file\r
+  CPU Architectural Protocol as defined in DXE CIS\r
+\r
+  This code abstracts the DXE core from processor implementation details.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  Cpu.h\r
+\r
+  @par Revision Reference:\r
+  Version 0.91B.\r
+\r
+**/\r
+\r
+#ifndef __ARCH_PROTOCOL_CPU_H__\r
+#define __ARCH_PROTOCOL_CPU_H__\r
+\r
+\r
+#define EFI_CPU_ARCH_PROTOCOL_GUID \\r
+  { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }\r
+\r
+typedef struct _EFI_CPU_ARCH_PROTOCOL   EFI_CPU_ARCH_PROTOCOL;\r
+\r
+typedef enum {\r
+  EfiCpuFlushTypeWriteBackInvalidate,\r
+  EfiCpuFlushTypeWriteBack,\r
+  EfiCpuFlushTypeInvalidate,\r
+  EfiCpuMaxFlushType\r
+} EFI_CPU_FLUSH_TYPE;\r
+\r
+typedef enum {\r
+  EfiCpuInit,\r
+  EfiCpuMaxInitType\r
+} EFI_CPU_INIT_TYPE;\r
+\r
+/**\r
+  EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs.\r
+\r
+  @param  InterruptType Defines the type of interrupt or exception that \r
+  occurred on the processor.This parameter is processor architecture specific.\r
+  \r
+  @param  SystemContext A pointer to the processor context when \r
+  the interrupt occurred on the processor.\r
+\r
+  @return None\r
+\r
+**/\r
+typedef\r
+VOID\r
+(*EFI_CPU_INTERRUPT_HANDLER) (\r
+  IN EFI_EXCEPTION_TYPE                 InterruptType,\r
+  IN EFI_SYSTEM_CONTEXT                 SystemContext\r
+  );\r
+\r
+/**\r
+  This function flushes the range of addresses from Start to Start+Length \r
+  from the processor's data cache. If Start is not aligned to a cache line \r
+  boundary, then the bytes before Start to the preceding cache line boundary \r
+  are also flushed. If Start+Length is not aligned to a cache line boundary, \r
+  then the bytes past Start+Length to the end of the next cache line boundary \r
+  are also flushed. The FlushType of EfiCpuFlushTypeWriteBackInvalidate must be \r
+  supported. If the data cache is fully coherent with all DMA operations, then \r
+  this function can just return EFI_SUCCESS. If the processor does not support \r
+  flushing a range of the data cache, then the entire data cache can be flushed.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  Start The beginning physical address to flush from the processor's data\r
+  cache.\r
+  @param  Length The number of bytes to flush from the processor's data cache. This\r
+  function may flush more bytes than Length specifies depending upon\r
+  the granularity of the flush operation that the processor supports.\r
+  @param  FlushType Specifies the type of flush operation to perform.\r
+\r
+  @retval  EFI_SUCCESS The address range from Start to Start+Length was flushed from\r
+  the processor's data cache.\r
+  @retval  EFI_UNSUPPORTEDT The processor does not support the cache flush type specified\r
+  by FlushType.\r
+  @retval  EFI_DEVICE_ERROR The address range from Start to Start+Length could not be flushed\r
+  from the processor's data cache.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This,\r
+  IN EFI_PHYSICAL_ADDRESS               Start,\r
+  IN UINT64                             Length,\r
+  IN EFI_CPU_FLUSH_TYPE                 FlushType\r
+  );\r
+\r
+\r
+/**\r
+  This function enables interrupt processing by the processor. \r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+\r
+  @retval  EFI_SUCCESS Interrupts are enabled on the processor.\r
+  @retval  EFI_DEVICE_ERROR Interrupts could not be enabled on the processor.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_ENABLE_INTERRUPT) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This\r
+  );\r
+\r
+\r
+/**\r
+  This function disables interrupt processing by the processor.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+\r
+  @retval  EFI_SUCCESS Interrupts are disabled on the processor.\r
+  @retval  EFI_DEVICE_ERROR Interrupts could not be disabled on the processor.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_DISABLE_INTERRUPT) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This\r
+  );\r
+\r
+\r
+/**\r
+  This function retrieves the processor's current interrupt state a returns it in \r
+  State. If interrupts are currently enabled, then TRUE is returned. If interrupts \r
+  are currently disabled, then FALSE is returned.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  State A pointer to the processor's current interrupt state. Set to TRUE if\r
+  interrupts are enabled and FALSE if interrupts are disabled.\r
+\r
+  @retval  EFI_SUCCESS The processor's current interrupt state was returned in State.\r
+  @retval  EFI_INVALID_PARAMETER State is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This,\r
+  OUT BOOLEAN                           *State\r
+  );\r
+\r
+\r
+/**\r
+  This function generates an INIT on the processor. If this function succeeds, then the\r
+  processor will be reset, and control will not be returned to the caller. If InitType is \r
+  not supported by this processor, or the processor cannot programmatically generate an \r
+  INIT without help from external hardware, then EFI_UNSUPPORTED is returned. If an error \r
+  occurs attempting to generate an INIT, then EFI_DEVICE_ERROR is returned.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  InitType The type of processor INIT to perform.\r
+\r
+  @retval  EFI_SUCCESS The processor INIT was performed. This return code should never be seen.\r
+  @retval  EFI_UNSUPPORTED The processor INIT operation specified by InitType is not supported\r
+  by this processor.\r
+  @retval  EFI_DEVICE_ERROR The processor INIT failed.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_INIT) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This,\r
+  IN EFI_CPU_INIT_TYPE                  InitType\r
+  );\r
+\r
+\r
+/**\r
+  This function registers and enables the handler specified by InterruptHandler for a processor \r
+  interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
+  handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
+  The installed handler is called once for each processor interrupt or exception.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
+  are enabled and FALSE if interrupts are disabled.\r
+  @param  InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
+  when a processor interrupt occurs. If this parameter is NULL, then the handler\r
+  will be uninstalled.\r
+\r
+  @retval  EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
+  @retval  EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
+  previously installed.\r
+  @retval  EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
+  previously installed.\r
+  @retval  EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This,\r
+  IN EFI_EXCEPTION_TYPE                 InterruptType,\r
+  IN EFI_CPU_INTERRUPT_HANDLER          InterruptHandler\r
+  );\r
+\r
+\r
+/**\r
+  This function reads the processor timer specified by TimerIndex and returns it in TimerValue.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  TimerIndex Specifies which processor timer is to be returned in TimerValue. This parameter\r
+  must be between 0 and NumberOfTimers-1.\r
+  @param  TimerValue Pointer to the returned timer value.\r
+  @param  TimerPeriod A pointer to the amount of time that passes in femtoseconds for each increment\r
+  of TimerValue.\r
+\r
+  @retval  EFI_SUCCESS The processor timer value specified by TimerIndex was returned in TimerValue.\r
+  @retval  EFI_DEVICE_ERROR An error occurred attempting to read one of the processor's timers.\r
+  @retval  EFI_INVALID_PARAMETER TimerValue is NULL or TimerIndex is not valid.\r
+  @retval  EFI_UNSUPPORTED The processor does not have any readable timers.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CPU_GET_TIMER_VALUE) (\r
+  IN EFI_CPU_ARCH_PROTOCOL              *This,\r
+  IN UINT32                             TimerIndex,\r
+  OUT UINT64                            *TimerValue,\r
+  OUT UINT64                            *TimerPeriod OPTIONAL\r
+  );\r
+\r
+\r
+/**\r
+  This function modifies the attributes for the memory region specified by BaseAddress and\r
+  Length from their current attributes to the attributes specified by Attributes.\r
+\r
+  @param  This The EFI_CPU_ARCH_PROTOCOL instance.\r
+  @param  BaseAddress The physical address that is the start address of a memory region.\r
+  @param  Length The size in bytes of the memory region.\r
+  @param  Attributes The bit mask of attributes to set for the memory region.\r
+\r
+  @retval  EFI_SUCCESS The attributes were set for the memory region.\r
+  @retval  EFI_ACCESS_DENIED The attributes for the memory resource range specified by\r
+  BaseAddress and Length cannot be modified.\r
+  @retval  EFI_INVALID_PARAMETER Length is zero.\r
+  @retval  EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of\r
+  the