def get_debug_info(self):\r
# Get the information from EFI_DEBUG_IMAGE_INFO_TABLE_HEADER\r
count = self.ec.getMemoryService().readMemory32(self.base + 0x4)\r
- debug_info_table_base = self.ec.getMemoryService().readMemory32(self.base + 0x8)\r
+ if edk2_debugger.is_aarch64(self.ec):\r
+ debug_info_table_base = self.ec.getMemoryService().readMemory64(self.base + 0x8)\r
+ else:\r
+ debug_info_table_base = self.ec.getMemoryService().readMemory32(self.base + 0x8)\r
\r
self.DebugInfos = []\r
\r
for i in range(0, count):\r
# Get the address of the structure EFI_DEBUG_IMAGE_INFO\r
if edk2_debugger.is_aarch64(self.ec):\r
- debug_info = self.ec.getMemoryService().readMemory32(debug_info_table_base + (i * 8))\r
+ debug_info = self.ec.getMemoryService().readMemory64(debug_info_table_base + (i * 8))\r
else:\r
debug_info = self.ec.getMemoryService().readMemory32(debug_info_table_base + (i * 4))\r
\r
if debug_info_type == 1:\r
if edk2_debugger.is_aarch64(self.ec):\r
# Get the base address of the structure EFI_LOADED_IMAGE_PROTOCOL\r
- loaded_image_protocol = self.ec.getMemoryService().readMemory32(debug_info + 0x8)\r
+ loaded_image_protocol = self.ec.getMemoryService().readMemory64(debug_info + 0x8)\r
\r
- image_base = self.ec.getMemoryService().readMemory32(loaded_image_protocol + 0x40)\r
+ image_base = self.ec.getMemoryService().readMemory64(loaded_image_protocol + 0x40)\r
image_size = self.ec.getMemoryService().readMemory32(loaded_image_protocol + 0x48)\r
else:\r
# Get the base address of the structure EFI_LOADED_IMAGE_PROTOCOL\r
raise Exception('SystemTable','Fail to access System Memory. Ensure all the memory in the region [0x%x;0x%X] is accessible.' % (membase,membase+memsize))\r
if signature == SystemTable.CONST_ST_SIGNATURE:\r
found = True\r
- self.system_table_base = self.ec.getMemoryService().readMemory32(offset + 0x8)\r
+ if edk2_debugger.is_aarch64(self.ec):\r
+ self.system_table_base = self.ec.getMemoryService().readMemory64(offset + 0x8)\r
+ else:\r
+ self.system_table_base = self.ec.getMemoryService().readMemory32(offset + 0x8)\r
break\r
offset = offset - 0x400000\r
\r
conf_table_entry_count = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x68)
\r
# Get location of the Configuration Table entries\r
- conf_table_offset = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x70)\r
+ conf_table_offset = self.ec.getMemoryService().readMemory64(self.system_table_base + 0x70)\r
else:\r
# Number of configuration Table entry\r
conf_table_entry_count = self.ec.getMemoryService().readMemory32(self.system_table_base + 0x40)
offset = conf_table_offset + (i * 0x14)\r
guid = struct.unpack("<IIII", self.ec.getMemoryService().read(str(offset), 16, 32))\r
if guid == conf_table_guid:\r
- return self.ec.getMemoryService().readMemory32(offset + 0x10)\r
+ if edk2_debugger.is_aarch64(self.ec):\r
+ return self.ec.getMemoryService().readMemory64(offset + 0x10)\r
+ else:\r
+ return self.ec.getMemoryService().readMemory32(offset + 0x10)\r
\r
raise Exception('SystemTable','Configuration Table not found')\r