def get_configuration_table()

in ArmPlatformPkg/Scripts/Ds5/system_table.py [0:0]


    def get_configuration_table(self, conf_table_guid):
        if edk2_debugger.is_aarch64(self.ec):
            # Number of configuration Table entry
            conf_table_entry_count = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x68)

            # Get location of the Configuration Table entries
            conf_table_offset = self.ec.getMemoryService().readMemory64(self.system_table_base + 0x70)
        else:
            # Number of configuration Table entry
            conf_table_entry_count = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x40)

            # Get location of the Configuration Table entries
            conf_table_offset = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x44)

        for i in range(0, conf_table_entry_count):
            if edk2_debugger.is_aarch64(self.ec):
                offset = conf_table_offset + (i * 0x18)
            else:
                offset = conf_table_offset + (i * 0x14)
            guid = struct.unpack("<IIII", self.ec.getMemoryService().read(str(offset), 16, 32))
            if guid == conf_table_guid:
                if edk2_debugger.is_aarch64(self.ec):
                    return self.ec.getMemoryService().readMemory64(offset + 0x10)
                else:
                    return self.ec.getMemoryService().readMemory32(offset + 0x10)

        raise Exception('SystemTable','Configuration Table not found')