Beispiel #1
0
class APICSubtable_int_flags_bits(cdata.Struct):
    _pack_ = 1
    _fields_ = [
        ('polarity', ctypes.c_uint16, 2),
        ('trigger_mode', ctypes.c_uint16, 2),
    ]
    _formats = {
        'polarity': unpack.format_table("{}", mps_inti_polarity),
        'trigger_mode': unpack.format_table("{}", mps_inti_trigger_mode),
    }
Beispiel #2
0
class FACP_v4(cdata.Struct):
    _pack_ = 1
    _fields_ = [
        ('header', TableHeader),
        ('firmware_ctrl', ctypes.c_uint32),
        ('dsdt', ctypes.c_uint32),
        ('reserved0', ctypes.c_uint8),
        ('preferred_pm_profile', ctypes.c_uint8),
        ('sci_int', ctypes.c_uint16),
        ('smi_cmd', ctypes.c_uint32),
        ('acpi_enable', ctypes.c_uint8),
        ('acpi_disable', ctypes.c_uint8),
        ('s4bios_req', ctypes.c_uint8),
        ('pstate_cnt', ctypes.c_uint8),
        ('pm1a_evt_blk', ctypes.c_uint32),
        ('pm1b_evt_blk', ctypes.c_uint32),
        ('pm1a_cnt_blk', ctypes.c_uint32),
        ('pm1b_cnt_blk', ctypes.c_uint32),
        ('pm2_cnt_blk', ctypes.c_uint32),
        ('pm_tmr_blk', ctypes.c_uint32),
        ('gpe0_blk', ctypes.c_uint32),
        ('gpe1_blk', ctypes.c_uint32),
        ('pm1_evt_len', ctypes.c_uint8),
        ('pm1_cnt_len', ctypes.c_uint8),
        ('pm2_cnt_len', ctypes.c_uint8),
        ('pm_tmr_len', ctypes.c_uint8),
        ('gpe0_blk_len', ctypes.c_uint8),
        ('gpe1_blk_len', ctypes.c_uint8),
        ('gpe1_base', ctypes.c_uint8),
        ('cst_cnt', ctypes.c_uint8),
        ('p_lvl2_lat', ctypes.c_uint16),
        ('p_lvl3_lat', ctypes.c_uint16),
        ('flush_size', ctypes.c_uint16),
        ('flush_stride', ctypes.c_uint16),
        ('duty_offset', ctypes.c_uint8),
        ('duty_width', ctypes.c_uint8),
        ('day_alrm', ctypes.c_uint8),
        ('mon_alrm', ctypes.c_uint8),
        ('century', ctypes.c_uint8),
        ('iapc_boot_arch', facp_iapc_arch_v4),
        ('reserved1', ctypes.c_uint8),
        ('flags', facp_flags_v3),
        ('reset_reg', GAS),
        ('reset_value', ctypes.c_uint8),
        ('reserved2', ctypes.c_uint8 * 3),
        ('x_firmware_ctrl', ctypes.c_uint64),
        ('x_dsdt', ctypes.c_uint64),
        ('x_pm1a_evt_blk', GAS),
        ('x_pm1b_evt_blk', GAS),
        ('x_pm1a_cnt_blk', GAS),
        ('x_pm1b_cnt_blk', GAS),
        ('x_pm2_cnt_blk', GAS),
        ('x_pm_tmr_blk', GAS),
        ('x_gpe0_blk', GAS),
        ('x_gpe1_blk', GAS),
    ]

    _formats = {
        'preferred_pm_profile': unpack.format_table("{}", _preferred_pm_profile),
    }
Beispiel #3
0
class APICSubtableLocalGIC_flags_bits(cdata.Struct):
    _pack_ = 1
    _fields_ = [
        ('enabled', ctypes.c_uint32, 1),
        ('performance_interrupt_mode', ctypes.c_uint32, 1),
    ]
    _formats = {
        'performance_interrupt_mode':
        unpack.format_table("{}", mps_inti_polarity),
    }
Beispiel #4
0
class GAS(cdata.Struct):
    _pack_ = 1
    _fields_ = [
        ('address_space_id', ctypes.c_uint8),
        ('register_bit_width', ctypes.c_uint8),
        ('register_bit_offset', ctypes.c_uint8),
        ('access_size', ctypes.c_uint8),
        ('address', ctypes.c_uint64),
    ]

    _formats = {
        'address_space_id' : unpack.format_function("{:#x}", _asid_str),
        'access_size'      : unpack.format_table("{}", _access_sizes),
    }