1) Check in Pei/Dxe status code;
2) OemHookStatusCodeLib and SerialPortLib class and null instance; 3) Remove all referenced code from EdkModulePkg,EdkNt32Pkg. 4) Add Nt32OemHookStatusCodeLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1067 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3f566587ae
commit
56836fe92b
@ -36,6 +36,143 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
<FlashDefinitionFile>dummy.fdf</FlashDefinitionFile>
|
<FlashDefinitionFile>dummy.fdf</FlashDefinitionFile>
|
||||||
</Flash>
|
</Flash>
|
||||||
<FrameworkModules>
|
<FrameworkModules>
|
||||||
|
<ModuleSA SupArchList="IA32 X64 EBC IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="1EC0F53A-FDE0-4576-8F25-7A1A410F58EB">
|
||||||
|
<Libraries>
|
||||||
|
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="8c690838-7a22-45c4-aa58-a33e3e515cd4" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="9ba1d976-0624-41a3-8650-28165e8d9ae8" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="fd44e603-002a-4b29-9f5f-529e815b6165" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="a804239b-4155-446f-acc8-f0825d74908c" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="926c9cd0-4bb8-479b-9ac4-8a2a23f85307" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="fa177ff7-1fc7-458d-a358-d9d62ae61cec" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="9643128f-ac24-4b3e-b6be-d8849a306153" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="e6e9c1f8-2c8a-4f4b-a27c-c382e4bb8e67" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="b5a05743-9b71-489b-a0ed-a0eb3950d23b" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="E4541241-8897-411a-91F8-7D7E45837146" ModuleVersion="1.0" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" PackageVersion="0.3"/>
|
||||||
|
<Instance ModuleGuid="54D2878F-25CD-4a2b-8420-EBD18E609C76" ModuleVersion="1.0" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" PackageVersion="0.3"/>
|
||||||
|
</Libraries>
|
||||||
|
<PcdBuildDefinition>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
|
||||||
|
<Token>0x00000001</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumAsciiStringLength</C_Name>
|
||||||
|
<Token>0x00000002</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugPropertyMask</C_Name>
|
||||||
|
<Token>0x00000005</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x0f</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdSpinLockTimeout</C_Name>
|
||||||
|
<Token>0x00000004</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>10000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdDebugPrintErrorLevel</C_Name>
|
||||||
|
<Token>0x00000006</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x80000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumLinkedListLength</C_Name>
|
||||||
|
<Token>0x00000003</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
|
||||||
|
<Token>0x00000007</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x07</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugClearMemoryValue</C_Name>
|
||||||
|
<Token>0x00000008</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0xAF</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdVpdBaseAddress</C_Name>
|
||||||
|
<Token>0x00010010</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x0</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdDxePcdDatabaseTraverseEnabled</C_Name>
|
||||||
|
<Token>0x00010021</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>TRUE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseSerial</C_Name>
|
||||||
|
<Token>0x00010022</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseMemory</C_Name>
|
||||||
|
<Token>0x00010023</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<Token>0x00010024</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdStatusCodeMemorySize</C_Name>
|
||||||
|
<Token>0x00010025</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT16</DatumType>
|
||||||
|
<MaxDatumSize>2</MaxDatumSize>
|
||||||
|
<Value>1</Value>
|
||||||
|
</PcdData>
|
||||||
|
</PcdBuildDefinition>
|
||||||
|
<ModuleSaBuildOptions>
|
||||||
|
<FvBinding>FV_RECOVERY</FvBinding>
|
||||||
|
<FfsFormatKey>PE32_PEIM</FfsFormatKey>
|
||||||
|
</ModuleSaBuildOptions>
|
||||||
|
</ModuleSA>
|
||||||
<ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="80CF7257-87AB-47f9-A3FE-D50B76D89541">
|
<ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="80CF7257-87AB-47f9-A3FE-D50B76D89541">
|
||||||
<Libraries>
|
<Libraries>
|
||||||
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
@ -4133,6 +4270,380 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
|
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
|
||||||
</ModuleSaBuildOptions>
|
</ModuleSaBuildOptions>
|
||||||
</ModuleSA>
|
</ModuleSA>
|
||||||
|
<ModuleSA SupArchList="X64 EBC IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="FEDE0A1B-BCA2-4A9F-BB2B-D9FD7DEC2E9F">
|
||||||
|
<Libraries>
|
||||||
|
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="fd44e603-002a-4b29-9f5f-529e815b6165" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="b5a05743-9b71-489b-a0ed-a0eb3950d23b" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="926c9cd0-4bb8-479b-9ac4-8a2a23f85307" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="E4541241-8897-411a-91F8-7D7E45837146" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
<Instance ModuleGuid="54D2878F-25CD-4a2b-8420-EBD18E609C76" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
<Instance ModuleGuid="b1ee6c28-54aa-4d17-b705-3e28ccb27b2e" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
</Libraries>
|
||||||
|
<PcdBuildDefinition>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
|
||||||
|
<Token>0x00000001</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumAsciiStringLength</C_Name>
|
||||||
|
<Token>0x00000002</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugPropertyMask</C_Name>
|
||||||
|
<Token>0x00000005</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x0f</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdSpinLockTimeout</C_Name>
|
||||||
|
<Token>0x00000004</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>10000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdDebugPrintErrorLevel</C_Name>
|
||||||
|
<Token>0x00000006</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x80000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumLinkedListLength</C_Name>
|
||||||
|
<Token>0x00000003</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugClearMemoryValue</C_Name>
|
||||||
|
<Token>0x00000008</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0xAF</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
|
||||||
|
<Token>0x00000007</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x07</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdVpdBaseAddress</C_Name>
|
||||||
|
<Token>0x00010010</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x0</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdDxePcdDatabaseTraverseEnabled</C_Name>
|
||||||
|
<Token>0x00010021</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>TRUE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseEfiSerial</C_Name>
|
||||||
|
<Token>0x00010026</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseHardSerial</C_Name>
|
||||||
|
<Token>0x00010027</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>
|
||||||
|
<Token>0x00010028</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseDataHub</C_Name>
|
||||||
|
<Token>0x00010029</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<Token>0x00010024</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInSerial</C_Name>
|
||||||
|
<Token>0x0001002a</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>
|
||||||
|
<Token>0x0001002b</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInDataHub</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInOEM</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdStatusCodeRuntimeMemorySize</C_Name>
|
||||||
|
<Token>0x0001002d</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT16</DatumType>
|
||||||
|
<MaxDatumSize>2</MaxDatumSize>
|
||||||
|
<Value>128</Value>
|
||||||
|
</PcdData>
|
||||||
|
</PcdBuildDefinition>
|
||||||
|
<ModuleSaBuildOptions>
|
||||||
|
<FvBinding>FV_RECOVERY</FvBinding>
|
||||||
|
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
|
||||||
|
</ModuleSaBuildOptions>
|
||||||
|
</ModuleSA>
|
||||||
|
<ModuleSA SupArchList="IPF" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="FEDE0A1B-BCA2-4A9F-BB2B-D9FD7DEC2E9F">
|
||||||
|
<Libraries>
|
||||||
|
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="fd44e603-002a-4b29-9f5f-529e815b6165" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="b5a05743-9b71-489b-a0ed-a0eb3950d23b" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="926c9cd0-4bb8-479b-9ac4-8a2a23f85307" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Instance ModuleGuid="E4541241-8897-411a-91F8-7D7E45837146" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
<Instance ModuleGuid="54D2878F-25CD-4a2b-8420-EBD18E609C76" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
<Instance ModuleGuid="b1ee6c28-54aa-4d17-b705-3e28ccb27b2e" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
<Instance ModuleGuid="61999c3c-72a5-4506-a4ff-4271d18a1d14" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
|
||||||
|
</Libraries>
|
||||||
|
<PcdBuildDefinition>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
|
||||||
|
<Token>0x00000001</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumAsciiStringLength</C_Name>
|
||||||
|
<Token>0x00000002</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugPropertyMask</C_Name>
|
||||||
|
<Token>0x00000005</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x0f</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdSpinLockTimeout</C_Name>
|
||||||
|
<Token>0x00000004</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>10000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdDebugPrintErrorLevel</C_Name>
|
||||||
|
<Token>0x00000006</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x80000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdMaximumLinkedListLength</C_Name>
|
||||||
|
<Token>0x00000003</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdDebugClearMemoryValue</C_Name>
|
||||||
|
<Token>0x00000008</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0xAF</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
|
||||||
|
<Token>0x00000007</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x07</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdVpdBaseAddress</C_Name>
|
||||||
|
<Token>0x00010010</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT32</DatumType>
|
||||||
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
|
<Value>0x0</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdDxePcdDatabaseTraverseEnabled</C_Name>
|
||||||
|
<Token>0x00010021</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>TRUE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseEfiSerial</C_Name>
|
||||||
|
<Token>0x00010026</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseHardSerial</C_Name>
|
||||||
|
<Token>0x00010027</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>
|
||||||
|
<Token>0x00010028</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseDataHub</C_Name>
|
||||||
|
<Token>0x00010029</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<Token>0x00010024</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInSerial</C_Name>
|
||||||
|
<Token>0x0001002a</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>
|
||||||
|
<Token>0x0001002b</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInDataHub</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInOEM</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>FALSE</Value>
|
||||||
|
</PcdData>
|
||||||
|
<PcdData ItemType="PATCHABLE_IN_MODULE">
|
||||||
|
<C_Name>PcdStatusCodeRuntimeMemorySize</C_Name>
|
||||||
|
<Token>0x0001002d</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT16</DatumType>
|
||||||
|
<MaxDatumSize>2</MaxDatumSize>
|
||||||
|
<Value>128</Value>
|
||||||
|
</PcdData>
|
||||||
|
</PcdBuildDefinition>
|
||||||
|
<ModuleSaBuildOptions>
|
||||||
|
<FvBinding>FV_RECOVERY</FvBinding>
|
||||||
|
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
|
||||||
|
</ModuleSaBuildOptions>
|
||||||
|
</ModuleSA>
|
||||||
|
|
||||||
|
|
||||||
<ModuleSA SupArchList="X64" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="80CF7257-87AB-47f9-A3FE-D50B76D89541">
|
<ModuleSA SupArchList="X64" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="80CF7257-87AB-47f9-A3FE-D50B76D89541">
|
||||||
<Libraries>
|
<Libraries>
|
||||||
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
@ -24,10 +24,6 @@
|
|||||||
<IncludeHeader>Include/Library/CustomDecompressLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/CustomDecompressLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
<LibraryClass Name="EdkBsDataHubStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkBsDataHubStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Name="EdkDxeSalLib">
|
<LibraryClass Name="EdkDxeSalLib">
|
||||||
<IncludeHeader>Include/Library/EdkDxeSalLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkDxeSalLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -44,10 +40,6 @@
|
|||||||
<IncludeHeader>Include/Library/EdkIfrSupportLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkIfrSupportLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
<LibraryClass Name="EdkMemoryStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkMemoryStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Name="EdkPeCoffLoaderLib">
|
<LibraryClass Name="EdkPeCoffLoaderLib">
|
||||||
<IncludeHeader>Include/Library/EdkPeCoffLoaderLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkPeCoffLoaderLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -56,14 +48,6 @@
|
|||||||
<IncludeHeader>Include/Library/EdkPeCoffLoaderX64Lib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkPeCoffLoaderX64Lib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
<LibraryClass Name="EdkRtMemoryStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkRtMemoryStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Name="EdkRtPlatformStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkRtPlatformStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Name="EdkScsiLib">
|
<LibraryClass Name="EdkScsiLib">
|
||||||
<IncludeHeader>Include/Library/EdkScsiLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkScsiLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -76,6 +60,14 @@
|
|||||||
<IncludeHeader>Include/Library/TianoDecompressLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/TianoDecompressLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
|
<LibraryClass Name="SerialPortLib">
|
||||||
|
<IncludeHeader>Include/Library/SerialPortLib.h</IncludeHeader>
|
||||||
|
<HelpText/>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Name="OemHookStatusCodeLib">
|
||||||
|
<IncludeHeader>Include/Library/OemHookStatusCodeLib.h</IncludeHeader>
|
||||||
|
<HelpText/>
|
||||||
|
</LibraryClass>
|
||||||
</LibraryClassDeclarations>
|
</LibraryClassDeclarations>
|
||||||
<IndustryStdIncludes>
|
<IndustryStdIncludes>
|
||||||
<IndustryStdHeader Name="CapsuleName">
|
<IndustryStdHeader Name="CapsuleName">
|
||||||
@ -198,10 +190,6 @@
|
|||||||
<IncludeHeader>Include/Library/CustomDecompressLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/CustomDecompressLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</IndustryStdHeader>
|
</IndustryStdHeader>
|
||||||
<IndustryStdHeader Name="EdkBsDataHubStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkBsDataHubStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</IndustryStdHeader>
|
|
||||||
<IndustryStdHeader Name="EdkDxeSalLib">
|
<IndustryStdHeader Name="EdkDxeSalLib">
|
||||||
<IncludeHeader>Include/Library/EdkDxeSalLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkDxeSalLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -218,10 +206,6 @@
|
|||||||
<IncludeHeader>Include/Library/EdkIfrSupportLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkIfrSupportLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</IndustryStdHeader>
|
</IndustryStdHeader>
|
||||||
<IndustryStdHeader Name="EdkMemoryStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkMemoryStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</IndustryStdHeader>
|
|
||||||
<IndustryStdHeader Name="EdkPeCoffLoaderLib">
|
<IndustryStdHeader Name="EdkPeCoffLoaderLib">
|
||||||
<IncludeHeader>Include/Library/EdkPeCoffLoaderLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkPeCoffLoaderLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -230,14 +214,6 @@
|
|||||||
<IncludeHeader>Include/Library/EdkPeCoffLoaderX64Lib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkPeCoffLoaderX64Lib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</IndustryStdHeader>
|
</IndustryStdHeader>
|
||||||
<IndustryStdHeader Name="EdkRtMemoryStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkRtMemoryStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</IndustryStdHeader>
|
|
||||||
<IndustryStdHeader Name="EdkRtPlatformStatusCodeLib">
|
|
||||||
<IncludeHeader>Include/Library/EdkRtPlatformStatusCodeLib.h</IncludeHeader>
|
|
||||||
<HelpText/>
|
|
||||||
</IndustryStdHeader>
|
|
||||||
<IndustryStdHeader Name="EdkScsiLib">
|
<IndustryStdHeader Name="EdkScsiLib">
|
||||||
<IncludeHeader>Include/Library/EdkScsiLib.h</IncludeHeader>
|
<IncludeHeader>Include/Library/EdkScsiLib.h</IncludeHeader>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
@ -424,18 +400,16 @@
|
|||||||
<Filename>Library/EdkFvbServiceLib/EdkFvbServiceLib.msa</Filename>
|
<Filename>Library/EdkFvbServiceLib/EdkFvbServiceLib.msa</Filename>
|
||||||
<Filename>Library/EdkGraphicsLib/EdkGraphicsLib.msa</Filename>
|
<Filename>Library/EdkGraphicsLib/EdkGraphicsLib.msa</Filename>
|
||||||
<Filename>Library/EdkIfrSupportLib/EdkIfrSupportLib.msa</Filename>
|
<Filename>Library/EdkIfrSupportLib/EdkIfrSupportLib.msa</Filename>
|
||||||
<Filename>Library/EdkMemoryStatusCodeLib/EdkMemoryStatusCodeLib.msa</Filename>
|
|
||||||
<Filename>Library/EdkNullCustomizedDecompressLib/EdkNullCustomizedDecompressLib.msa</Filename>
|
<Filename>Library/EdkNullCustomizedDecompressLib/EdkNullCustomizedDecompressLib.msa</Filename>
|
||||||
<Filename>Library/EdkPeCoffLoaderLib/EdkPeCoffLoaderLib.msa</Filename>
|
<Filename>Library/EdkPeCoffLoaderLib/EdkPeCoffLoaderLib.msa</Filename>
|
||||||
<Filename>Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64Lib.msa</Filename>
|
<Filename>Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64Lib.msa</Filename>
|
||||||
<Filename>Library/PeiPerformanceLib/PeiPerformanceLib.msa</Filename>
|
<Filename>Library/PeiPerformanceLib/PeiPerformanceLib.msa</Filename>
|
||||||
<Filename>Library/EdkRuntimeStatusCodeLib/BsDataHubStatusCode/BsDataHubStatusCode.msa</Filename>
|
|
||||||
<Filename>Library/EdkRuntimeStatusCodeLib/RtMemoryStatusCode/RtMemoryStatusCode.msa</Filename>
|
|
||||||
<Filename>Library/EdkRuntimeStatusCodeLib/RtPlatformStatusCode/RtPlatformStatusCode.msa</Filename>
|
|
||||||
<Filename>Library/EdkScsiLib/EdkScsiLib.msa</Filename>
|
<Filename>Library/EdkScsiLib/EdkScsiLib.msa</Filename>
|
||||||
<Filename>Library/EdkUefiDebugLibConOut/EdkUefiDebugLibConOut.msa</Filename>
|
<Filename>Library/EdkUefiDebugLibConOut/EdkUefiDebugLibConOut.msa</Filename>
|
||||||
<Filename>Library/EdkUefiDebugLibStdErr/EdkUefiDebugLibStdErr.msa</Filename>
|
<Filename>Library/EdkUefiDebugLibStdErr/EdkUefiDebugLibStdErr.msa</Filename>
|
||||||
<Filename>Library/EdkUsbLib/EdkUsbLib.msa</Filename>
|
<Filename>Library/EdkUsbLib/EdkUsbLib.msa</Filename>
|
||||||
|
<Filename>Library/EdkSerialPortLibNull/EdkSerialPortLibNull.msa</Filename>
|
||||||
|
<Filename>Library/EdkOemHookStatusCodeLibNull/EdkOemHookStatusCodeLibNull.msa</Filename>
|
||||||
<Filename>Universal/Console/ConSplitter/Dxe/ConSplitter.msa</Filename>
|
<Filename>Universal/Console/ConSplitter/Dxe/ConSplitter.msa</Filename>
|
||||||
<Filename>Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.msa</Filename>
|
<Filename>Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.msa</Filename>
|
||||||
<Filename>Universal/Console/Terminal/Dxe/Terminal.msa</Filename>
|
<Filename>Universal/Console/Terminal/Dxe/Terminal.msa</Filename>
|
||||||
@ -460,7 +434,6 @@
|
|||||||
<Filename>Universal/PCD/Dxe/Pcd.msa</Filename>
|
<Filename>Universal/PCD/Dxe/Pcd.msa</Filename>
|
||||||
<Filename>Universal/Runtime/RuntimeDxe/Runtime.msa</Filename>
|
<Filename>Universal/Runtime/RuntimeDxe/Runtime.msa</Filename>
|
||||||
<Filename>Universal/Security/SecurityStub/Dxe/SecurityStub.msa</Filename>
|
<Filename>Universal/Security/SecurityStub/Dxe/SecurityStub.msa</Filename>
|
||||||
<Filename>Universal/StatusCode/RuntimeDxe/StatusCode.msa</Filename>
|
|
||||||
<Filename>Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.msa</Filename>
|
<Filename>Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.msa</Filename>
|
||||||
<Filename>Universal/UserInterface/DriverSample/DriverSample.msa</Filename>
|
<Filename>Universal/UserInterface/DriverSample/DriverSample.msa</Filename>
|
||||||
<Filename>Universal/UserInterface/SetupBrowser/Dxe/SetupBrowser.msa</Filename>
|
<Filename>Universal/UserInterface/SetupBrowser/Dxe/SetupBrowser.msa</Filename>
|
||||||
@ -469,6 +442,8 @@
|
|||||||
<Filename>Universal/Variable/RuntimeDxe/Variable.msa</Filename>
|
<Filename>Universal/Variable/RuntimeDxe/Variable.msa</Filename>
|
||||||
<Filename>Universal/Capsule/RuntimeDxe/CapsuleRuntime.msa</Filename>
|
<Filename>Universal/Capsule/RuntimeDxe/CapsuleRuntime.msa</Filename>
|
||||||
<Filename>Universal/WatchdogTimer/Dxe/WatchDogTimer.msa</Filename>
|
<Filename>Universal/WatchdogTimer/Dxe/WatchDogTimer.msa</Filename>
|
||||||
|
<Filename>Universal/StatusCode/Pei/PeiStatusCode.msa</Filename>
|
||||||
|
<Filename>Universal/StatusCode/Dxe/DxeStatusCode.msa</Filename>
|
||||||
</MsaFiles>
|
</MsaFiles>
|
||||||
<PackageHeaders>
|
<PackageHeaders>
|
||||||
<IncludePkgHeader ModuleType="SEC">Include/EdkPeim.h</IncludePkgHeader>
|
<IncludePkgHeader ModuleType="SEC">Include/EdkPeim.h</IncludePkgHeader>
|
||||||
@ -663,6 +638,11 @@
|
|||||||
<GuidValue>EC4DF5AF-4395-4CC9-94DE-77506D12C7B8</GuidValue>
|
<GuidValue>EC4DF5AF-4395-4CC9-94DE-77506D12C7B8</GuidValue>
|
||||||
<HelpText/>
|
<HelpText/>
|
||||||
</Entry>
|
</Entry>
|
||||||
|
<Entry Name="MemoryStatusCodeRecord">
|
||||||
|
<C_Name>gMemoryStatusCodeRecordGuid</C_Name>
|
||||||
|
<GuidValue>060CC026-4C0D-4DDA-8F41-595FEF00A502</GuidValue>
|
||||||
|
<HelpText/>
|
||||||
|
</Entry>
|
||||||
</GuidDeclarations>
|
</GuidDeclarations>
|
||||||
<ProtocolDeclarations>
|
<ProtocolDeclarations>
|
||||||
<Entry Name="Capsule">
|
<Entry Name="Capsule">
|
||||||
@ -886,5 +866,122 @@
|
|||||||
<HelpText>This feature flag can be used to enable or disable the Pcd DXE database
|
<HelpText>This feature flag can be used to enable or disable the Pcd DXE database
|
||||||
traverse capability. Disable it can reduce the size of final image generated.</HelpText>
|
traverse capability. Disable it can reduce the size of final image generated.</HelpText>
|
||||||
</PcdEntry>
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseSerial</C_Name>
|
||||||
|
<Token>0x00010022</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>This feature flag can be used to enable or disable report staus code to serial I/O. Disable it can reduce the size of final image generated.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseMemory</C_Name>
|
||||||
|
<Token>0x00010023</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>This feature flag can be used to enable or disable save statuc code in GUID'ed HOB. Disable it can reduce the size of final image generated.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<Token>0x00010024</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>This feature flag can be used to enable or disable send status code to OEM device. Disable it can reduce the size of final image generated.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeMemorySize</C_Name>
|
||||||
|
<Token>0x00010025</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT16</DatumType>
|
||||||
|
<ValidUsage>DYNAMIC</ValidUsage>
|
||||||
|
<DefaultValue>4</DefaultValue>
|
||||||
|
<HelpText>kbytes size of GUID'ed HOB, if the GUID'ed HOB is full, create new GUID'ed HOB with this size.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseEfiSerial</C_Name>
|
||||||
|
<Token>0x00010026</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to switch on/off report status code through serial DXE.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseHardSerial</C_Name>
|
||||||
|
<Token>0x00010027</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to switch on/off report status code to serial device.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>
|
||||||
|
<Token>0x00010028</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to switch on/off save status code in runtime memory.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeUseDataHub</C_Name>
|
||||||
|
<Token>0x00010029</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to switch on/off log status code in data hub.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeReplayInSerial</C_Name>
|
||||||
|
<Token>0x0001002a</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to enable/dsable replay status code which saved in GUID'ed HOB in PEI phase to EFI serial.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>
|
||||||
|
<Token>0x0001002b</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to enable/dsable replay status code which saved in GUID'ed HOB in PEI phase to EFI serial.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeReplayInDataHub</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to enable/dsable replay status code which saved in GUID'ed HOB in PEI phase to EFI serial.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeReplayInOEM</C_Name>
|
||||||
|
<Token>0x0001002c</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>BOOLEAN</DatumType>
|
||||||
|
<ValidUsage>FEATURE_FLAG</ValidUsage>
|
||||||
|
<DefaultValue>FALSE</DefaultValue>
|
||||||
|
<HelpText>Use to enable/dsable replay status code which saved in GUID'ed HOB in PEI phase to EFI serial.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry>
|
||||||
|
<C_Name>PcdStatusCodeRuntimeMemorySize</C_Name>
|
||||||
|
<Token>0x0001002d</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT16</DatumType>
|
||||||
|
<ValidUsage>DYNAMIC</ValidUsage>
|
||||||
|
<DefaultValue>4</DefaultValue>
|
||||||
|
<HelpText>kbytes size of runtime memory.</HelpText>
|
||||||
|
</PcdEntry>
|
||||||
</PcdDeclarations>
|
</PcdDeclarations>
|
||||||
</PackageSurfaceArea>
|
</PackageSurfaceArea>
|
||||||
|
@ -56,6 +56,7 @@ Abstract:
|
|||||||
#include <Guid/PeiPeCoffLoader.h>
|
#include <Guid/PeiPeCoffLoader.h>
|
||||||
#include <Guid/CapsuleVendor.h>
|
#include <Guid/CapsuleVendor.h>
|
||||||
#include <Guid/CompatibleMemoryTested.h>
|
#include <Guid/CompatibleMemoryTested.h>
|
||||||
|
#include <Guid/MemoryStatusCodeRecord.h>
|
||||||
|
|
||||||
#include <Ppi/StatusCodeMemory.h>
|
#include <Ppi/StatusCodeMemory.h>
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ Abstract:
|
|||||||
#include <Guid/MemoryTypeInformation.h>
|
#include <Guid/MemoryTypeInformation.h>
|
||||||
#include <Guid/CapsuleVendor.h>
|
#include <Guid/CapsuleVendor.h>
|
||||||
#include <Guid/BootState.h>
|
#include <Guid/BootState.h>
|
||||||
|
#include <Guid/MemoryStatusCodeRecord.h>
|
||||||
|
|
||||||
#include <Ppi/PeiInMemory.h>
|
#include <Ppi/PeiInMemory.h>
|
||||||
#include <Ppi/FlashMap.h>
|
#include <Ppi/FlashMap.h>
|
||||||
|
54
EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h
Normal file
54
EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*++
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name:
|
||||||
|
|
||||||
|
MemoryStatusCodeRecord.h
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
|
||||||
|
GUID used to identify status code records HOB that originate from the PEI status code
|
||||||
|
|
||||||
|
--*/
|
||||||
|
|
||||||
|
#ifndef _MEMORY_STATUS_CODE_RECORD_H__
|
||||||
|
#define _MEMORY_STATUS_CODE_RECORD_H__
|
||||||
|
|
||||||
|
#define MEMORY_STATUS_CODE_RECORD_GUID \
|
||||||
|
{ \
|
||||||
|
0x60cc026, 0x4c0d, 0x4dda, {0x8f, 0x41, 0x59, 0x5f, 0xef, 0x0, 0xa5, 0x2} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Memory status code records packet structure :
|
||||||
|
+---------------+----------+----------+-----+----------+-----+----------+
|
||||||
|
| Packet Header | Record 1 | Record 2 | ... + Record n | ... | Record m |
|
||||||
|
+---------------+----------+----------+-----+----------+-----+----------+
|
||||||
|
^ ^ ^
|
||||||
|
+--------- RecordIndex -----------+ |
|
||||||
|
+---------------- MaxRecordsNumber----------------------+
|
||||||
|
**/
|
||||||
|
typedef struct {
|
||||||
|
UINT16 PacketIndex; // Index of the Packet.
|
||||||
|
UINT16 RecordIndex; // Index of record in the packet.
|
||||||
|
UINT32 MaxRecordsNumber; // Max number of records in the packet.
|
||||||
|
} MEMORY_STATUSCODE_PACKET_HEADER;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
EFI_STATUS_CODE_TYPE CodeType;
|
||||||
|
EFI_STATUS_CODE_VALUE Value;
|
||||||
|
UINT32 Instance;
|
||||||
|
} MEMORY_STATUSCODE_RECORD;
|
||||||
|
|
||||||
|
|
||||||
|
extern EFI_GUID gMemoryStatusCodeRecordGuid;
|
||||||
|
|
||||||
|
#endif
|
@ -23,6 +23,7 @@ Abstract:
|
|||||||
//#include <Ipf/SalApi.h>
|
//#include <Ipf/SalApi.h>
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
RegisterEsalFunction (
|
RegisterEsalFunction (
|
||||||
IN UINT64 FunctionId,
|
IN UINT64 FunctionId,
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
@ -49,6 +50,7 @@ Returns:
|
|||||||
;
|
;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
RegisterEsalClass (
|
RegisterEsalClass (
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
IN VOID *ModuleGlobal,
|
IN VOID *ModuleGlobal,
|
||||||
@ -74,6 +76,7 @@ Returns:
|
|||||||
;
|
;
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
EfiCallEsalService (
|
EfiCallEsalService (
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
IN UINT64 FunctionId,
|
IN UINT64 FunctionId,
|
||||||
@ -112,6 +115,7 @@ Returns:
|
|||||||
;
|
;
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
SetEsalVirtualEntryPoint (
|
SetEsalVirtualEntryPoint (
|
||||||
IN UINT64 EntryPoint,
|
IN UINT64 EntryPoint,
|
||||||
IN UINT64 Gp
|
IN UINT64 Gp
|
||||||
@ -119,6 +123,7 @@ SetEsalVirtualEntryPoint (
|
|||||||
;
|
;
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
SetEsalPhysicalEntryPoint (
|
SetEsalPhysicalEntryPoint (
|
||||||
IN UINT64 EntryPoint,
|
IN UINT64 EntryPoint,
|
||||||
IN UINT64 Gp
|
IN UINT64 Gp
|
||||||
@ -126,12 +131,14 @@ SetEsalPhysicalEntryPoint (
|
|||||||
;
|
;
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
GetEsalEntryPoint (
|
GetEsalEntryPoint (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
SalFlushCache (
|
SalFlushCache (
|
||||||
IN EFI_PHYSICAL_ADDRESS Start,
|
IN EFI_PHYSICAL_ADDRESS Start,
|
||||||
IN UINT64 Length
|
IN UINT64 Length
|
||||||
|
70
EdkModulePkg/Include/Library/OemHookStatusCodeLib.h
Normal file
70
EdkModulePkg/Include/Library/OemHookStatusCodeLib.h
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
OEM hook status code library functions with no library constructor/destructor
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: OemHookStatusCodeLib.h
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __OEM_HOOK_STATUSCODE_LIB__
|
||||||
|
#define __OEM_HOOK_STATUSCODE_LIB__
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Initialize OEM status code device .
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
OemHookStatusCodeInitialize (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to OEM device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId, OPTIONAL
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif
|
74
EdkModulePkg/Include/Library/SerialPortLib.h
Normal file
74
EdkModulePkg/Include/Library/SerialPortLib.h
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
Serial I/O Port library functions with no library constructor/destructor
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: SerialPortLib.h
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __SERIAL_PORT_LIB__
|
||||||
|
#define __SERIAL_PORT_LIB__
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Programmed hardware of Serial port.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
SerialPortInitialize (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Write data to serial device.
|
||||||
|
|
||||||
|
If the buffer is NULL, then ASSERT();
|
||||||
|
if NumberOfBytes is zero, then ASSERT().
|
||||||
|
|
||||||
|
@param Buffer Point of data buffer which need to be writed.
|
||||||
|
@param NumberOfBytes Number of output bytes which are cached in Buffer.
|
||||||
|
|
||||||
|
@retval 0 Write data failed.
|
||||||
|
@retval !0 Actual number of bytes writed to serial device.
|
||||||
|
|
||||||
|
**/
|
||||||
|
UINTN
|
||||||
|
EFIAPI
|
||||||
|
SerialPortWrite (
|
||||||
|
IN UINT8 *Buffer,
|
||||||
|
IN UINTN NumberOfBytes
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read data from serial device and save the datas in buffer.
|
||||||
|
|
||||||
|
If the buffer is NULL, then ASSERT();
|
||||||
|
if NumberOfBytes is zero, then ASSERT().
|
||||||
|
|
||||||
|
@param Buffer Point of data buffer which need to be writed.
|
||||||
|
@param NumberOfBytes Number of output bytes which are cached in Buffer.
|
||||||
|
|
||||||
|
@retval 0 Read data failed.
|
||||||
|
@retval !0 Aactual number of bytes read from serial device.
|
||||||
|
|
||||||
|
**/
|
||||||
|
UINTN
|
||||||
|
EFIAPI
|
||||||
|
SerialPortRead (
|
||||||
|
OUT UINT8 *Buffer,
|
||||||
|
IN UINTN NumberOfBytes
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -38,6 +38,7 @@ DxeSalLibConstruct (
|
|||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
RegisterEsalFunction (
|
RegisterEsalFunction (
|
||||||
IN UINT64 FunctionId,
|
IN UINT64 FunctionId,
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
@ -72,6 +73,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
RegisterEsalClass (
|
RegisterEsalClass (
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
IN VOID *ModuleGlobal,
|
IN VOID *ModuleGlobal,
|
||||||
@ -129,6 +131,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
EfiCallEsalService (
|
EfiCallEsalService (
|
||||||
IN EFI_GUID *ClassGuid,
|
IN EFI_GUID *ClassGuid,
|
||||||
IN UINT64 FunctionId,
|
IN UINT64 FunctionId,
|
||||||
|
@ -11,12 +11,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
-->
|
-->
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
||||||
<MsaHeader>
|
<MsaHeader>
|
||||||
<ModuleName>EdkRtMemoryStatusCodeLib</ModuleName>
|
<ModuleName>EdkOemHookStatusCodeLibNull</ModuleName>
|
||||||
<ModuleType>DXE_DRIVER</ModuleType>
|
<ModuleType>PEIM</ModuleType>
|
||||||
<GuidValue>1517564b-ab66-42b7-8903-731a95f314f9</GuidValue>
|
<GuidValue>54D2878F-25CD-4a2b-8420-EBD18E609C76</GuidValue>
|
||||||
<Version>1.0</Version>
|
<Version>1.0</Version>
|
||||||
<Abstract>Runtime memory status code library</Abstract>
|
<Abstract>Memory Status Code Library for UEFI drivers</Abstract>
|
||||||
<Description>Save status code in runtime memory heap.</Description>
|
<Description>Lib to provide memory journal status code reporting Routines</Description>
|
||||||
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
||||||
<License>All rights reserved. This program and the accompanying materials
|
<License>All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -29,44 +29,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
<ModuleDefinitions>
|
<ModuleDefinitions>
|
||||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||||
<BinaryModule>false</BinaryModule>
|
<BinaryModule>false</BinaryModule>
|
||||||
<OutputFileBasename>EdkRtMemoryStatusCodeLib</OutputFileBasename>
|
<OutputFileBasename>EdkOemHookStatusCodeLibNull</OutputFileBasename>
|
||||||
</ModuleDefinitions>
|
</ModuleDefinitions>
|
||||||
<LibraryClassDefinitions>
|
<LibraryClassDefinitions>
|
||||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||||
<Keyword>EdkRtMemoryStatusCodeLib</Keyword>
|
<Keyword>OemHookStatusCodeLib</Keyword>
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>DebugLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>BaseLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiRuntimeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>ReportStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>PrintLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>HobLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
</LibraryClassDefinitions>
|
</LibraryClassDefinitions>
|
||||||
<SourceFiles>
|
<SourceFiles>
|
||||||
<Filename>RtMemoryStatusCode.c</Filename>
|
<Filename>OemHookStatusCodeLibNull.c</Filename>
|
||||||
</SourceFiles>
|
</SourceFiles>
|
||||||
<PackageDependencies>
|
<PackageDependencies>
|
||||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
</PackageDependencies>
|
</PackageDependencies>
|
||||||
|
<PPIs>
|
||||||
|
</PPIs>
|
||||||
<Externs>
|
<Externs>
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
@ -0,0 +1,71 @@
|
|||||||
|
/** @file
|
||||||
|
OEM hook status code library functions with no library constructor/destructor
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: OemHookStatusCodeLibNull.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Initialize OEM status code device .
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
OemHookStatusCodeInitialize (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to OEM device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId, OPTIONAL
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
@ -1,397 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
BsDataHubStatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
This implements a status code listener that logs status codes into the data
|
|
||||||
hub. This is only active during non-runtime DXE.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#include "BsDataHubStatusCode.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// Globals only work at BootService Time. NOT at Runtime!
|
|
||||||
//
|
|
||||||
static EFI_DATA_HUB_PROTOCOL *mDataHub;
|
|
||||||
static LIST_ENTRY mRecordBuffer;
|
|
||||||
static INTN mRecordNum;
|
|
||||||
static EFI_EVENT mLogDataHubEvent;
|
|
||||||
static EFI_LOCK mStatusCodeReportLock;
|
|
||||||
static BOOLEAN mEventHandlerActive = FALSE;
|
|
||||||
|
|
||||||
STATUS_CODE_RECORD_LIST *
|
|
||||||
GetRecordBuffer (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Returned buffer of length BYTES_PER_RECORD
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Entry in mRecordBuffer or NULL if non available
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
STATUS_CODE_RECORD_LIST *Buffer;
|
|
||||||
|
|
||||||
gBS->AllocatePool (EfiBootServicesData, sizeof (STATUS_CODE_RECORD_LIST), (VOID **) &Buffer);
|
|
||||||
if (Buffer == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ZeroMem (Buffer, sizeof (STATUS_CODE_RECORD_LIST));
|
|
||||||
Buffer->Signature = BS_DATA_HUB_STATUS_CODE_SIGNATURE;
|
|
||||||
|
|
||||||
return Buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
DATA_HUB_STATUS_CODE_DATA_RECORD *
|
|
||||||
AquireEmptyRecordBuffer (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Allocate a mRecordBuffer entry in the form of a pointer.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Pointer to new buffer. NULL if none exist.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
STATUS_CODE_RECORD_LIST *DataBuffer;
|
|
||||||
|
|
||||||
if (mRecordNum < MAX_RECORD_NUM) {
|
|
||||||
DataBuffer = GetRecordBuffer ();
|
|
||||||
if (DataBuffer != NULL) {
|
|
||||||
EfiAcquireLock (&mStatusCodeReportLock);
|
|
||||||
InsertTailList (&mRecordBuffer, &DataBuffer->Link);
|
|
||||||
mRecordNum++;
|
|
||||||
EfiReleaseLock (&mStatusCodeReportLock);
|
|
||||||
return (DATA_HUB_STATUS_CODE_DATA_RECORD *) DataBuffer->RecordBuffer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
ReleaseRecordBuffer (
|
|
||||||
IN STATUS_CODE_RECORD_LIST *RecordBuffer
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Release a mRecordBuffer entry allocated by AquireEmptyRecordBuffer ().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
RecordBuffer - Data to free
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - If DataRecord is valid
|
|
||||||
EFI_UNSUPPORTED - The record list has empty
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
ASSERT (RecordBuffer != NULL);
|
|
||||||
if (mRecordNum <= 0) {
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
EfiAcquireLock (&mStatusCodeReportLock);
|
|
||||||
RemoveEntryList (&RecordBuffer->Link);
|
|
||||||
mRecordNum--;
|
|
||||||
EfiReleaseLock (&mStatusCodeReportLock);
|
|
||||||
gBS->FreePool (RecordBuffer);
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
BsDataHubReportStatusCode (
|
|
||||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID * CallerId,
|
|
||||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Boot service report status code listener. This function logs the status code
|
|
||||||
into the data hub.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Same as ReportStatusCode (See Tiano Runtime Specification)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
DATA_HUB_STATUS_CODE_DATA_RECORD *DataHub;
|
|
||||||
UINT32 ErrorLevel;
|
|
||||||
VA_LIST Marker;
|
|
||||||
CHAR8 *Format;
|
|
||||||
UINTN Index;
|
|
||||||
CHAR16 FormatBuffer[BYTES_PER_RECORD];
|
|
||||||
|
|
||||||
if (EfiAtRuntime ()) {
|
|
||||||
//
|
|
||||||
// For now all we do is post code at runtime
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// If we had an error while in our event handler, then do nothing so
|
|
||||||
// that we don't get in an endless loop.
|
|
||||||
//
|
|
||||||
if (mEventHandlerActive) {
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
DataHub = (DATA_HUB_STATUS_CODE_DATA_RECORD *) AquireEmptyRecordBuffer ();
|
|
||||||
if (DataHub == NULL) {
|
|
||||||
//
|
|
||||||
// There are no empty record buffer in private buffers
|
|
||||||
//
|
|
||||||
return EFI_OUT_OF_RESOURCES;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Construct Data Hub Extended Data
|
|
||||||
//
|
|
||||||
DataHub->CodeType = CodeType;
|
|
||||||
DataHub->Value = Value;
|
|
||||||
DataHub->Instance = Instance;
|
|
||||||
|
|
||||||
if (CallerId != NULL) {
|
|
||||||
CopyMem (&DataHub->CallerId, CallerId, sizeof (EFI_GUID));
|
|
||||||
} else {
|
|
||||||
ZeroMem (&DataHub->CallerId, sizeof (EFI_GUID));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Data == NULL) {
|
|
||||||
ZeroMem (&DataHub->Data, sizeof (EFI_STATUS_CODE_DATA));
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Copy generic Header
|
|
||||||
//
|
|
||||||
CopyMem (&DataHub->Data, Data, sizeof (EFI_STATUS_CODE_DATA));
|
|
||||||
|
|
||||||
if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
|
||||||
//
|
|
||||||
// Convert Ascii Format string to Unicode.
|
|
||||||
//
|
|
||||||
for (Index = 0; Format[Index] != '\0' && Index < (BYTES_PER_RECORD - 1); Index += 1) {
|
|
||||||
FormatBuffer[Index] = (CHAR16) Format[Index];
|
|
||||||
}
|
|
||||||
|
|
||||||
FormatBuffer[Index] = L'\0';
|
|
||||||
|
|
||||||
//
|
|
||||||
// Put processed string into the buffer
|
|
||||||
//
|
|
||||||
Index = UnicodeVSPrint (
|
|
||||||
(CHAR16 *) (DataHub + 1),
|
|
||||||
BYTES_PER_RECORD - (sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD)),
|
|
||||||
FormatBuffer,
|
|
||||||
Marker
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// DATA_HUB_STATUS_CODE_DATA_RECORD followed by VSPrint String Buffer
|
|
||||||
//
|
|
||||||
DataHub->Data.Size = (UINT16) (Index * sizeof (CHAR16));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Default behavior is to copy optional data
|
|
||||||
//
|
|
||||||
if (Data->Size > (BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD))) {
|
|
||||||
DataHub->Data.Size = (UINT16) (BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD));
|
|
||||||
}
|
|
||||||
|
|
||||||
CopyMem (DataHub + 1, Data + 1, DataHub->Data.Size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gBS->SignalEvent (mLogDataHubEvent);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
LogDataHubEventHandler (
|
|
||||||
IN EFI_EVENT Event,
|
|
||||||
IN VOID *Context
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The Event handler which will be notified to log data in Data Hub.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Event - Instance of the EFI_EVENT to signal whenever data is
|
|
||||||
available to be logged in the system.
|
|
||||||
Context - Context of the event.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
DATA_HUB_STATUS_CODE_DATA_RECORD *DataRecord;
|
|
||||||
UINTN Size;
|
|
||||||
UINT64 DataRecordClass;
|
|
||||||
LIST_ENTRY *Link;
|
|
||||||
STATUS_CODE_RECORD_LIST *BufferEntry;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Set our global flag so we don't recurse if we get an error here.
|
|
||||||
//
|
|
||||||
mEventHandlerActive = TRUE;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Log DataRecord in Data Hub.
|
|
||||||
// If there are multiple DataRecords, Log all of them.
|
|
||||||
//
|
|
||||||
for (Link = mRecordBuffer.ForwardLink; Link != &mRecordBuffer;) {
|
|
||||||
BufferEntry = CR (Link, STATUS_CODE_RECORD_LIST, Link, BS_DATA_HUB_STATUS_CODE_SIGNATURE);
|
|
||||||
DataRecord = (DATA_HUB_STATUS_CODE_DATA_RECORD *) (BufferEntry->RecordBuffer);
|
|
||||||
Link = Link->ForwardLink;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Add in the size of the header we added.
|
|
||||||
//
|
|
||||||
Size = sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD) + DataRecord->Data.Size;
|
|
||||||
|
|
||||||
if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
|
||||||
DataRecordClass = EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
|
||||||
} else if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
|
||||||
DataRecordClass = EFI_DATA_RECORD_CLASS_ERROR;
|
|
||||||
} else if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
|
||||||
DataRecordClass = EFI_DATA_RECORD_CLASS_DEBUG;
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Should never get here.
|
|
||||||
//
|
|
||||||
DataRecordClass = EFI_DATA_RECORD_CLASS_DEBUG |
|
|
||||||
EFI_DATA_RECORD_CLASS_ERROR |
|
|
||||||
EFI_DATA_RECORD_CLASS_DATA |
|
|
||||||
EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((DataRecord->Instance & EFI_D_ERROR) != 0) &&
|
|
||||||
(((DataRecord->Instance & EFI_D_POOL) != 0) || ((DataRecord->Instance & EFI_D_PAGE) != 0))
|
|
||||||
) {
|
|
||||||
//
|
|
||||||
// If memory error, do not call LogData ().
|
|
||||||
//
|
|
||||||
DebugPrint ((UINTN)-1, "Memory Error\n");
|
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Log DataRecord in Data Hub
|
|
||||||
//
|
|
||||||
Status = mDataHub->LogData (
|
|
||||||
mDataHub,
|
|
||||||
&gEfiStatusCodeGuid,
|
|
||||||
&gEfiStatusCodeRuntimeProtocolGuid,
|
|
||||||
DataRecordClass,
|
|
||||||
DataRecord,
|
|
||||||
(UINT32) Size
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReleaseRecordBuffer (BufferEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
mEventHandlerActive = FALSE;
|
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
BsDataHubStatusCodeInitialize (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install a data hub listener.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - Logging Hub protocol installed
|
|
||||||
Other - No protocol installed, unload driver.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID **) &mDataHub);
|
|
||||||
//
|
|
||||||
// Should never fail due to dependency grammer
|
|
||||||
//
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize FIFO
|
|
||||||
//
|
|
||||||
InitializeListHead (&mRecordBuffer);
|
|
||||||
mRecordNum = 0;
|
|
||||||
|
|
||||||
EfiInitializeLock (&mStatusCodeReportLock, EFI_TPL_HIGH_LEVEL);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Create a Notify Event to log data in Data Hub
|
|
||||||
//
|
|
||||||
Status = gBS->CreateEvent (
|
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
|
||||||
EFI_TPL_CALLBACK,
|
|
||||||
LogDataHubEventHandler,
|
|
||||||
NULL,
|
|
||||||
&mLogDataHubEvent
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
@ -1,130 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
BsDataHubStatusCode.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Header for the status code data hub logging component
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#ifndef _EFI_BS_DATA_HUB_STATUS_CODE_H_
|
|
||||||
#define _EFI_BS_DATA_HUB_STATUS_CODE_H_
|
|
||||||
|
|
||||||
//
|
|
||||||
// Private data declarations
|
|
||||||
//
|
|
||||||
#define MAX_RECORD_NUM 1000
|
|
||||||
#define BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
|
|
||||||
#define EMPTY_RECORD_TAG 0xFF
|
|
||||||
|
|
||||||
#define BS_DATA_HUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINTN Signature;
|
|
||||||
LIST_ENTRY Link;
|
|
||||||
UINT8 RecordBuffer[BYTES_PER_RECORD];
|
|
||||||
} STATUS_CODE_RECORD_LIST;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function prototypes
|
|
||||||
//
|
|
||||||
STATUS_CODE_RECORD_LIST *
|
|
||||||
GetRecordBuffer (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Returned buffer of length BYTES_PER_RECORD
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Entry in mRecordBuffer or NULL if non available
|
|
||||||
|
|
||||||
--*/
|
|
||||||
DATA_HUB_STATUS_CODE_DATA_RECORD *
|
|
||||||
AquireEmptyRecordBuffer (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Allocate a mRecordBuffer entry in the form of a pointer.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Pointer to new buffer. NULL if none exist.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
EFI_STATUS
|
|
||||||
ReleaseRecordBuffer (
|
|
||||||
IN STATUS_CODE_RECORD_LIST *RecordBuffer
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Release a mRecordBuffer entry allocated by AquireEmptyRecordBuffer ().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
RecordBuffer - Data to free
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - If RecordBuffer is valid
|
|
||||||
EFI_UNSUPPORTED - The record list has empty
|
|
||||||
|
|
||||||
--*/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
LogDataHubEventHandler (
|
|
||||||
IN EFI_EVENT Event,
|
|
||||||
IN VOID *Context
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Event Handler that log in Status code in Data Hub.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(Standard EFI Event Handler - EFI_EVENT_NOTIFY)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
NONE
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#endif
|
|
@ -1,100 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
-->
|
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
|
||||||
<MsaHeader>
|
|
||||||
<ModuleName>EdkBsDataHubStatusCodeLib</ModuleName>
|
|
||||||
<ModuleType>DXE_DRIVER</ModuleType>
|
|
||||||
<GuidValue>041bf780-dc3e-49ab-8d67-4b86075440ea</GuidValue>
|
|
||||||
<Version>1.0</Version>
|
|
||||||
<Abstract>Data hub status code library</Abstract>
|
|
||||||
<Description>Save status code in DATA HUB.</Description>
|
|
||||||
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
|
||||||
<License>All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
|
|
||||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
|
||||||
</MsaHeader>
|
|
||||||
<ModuleDefinitions>
|
|
||||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
|
||||||
<BinaryModule>false</BinaryModule>
|
|
||||||
<OutputFileBasename>EdkBsDataHubStatusCodeLib</OutputFileBasename>
|
|
||||||
</ModuleDefinitions>
|
|
||||||
<LibraryClassDefinitions>
|
|
||||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
|
||||||
<Keyword>EdkBsDataHubStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>DebugLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>BaseLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>BaseMemoryLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiRuntimeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>ReportStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>PrintLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
</LibraryClassDefinitions>
|
|
||||||
<SourceFiles>
|
|
||||||
<Filename>BsDataHubStatusCode.c</Filename>
|
|
||||||
<Filename>BsDataHubStatusCode.h</Filename>
|
|
||||||
</SourceFiles>
|
|
||||||
<PackageDependencies>
|
|
||||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
|
||||||
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
|
||||||
</PackageDependencies>
|
|
||||||
<Protocols>
|
|
||||||
<Protocol Usage="ALWAYS_CONSUMED">
|
|
||||||
<ProtocolCName>gEfiStatusCodeRuntimeProtocolGuid</ProtocolCName>
|
|
||||||
</Protocol>
|
|
||||||
<Protocol Usage="ALWAYS_CONSUMED">
|
|
||||||
<ProtocolCName>gEfiDataHubProtocolGuid</ProtocolCName>
|
|
||||||
</Protocol>
|
|
||||||
</Protocols>
|
|
||||||
<Events>
|
|
||||||
<CreateEvents>
|
|
||||||
<EventTypes EventGuidCName="EFI_EVENT_NOTIFY_SIGNAL" Usage="ALWAYS_CONSUMED">
|
|
||||||
<EventType>EVENT_GROUP_GUID</EventType>
|
|
||||||
</EventTypes>
|
|
||||||
</CreateEvents>
|
|
||||||
</Events>
|
|
||||||
<DataHubs>
|
|
||||||
<DataHubRecord Usage="ALWAYS_CONSUMED">
|
|
||||||
<DataHubCName>gEfiStatusCodeGuid</DataHubCName>
|
|
||||||
</DataHubRecord>
|
|
||||||
</DataHubs>
|
|
||||||
<Guids>
|
|
||||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
|
||||||
<GuidCName>gEfiStatusCodeGuid</GuidCName>
|
|
||||||
</GuidCNames>
|
|
||||||
</Guids>
|
|
||||||
<Externs>
|
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
|
||||||
</Externs>
|
|
||||||
</ModuleSurfaceArea>
|
|
@ -1,188 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
RtMemoryStatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
EFI lib to provide memory journal status code reporting routines.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include <Ppi/StatusCodeMemory.h>
|
|
||||||
|
|
||||||
//
|
|
||||||
// Global variables
|
|
||||||
//
|
|
||||||
PEI_STATUS_CODE_MEMORY_PPI mStatusCodeMemoryPpi = { 0, 0, 0, 0 };
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function implementations
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
RtMemoryReportStatusCode (
|
|
||||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID * CallerId,
|
|
||||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Log a status code to a memory journal. If no memory journal exists,
|
|
||||||
we will just return.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Same as ReportStatusCode AP
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS This function always returns success
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS_CODE_ENTRY *CurrentEntry;
|
|
||||||
UINT32 MaxEntry;
|
|
||||||
|
|
||||||
//
|
|
||||||
// We don't care to log debug codes.
|
|
||||||
//
|
|
||||||
if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Update the latest entry in the journal.
|
|
||||||
//
|
|
||||||
MaxEntry = mStatusCodeMemoryPpi.Length / sizeof (EFI_STATUS_CODE_ENTRY);
|
|
||||||
if (!MaxEntry) {
|
|
||||||
//
|
|
||||||
// If we don't have any entries, then we can return.
|
|
||||||
// This effectively means that no memory buffer was passed forward from PEI.
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentEntry = (EFI_STATUS_CODE_ENTRY *) (UINTN) (mStatusCodeMemoryPpi.Address + (mStatusCodeMemoryPpi.LastEntry * sizeof (EFI_STATUS_CODE_ENTRY)));
|
|
||||||
|
|
||||||
mStatusCodeMemoryPpi.LastEntry = (mStatusCodeMemoryPpi.LastEntry + 1) % MaxEntry;
|
|
||||||
if (mStatusCodeMemoryPpi.LastEntry == mStatusCodeMemoryPpi.FirstEntry) {
|
|
||||||
mStatusCodeMemoryPpi.FirstEntry = (mStatusCodeMemoryPpi.FirstEntry + 1) % MaxEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentEntry->Type = CodeType;
|
|
||||||
CurrentEntry->Value = Value;
|
|
||||||
CurrentEntry->Instance = Instance;
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
RtMemoryStatusCodeInitialize (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Initialization routine.
|
|
||||||
Allocates heap space for storing Status Codes.
|
|
||||||
Installs a PPI to point to that heap space.
|
|
||||||
Installs a callback to switch to memory.
|
|
||||||
Installs a callback to
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
|
||||||
PEI_STATUS_CODE_MEMORY_PPI **StatusCodeMemoryPpi;
|
|
||||||
|
|
||||||
GuidHob = GetFirstGuidHob (&gPeiStatusCodeMemoryPpiGuid);
|
|
||||||
if (GuidHob == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusCodeMemoryPpi = GET_GUID_HOB_DATA (GuidHob);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Copy data to our structure since the HOB will go away at runtime
|
|
||||||
//
|
|
||||||
// BUGBUG: Virtualize for RT
|
|
||||||
//
|
|
||||||
mStatusCodeMemoryPpi.FirstEntry = (*StatusCodeMemoryPpi)->FirstEntry;
|
|
||||||
mStatusCodeMemoryPpi.LastEntry = (*StatusCodeMemoryPpi)->LastEntry;
|
|
||||||
mStatusCodeMemoryPpi.Address = (*StatusCodeMemoryPpi)->Address;
|
|
||||||
mStatusCodeMemoryPpi.Length = (*StatusCodeMemoryPpi)->Length;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
PlaybackStatusCodes (
|
|
||||||
IN EFI_REPORT_STATUS_CODE ReportStatusCodeFunc
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Call the input ReportStatusCode function with every status code recorded in
|
|
||||||
the journal.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
ReportStatusCode ReportStatusCode function to call.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
UINTN MaxEntry;
|
|
||||||
EFI_STATUS_CODE_ENTRY *CurrentEntry;
|
|
||||||
UINTN Counter;
|
|
||||||
|
|
||||||
if (ReportStatusCodeFunc == RtMemoryReportStatusCode) {
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Playback prior status codes to current listeners
|
|
||||||
//
|
|
||||||
MaxEntry = mStatusCodeMemoryPpi.Length / sizeof (EFI_STATUS_CODE_ENTRY);
|
|
||||||
for (Counter = mStatusCodeMemoryPpi.FirstEntry; Counter != mStatusCodeMemoryPpi.LastEntry; Counter++) {
|
|
||||||
//
|
|
||||||
// Check if we have to roll back to beginning of queue buffer
|
|
||||||
//
|
|
||||||
if (Counter == MaxEntry) {
|
|
||||||
Counter = 0;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Play current entry
|
|
||||||
//
|
|
||||||
CurrentEntry = (EFI_STATUS_CODE_ENTRY *) (UINTN) (mStatusCodeMemoryPpi.Address + (Counter * sizeof (EFI_STATUS_CODE_ENTRY)));
|
|
||||||
ReportStatusCodeFunc (
|
|
||||||
CurrentEntry->Type,
|
|
||||||
CurrentEntry->Value,
|
|
||||||
CurrentEntry->Instance,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,130 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
RtPlatformStatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Contains NT32 specific implementations required to use status codes.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// Globals only work at BootService Time. NOT at Runtime!
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
typedef
|
|
||||||
EFI_STATUS
|
|
||||||
(EFIAPI *REPORT_STATUS_CODE_FUNCTION) (
|
|
||||||
IN EFI_STATUS_CODE_TYPE Type,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID *CallerId OPTIONAL,
|
|
||||||
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
|
||||||
);
|
|
||||||
|
|
||||||
REPORT_STATUS_CODE_FUNCTION mPeiReportStatusCode;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function implementations
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
RtPlatformReportStatusCode (
|
|
||||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID * CallerId,
|
|
||||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Call all status code listeners in the MonoStatusCode.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Same as ReportStatusCode service
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS Always returns success.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
RtMemoryReportStatusCode (CodeType, Value, Instance, CallerId, Data);
|
|
||||||
if (EfiAtRuntime ()) {
|
|
||||||
//
|
|
||||||
// For now all we do is post code at runtime
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
BsDataHubReportStatusCode (CodeType, Value, Instance, CallerId, Data);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Call back into PEI to get status codes. This is because SecMain contains
|
|
||||||
// status code that reports to Win32.
|
|
||||||
//
|
|
||||||
if (mPeiReportStatusCode != NULL) {
|
|
||||||
return mPeiReportStatusCode (CodeType, Value, Instance, CallerId, Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
RtPlatformStatusCodeInitialize (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Initialize the status code listeners.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
|
||||||
void *Pointer;
|
|
||||||
|
|
||||||
RtMemoryStatusCodeInitialize ();
|
|
||||||
BsDataHubStatusCodeInitialize ();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Play any prior status codes to the data hub.
|
|
||||||
//
|
|
||||||
PlaybackStatusCodes (BsDataHubReportStatusCode);
|
|
||||||
|
|
||||||
//
|
|
||||||
// If PEI has a ReportStatusCode callback find it and use it before StdErr
|
|
||||||
// is connected.
|
|
||||||
//
|
|
||||||
mPeiReportStatusCode = NULL;
|
|
||||||
|
|
||||||
GuidHob = GetFirstGuidHob (&gEfiStatusCodeRuntimeProtocolGuid);
|
|
||||||
if (NULL == GuidHob) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Pointer = GET_GUID_HOB_DATA (GuidHob);
|
|
||||||
mPeiReportStatusCode = (REPORT_STATUS_CODE_FUNCTION) (*(UINTN *) Pointer);
|
|
||||||
}
|
|
@ -11,12 +11,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
-->
|
-->
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
||||||
<MsaHeader>
|
<MsaHeader>
|
||||||
<ModuleName>EdkRtPlatformStatusCodeLib</ModuleName>
|
<ModuleName>EdkSerialPortLibNull</ModuleName>
|
||||||
<ModuleType>DXE_DRIVER</ModuleType>
|
<ModuleType>PEIM</ModuleType>
|
||||||
<GuidValue>68b157b5-9534-43ff-9cd3-6705e4e1d56c</GuidValue>
|
<GuidValue>E4541241-8897-411a-91F8-7D7E45837146</GuidValue>
|
||||||
<Version>1.0</Version>
|
<Version>1.0</Version>
|
||||||
<Abstract>Runtime platform status code library</Abstract>
|
<Abstract>Memory Status Code Library for UEFI drivers</Abstract>
|
||||||
<Description>Platform status code library</Description>
|
<Description>Lib to provide memory journal status code reporting Routines</Description>
|
||||||
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
||||||
<License>All rights reserved. This program and the accompanying materials
|
<License>All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -29,50 +29,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
<ModuleDefinitions>
|
<ModuleDefinitions>
|
||||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||||
<BinaryModule>false</BinaryModule>
|
<BinaryModule>false</BinaryModule>
|
||||||
<OutputFileBasename>EdkRtPlatformStatusCodeLib</OutputFileBasename>
|
<OutputFileBasename>EdkSerialPortLibNull</OutputFileBasename>
|
||||||
</ModuleDefinitions>
|
</ModuleDefinitions>
|
||||||
<LibraryClassDefinitions>
|
<LibraryClassDefinitions>
|
||||||
<LibraryClass Usage="ALWAYS_PRODUCED">
|
<LibraryClass Usage="ALWAYS_PRODUCED">
|
||||||
<Keyword>EdkRtPlatformStatusCodeLib</Keyword>
|
<Keyword>SerialPortLib</Keyword>
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>DebugLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>BaseLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiRuntimeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>ReportStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>PrintLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>HobLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>EdkBsDataHubStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>EdkRtMemoryStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
|
||||||
</LibraryClass>
|
</LibraryClass>
|
||||||
</LibraryClassDefinitions>
|
</LibraryClassDefinitions>
|
||||||
<SourceFiles>
|
<SourceFiles>
|
||||||
<Filename>RtPlatformStatusCode.c</Filename>
|
<Filename>SerialPortLibNull.c</Filename>
|
||||||
</SourceFiles>
|
</SourceFiles>
|
||||||
<PackageDependencies>
|
<PackageDependencies>
|
||||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
</PackageDependencies>
|
</PackageDependencies>
|
||||||
|
<PPIs>
|
||||||
|
</PPIs>
|
||||||
<Externs>
|
<Externs>
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
@ -0,0 +1,77 @@
|
|||||||
|
/** @file
|
||||||
|
Serial I/O Port library functions with no library constructor/destructor
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: SerialPortLibNull.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Programmed hardware of Serial port.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
SerialPortInitialize (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Write data to serial device.
|
||||||
|
|
||||||
|
If the buffer is NULL, then ASSERT();
|
||||||
|
if NumberOfBytes is zero, then ASSERT().
|
||||||
|
|
||||||
|
@param Buffer Point of data buffer which need to be writed.
|
||||||
|
@param NumberOfBytes Number of output bytes which are cached in Buffer.
|
||||||
|
|
||||||
|
@retval 0 Write data failed.
|
||||||
|
@retval !0 Actual number of bytes writed to serial device.
|
||||||
|
|
||||||
|
**/
|
||||||
|
UINTN
|
||||||
|
EFIAPI
|
||||||
|
SerialPortWrite (
|
||||||
|
IN UINT8 *Buffer,
|
||||||
|
IN UINTN NumberOfBytes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read data from serial device and save the datas in buffer.
|
||||||
|
|
||||||
|
If the buffer is NULL, then ASSERT();
|
||||||
|
if NumberOfBytes is zero, then ASSERT().
|
||||||
|
|
||||||
|
@param Buffer Point of data buffer which need to be writed.
|
||||||
|
@param NumberOfBytes Number of output bytes which are cached in Buffer.
|
||||||
|
|
||||||
|
@retval 0 Read data failed.
|
||||||
|
@retval !0 Aactual number of bytes read from serial device.
|
||||||
|
|
||||||
|
**/
|
||||||
|
UINTN
|
||||||
|
EFIAPI
|
||||||
|
SerialPortRead (
|
||||||
|
OUT UINT8 *Buffer,
|
||||||
|
IN UINTN NumberOfBytes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,222 @@
|
|||||||
|
/** @file
|
||||||
|
Status code driver for IA32/X64/EBC architecture.
|
||||||
|
|
||||||
|
// Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
// This software and associated documentation (if any) is furnished
|
||||||
|
// under a license and may only be used or copied in accordance
|
||||||
|
// with the terms of the license. Except as permitted by such
|
||||||
|
// license, no part of this software or documentation may be
|
||||||
|
// reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
// form or by any means without the express written consent of
|
||||||
|
// Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: DxeStatusCodeCommon.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
#include "DxeStatusCode.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to all supported device.
|
||||||
|
Calls into the workers which dispatches the platform specific
|
||||||
|
listeners.
|
||||||
|
|
||||||
|
@param Type Indicates the type of status code being reported.
|
||||||
|
The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This includes information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance
|
||||||
|
information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
@param Data This optional parameter may be used to pass additional data.
|
||||||
|
Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
|
||||||
|
The contents of this data type may have additional GUID-specific data. The standard GUIDs and
|
||||||
|
their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ReportDispatcher (
|
||||||
|
IN EFI_STATUS_CODE_TYPE Type,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId OPTIONAL,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Declaration of status code protocol.
|
||||||
|
//
|
||||||
|
EFI_STATUS_CODE_PROTOCOL mEfiStatusCodeProtocol = {
|
||||||
|
ReportDispatcher
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Delaration of DXE status code controller
|
||||||
|
//
|
||||||
|
DXE_STATUS_CODE_CONTROLLER gDxeStatusCode = {
|
||||||
|
//
|
||||||
|
// Initialize nest status as non nested.
|
||||||
|
//
|
||||||
|
0,
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Install the ReportStatusCode runtime service.
|
||||||
|
|
||||||
|
@param ImageHandle Image handle of the loaded driver
|
||||||
|
@param SystemTable Pointer to the System Table
|
||||||
|
|
||||||
|
@return The function always returns success.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
DxeStatusCodeDriverEntry (
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_HANDLE Handle = NULL;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Dispatch initialization request to supported devices
|
||||||
|
//
|
||||||
|
InitializationDispatcherWorker ();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Install Status Code Architectural Protocol implementation as defined in Tiano
|
||||||
|
// Architecture Specification.
|
||||||
|
//
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&Handle,
|
||||||
|
&gEfiStatusCodeRuntimeProtocolGuid,
|
||||||
|
&mEfiStatusCodeProtocol,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to all supported device.
|
||||||
|
Calls into the workers which dispatches the platform specific
|
||||||
|
listeners.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported.
|
||||||
|
The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This includes information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance
|
||||||
|
information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
@param Data This optional parameter may be used to pass additional data.
|
||||||
|
Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
|
||||||
|
The contents of this data type may have additional GUID-specific data. The standard GUIDs and
|
||||||
|
their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ReportDispatcher (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId OPTIONAL,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Use atom operation to avoid the reentant of report.
|
||||||
|
// If current status is not zero, then the function is reentrancy.
|
||||||
|
//
|
||||||
|
if (InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {
|
||||||
|
return EFI_DEVICE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) || FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance,
|
||||||
|
CallerId,
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE],
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance,
|
||||||
|
CallerId,
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance,
|
||||||
|
CallerId,
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Restore the nest status of report
|
||||||
|
//
|
||||||
|
InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 1, 0);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Virtual address change notification call back. It converts global pointer
|
||||||
|
to virtual address.
|
||||||
|
|
||||||
|
@param Event Event whose notification function is being invoked.
|
||||||
|
@param Context Pointer to the notification function¡¯s context, which is
|
||||||
|
always zero in current implementation.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
VirtualAddressChangeCallBack (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Convert memory status code table to virtual address;
|
||||||
|
//
|
||||||
|
EfiConvertPointer (
|
||||||
|
0,
|
||||||
|
(VOID **) &gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
310
EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
Normal file
310
EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
/** @file
|
||||||
|
Data Hub status code worker in DXE.
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: DataHubStatusCodeWorker.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
#include "DxeStatusCode.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize FIFO to cache records.
|
||||||
|
//
|
||||||
|
EFI_LOCK mFifoLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
|
||||||
|
LIST_ENTRY mRecordsFifo = INITIALIZE_LIST_HEAD_VARIABLE (mRecordsFifo);
|
||||||
|
UINTN mNumberOfRecords = 0;
|
||||||
|
|
||||||
|
EFI_EVENT mLogDataHubEvent;
|
||||||
|
//
|
||||||
|
// Cache data hub protocol.
|
||||||
|
//
|
||||||
|
EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return buffer of length DATAHUB_STATUSCODE_RECORD
|
||||||
|
|
||||||
|
@retval NULL Can not allocate free memeory for record.
|
||||||
|
@retval !NULL Point to buffer of record.
|
||||||
|
|
||||||
|
**/
|
||||||
|
DATAHUB_STATUSCODE_RECORD *
|
||||||
|
AcquireRecordBuffer (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DATAHUB_STATUSCODE_RECORD *Record;
|
||||||
|
|
||||||
|
Record = (DATAHUB_STATUSCODE_RECORD *) AllocateZeroPool (sizeof (DATAHUB_STATUSCODE_RECORD));
|
||||||
|
if (NULL == Record) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
Record->Signature = DATAHUB_STATUS_CODE_SIGNATURE;
|
||||||
|
|
||||||
|
EfiAcquireLock (&mFifoLock);
|
||||||
|
InsertTailList (&mRecordsFifo, &Record->Node);
|
||||||
|
mNumberOfRecords++;
|
||||||
|
EfiReleaseLock (&mFifoLock);
|
||||||
|
|
||||||
|
return Record;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Release a mRecordBuffer entry allocated by AcquirRecordBuffer ().
|
||||||
|
|
||||||
|
@param Record Point to record buffer which is acquired by AcquirRecordBuffer()
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS If DataRecord is valid.
|
||||||
|
@retval !EFI_SUCCESS The record list has empty.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
FreeRecordBuffer (
|
||||||
|
IN DATAHUB_STATUSCODE_RECORD *Record
|
||||||
|
)
|
||||||
|
/*++
|
||||||
|
|
||||||
|
Routine Description:
|
||||||
|
|
||||||
|
Release a mRecordBuffer entry allocated by AquireEmptyRecordBuffer ().
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
|
||||||
|
RecordBuffer - Data to free
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
EFI_SUCCESS - If DataRecord is valid
|
||||||
|
EFI_UNSUPPORTED - The record list has empty
|
||||||
|
|
||||||
|
--*/
|
||||||
|
{
|
||||||
|
ASSERT (Record != NULL);
|
||||||
|
ASSERT (mNumberOfRecords != 0);
|
||||||
|
|
||||||
|
EfiAcquireLock (&mFifoLock);
|
||||||
|
RemoveEntryList (&Record->Node);
|
||||||
|
mNumberOfRecords--;
|
||||||
|
EfiReleaseLock (&mFifoLock);
|
||||||
|
|
||||||
|
FreePool (Record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into DataHub.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
|
||||||
|
@retval EFI_SUCCESS Success to cache status code and signal log data event.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DATAHUB_STATUSCODE_RECORD *Record;
|
||||||
|
UINT32 ErrorLevel;
|
||||||
|
VA_LIST Marker;
|
||||||
|
CHAR8 *Format;
|
||||||
|
UINTN CharCount;
|
||||||
|
|
||||||
|
//
|
||||||
|
// See whether in runtime phase or not.
|
||||||
|
//
|
||||||
|
if (EfiAtRuntime ()) {
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
Record = (DATAHUB_STATUSCODE_RECORD *) AcquireRecordBuffer ();
|
||||||
|
if (Record == NULL) {
|
||||||
|
//
|
||||||
|
// There are no empty record buffer in private buffers
|
||||||
|
//
|
||||||
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Construct Data Hub Extended Data
|
||||||
|
//
|
||||||
|
Record->CodeType = CodeType;
|
||||||
|
Record->Value = Value;
|
||||||
|
Record->Instance = Instance;
|
||||||
|
|
||||||
|
if (CallerId != NULL) {
|
||||||
|
CopyMem (&Record->CallerId, CallerId, sizeof (EFI_GUID));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Data != NULL) {
|
||||||
|
if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
||||||
|
CharCount = UnicodeVSPrintAsciiFormat (
|
||||||
|
(CHAR16 *) Record->ExtendData,
|
||||||
|
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||||
|
Format,
|
||||||
|
Marker
|
||||||
|
);
|
||||||
|
//
|
||||||
|
// Change record data type from DebugType to String Type.
|
||||||
|
//
|
||||||
|
CopyGuid (&Record->Data.Type, &gEfiStatusCodeDataTypeStringGuid);
|
||||||
|
Record->Data.HeaderSize = Data->HeaderSize;
|
||||||
|
Record->Data.Size = (UINT16) ((CharCount + 1) * sizeof (CHAR16));
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// Copy status code data header
|
||||||
|
//
|
||||||
|
CopyMem (&Record->Data, Data, sizeof (EFI_STATUS_CODE_DATA));
|
||||||
|
|
||||||
|
if (Data->Size > EFI_STATUS_CODE_DATA_MAX_SIZE) {
|
||||||
|
Record->Data.Size = EFI_STATUS_CODE_DATA_MAX_SIZE;
|
||||||
|
}
|
||||||
|
CopyMem (Record->ExtendData, Data + 1, Record->Data.Size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gBS->SignalEvent (mLogDataHubEvent);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
The Event handler which will be notified to log data in Data Hub.
|
||||||
|
|
||||||
|
@param Event Instance of the EFI_EVENT to signal whenever data is
|
||||||
|
available to be logged in the system.
|
||||||
|
@param Context Context of the event.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
LogDataHubEventCallBack (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DATAHUB_STATUSCODE_RECORD *Record;
|
||||||
|
UINTN Size;
|
||||||
|
UINT64 DataRecordClass;
|
||||||
|
LIST_ENTRY *Node;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Log DataRecord in Data Hub.
|
||||||
|
// Journal records fifo to find all record entry.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
for (Node = mRecordsFifo.ForwardLink; Node != &mRecordsFifo;) {
|
||||||
|
Record = CR (Node, DATAHUB_STATUSCODE_RECORD, Node, DATAHUB_STATUS_CODE_SIGNATURE);
|
||||||
|
Node = Node->ForwardLink;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Add in the size of the header we added.
|
||||||
|
//
|
||||||
|
Size = sizeof (DATAHUB_STATUSCODE_RECORD) + Record->Data.Size;
|
||||||
|
|
||||||
|
if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||||
|
DataRecordClass = EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
||||||
|
} else if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
||||||
|
DataRecordClass = EFI_DATA_RECORD_CLASS_ERROR;
|
||||||
|
} else if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||||
|
DataRecordClass = EFI_DATA_RECORD_CLASS_DEBUG;
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// Should never get here.
|
||||||
|
//
|
||||||
|
DataRecordClass = EFI_DATA_RECORD_CLASS_DEBUG |
|
||||||
|
EFI_DATA_RECORD_CLASS_ERROR |
|
||||||
|
EFI_DATA_RECORD_CLASS_DATA |
|
||||||
|
EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Log DataRecord in Data Hub
|
||||||
|
//
|
||||||
|
|
||||||
|
mDataHubProtocol->LogData (
|
||||||
|
mDataHubProtocol,
|
||||||
|
&gEfiStatusCodeGuid,
|
||||||
|
&gEfiStatusCodeRuntimeProtocolGuid,
|
||||||
|
DataRecordClass,
|
||||||
|
Record,
|
||||||
|
(UINT32) Size
|
||||||
|
);
|
||||||
|
|
||||||
|
FreeRecordBuffer (Record);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize data hubstatus code.
|
||||||
|
Create a data hub listener.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
DataHubStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (
|
||||||
|
&gEfiDataHubProtocolGuid,
|
||||||
|
NULL,
|
||||||
|
(VOID **) &mDataHubProtocol
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Create a Notify Event to log data in Data Hub
|
||||||
|
//
|
||||||
|
Status = gBS->CreateEvent (
|
||||||
|
EFI_EVENT_NOTIFY_SIGNAL,
|
||||||
|
EFI_TPL_CALLBACK,
|
||||||
|
LogDataHubEventCallBack,
|
||||||
|
NULL,
|
||||||
|
&mLogDataHubEvent
|
||||||
|
);
|
||||||
|
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
149
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.c
Normal file
149
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.c
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
/** @file
|
||||||
|
Status Code Architectural Protocol implementation as defined in Tiano
|
||||||
|
Architecture Specification.
|
||||||
|
|
||||||
|
This driver has limited functionality at runtime and will not log to Data Hub
|
||||||
|
at runtime.
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
This driver assumes the following ReportStatusCode strategy:
|
||||||
|
PEI -> uses PeiReportStatusCode
|
||||||
|
DXE IPL -> uses PeiReportStatusCode
|
||||||
|
early DXE -> uses PeiReportStatusCode via HOB
|
||||||
|
DXE -> This driver
|
||||||
|
RT -> This driver
|
||||||
|
|
||||||
|
// Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
// This software and associated documentation (if any) is furnished
|
||||||
|
// under a license and may only be used or copied in accordance
|
||||||
|
// with the terms of the license. Except as permitted by such
|
||||||
|
// license, no part of this software or documentation may be
|
||||||
|
// reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
// form or by any means without the express written consent of
|
||||||
|
// Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: StatusCode.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "DxeStatusCode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Dispatch initialization request to sub status code devices based on
|
||||||
|
customized feature flags.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
InitializationDispatcherWorker (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_PEI_HOB_POINTERS Hob;
|
||||||
|
MEMORY_STATUSCODE_PACKET_HEADER *PacketHeader;
|
||||||
|
MEMORY_STATUSCODE_RECORD *Record;
|
||||||
|
UINTN ExpectedPacketIndex = 0;
|
||||||
|
UINTN Index;
|
||||||
|
VOID *HobStart;
|
||||||
|
|
||||||
|
//
|
||||||
|
// If enable UseSerial, then initialize serial port.
|
||||||
|
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
||||||
|
// if enable UseDataHub, then initialize data hub status code worker.
|
||||||
|
//
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
||||||
|
EfiSerialStatusCodeInitializeWorker ();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
||||||
|
SerialPortInitialize ();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
||||||
|
RtMemoryStatusCodeInitializeWorker ();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
||||||
|
DataHubStatusCodeInitializeWorker ();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeInitialize ();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Replay Status code which saved in GUID'ed HOB to all supported device.
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// Journal GUID'ed HOBs to find all record entry, if found,
|
||||||
|
// then output record to support replay device.
|
||||||
|
//
|
||||||
|
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
|
||||||
|
HobStart = Hob.Raw;
|
||||||
|
while (Hob.Raw != NULL) {
|
||||||
|
PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);
|
||||||
|
if (PacketHeader->PacketIndex == ExpectedPacketIndex) {
|
||||||
|
Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
|
||||||
|
for (Index = 0; Index < PacketHeader->RecordIndex; Index++) {
|
||||||
|
//
|
||||||
|
// Dispatch records to devices based on feature flag.
|
||||||
|
//
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeReplayInSerial) &&
|
||||||
|
(FeaturePcdGet (PcdStatusCodeUseHardSerial) ||
|
||||||
|
FeaturePcdGet (PcdStatusCodeUseEfiSerial))) {
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeReplayInRuntimeMemory) &&
|
||||||
|
FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE],
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeReplayInDataHub) &&
|
||||||
|
FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeReplayInOEM) &&
|
||||||
|
FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ExpectedPacketIndex++;
|
||||||
|
|
||||||
|
//
|
||||||
|
// See whether there is gap of packet or not
|
||||||
|
//
|
||||||
|
if (HobStart) {
|
||||||
|
HobStart = NULL;
|
||||||
|
Hob.Raw = HobStart;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else if (HobStart != NULL) {
|
||||||
|
//
|
||||||
|
// Cache the found packet for improve the performance
|
||||||
|
//
|
||||||
|
HobStart = Hob.Raw;
|
||||||
|
}
|
||||||
|
|
||||||
|
Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
238
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
Normal file
238
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
/*++
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name:
|
||||||
|
|
||||||
|
DxeStatusCode.h
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
|
||||||
|
Header file of EFI DXE/RT Status Code.
|
||||||
|
|
||||||
|
--*/
|
||||||
|
|
||||||
|
#ifndef __DXE_STATUS_CODE_H__
|
||||||
|
#define __DXE_STATUS_CODE_H__
|
||||||
|
|
||||||
|
//
|
||||||
|
// Data hub worker definition
|
||||||
|
//
|
||||||
|
#define MAX_NUMBER_DATAHUB_RECORDS 1000
|
||||||
|
#define DATAHUB_BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
|
||||||
|
#define EMPTY_RECORD_TAG 0xFF
|
||||||
|
#define DATAHUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')
|
||||||
|
|
||||||
|
//
|
||||||
|
// Address type of pointer.
|
||||||
|
// The point type always equal to PHYSICAL_MODE on IA32/X64/EBC architecture
|
||||||
|
// Otherwise, VIRTUAL_MODE/PHYSICAL_MODE would be used on Ipf architecture,
|
||||||
|
//
|
||||||
|
enum {
|
||||||
|
PHYSICAL_MODE,
|
||||||
|
VIRTUAL_MODE
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINTN Signature;
|
||||||
|
LIST_ENTRY Node;
|
||||||
|
EFI_STATUS_CODE_TYPE CodeType;
|
||||||
|
EFI_STATUS_CODE_VALUE Value;
|
||||||
|
UINT32 Instance;
|
||||||
|
EFI_GUID CallerId;
|
||||||
|
EFI_STATUS_CODE_DATA Data;
|
||||||
|
UINT8 ExtendData[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
||||||
|
} DATAHUB_STATUSCODE_RECORD;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Runtime memory status code worker definition
|
||||||
|
//
|
||||||
|
typedef struct {
|
||||||
|
UINT32 RecordIndex;
|
||||||
|
UINT32 NumberOfRecords;
|
||||||
|
UINT32 MaxRecordsNumber;
|
||||||
|
} RUNTIME_MEMORY_STATUSCODE_HEADER;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
//
|
||||||
|
// Report operation nest status.
|
||||||
|
// If it is set, then the report operation has nested.
|
||||||
|
//
|
||||||
|
UINT32 StatusCodeNestStatus;
|
||||||
|
//
|
||||||
|
// Runtime status code management header, the records buffer is following it.
|
||||||
|
//
|
||||||
|
RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable[2];
|
||||||
|
} DXE_STATUS_CODE_CONTROLLER;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Dispatch initialization request to sub status code devices based on
|
||||||
|
customized feature flags.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
InitializationDispatcherWorker (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize serial status code worker.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EfiSerialStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize runtime memory status code.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
RtMemoryStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into runtime memory. If the runtime pool is full, roll back to the
|
||||||
|
first record and overwrite it.
|
||||||
|
|
||||||
|
@param RtMemoryStatusCodeTable
|
||||||
|
Point to Runtime memory table header.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable,
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize data hubstatus code.
|
||||||
|
Create a data hub listener.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
DataHubStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into DataHub.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
|
||||||
|
@retval EFI_SUCCESS Success to cache status code and signal log data event.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// declaration of DXE status code controller.
|
||||||
|
//
|
||||||
|
extern DXE_STATUS_CODE_CONTROLLER gDxeStatusCode;
|
||||||
|
|
||||||
|
#endif
|
187
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa
Normal file
187
EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
||||||
|
<ModuleSurfaceArea xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd" xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<MsaHeader>
|
||||||
|
<ModuleName>DxeStatusCode</ModuleName>
|
||||||
|
<ModuleType>DXE_RUNTIME_DRIVER</ModuleType>
|
||||||
|
<GuidValue>FEDE0A1B-BCA2-4A9F-BB2B-D9FD7DEC2E9F</GuidValue>
|
||||||
|
<Version>1.0</Version>
|
||||||
|
<Abstract>DXE status code driver.</Abstract>
|
||||||
|
<Description>
|
||||||
|
Status Code Architectural Protocol implementation as defined in Tiano
|
||||||
|
Architecture Specification. This driver has limited functionality
|
||||||
|
at runtime and will not log to Data Hub at runtime.
|
||||||
|
</Description>
|
||||||
|
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
||||||
|
<License>All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.</License>
|
||||||
|
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||||
|
</MsaHeader>
|
||||||
|
<ModuleDefinitions>
|
||||||
|
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||||
|
<BinaryModule>false</BinaryModule>
|
||||||
|
<OutputFileBasename>DxeStatusCode</OutputFileBasename>
|
||||||
|
</ModuleDefinitions>
|
||||||
|
<LibraryClassDefinitions>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>BaseLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>BaseMemoryLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>DebugLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>ReportStatusCodeLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PrintLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PcdLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>HobLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>UefiLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>MemoryAllocationLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>UefiRuntimeLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>SerialPortLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>OemHookStatusCodeLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>EdkDxeSalLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
</LibraryClassDefinitions>
|
||||||
|
<SourceFiles>
|
||||||
|
<Filename>DxeStatusCode.c</Filename>
|
||||||
|
<Filename>DataHubStatusCodeWorker.c</Filename>
|
||||||
|
<Filename>RtMemoryStatusCodeWorker.c</Filename>
|
||||||
|
<Filename>SerialStatusCodeWorker.c</Filename>
|
||||||
|
<Filename SupArchList="IA32">Common/DxeStatusCodeCommon.c</Filename>
|
||||||
|
<Filename SupArchList="IA32">Common/StatusCode.dxs</Filename>
|
||||||
|
<Filename SupArchList="X64">Common/DxeStatusCodeCommon.c</Filename>
|
||||||
|
<Filename SupArchList="X64">Common/StatusCode.dxs</Filename>
|
||||||
|
<Filename SupArchList="EBC">Common/DxeStatusCodeCommon.c</Filename>
|
||||||
|
<Filename SupArchList="EBC">Common/StatusCode.dxs</Filename>
|
||||||
|
<Filename SupArchList="IPF">Ipf/DxeStatusCodeIpf.c</Filename>
|
||||||
|
<Filename SupArchList="IPF">Ipf/StatusCode.dxs</Filename>
|
||||||
|
</SourceFiles>
|
||||||
|
<PackageDependencies>
|
||||||
|
<Package PackageGuid="5E0E9358-46B6-4AE2-8218-4AB8B9BBDCEC"/>
|
||||||
|
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
</PackageDependencies>
|
||||||
|
<Protocols>
|
||||||
|
<Protocol Usage="ALWAYS_CONSUMED">
|
||||||
|
<ProtocolCName>gEfiExtendedSalStatusCodeServicesProtocolGuid</ProtocolCName>
|
||||||
|
</Protocol>
|
||||||
|
<Protocol Usage="ALWAYS_CONSUMED">
|
||||||
|
<ProtocolCName>gEfiSerialIoProtocolGuid</ProtocolCName>
|
||||||
|
</Protocol>
|
||||||
|
<Protocol Usage="ALWAYS_CONSUMED">
|
||||||
|
<ProtocolCName>gEfiDataHubProtocolGuid</ProtocolCName>
|
||||||
|
</Protocol>
|
||||||
|
</Protocols>
|
||||||
|
<Guids>
|
||||||
|
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||||
|
<GuidCName>gMemoryStatusCodeRecordGuid</GuidCName>
|
||||||
|
</GuidCNames>
|
||||||
|
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||||
|
<GuidCName>gEfiStatusCodeDataTypeStringGuid</GuidCName>
|
||||||
|
</GuidCNames>
|
||||||
|
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||||
|
<GuidCName>gEfiStatusCodeGuid</GuidCName>
|
||||||
|
</GuidCNames>
|
||||||
|
</Guids>
|
||||||
|
<Externs>
|
||||||
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||||
|
<Extern>
|
||||||
|
<ModuleEntryPoint>DxeStatusCodeDriverEntry</ModuleEntryPoint>
|
||||||
|
</Extern>
|
||||||
|
<Extern>
|
||||||
|
<SetVirtualAddressMapCallBack>VirtualAddressChangeCallBack</SetVirtualAddressMapCallBack>
|
||||||
|
</Extern>
|
||||||
|
</Externs>
|
||||||
|
<PcdCoded>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseHardSerial</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseEfiSerial</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseRuntimeMemory</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseDataHub</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInSerial</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInDataHub</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInRuntimeMemory</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeReplayInOEM</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="DYNAMIC">
|
||||||
|
<C_Name>PcdStatusCodeRuntimeMemory</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
</PcdCoded>
|
||||||
|
</ModuleSurfaceArea>
|
201
EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c
Normal file
201
EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
/** @file
|
||||||
|
Status code driver for IA32/X64/EBC architecture.
|
||||||
|
|
||||||
|
// Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
// This software and associated documentation (if any) is furnished
|
||||||
|
// under a license and may only be used or copied in accordance
|
||||||
|
// with the terms of the license. Except as permitted by such
|
||||||
|
// license, no part of this software or documentation may be
|
||||||
|
// reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
// form or by any means without the express written consent of
|
||||||
|
// Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: DxeStatusCodeIpf.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "DxeStatusCode.h"
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Delaration of DXE status code controller
|
||||||
|
//
|
||||||
|
DXE_STATUS_CODE_CONTROLLER gDxeStatusCode = {
|
||||||
|
//
|
||||||
|
// Initialize nest status as non nested.
|
||||||
|
//
|
||||||
|
0,
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Main entry for Extended SAL ReportStatusCode Services
|
||||||
|
|
||||||
|
@param FunctionId Function Id which needed to be called
|
||||||
|
@param Arg2 Efi status code type
|
||||||
|
@param Arg3 Efi status code value
|
||||||
|
@param Arg4 Instance number
|
||||||
|
@param Arg5 Caller Id
|
||||||
|
@param Arg6 Efi status code data
|
||||||
|
@param Arg7 Not used
|
||||||
|
@param Arg8 Not used
|
||||||
|
@param ExtendedSalProc Esal Proc pointer
|
||||||
|
@param VirtualMode If this function is called in virtual mode
|
||||||
|
@param Global This module's global variable pointer
|
||||||
|
|
||||||
|
@return Value returned in SAL_RETURN_REGS
|
||||||
|
|
||||||
|
--*/
|
||||||
|
SAL_RETURN_REGS
|
||||||
|
EFIAPI
|
||||||
|
ReportEsalServiceEntry (
|
||||||
|
IN UINT64 FunctionId,
|
||||||
|
IN UINT64 Arg2,
|
||||||
|
IN UINT64 Arg3,
|
||||||
|
IN UINT64 Arg4,
|
||||||
|
IN UINT64 Arg5,
|
||||||
|
IN UINT64 Arg6,
|
||||||
|
IN UINT64 Arg7,
|
||||||
|
IN UINT64 Arg8,
|
||||||
|
IN SAL_EXTENDED_SAL_PROC ExtendedSalProc,
|
||||||
|
IN BOOLEAN VirtualMode,
|
||||||
|
IN VOID *Global
|
||||||
|
)
|
||||||
|
{
|
||||||
|
SAL_RETURN_REGS ReturnVal;
|
||||||
|
DXE_STATUS_CODE_CONTROLLER *DxeStatusCode;
|
||||||
|
|
||||||
|
switch (FunctionId) {
|
||||||
|
|
||||||
|
case ReportStatusCodeService:
|
||||||
|
|
||||||
|
DxeStatusCode = (DXE_STATUS_CODE_CONTROLLER *) Global;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Use atom operation to avoid the reentant of report.
|
||||||
|
// If current status is not zero, then the function is reentrancy.
|
||||||
|
//
|
||||||
|
if (InterlockedCompareExchange32 (&DxeStatusCode->StatusCodeNestStatus, 0, 1)) {
|
||||||
|
ReturnVal.Status = EFI_DEVICE_ERROR ;
|
||||||
|
return ReturnVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) || FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
(EFI_STATUS_CODE_TYPE) Arg2,
|
||||||
|
(EFI_STATUS_CODE_VALUE) Arg3,
|
||||||
|
(UINT32) Arg4,
|
||||||
|
(EFI_GUID *) Arg5,
|
||||||
|
(EFI_STATUS_CODE_DATA *) Arg6
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
DxeStatusCode->RtMemoryStatusCodeTable[VirtualMode],
|
||||||
|
(EFI_STATUS_CODE_TYPE) Arg2,
|
||||||
|
(EFI_STATUS_CODE_VALUE) Arg3,
|
||||||
|
(UINT32) Arg4
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
(EFI_STATUS_CODE_TYPE) Arg2,
|
||||||
|
(EFI_STATUS_CODE_VALUE) Arg3,
|
||||||
|
(UINT32) Arg4,
|
||||||
|
(EFI_GUID *) Arg5,
|
||||||
|
(EFI_STATUS_CODE_DATA *) Arg6
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
(EFI_STATUS_CODE_TYPE) Arg2,
|
||||||
|
(EFI_STATUS_CODE_VALUE) Arg3,
|
||||||
|
(UINT32) Arg4,
|
||||||
|
(EFI_GUID *) Arg5,
|
||||||
|
(EFI_STATUS_CODE_DATA *) Arg6
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Restore the nest status of report
|
||||||
|
//
|
||||||
|
InterlockedCompareExchange32 (&DxeStatusCode->StatusCodeNestStatus, 1, 0);
|
||||||
|
|
||||||
|
ReturnVal.Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ReturnVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Install the ReportStatusCode runtime service.
|
||||||
|
|
||||||
|
@param ImageHandle Image handle of the loaded driver
|
||||||
|
@param SystemTable Pointer to the System Table
|
||||||
|
|
||||||
|
@return The function always returns success.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
DxeStatusCodeDriverEntry (
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Dispatch initialization request to supported devices
|
||||||
|
//
|
||||||
|
InitializationDispatcherWorker ();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize ESAL capabilities.
|
||||||
|
//
|
||||||
|
RegisterEsalClass (
|
||||||
|
&gEfiExtendedSalStatusCodeServicesProtocolGuid,
|
||||||
|
&gDxeStatusCode,
|
||||||
|
ReportEsalServiceEntry,
|
||||||
|
StatusCode,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Virtual address change notification call back. It converts physical mode global pointer to
|
||||||
|
virtual mode.
|
||||||
|
|
||||||
|
@param Event Event whose notification function is being invoked.
|
||||||
|
@param Context Pointer to the notification function¡¯s context, which is
|
||||||
|
always zero in current implementation.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
VirtualAddressChangeCallBack (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
gDxeStatusCode.RtMemoryStatusCodeTable[VIRTUAL_MODE] =
|
||||||
|
gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Convert the physical mode pointer to virtual mode point.
|
||||||
|
//
|
||||||
|
EfiConvertPointer (
|
||||||
|
0,
|
||||||
|
(VOID **) &gDxeStatusCode.RtMemoryStatusCodeTable[VIRTUAL_MODE]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
27
EdkModulePkg/Universal/StatusCode/Dxe/Ipf/StatusCode.dxs
Normal file
27
EdkModulePkg/Universal/StatusCode/Dxe/Ipf/StatusCode.dxs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#/*++
|
||||||
|
#
|
||||||
|
// Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
// This software and associated documentation (if any) is furnished
|
||||||
|
// under a license and may only be used or copied in accordance
|
||||||
|
// with the terms of the license. Except as permitted by such
|
||||||
|
// license, no part of this software or documentation may be
|
||||||
|
// reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
// form or by any means without the express written consent of
|
||||||
|
// Intel Corporation.
|
||||||
|
#
|
||||||
|
# Module Name:
|
||||||
|
#
|
||||||
|
# IpfStatusCode.dxs
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
#
|
||||||
|
# Dependency expression source file.
|
||||||
|
#
|
||||||
|
#--*/
|
||||||
|
|
||||||
|
#include <AutoGen.h>
|
||||||
|
#include <DxeDepex.h>
|
||||||
|
|
||||||
|
DEPENDENCY_START
|
||||||
|
EFI_DATA_HUB_PROTOCOL_GUID AND EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID
|
||||||
|
DEPENDENCY_END
|
119
EdkModulePkg/Universal/StatusCode/Dxe/RtMemoryStatusCodeWorker.c
Normal file
119
EdkModulePkg/Universal/StatusCode/Dxe/RtMemoryStatusCodeWorker.c
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
/** @file
|
||||||
|
Runtime memory status code worker in DXE.
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: RtMemoryStatusCodeWorker.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "DxeStatusCode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize runtime memory status code.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
RtMemoryStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Allocate runtime memory status code pool.
|
||||||
|
//
|
||||||
|
RtMemoryStatusCodeTable =
|
||||||
|
(RUNTIME_MEMORY_STATUSCODE_HEADER *) AllocatePool (
|
||||||
|
sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024
|
||||||
|
);
|
||||||
|
|
||||||
|
ASSERT (NULL != RtMemoryStatusCodeTable);
|
||||||
|
|
||||||
|
RtMemoryStatusCodeTable->RecordIndex = 0;
|
||||||
|
RtMemoryStatusCodeTable->NumberOfRecords = 0;
|
||||||
|
RtMemoryStatusCodeTable->MaxRecordsNumber =
|
||||||
|
(PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);
|
||||||
|
|
||||||
|
gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE] = RtMemoryStatusCodeTable;
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into runtime memory. If the runtime pool is full, roll back to the
|
||||||
|
first record and overwrite it.
|
||||||
|
|
||||||
|
@param RtMemoryStatusCodeTable
|
||||||
|
Point to Runtime memory table header.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable,
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MEMORY_STATUSCODE_RECORD *Record;
|
||||||
|
|
||||||
|
ASSERT (NULL != RtMemoryStatusCodeTable);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Locate current record buffer.
|
||||||
|
//
|
||||||
|
Record = (MEMORY_STATUSCODE_RECORD *) (RtMemoryStatusCodeTable + 1);
|
||||||
|
Record = &Record[RtMemoryStatusCodeTable->RecordIndex++];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Save status code.
|
||||||
|
//
|
||||||
|
Record->CodeType = CodeType;
|
||||||
|
Record->Value = Value;
|
||||||
|
Record->Instance = Instance;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Record total number of records, we compare the number with max records number,
|
||||||
|
// if it is bigger than the max number, then the roll back had happened, the record index points to
|
||||||
|
// the first record. if it is less then max number, then the zero index is the first record.
|
||||||
|
//
|
||||||
|
RtMemoryStatusCodeTable->NumberOfRecords++;
|
||||||
|
if (RtMemoryStatusCodeTable->RecordIndex == RtMemoryStatusCodeTable->MaxRecordsNumber) {
|
||||||
|
//
|
||||||
|
// Roll back record index.
|
||||||
|
//
|
||||||
|
RtMemoryStatusCodeTable->RecordIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
184
EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c
Normal file
184
EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
Serial I/O status code reporting worker.
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: SerialStatusCodeWorker.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
EFI_SERIAL_IO_PROTOCOL *SerialIoProtocol;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize serial status code worker.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EfiSerialStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (
|
||||||
|
&gEfiSerialIoProtocolGuid,
|
||||||
|
NULL,
|
||||||
|
(VOID **) &SerialIoProtocol
|
||||||
|
);
|
||||||
|
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
CHAR8 *Filename;
|
||||||
|
CHAR8 *Description;
|
||||||
|
CHAR8 *Format;
|
||||||
|
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
||||||
|
UINT32 ErrorLevel;
|
||||||
|
UINT32 LineNumber;
|
||||||
|
UINTN CharCount;
|
||||||
|
VA_LIST Marker;
|
||||||
|
EFI_DEBUG_INFO *DebugInfo;
|
||||||
|
|
||||||
|
Buffer[0] = '\0';
|
||||||
|
|
||||||
|
if (Data != NULL &&
|
||||||
|
ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {
|
||||||
|
//
|
||||||
|
// Print ASSERT() information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiSPrint (
|
||||||
|
Buffer,
|
||||||
|
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||||
|
"\n\rDXE_ASSERT!: %a (%d): %a\n\r",
|
||||||
|
Filename,
|
||||||
|
LineNumber,
|
||||||
|
Description
|
||||||
|
);
|
||||||
|
} else if (Data != NULL &&
|
||||||
|
ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
||||||
|
//
|
||||||
|
// Print DEBUG() information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiVSPrint (
|
||||||
|
Buffer,
|
||||||
|
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||||
|
Format,
|
||||||
|
Marker
|
||||||
|
);
|
||||||
|
} else if (Data != NULL &&
|
||||||
|
CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid) &&
|
||||||
|
(CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||||
|
//
|
||||||
|
// Print specific data into output buffer.
|
||||||
|
//
|
||||||
|
DebugInfo = (EFI_DEBUG_INFO *) (Data + 1);
|
||||||
|
Marker = (VA_LIST) (DebugInfo + 1);
|
||||||
|
Format = (CHAR8 *) (((UINT64 *) Marker) + 12);
|
||||||
|
|
||||||
|
CharCount = AsciiVSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, Marker);
|
||||||
|
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
||||||
|
//
|
||||||
|
// Print ERROR information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "ERROR: C%x:V%x I%x", CodeType, Value, Instance);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.
|
||||||
|
//
|
||||||
|
|
||||||
|
if (CallerId != NULL) {
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
" %g",
|
||||||
|
CallerId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Data) {
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
" %x",
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
"\n\r"
|
||||||
|
);
|
||||||
|
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "PROGRESS CODE: V%x I%x\n\r", Value, Instance);
|
||||||
|
} else {
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "Undefined: C%x:V%x I%x\n\r", CodeType, Value, Instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
||||||
|
//
|
||||||
|
// Callout to SerialPort Lib function to do print.
|
||||||
|
//
|
||||||
|
SerialPortWrite (Buffer, CharCount);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
||||||
|
SerialIoProtocol->Write (
|
||||||
|
SerialIoProtocol,
|
||||||
|
&CharCount,
|
||||||
|
Buffer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
145
EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
Normal file
145
EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/** @file
|
||||||
|
Memory status code worker in PEI.
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: MemoryStatusCodeWorker.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Create one memory status code GUID'ed HOB, use PacketIndex
|
||||||
|
to identify the packet.
|
||||||
|
|
||||||
|
@param PacketIndex Index of records packet.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
MEMORY_STATUSCODE_PACKET_HEADER *
|
||||||
|
CreateMemoryStatusCodePacket (
|
||||||
|
UINT16 PacketIndex
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MEMORY_STATUSCODE_PACKET_HEADER *PacketHeader;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build GUID'ed HOB with PCD defined size.
|
||||||
|
//
|
||||||
|
PacketHeader =
|
||||||
|
(MEMORY_STATUSCODE_PACKET_HEADER *) BuildGuidHob (
|
||||||
|
&gMemoryStatusCodeRecordGuid,
|
||||||
|
(PcdGet16 (PcdStatusCodeMemorySize) * 1024) + sizeof (MEMORY_STATUSCODE_PACKET_HEADER));
|
||||||
|
ASSERT (PacketHeader != NULL);
|
||||||
|
|
||||||
|
PacketHeader->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024)/ sizeof (MEMORY_STATUSCODE_RECORD);
|
||||||
|
PacketHeader->PacketIndex = PacketIndex;
|
||||||
|
PacketHeader->RecordIndex = 0;
|
||||||
|
|
||||||
|
return PacketHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize memory status code.
|
||||||
|
Create one GUID'ed HOB with PCD defined size. If create required size
|
||||||
|
GUID'ed HOB failed, then ASSERT().
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MemoryStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Create first memory status code GUID'ed HOB.
|
||||||
|
//
|
||||||
|
CreateMemoryStatusCodePacket (0);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into GUID'ed HOB..
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MemoryStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
EFI_PEI_HOB_POINTERS Hob;
|
||||||
|
MEMORY_STATUSCODE_PACKET_HEADER *PacketHeader;
|
||||||
|
MEMORY_STATUSCODE_RECORD *Record = NULL;
|
||||||
|
UINT16 PacketIndex = 0;;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Journal GUID'ed HOBs to find empty record entry, if found, then save status code in it.
|
||||||
|
// otherwise, create a new GUID'ed HOB.
|
||||||
|
//
|
||||||
|
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
|
||||||
|
while (Hob.Raw != NULL) {
|
||||||
|
PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check whether pccket is full or not.
|
||||||
|
//
|
||||||
|
if (PacketHeader->RecordIndex < PacketHeader->MaxRecordsNumber) {
|
||||||
|
Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
|
||||||
|
Record = &Record[PacketHeader->RecordIndex++];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Cache number of found packet in PacketIndex.
|
||||||
|
//
|
||||||
|
PacketIndex++;
|
||||||
|
|
||||||
|
Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NULL == Record) {
|
||||||
|
//
|
||||||
|
// In order to save status code , create new packet.
|
||||||
|
//
|
||||||
|
PacketHeader = CreateMemoryStatusCodePacket (PacketIndex);
|
||||||
|
|
||||||
|
Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
|
||||||
|
Record = &Record[PacketHeader->RecordIndex++];
|
||||||
|
}
|
||||||
|
|
||||||
|
Record->CodeType = CodeType;
|
||||||
|
Record->Instance = Instance;
|
||||||
|
Record->Value = Value;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
176
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
Normal file
176
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
Generic PeiStatusCode Module.
|
||||||
|
|
||||||
|
// Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
// This software and associated documentation (if any) is furnished
|
||||||
|
// under a license and may only be used or copied in accordance
|
||||||
|
// with the terms of the license. Except as permitted by such
|
||||||
|
// license, no part of this software or documentation may be
|
||||||
|
// reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
// form or by any means without the express written consent of
|
||||||
|
// Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: PeiStatusCode.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include "PeiStatusCode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to all supported device.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
@param PeiServices
|
||||||
|
|
||||||
|
@param Type Indicates the type of status code being reported.
|
||||||
|
The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This includes information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance
|
||||||
|
information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
@param Data This optional parameter may be used to pass additional data.
|
||||||
|
Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
|
||||||
|
The contents of this data type may have additional GUID-specific data. The standard GUIDs and
|
||||||
|
their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ReportDispatcher (
|
||||||
|
IN EFI_PEI_SERVICES **PeiServices,
|
||||||
|
IN EFI_STATUS_CODE_TYPE Type,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId OPTIONAL,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi = {
|
||||||
|
ReportDispatcher
|
||||||
|
};
|
||||||
|
|
||||||
|
EFI_PEI_PPI_DESCRIPTOR mStatusCodePpiDescriptor = {
|
||||||
|
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
|
||||||
|
&gEfiPeiStatusCodePpiGuid,
|
||||||
|
&mStatusCodePpi
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code to all supported device.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
@param PeiServices
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported.
|
||||||
|
The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This includes information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance
|
||||||
|
information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
@param Data This optional parameter may be used to pass additional data.
|
||||||
|
Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
|
||||||
|
The contents of this data type may have additional GUID-specific data. The standard GUIDs and
|
||||||
|
their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ReportDispatcher (
|
||||||
|
IN EFI_PEI_SERVICES **PeiServices,
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId OPTIONAL,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance,
|
||||||
|
CallerId,
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
||||||
|
MemoryStatusCodeReportWorker (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
CodeType,
|
||||||
|
Value,
|
||||||
|
Instance,
|
||||||
|
CallerId,
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize PEI status codes and publish the status code
|
||||||
|
PPI.
|
||||||
|
|
||||||
|
@param FfsHeader FV this PEIM was loaded from.
|
||||||
|
@param PeiServices General purpose services available to every PEIM.
|
||||||
|
|
||||||
|
@return The function always returns success.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
PeiStatusCodeDriverEntry (
|
||||||
|
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||||
|
IN EFI_PEI_SERVICES **PeiServices
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Dispatch initialization request to sub-statuscode-devices.
|
||||||
|
// If enable UseSerial, then initialize serial port.
|
||||||
|
// if enable UseMemory, then initialize memory status code worker.
|
||||||
|
// if enable UseOEM, then initialize Oem status code.
|
||||||
|
//
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
||||||
|
SerialPortInitialize();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
||||||
|
MemoryStatusCodeInitializeWorker ();
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
OemHookStatusCodeInitialize ();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Install PeiStatusCodePpi.
|
||||||
|
// PeiServices use this Ppi to output status code.
|
||||||
|
// use library
|
||||||
|
Status = PeiServicesInstallPpi (&mStatusCodePpiDescriptor);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
100
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
Normal file
100
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
Heade file of status code PEIM
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: PeiStatusCode.h
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __PEI_STATUS_CODE_H__
|
||||||
|
#define __PEI_STATUS_CODE_H__
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initialize memory status code.
|
||||||
|
Create one GUID'ed HOB with PCD defined size. If create required size
|
||||||
|
GUID'ed HOB failed, then ASSERT().
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MemoryStatusCodeInitializeWorker (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Report status code into GUID'ed HOB.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MemoryStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif
|
115
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.msa
Normal file
115
EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.msa
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Copyright (c) 2006, Intel Corporation
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
||||||
|
<ModuleSurfaceArea xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd" xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<MsaHeader>
|
||||||
|
<ModuleName>PeiStatusCode</ModuleName>
|
||||||
|
<ModuleType>PEIM</ModuleType>
|
||||||
|
<GuidValue>1EC0F53A-FDE0-4576-8F25-7A1A410F58EB</GuidValue>
|
||||||
|
<Version>1.0</Version>
|
||||||
|
<Abstract>Generic Status code Pei driver</Abstract>
|
||||||
|
<Description>Customized output devices based on feature flags.</Description>
|
||||||
|
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
|
||||||
|
<License>All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.</License>
|
||||||
|
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||||
|
</MsaHeader>
|
||||||
|
<ModuleDefinitions>
|
||||||
|
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||||
|
<BinaryModule>false</BinaryModule>
|
||||||
|
<OutputFileBasename>PeiStatusCode</OutputFileBasename>
|
||||||
|
</ModuleDefinitions>
|
||||||
|
<LibraryClassDefinitions>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>BaseLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>BaseMemoryLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>DebugLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PrintLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>ReportStatusCodeLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>SerialPortLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>HobLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PcdLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>PeiServicesLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||||
|
<Keyword>OemHookStatusCodeLib</Keyword>
|
||||||
|
</LibraryClass>
|
||||||
|
</LibraryClassDefinitions>
|
||||||
|
<SourceFiles>
|
||||||
|
<Filename>SerialStatusCodeWorker.c</Filename>
|
||||||
|
<Filename>MemoryStausCodeWorker.c</Filename>
|
||||||
|
<Filename>PeiStatusCode.c</Filename>
|
||||||
|
<Filename>PeiStatusCode.c</Filename>
|
||||||
|
</SourceFiles>
|
||||||
|
<PackageDependencies>
|
||||||
|
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
||||||
|
</PackageDependencies>
|
||||||
|
<PPIs>
|
||||||
|
<Ppi Usage="ALWAYS_CONSUMED">
|
||||||
|
<PpiCName>gEfiPeiStatusCodePpiGuid</PpiCName>
|
||||||
|
</Ppi>
|
||||||
|
</PPIs>
|
||||||
|
<Guids>
|
||||||
|
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||||
|
<GuidCName>gMemoryStatusCodeRecordGuid</GuidCName>
|
||||||
|
</GuidCNames>
|
||||||
|
</Guids>
|
||||||
|
<Externs>
|
||||||
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||||
|
<Extern>
|
||||||
|
<ModuleEntryPoint>PeiStatusCodeDriverEntry</ModuleEntryPoint>
|
||||||
|
</Extern>
|
||||||
|
</Externs>
|
||||||
|
<PcdCoded>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseSerial</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseMemory</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="FEATURE_FLAG">
|
||||||
|
<C_Name>PcdStatusCodeUseOEM</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
<PcdEntry PcdItemType="DYNAMIC">
|
||||||
|
<C_Name>PcdStatusCodeMemorySize</C_Name>
|
||||||
|
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<HelpText/>
|
||||||
|
</PcdEntry>
|
||||||
|
</PcdCoded>
|
||||||
|
</ModuleSurfaceArea>
|
147
EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
Normal file
147
EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
|
||||||
|
/** @file
|
||||||
|
Serial I/O status code reporting worker.
|
||||||
|
|
||||||
|
Copyright (c) 2006, Intel Corporation. All rights reserved.
|
||||||
|
This software and associated documentation (if any) is furnished
|
||||||
|
under a license and may only be used or copied in accordance
|
||||||
|
with the terms of the license. Except as permitted by such
|
||||||
|
license, no part of this software or documentation may be
|
||||||
|
reproduced, stored in a retrieval system, or transmitted in any
|
||||||
|
form or by any means without the express written consent of
|
||||||
|
Intel Corporation.
|
||||||
|
|
||||||
|
Module Name: SerialStatusCodeWorker.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||||
|
|
||||||
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.
|
||||||
|
|
||||||
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
|
This included information about the class and subclass that is used to classify the entity
|
||||||
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
|
Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.
|
||||||
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
|
@return The function always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SerialStatusCodeReportWorker (
|
||||||
|
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||||
|
IN EFI_STATUS_CODE_VALUE Value,
|
||||||
|
IN UINT32 Instance,
|
||||||
|
IN EFI_GUID *CallerId,
|
||||||
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
CHAR8 *Filename;
|
||||||
|
CHAR8 *Description;
|
||||||
|
CHAR8 *Format;
|
||||||
|
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
||||||
|
UINT32 ErrorLevel;
|
||||||
|
UINT32 LineNumber;
|
||||||
|
UINTN CharCount;
|
||||||
|
VA_LIST Marker;
|
||||||
|
EFI_DEBUG_INFO *DebugInfo;
|
||||||
|
|
||||||
|
Buffer[0] = '\0';
|
||||||
|
|
||||||
|
if (Data != NULL &&
|
||||||
|
ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {
|
||||||
|
//
|
||||||
|
// Print ASSERT() information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiSPrint (
|
||||||
|
Buffer,
|
||||||
|
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||||
|
"\n\rPEI_ASSERT!: %a (%d): %a\n\r",
|
||||||
|
Filename,
|
||||||
|
LineNumber,
|
||||||
|
Description
|
||||||
|
);
|
||||||
|
} else if (Data != NULL &&
|
||||||
|
ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
||||||
|
//
|
||||||
|
// Print DEBUG() information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiVSPrint (
|
||||||
|
Buffer,
|
||||||
|
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||||
|
Format,
|
||||||
|
Marker
|
||||||
|
);
|
||||||
|
} else if (Data != NULL &&
|
||||||
|
CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid) &&
|
||||||
|
(CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||||
|
//
|
||||||
|
// Print specific data into output buffer.
|
||||||
|
//
|
||||||
|
DebugInfo = (EFI_DEBUG_INFO *) (Data + 1);
|
||||||
|
Marker = (VA_LIST) (DebugInfo + 1);
|
||||||
|
Format = (CHAR8 *) (((UINT64 *) Marker) + 12);
|
||||||
|
|
||||||
|
CharCount = AsciiVSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, Marker);
|
||||||
|
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
||||||
|
//
|
||||||
|
// Print ERROR information into output buffer.
|
||||||
|
//
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "ERROR: C%x:V%x I%x", CodeType, Value, Instance);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.
|
||||||
|
//
|
||||||
|
|
||||||
|
if (CallerId != NULL) {
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
" %g",
|
||||||
|
CallerId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Data) {
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
" %x",
|
||||||
|
Data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
CharCount += AsciiSPrint (
|
||||||
|
&Buffer[CharCount - 1],
|
||||||
|
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
|
||||||
|
"\n\r"
|
||||||
|
);
|
||||||
|
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "PROGRESS CODE: V%x I%x\n\r", Value, Instance);
|
||||||
|
} else {
|
||||||
|
CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "Undefined: C%x:V%x I%x\n\r", CodeType, Value, Instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Callout to SerialPort Lib function to do print.
|
||||||
|
//
|
||||||
|
SerialPortWrite (Buffer, CharCount);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
@ -1,231 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
DebugAssert.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Produce EfiDebugAssertProtocol to enable EfiUtilityLib to function.
|
|
||||||
The EfiUtilityLib is used by the EFI shell!
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include "StatusCode.h"
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeDebugAssert (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN CHAR8 *FileName,
|
|
||||||
IN INTN LineNumber,
|
|
||||||
IN CHAR8 *Description
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeDebugPrint (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN ErrorLevel,
|
|
||||||
IN CHAR8 *Format,
|
|
||||||
IN VA_LIST Marker
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodePostCode (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL * This,
|
|
||||||
IN UINT16 PostCode,
|
|
||||||
IN CHAR8 *PostCodeString OPTIONAL
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeGetErrorLevel (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN *ErrorLevel
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeSetErrorLevel (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN ErrorLevel
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Protocol instance, there can be only one.
|
|
||||||
//
|
|
||||||
EFI_HANDLE mHandle = NULL;
|
|
||||||
EFI_DEBUG_ASSERT_PROTOCOL mDebugAssertProtocol = {
|
|
||||||
StatusCodeDebugAssert,
|
|
||||||
StatusCodeDebugPrint,
|
|
||||||
StatusCodePostCode,
|
|
||||||
StatusCodeGetErrorLevel,
|
|
||||||
StatusCodeSetErrorLevel
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function implementations
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeDebugAssert (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN CHAR8 *FileName,
|
|
||||||
IN INTN LineNumber,
|
|
||||||
IN CHAR8 *Description
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Worker function for ASSERT (). If Error Logging hub is loaded log ASSERT
|
|
||||||
information. If Error Logging hub is not loaded CpuBreakpoint ().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
This - Protocol instance.
|
|
||||||
FileName - File name of failing routine.
|
|
||||||
LineNumber - Line number of failing ASSERT().
|
|
||||||
Description - Description, usually the assertion,
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always completes successfully.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
DebugAssert (FileName, LineNumber, Description);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeDebugPrint (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN ErrorLevel,
|
|
||||||
IN CHAR8 *Format,
|
|
||||||
IN VA_LIST Marker
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Worker function for DEBUG (). If Error Logging hub is loaded log ASSERT
|
|
||||||
information. If Error Logging hub is not loaded do nothing.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
This - Protocol Instance.
|
|
||||||
ErrorLevel - If error level is set do the debug print.
|
|
||||||
Format - String to use for the print, followed by Print arguments.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always completes successfully.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
|
||||||
|
|
||||||
AsciiVSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, Marker);
|
|
||||||
DebugPrint (ErrorLevel, Buffer);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeGetErrorLevel (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN *ErrorLevel
|
|
||||||
)
|
|
||||||
{
|
|
||||||
*ErrorLevel = PcdGet32(PcdDebugPrintErrorLevel);
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeSetErrorLevel (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL *This,
|
|
||||||
IN UINTN ErrorLevel
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodePostCode (
|
|
||||||
IN EFI_DEBUG_ASSERT_PROTOCOL * This,
|
|
||||||
IN UINT16 PostCode,
|
|
||||||
IN CHAR8 *PostCodeString OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Write the code to IO ports 80 and 81.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
This - Protocol Instance.
|
|
||||||
PostCode - Code to write
|
|
||||||
PostCodeString - String, currently ignored.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always completes successfully.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
IoWrite8 (0x80, (UINT8) (PostCode & 0xff));
|
|
||||||
IoWrite8 (0x81, (UINT8) (PostCode >> 8));
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
InstallStatusCodeDebugAssert (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install the status code debug assert protocol
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Results of call to InstallProtocolInterface.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
|
|
||||||
DEBUG_CODE (
|
|
||||||
gBS->InstallProtocolInterface (
|
|
||||||
&mHandle,
|
|
||||||
&gEfiDebugAssertProtocolGuid,
|
|
||||||
EFI_NATIVE_INTERFACE,
|
|
||||||
&mDebugAssertProtocol
|
|
||||||
);
|
|
||||||
);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
@ -1,75 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ia32StatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Installs the ReportStatusCode runtime service.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include "StatusCode.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
EFI_HANDLE gStatusCodeHandle = NULL;
|
|
||||||
|
|
||||||
const EFI_STATUS_CODE_PROTOCOL gStatusCodeInstance = {
|
|
||||||
StatusCodeReportStatusCode
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// Define the driver entry point
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InstallStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install the ReportStatusCode runtime service.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
ImageHandle Image handle of the loaded driver
|
|
||||||
SystemTable Pointer to the System Table
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always returns success.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize RT status code
|
|
||||||
//
|
|
||||||
InitializeStatusCode (ImageHandle, SystemTable);
|
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
|
||||||
&gStatusCodeHandle,
|
|
||||||
&gEfiStatusCodeRuntimeProtocolGuid,
|
|
||||||
&gStatusCodeInstance,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
@ -1,126 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
IpfStatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Contains the IPF installation function and an ESAL entry.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include "StatusCode.h"
|
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
|
||||||
ReportStatusCodeEsalServicesClassCommonEntry (
|
|
||||||
IN UINT64 FunctionId,
|
|
||||||
IN UINT64 Arg2,
|
|
||||||
IN UINT64 Arg3,
|
|
||||||
IN UINT64 Arg4,
|
|
||||||
IN UINT64 Arg5,
|
|
||||||
IN UINT64 Arg6,
|
|
||||||
IN UINT64 Arg7,
|
|
||||||
IN UINT64 Arg8,
|
|
||||||
IN SAL_EXTENDED_SAL_PROC ExtendedSalProc,
|
|
||||||
IN BOOLEAN VirtualMode,
|
|
||||||
IN VOID *Global
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Main entry for Extended SAL ReportStatusCode Services
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
FunctionId Function Id which needed to be called
|
|
||||||
Arg2 Efi status code type
|
|
||||||
Arg3 Efi status code value
|
|
||||||
Arg4 Instance number
|
|
||||||
Arg5 Caller Id
|
|
||||||
Arg6 Efi status code data
|
|
||||||
Arg7 Not used
|
|
||||||
Arg8 Not used
|
|
||||||
ExtendedSalProc Esal Proc pointer
|
|
||||||
VirtualMode If this function is called in virtual mode
|
|
||||||
Global This module's global variable pointer
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
SAL_RETURN_REGS
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
SAL_RETURN_REGS ReturnVal;
|
|
||||||
|
|
||||||
switch (FunctionId) {
|
|
||||||
|
|
||||||
case ReportStatusCodeService:
|
|
||||||
ReturnVal.Status = StatusCodeReportStatusCode (
|
|
||||||
(EFI_STATUS_CODE_TYPE) Arg2,
|
|
||||||
(EFI_STATUS_CODE_VALUE) Arg3,
|
|
||||||
(UINT32) Arg4,
|
|
||||||
(EFI_GUID *) Arg5,
|
|
||||||
(EFI_STATUS_CODE_DATA *) Arg6
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ReturnVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InstallStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install the ReportStatusCode runtime service.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
ImageHandle Image handle of the loaded driver
|
|
||||||
SystemTable Pointer to the System Table
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always returns success.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Initialize RT status code
|
|
||||||
//
|
|
||||||
InitializeStatusCode (ImageHandle, SystemTable);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize ESAL capabilities
|
|
||||||
//
|
|
||||||
RegisterEsalClass (
|
|
||||||
&gEfiExtendedSalStatusCodeServicesProtocolGuid,
|
|
||||||
NULL,
|
|
||||||
ReportStatusCodeEsalServicesClassCommonEntry,
|
|
||||||
StatusCode,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
#/*++
|
|
||||||
#
|
|
||||||
# Copyright (c) 2006, Intel Corporation
|
|
||||||
# All rights reserved. This program and the accompanying materials
|
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
|
||||||
#
|
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
#
|
|
||||||
# Module Name:
|
|
||||||
#
|
|
||||||
# IpfStatusCode.dxs
|
|
||||||
#
|
|
||||||
# Abstract:
|
|
||||||
#
|
|
||||||
# Dependency expression source file.
|
|
||||||
#
|
|
||||||
#--*/
|
|
||||||
|
|
||||||
#include <AutoGen.h>
|
|
||||||
#include <DxeDepex.h>
|
|
||||||
|
|
||||||
DEPENDENCY_START
|
|
||||||
EFI_DATA_HUB_PROTOCOL_GUID AND EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID
|
|
||||||
DEPENDENCY_END
|
|
@ -1,172 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
StatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Status Code Architectural Protocol implementation as defined in Tiano
|
|
||||||
Architecture Specification.
|
|
||||||
|
|
||||||
This driver also depends on the DataHub, and will log all status code info
|
|
||||||
to the DataHub. Fatal Errors are Printed to Standard Error (StdErr) and not
|
|
||||||
logged to the data hub (If you crash what good is the data in the data hub).
|
|
||||||
|
|
||||||
This driver has limited functionality at runtime and will not log to Data Hub
|
|
||||||
at runtime.
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
This driver assumes the following ReportStatusCode strategy:
|
|
||||||
PEI -> uses PeiReportStatusCode
|
|
||||||
DXE IPL -> uses PeiReportStatusCode
|
|
||||||
early DXE -> uses PeiReportStatusCode via HOB
|
|
||||||
DXE -> This driver
|
|
||||||
RT -> This driver
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include "StatusCode.h"
|
|
||||||
|
|
||||||
EFI_LOCK mStatusCodeLock;
|
|
||||||
BOOLEAN mStatusCodeFlag = FALSE;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function implemenations
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeReportStatusCode (
|
|
||||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID *CallerId,
|
|
||||||
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Calls into the platform library which dispatches the platform specific
|
|
||||||
listeners. For NT environments we still call back into PEI because the
|
|
||||||
ReportStatusCode functionality requires Win32 services and is built into
|
|
||||||
the SecMain.exe utility.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(See Tiano Runtime Specification)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Acquire the lock required to update mStatusCodeFlag
|
|
||||||
//
|
|
||||||
Status = EfiAcquireLockOrFail (&mStatusCodeLock);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
//
|
|
||||||
// Check for reentrancy of the lock
|
|
||||||
//
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Check to see if we are already in the middle of a ReportStatusCode()
|
|
||||||
//
|
|
||||||
if (mStatusCodeFlag) {
|
|
||||||
EfiReleaseLock (&mStatusCodeLock);
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Set the flag to show we are in the middle of a ReportStatusCode()
|
|
||||||
//
|
|
||||||
mStatusCodeFlag = TRUE;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Release the lock for updating mStatusCodeFlag
|
|
||||||
//
|
|
||||||
EfiReleaseLock (&mStatusCodeLock);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Go do the work required to report a status code
|
|
||||||
//
|
|
||||||
RtPlatformReportStatusCode (CodeType, Value, Instance, CallerId, Data);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Acquire the lock required to update mStatusCodeFlag
|
|
||||||
//
|
|
||||||
Status = EfiAcquireLockOrFail (&mStatusCodeLock);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
//
|
|
||||||
// Check for reentrancy of the lock
|
|
||||||
//
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Clear the flag to show we are no longer in the middle of a ReportStatusCode()
|
|
||||||
//
|
|
||||||
mStatusCodeFlag = FALSE;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Release the lock for updating mStatusCodeFlag
|
|
||||||
//
|
|
||||||
EfiReleaseLock (&mStatusCodeLock);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Protocol instance, there can be only one.
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
InitializeStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install Driver to produce Report Status Code Arch Protocol
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - Logging Hub protocol installed
|
|
||||||
Other - No protocol installed, unload driver.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
|
|
||||||
EfiInitializeLock (&mStatusCodeLock, EFI_TPL_HIGH_LEVEL);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Call the platform hook to initialize the different listeners.
|
|
||||||
//
|
|
||||||
RtPlatformStatusCodeInitialize ();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Register a protocol that EfiUtilityLib can use to implement DEBUG () and ASSERT ()
|
|
||||||
// Macros.
|
|
||||||
//
|
|
||||||
InstallStatusCodeDebugAssert ();
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
StatusCode.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
EFI DXE/RT Status Code include file.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#ifndef _EFI_RUNTIME_STATUS_CODE_H_
|
|
||||||
#define _EFI_RUNTIME_STATUS_CODE_H_
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function prototypes
|
|
||||||
//
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
StatusCodeReportStatusCode (
|
|
||||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
|
||||||
IN EFI_STATUS_CODE_VALUE Value,
|
|
||||||
IN UINT32 Instance,
|
|
||||||
IN EFI_GUID * CallerId,
|
|
||||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
InitializeStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
InstallStatusCodeDebugAssert (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Driver entry point
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InstallStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,97 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
|
||||||
<MsaHeader>
|
|
||||||
<ModuleName>StatusCode</ModuleName>
|
|
||||||
<ModuleType>DXE_RUNTIME_DRIVER</ModuleType>
|
|
||||||
<GuidValue>9F455D3B-2B8A-4c06-960B-A71B9714B9CD</GuidValue>
|
|
||||||
<Version>1.0</Version>
|
|
||||||
<Abstract>Component description file for StatusCode module.</Abstract>
|
|
||||||
<Description>This driver implement Status Code Architectural Protocol and log all status code info. </Description>
|
|
||||||
<Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
|
|
||||||
<License>All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
|
|
||||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
|
||||||
</MsaHeader>
|
|
||||||
<ModuleDefinitions>
|
|
||||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
|
||||||
<BinaryModule>false</BinaryModule>
|
|
||||||
<OutputFileBasename>StatusCode</OutputFileBasename>
|
|
||||||
</ModuleDefinitions>
|
|
||||||
<LibraryClassDefinitions>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>BaseLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiRuntimeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>DebugLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>PrintLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>IoLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>EdkRtPlatformStatusCodeLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>EdkDxeSalLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
|
||||||
<Keyword>PcdLib</Keyword>
|
|
||||||
</LibraryClass>
|
|
||||||
</LibraryClassDefinitions>
|
|
||||||
<SourceFiles>
|
|
||||||
<Filename>DebugAssert.c</Filename>
|
|
||||||
<Filename>StatusCode.c</Filename>
|
|
||||||
<Filename>StatusCode.h</Filename>
|
|
||||||
<Filename SupArchList="IA32">Ia32/Ia32StatusCode.c</Filename>
|
|
||||||
<Filename SupArchList="IA32">Ia32/Ia32StatusCode.dxs</Filename>
|
|
||||||
<Filename SupArchList="X64">x64/x64StatusCode.c</Filename>
|
|
||||||
<Filename SupArchList="X64">x64/x64StatusCode.dxs</Filename>
|
|
||||||
<Filename SupArchList="IPF">Ipf/IpfStatusCode.c</Filename>
|
|
||||||
<Filename SupArchList="IPF">Ipf/IpfStatusCode.dxs</Filename>
|
|
||||||
</SourceFiles>
|
|
||||||
<PackageDependencies>
|
|
||||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
|
||||||
<Package PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
|
|
||||||
</PackageDependencies>
|
|
||||||
<Protocols>
|
|
||||||
<Protocol Usage="ALWAYS_CONSUMED">
|
|
||||||
<ProtocolCName>gEfiDebugAssertProtocolGuid</ProtocolCName>
|
|
||||||
</Protocol>
|
|
||||||
<Protocol Usage="ALWAYS_CONSUMED">
|
|
||||||
<ProtocolCName>gEfiExtendedSalStatusCodeServicesProtocolGuid</ProtocolCName>
|
|
||||||
</Protocol>
|
|
||||||
</Protocols>
|
|
||||||
<Externs>
|
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
|
||||||
<Extern>
|
|
||||||
<ModuleEntryPoint>InstallStatusCode</ModuleEntryPoint>
|
|
||||||
</Extern>
|
|
||||||
</Externs>
|
|
||||||
</ModuleSurfaceArea>
|
|
@ -1,75 +0,0 @@
|
|||||||
/*++
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
x64StatusCode.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Installs the ReportStatusCode runtime service.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
|
|
||||||
#include "StatusCode.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
EFI_HANDLE gStatusCodeHandle = NULL;
|
|
||||||
|
|
||||||
const EFI_STATUS_CODE_PROTOCOL gStatusCodeInstance = {
|
|
||||||
StatusCodeReportStatusCode
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// Define the driver entry point
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InstallStatusCode (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Install the ReportStatusCode runtime service.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
ImageHandle Image handle of the loaded driver
|
|
||||||
SystemTable Pointer to the System Table
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS The function always returns success.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize RT status code
|
|
||||||
//
|
|
||||||
InitializeStatusCode (ImageHandle, SystemTable);
|
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
|
||||||
&gStatusCodeHandle,
|
|
||||||
&gEfiStatusCodeRuntimeProtocolGuid,
|
|
||||||
&gStatusCodeInstance,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
#/*++
|
|
||||||
#
|
|
||||||
# Copyright (c) 2006, Intel Corporation
|
|
||||||
# All rights reserved. This program and the accompanying materials
|
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
|
||||||
#
|
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
#
|
|
||||||
# Module Name:
|
|
||||||
#
|
|
||||||
# x64StatusCode.dxs
|
|
||||||
#
|
|
||||||
# Abstract:
|
|
||||||
#
|
|
||||||
# Dependency expression source file.
|
|
||||||
#
|
|
||||||
#--*/
|
|
||||||
|
|
||||||
#include <AutoGen.h>
|
|
||||||
#include <DxeDepex.h>
|
|
||||||
|
|
||||||
DEPENDENCY_START
|
|
||||||
EFI_DATA_HUB_PROTOCOL_GUID AND EFI_CPU_IO_PROTOCOL_GUID
|
|
||||||
DEPENDENCY_END
|
|
Loading…
x
Reference in New Issue
Block a user