예제 #1
0
    def __init__(self):
        super(MPTable, self).__init__()
        u = unpack.Unpackable(self._floating_pointer_memory)
        self.add_field('floating_pointer', FloatingPointer(u))

        self._base_header_memory = bits.memory(
            self.floating_pointer.physical_address_pointer, 44)
        u = unpack.Unpackable(self._base_header_memory)
        self.add_field('header', Header(u), "\n\n{!r}")

        self._base_table_memory = bits.memory(
            self.floating_pointer.physical_address_pointer,
            self.header.base_table_length)
        u = unpack.Unpackable(self._base_table_memory)
        u.skip(44)
        self.add_field('base_structures',
                       unpack.unpack_all(u, _base_structures),
                       unpack.format_each("\n\n{!r}"))

        self._extended_table_memory = bits.memory(
            self.floating_pointer.physical_address_pointer +
            self.header.base_table_length, self.header.extended_table_length)
        u = unpack.Unpackable(self._extended_table_memory)
        self.add_field('extended_structures',
                       unpack.unpack_all(u, _extended_structures),
                       unpack.format_each("\n\n{!r}"))
예제 #2
0
파일: smbios.py 프로젝트: kirkboy/bits
 def __init__(self):
     super(SMBIOS, self).__init__()
     u = unpack.Unpackable(self._header_memory)
     self.add_field('header', Header(u))
     self._structure_memory = bits.memory(self.header.structure_table_address, self.header.structure_table_length)
     u = unpack.Unpackable(self._structure_memory)
     self.add_field('structures', unpack.unpack_all(u, _smbios_structures, self), unpack.format_each("\n\n{!r}"))
예제 #3
0
파일: pirtable.py 프로젝트: kirkboy/bits
    def __init__(self):
        super(PIRTable, self).__init__()
        u = unpack.Unpackable(self._header_memory)
        self.add_field('header', Header(u), "\n\n{!r}")

        self._table_memory = bits.memory(bits.memory_addr(self._header_memory), self.header.table_size)
        u = unpack.Unpackable(self._table_memory)
        u.skip(0x20)
        self.add_field('structures', unpack.unpack_all(u, [SlotEntry]), unpack.format_each("\n\n{!r}"))
예제 #4
0
파일: mptable.py 프로젝트: kirkboy/bits
    def __init__(self):
        super(MPTable, self).__init__()
        u = unpack.Unpackable(self._floating_pointer_memory)
        self.add_field("floating_pointer", FloatingPointer(u))

        self._base_header_memory = bits.memory(self.floating_pointer.physical_address_pointer, 44)
        u = unpack.Unpackable(self._base_header_memory)
        self.add_field("header", Header(u), "\n\n{!r}")

        self._base_table_memory = bits.memory(
            self.floating_pointer.physical_address_pointer, self.header.base_table_length
        )
        u = unpack.Unpackable(self._base_table_memory)
        u.skip(44)
        self.add_field("base_structures", unpack.unpack_all(u, _base_structures), unpack.format_each("\n\n{!r}"))

        self._extended_table_memory = bits.memory(
            self.floating_pointer.physical_address_pointer + self.header.base_table_length,
            self.header.extended_table_length,
        )
        u = unpack.Unpackable(self._extended_table_memory)
        self.add_field(
            "extended_structures", unpack.unpack_all(u, _extended_structures), unpack.format_each("\n\n{!r}")
        )