Lines Matching +full:- +full:encoded
12 #include <libcper/cper-utils.h>
13 #include <libcper/sections/cper-section-dmar-iommu.h>
24 json_object_new_int(iommu_error->Revision)); in cper_section_dmar_iommu_to_ir()
28 json_object_new_uint64(iommu_error->Control)); in cper_section_dmar_iommu_to_ir()
30 json_object_new_uint64(iommu_error->Status)); in cper_section_dmar_iommu_to_ir()
36 char *encoded = base64_encode((UINT8 *)iommu_error->EventLogEntry, 16, in cper_section_dmar_iommu_to_ir() local
38 if (encoded == NULL) { in cper_section_dmar_iommu_to_ir()
44 json_object_new_string_len(encoded, in cper_section_dmar_iommu_to_ir()
46 free(encoded); in cper_section_dmar_iommu_to_ir()
51 encoded = base64_encode((UINT8 *)iommu_error->DeviceTableEntry, 32, in cper_section_dmar_iommu_to_ir()
53 if (encoded == NULL) { in cper_section_dmar_iommu_to_ir()
58 json_object_new_string_len(encoded, in cper_section_dmar_iommu_to_ir()
60 free(encoded); in cper_section_dmar_iommu_to_ir()
64 json_object_new_uint64(iommu_error->PteL6)); in cper_section_dmar_iommu_to_ir()
66 json_object_new_uint64(iommu_error->PteL5)); in cper_section_dmar_iommu_to_ir()
68 json_object_new_uint64(iommu_error->PteL4)); in cper_section_dmar_iommu_to_ir()
70 json_object_new_uint64(iommu_error->PteL3)); in cper_section_dmar_iommu_to_ir()
72 json_object_new_uint64(iommu_error->PteL2)); in cper_section_dmar_iommu_to_ir()
74 json_object_new_uint64(iommu_error->PteL1)); in cper_section_dmar_iommu_to_ir()
79 //Converts a single DMAR IOMMU CPER-JSON section into CPER binary, outputting to the given stream.
87 section_cper->Revision = (UINT8)json_object_get_int( in ir_section_dmar_iommu_to_cper()
89 section_cper->Control = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
91 section_cper->Status = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
95 json_object *encoded = json_object_object_get(section, "eventLogEntry"); in ir_section_dmar_iommu_to_cper() local
98 UINT8 *decoded = base64_decode(json_object_get_string(encoded), in ir_section_dmar_iommu_to_cper()
99 json_object_get_string_len(encoded), in ir_section_dmar_iommu_to_cper()
104 memcpy(section_cper->EventLogEntry, decoded, decoded_len); in ir_section_dmar_iommu_to_cper()
108 encoded = json_object_object_get(section, "deviceTableEntry"); in ir_section_dmar_iommu_to_cper()
111 decoded = base64_decode(json_object_get_string(encoded), in ir_section_dmar_iommu_to_cper()
112 json_object_get_string_len(encoded), in ir_section_dmar_iommu_to_cper()
117 memcpy(section_cper->DeviceTableEntry, decoded, decoded_len); in ir_section_dmar_iommu_to_cper()
122 section_cper->PteL1 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
124 section_cper->PteL2 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
126 section_cper->PteL3 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
128 section_cper->PteL4 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
130 section_cper->PteL5 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()
132 section_cper->PteL6 = json_object_get_uint64( in ir_section_dmar_iommu_to_cper()