iPXE
|
Go to the source code of this file.
Macros | |
#define | DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) |
#define | MCDI_SEQ_MASK 0xf |
#define | MCDI_DECLARE_BUF(_name, _len) efx_dword_t _name[DIV_ROUND_UP(_len, 4)] |
#define | MCDI_DECLARE_BUF_OUT_OR_ERR(_name, _len) MCDI_DECLARE_BUF(_name, max_t(size_t, _len, 8)) |
#define | _MCDI_PTR(_buf, _offset) ((u8 *)(_buf) + (_offset)) |
#define | MCDI_PTR(_buf, _field) _MCDI_PTR(_buf, MC_CMD_ ## _field ## _OFST) |
#define | _MCDI_CHECK_ALIGN(_ofst, _align) ((_ofst) + BUILD_BUG_ON_ZERO((_ofst) & (_align - 1))) |
#define | _MCDI_DWORD(_buf, _field) ((_buf) + (_MCDI_CHECK_ALIGN(MC_CMD_ ## _field ## _OFST, 4) >> 2)) |
#define | MCDI_WORD(_buf, _field) |
#define | MCDI_SET_DWORD(_buf, _field, _value) EFX_POPULATE_DWORD_1(*_MCDI_DWORD(_buf, _field), EFX_DWORD_0, _value) |
#define | MCDI_DWORD(_buf, _field) EFX_DWORD_FIELD(*_MCDI_DWORD(_buf, _field), EFX_DWORD_0) |
#define | MCDI_POPULATE_DWORD_1(_buf, _field, _name1, _value1) |
#define | MCDI_POPULATE_DWORD_2(_buf, _field, _name1, _value1, _name2, _value2) |
#define | MCDI_POPULATE_DWORD_3(_buf, _field, _name1, _value1, _name2, _value2, _name3, _value3) |
#define | MCDI_POPULATE_DWORD_4(_buf, _field, _name1, _value1, _name2, _value2, _name3, _value3, _name4, _value4) |
#define | MCDI_POPULATE_DWORD_5(_buf, _field, _name1, _value1, _name2, _value2, _name3, _value3, _name4, _value4, _name5, _value5) |
#define | MCDI_POPULATE_DWORD_6(_buf, _field, _name1, _value1, _name2, _value2, _name3, _value3, _name4, _value4, _name5, _value5, _name6, _value6) |
#define | MCDI_POPULATE_DWORD_7(_buf, _field, _name1, _value1, _name2, _value2, _name3, _value3, _name4, _value4, _name5, _value5, _name6, _value6, _name7, _value7) |
#define | MCDI_SET_QWORD(_buf, _field, _value) |
#define | MCDI_QWORD(_buf, _field) |
#define | MCDI_FIELD(_ptr, _type, _field) |
#define | _MCDI_ARRAY_PTR(_buf, _field, _index, _align) |
#define | MCDI_DECLARE_STRUCT_PTR(_name) efx_dword_t *_name |
#define | MCDI_ARRAY_STRUCT_PTR(_buf, _field, _index) ((efx_dword_t *)_MCDI_ARRAY_PTR(_buf, _field, _index, 4)) |
#define | MCDI_VAR_ARRAY_LEN(_len, _field) |
#define | MCDI_ARRAY_WORD(_buf, _field, _index) |
#define | _MCDI_ARRAY_DWORD(_buf, _field, _index) |
#define | MCDI_SET_ARRAY_DWORD(_buf, _field, _index, _value) |
#define | MCDI_ARRAY_DWORD(_buf, _field, _index) EFX_DWORD_FIELD(*_MCDI_ARRAY_DWORD(_buf, _field, _index), EFX_DWORD_0) |
#define | _MCDI_ARRAY_QWORD(_buf, _field, _index) |
#define | MCDI_SET_ARRAY_QWORD(_buf, _field, _index, _value) |
#define | MCDI_ARRAY_FIELD(_buf, _field1, _type, _index, _field2) |
#define | MCDI_EVENT_FIELD(_ev, _field) EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
#define MCDI_DECLARE_BUF | ( | _name, | |
_len | |||
) | efx_dword_t _name[DIV_ROUND_UP(_len, 4)] |
#define MCDI_DECLARE_BUF_OUT_OR_ERR | ( | _name, | |
_len | |||
) | MCDI_DECLARE_BUF(_name, max_t(size_t, _len, 8)) |
#define _MCDI_PTR | ( | _buf, | |
_offset | |||
) | ((u8 *)(_buf) + (_offset)) |
#define MCDI_PTR | ( | _buf, | |
_field | |||
) | _MCDI_PTR(_buf, MC_CMD_ ## _field ## _OFST) |
#define _MCDI_CHECK_ALIGN | ( | _ofst, | |
_align | |||
) | ((_ofst) + BUILD_BUG_ON_ZERO((_ofst) & (_align - 1))) |
#define _MCDI_DWORD | ( | _buf, | |
_field | |||
) | ((_buf) + (_MCDI_CHECK_ALIGN(MC_CMD_ ## _field ## _OFST, 4) >> 2)) |
#define MCDI_WORD | ( | _buf, | |
_field | |||
) |
#define MCDI_SET_DWORD | ( | _buf, | |
_field, | |||
_value | |||
) | EFX_POPULATE_DWORD_1(*_MCDI_DWORD(_buf, _field), EFX_DWORD_0, _value) |
#define MCDI_DWORD | ( | _buf, | |
_field | |||
) | EFX_DWORD_FIELD(*_MCDI_DWORD(_buf, _field), EFX_DWORD_0) |
#define MCDI_POPULATE_DWORD_1 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1 | |||
) |
#define MCDI_POPULATE_DWORD_2 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2 | |||
) |
#define MCDI_POPULATE_DWORD_3 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2, | |||
_name3, | |||
_value3 | |||
) |
#define MCDI_POPULATE_DWORD_4 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2, | |||
_name3, | |||
_value3, | |||
_name4, | |||
_value4 | |||
) |
#define MCDI_POPULATE_DWORD_5 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2, | |||
_name3, | |||
_value3, | |||
_name4, | |||
_value4, | |||
_name5, | |||
_value5 | |||
) |
#define MCDI_POPULATE_DWORD_6 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2, | |||
_name3, | |||
_value3, | |||
_name4, | |||
_value4, | |||
_name5, | |||
_value5, | |||
_name6, | |||
_value6 | |||
) |
#define MCDI_POPULATE_DWORD_7 | ( | _buf, | |
_field, | |||
_name1, | |||
_value1, | |||
_name2, | |||
_value2, | |||
_name3, | |||
_value3, | |||
_name4, | |||
_value4, | |||
_name5, | |||
_value5, | |||
_name6, | |||
_value6, | |||
_name7, | |||
_value7 | |||
) |
#define MCDI_SET_QWORD | ( | _buf, | |
_field, | |||
_value | |||
) |
#define MCDI_QWORD | ( | _buf, | |
_field | |||
) |
#define MCDI_FIELD | ( | _ptr, | |
_type, | |||
_field | |||
) |
#define _MCDI_ARRAY_PTR | ( | _buf, | |
_field, | |||
_index, | |||
_align | |||
) |
#define MCDI_DECLARE_STRUCT_PTR | ( | _name | ) | efx_dword_t *_name |
#define MCDI_ARRAY_STRUCT_PTR | ( | _buf, | |
_field, | |||
_index | |||
) | ((efx_dword_t *)_MCDI_ARRAY_PTR(_buf, _field, _index, 4)) |
#define MCDI_VAR_ARRAY_LEN | ( | _len, | |
_field | |||
) |
#define MCDI_ARRAY_WORD | ( | _buf, | |
_field, | |||
_index | |||
) |
#define _MCDI_ARRAY_DWORD | ( | _buf, | |
_field, | |||
_index | |||
) |
#define MCDI_SET_ARRAY_DWORD | ( | _buf, | |
_field, | |||
_index, | |||
_value | |||
) |
#define MCDI_ARRAY_DWORD | ( | _buf, | |
_field, | |||
_index | |||
) | EFX_DWORD_FIELD(*_MCDI_ARRAY_DWORD(_buf, _field, _index), EFX_DWORD_0) |
#define _MCDI_ARRAY_QWORD | ( | _buf, | |
_field, | |||
_index | |||
) |
#define MCDI_SET_ARRAY_QWORD | ( | _buf, | |
_field, | |||
_index, | |||
_value | |||
) |
#define MCDI_ARRAY_FIELD | ( | _buf, | |
_field1, | |||
_type, | |||
_index, | |||
_field2 | |||
) |
#define MCDI_EVENT_FIELD | ( | _ev, | |
_field | |||
) | EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |