def dump_raw(): try: mp = MPTable() s = "MP Table -- Raw bytes and structure decode.\n\n" if mp: s += str(mp.floating_pointer) + '\n' s += bits.dumpmem(mp._floating_pointer_memory) + '\n' s += str(mp.header) + '\n' s += bits.dumpmem(mp._base_header_memory) + '\n' for base_struct in mp.base_structures: s += str(base_struct) + '\n' s += bits.dumpmem(base_struct.raw_data) + '\n' if mp.header.extended_table_length: for extended_struct in mp.extended_structures: s += str(extended_struct) + '\n' s += bits.dumpmem(extended_struct.raw_data) + '\n' else: s += "MP Table not found.\n" ttypager.ttypager_wrap(s, indent=False) except: print("Error parsing MP Table information:") import traceback traceback.print_exc()
def dump_raw(): try: sm = SMBIOS() if sm: s = "SMBIOS -- Raw bytes and structure decode.\n\n" s += str(sm.header) + '\n' s += bits.dumpmem(sm._header_memory) + '\n' s += "Raw bytes for the SMBIOS structures\n" s += bits.dumpmem(sm._structure_memory) + '\n' for sm_struct in sm.structures: s += str(sm_struct) + '\n' s += bits.dumpmem(sm_struct.raw_data) s += "Strings:\n" for n in range(1, len(getattr(sm_struct, "strings", [])) + 1): s += str(sm_struct.fmtstr(n)) + '\n' s += bits.dumpmem(sm_struct.raw_strings) + '\n' else: s = "No SMBIOS structures found" ttypager.ttypager_wrap(s, indent=False) except: print "Error parsing SMBIOS information:" import traceback traceback.print_exc()
def print_variables(): name = ctypes.create_unicode_buffer("") size = ctypes.c_ulong(ctypes.sizeof(name)) guid = GUID() while True: status = call(system_table.RuntimeServices.contents.GetNextVariableName, ctypes.addressof(size), ctypes.addressof(name), ctypes.addressof(guid)) if status == EFI_NOT_FOUND: break if status == EFI_BUFFER_TOO_SMALL: ctypes.resize(name, size.value) continue check_status(status) print name.value, guid data, attributes, data_size = get_variable(name, guid) print "attributes={:#x} size={} data:".format(attributes, data_size) print bits.dumpmem(data.raw)
def dump_raw(): try: pir = PIRTable() s = "PCI Interrupt Routing (PIR) Table -- Raw bytes and structure decode.\n\n" if pir: s += str(pir.header) + '\n' s += bits.dumpmem(bits.cdata.to_bytes(pir.header)) + '\n' for slot_entry in pir.structures: s += str(slot_entry) + '\n' s += bits.dumpmem(bits.cdata.to_bytes(slot_entry)) + '\n' else: s += "PCI Interrupt Routing (PIR) Table not found.\n" ttypager.ttypager_wrap(s, indent=False) except: print("Error parsing PCI Interrupt Routing Table information:") import traceback traceback.print_exc()
def dump_raw(): try: pir = PIRTable() s = "PCI Interrupt Routing (PIR) Table -- Raw bytes and structure decode.\n\n" if pir: s += str(pir.header) + '\n' s += bits.dumpmem(pir._header_memory) + '\n' for slot_entry in pir.structures: s += str(slot_entry) + '\n' s += bits.dumpmem(slot_entry.raw_data) + '\n' else: s += "PCI Interrupt Routing (PIR) Table not found.\n" ttypager.ttypager_wrap(s, indent=False) except: print "Error parsing PCI Interrupt Routing Table information:" import traceback traceback.print_exc()