Fix broken IPF GUID from EDK.
diff --git a/cper-parse.c b/cper-parse.c
index 5551fb7..0ff82b2 100644
--- a/cper-parse.c
+++ b/cper-parse.c
@@ -23,6 +23,7 @@
#include "sections/cper-section-dmar-iommu.h"
#include "sections/cper-section-ccix-per.h"
#include "sections/cper-section-cxl-protocol.h"
+#include "sections/cper-section-ipf.h"
//Private pre-definitions.
json_object* cper_header_to_ir(EFI_COMMON_ERROR_RECORD_HEADER* header);
@@ -243,9 +244,8 @@
section_type_readable = "Processor Generic";
else if (guid_equal(§ion_descriptor->SectionType, &gEfiIa32X64ProcessorErrorSectionGuid))
section_type_readable = "IA32/X64";
- //todo: Why does IPF have an overly long GUID?
- // if (guid_equal(§ion_descriptor->SectionType, &gEfiIpfProcessorErrorSectionGuid))
- // section_type_readable = "IPF";
+ else if (guid_equal(§ion_descriptor->SectionType, &gEfiIpfProcessorErrorSectionGuid))
+ section_type_readable = "IPF";
else if (guid_equal(§ion_descriptor->SectionType, &gEfiArmProcessorErrorSectionGuid))
section_type_readable = "ARM";
else if (guid_equal(§ion_descriptor->SectionType, &gEfiPlatformMemoryErrorSectionGuid))
@@ -318,8 +318,8 @@
result = cper_section_generic_to_ir(section, descriptor);
else if (guid_equal(&descriptor->SectionType, &gEfiIa32X64ProcessorErrorSectionGuid))
result = cper_section_ia32x64_to_ir(section, descriptor);
- // //todo: Why does IPF have an overly long GUID?
- // // if (guid_equal(&descriptor->SectionType, &gEfiIpfProcessorErrorSectionGuid))
+ else if (guid_equal(&descriptor->SectionType, &gEfiIpfProcessorErrorSectionGuid))
+ result = cper_section_ipf_to_ir(section, descriptor);
else if (guid_equal(&descriptor->SectionType, &gEfiArmProcessorErrorSectionGuid))
result = cper_section_arm_to_ir(section, descriptor);
else if (guid_equal(&descriptor->SectionType, &gEfiPlatformMemoryErrorSectionGuid))
diff --git a/edk/Cper.c b/edk/Cper.c
index 69a68f8..2d2614d 100644
--- a/edk/Cper.c
+++ b/edk/Cper.c
@@ -23,8 +23,7 @@
EFI_GUID gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }};
EFI_GUID gEfiProcessorSpecificErrorSectionGuid = { 0xdc3ea0b0, 0xa144, 0x4797, { 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d }};
EFI_GUID gEfiIa32X64ProcessorErrorSectionGuid = { 0xdc3ea0b0, 0xa144, 0x4797, { 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d }};
-//todo: Why does IPF GUID have an excess of elements?
-//EFI_GUID gEfiIpfProcessorErrorSectionGuid = { 0xe429faf1, 0x3cb7, 0x11d4, { 0xb, 0xca, 0x7, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81 }};
+EFI_GUID gEfiIpfProcessorErrorSectionGuid = { 0xe429faf1, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81 }};
EFI_GUID gEfiArmProcessorErrorSectionGuid = { 0xe19e3d16, 0xbc11, 0x11e4, { 0x9c, 0xaa, 0xc2, 0x05, 0x1d, 0x5d, 0x46, 0xb0 }};
EFI_GUID gEfiPlatformMemoryErrorSectionGuid = { 0xa5bc1114, 0x6f64, 0x4ede, { 0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1 }};
EFI_GUID gEfiPlatformMemoryError2SectionGuid = { 0x61EC04FC, 0x48E6, 0xD813, { 0x25, 0xC9, 0x8D, 0xAA, 0x44, 0x75, 0x0B, 0x12 }};
diff --git a/edk/Cper.h b/edk/Cper.h
index 536858f..5a6d2b2 100644
--- a/edk/Cper.h
+++ b/edk/Cper.h
@@ -1253,8 +1253,7 @@
extern EFI_GUID gEfiProcessorGenericErrorSectionGuid;
extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid;
extern EFI_GUID gEfiIa32X64ProcessorErrorSectionGuid;
-//todo: Why does the IPF GUID have an excess of elements?
-//extern EFI_GUID gEfiIpfProcessorErrorSectionGuid;
+extern EFI_GUID gEfiIpfProcessorErrorSectionGuid;
extern EFI_GUID gEfiArmProcessorErrorSectionGuid;
extern EFI_GUID gEfiPlatformMemoryErrorSectionGuid;
extern EFI_GUID gEfiPlatformMemoryError2SectionGuid;
diff --git a/sections/cper-section-ipf.c b/sections/cper-section-ipf.c
new file mode 100644
index 0000000..0cbfb6b
--- /dev/null
+++ b/sections/cper-section-ipf.c
@@ -0,0 +1,17 @@
+/**
+ * Describes functions for converting Intel IPF CPER sections from binary and JSON format
+ * into an intermediate format.
+ *
+ * Author: Lawrence.Tang@arm.com
+ **/
+#include <stdio.h>
+#include "json.h"
+#include "../edk/Cper.h"
+#include "../cper-utils.h"
+#include "cper-section-ipf.h"
+
+//Converts a single Intel IPF error CPER section into JSON IR.
+json_object* cper_section_ipf_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor)
+{
+ //... todo ...
+}
\ No newline at end of file
diff --git a/sections/cper-section-ipf.h b/sections/cper-section-ipf.h
new file mode 100644
index 0000000..8083ff0
--- /dev/null
+++ b/sections/cper-section-ipf.h
@@ -0,0 +1,54 @@
+#ifndef CPER_SECTION_IPF_H
+#define CPER_SECTION_IPF_H
+
+#include "json.h"
+#include "../edk/Cper.h"
+
+///
+/// IPF Error Record Section
+/// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification.
+///
+typedef struct {
+ UINT64 ProcErrorMapValid : 1;
+ UINT64 ProcStateParameterValid : 1;
+ UINT64 ProcCrLidValid : 1;
+ UINT64 PsiStaticStructValid : 1;
+ UINT64 CacheCheckNum : 4;
+ UINT64 TlbCheckNum : 4;
+ UINT64 BusCheckNum : 4;
+ UINT64 RegFileCheckNum : 4;
+ UINT64 MsCheckNum : 4;
+ UINT64 CpuIdInfoValid : 1;
+ UINT64 Reserved : 39;
+} EPI_IPF_ERROR_VALID_BITS;
+
+typedef struct {
+ EPI_IPF_ERROR_VALID_BITS ValidBits;
+ UINT64 ProcErrorMap;
+ UINT64 ProcStateParameter;
+ UINT64 ProcCrLid;
+} EFI_IPF_ERROR_INFO_HEADER;
+
+typedef struct {
+ UINT64 ValidBits;
+ UINT64 ModCheckInfo;
+ UINT64 ModTargetId;
+ UINT64 ModRequestorId;
+ UINT64 ModResponderId;
+ UINT64 ModPreciseIp;
+} EFI_IPF_MOD_ERROR_INFO;
+
+typedef struct {
+ UINT8 CpuIdInfo[40];
+ UINT8 Reserved1[8];
+ UINT64 ValidBits;
+ UINT8 MinimalSaveStateInfo[1024];
+ UINT8 Brs[64];
+ UINT8 Crs[1024];
+ UINT8 Rrs[64];
+ UINT8 Frs[2048];
+} EFI_IPF_ERROR_INFO_FOOTER;
+
+json_object* cper_section_ipf_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
+
+#endif
\ No newline at end of file