PatchworkOS
Loading...
Searching...
No Matches
named.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <stdbool.h>
7
8typedef struct aml_object aml_object_t;
9typedef struct aml_opregion_obj aml_opregion_obj_t;
10typedef struct aml_field_unit_obj aml_field_unit_obj_t;
11typedef struct aml_term_list_ctx aml_term_list_ctx_t;
12
45
59
69
80
91
102
130
136
147
152
157
162
167
172
183
194
205
216
228
262
275
288
302
316
326
345
365
381
393
405
418
430
441
452
463
477
489
500
511
532
548
564
580
596
608
620
631
642
655
666
678
695
711
746
uint64_t aml_bit_size_t
Represents a size in bits within an opregion.
uint64_t aml_def_create_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateField structure from the AML byte stream.
Definition named.c:1133
uint64_t aml_def_opregion_read(aml_term_list_ctx_t *ctx)
Reads a DefOpRegion structure from the AML byte stream.
Definition named.c:68
uint8_t aml_proc_id_t
ProcID structure, deprecated in version 6.4 of the ACPI specification.
Definition named.h:151
uint64_t aml_def_device_read(aml_term_list_ctx_t *ctx)
Reads a DefDevice structure from the AML byte stream.
Definition named.c:593
uint64_t aml_field_flags_read(aml_term_list_ctx_t *ctx, aml_field_flags_t *out)
Reads a FieldFlags structure from the AML byte stream.
Definition named.c:122
uint64_t aml_reserved_field_read(aml_term_list_ctx_t *ctx, aml_field_list_ctx_t *fieldCtx)
Reads a ReservedField structure from the AML byte stream.
Definition named.c:258
uint32_t aml_pblk_addr_t
PblkAddr structure, deprecated in version 6.4 of the ACPI specification.
Definition named.h:156
uint64_t aml_def_index_field_read(aml_term_list_ctx_t *ctx)
Reads a DefIndexField structure from the AML byte stream.
Definition named.c:380
uint64_t aml_def_field_read(aml_term_list_ctx_t *ctx)
Reads a DefField structure from the AML byte stream.
Definition named.c:323
uint64_t aml_byte_index_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a ByteIndex structure from the AML byte stream.
Definition named.c:826
aml_access_type_t
Enum for all field access types, bits 0-3 of FieldFlags.
Definition named.h:51
uint64_t aml_def_create_byte_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateByteField structure from the AML byte stream.
Definition named.c:936
uint64_t aml_def_bank_field_read(aml_term_list_ctx_t *ctx)
Reads a DefBankField structure from the AML byte stream.
Definition named.c:451
uint64_t aml_field_element_read(aml_term_list_ctx_t *ctx, aml_field_list_ctx_t *fieldCtx)
Reads a FieldElement structure from the AML byte stream.
Definition named.c:277
uint64_t aml_sync_flags_read(aml_term_list_ctx_t *ctx, aml_sync_level_t *out)
Reads a SyncFlags structure from the AML byte stream.
Definition named.c:643
uint64_t aml_def_thermal_zone_read(aml_term_list_ctx_t *ctx)
Reads a DefThermalZone structure from the AML byte stream.
Definition named.c:988
aml_lock_rule_t
Enum for all field lock rules, bit 4 of FieldFlags.
Definition named.h:65
uint64_t aml_region_space_read(aml_term_list_ctx_t *ctx, aml_region_space_t *out)
Reads a RegionSpace structure from the AML byte stream.
Definition named.c:26
uint64_t aml_num_bits_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a NumBits structure from the AML byte stream.
Definition named.c:1122
uint64_t aml_def_create_dword_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateDWordField structure from the AML byte stream.
Definition named.c:946
uint64_t aml_def_data_region_read(aml_term_list_ctx_t *ctx)
Reads a DefDataRegion structure from the AML byte stream.
Definition named.c:1189
aml_update_rule_t
Enum for all field update rules, bits 5-6 of FieldFlags.
Definition named.h:75
uint64_t aml_def_create_word_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateWordField structure from the AML byte stream.
Definition named.c:941
uint64_t aml_def_create_qword_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateQWordField structure from the AML byte stream.
Definition named.c:951
aml_field_list_type_t
Enum for all FieldList types.
Definition named.h:97
uint64_t aml_name_field_read(aml_term_list_ctx_t *ctx, aml_field_list_ctx_t *fieldCtx)
Reads a NamedField structure from the AML byte stream.
Definition named.c:155
uint64_t aml_system_level_read(aml_term_list_ctx_t *ctx, aml_system_level_t *out)
Reads a SystemLevel structure from the AML byte stream.
Definition named.c:1038
uint64_t aml_def_create_bit_field_read(aml_term_list_ctx_t *ctx)
Reads a DefCreateBitField structure from the AML byte stream.
Definition named.c:837
uint8_t aml_system_level_t
SystemLevel structure.
Definition named.h:166
uint64_t aml_def_method_read(aml_term_list_ctx_t *ctx)
Reads a DefMethod structure from the AML byte stream.
Definition named.c:540
uint64_t aml_def_event_read(aml_term_list_ctx_t *ctx)
Reads a DefEvent structure from the AML byte stream.
Definition named.c:956
uint64_t aml_named_obj_read(aml_term_list_ctx_t *ctx)
Reads a NamedObj structure from the AML byte stream.
Definition named.c:1296
uint8_t aml_pblk_len_t
PblkLen structure, deprecated in version 6.4 of the ACPI specification.
Definition named.h:161
uint64_t aml_def_mutex_read(aml_term_list_ctx_t *ctx)
Reads a DefMutex structure from the AML byte stream.
Definition named.c:663
uint8_t aml_sync_level_t
Definition named.h:135
uint64_t aml_proc_id_read(aml_term_list_ctx_t *ctx, aml_proc_id_t *out)
Reads a ProcID structure from the AML byte stream. Deprecated in ACPI 6.4 but still supported.
Definition named.c:702
uint64_t aml_bit_index_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a BitIndex structure from the AML byte stream.
Definition named.c:815
uint64_t aml_def_processor_read(aml_term_list_ctx_t *ctx)
Reads a DefProcessor structure from the AML byte stream. Deprecated in ACPI 6.4 but still supported.
Definition named.c:732
aml_object_t * aml_source_buff_read(aml_term_list_ctx_t *ctx)
Reads a SourceBuff structure from the AML byte stream.
Definition named.c:803
uint64_t aml_pblk_len_read(aml_term_list_ctx_t *ctx, aml_pblk_len_t *out)
Reads a PblkLen structure from the AML byte stream. Deprecated in ACPI 6.4 but still supported.
Definition named.c:722
uint64_t aml_bank_value_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a BankValue structure from the AML byte stream.
Definition named.c:15
aml_region_space_t
Region Space Encoding.
Definition named.h:30
uint64_t aml_resource_order_read(aml_term_list_ctx_t *ctx, aml_resource_order_t *out)
Reads a ResourceOrder structure from the AML byte stream.
Definition named.c:1048
uint64_t aml_method_flags_read(aml_term_list_ctx_t *ctx, aml_method_flags_t *out)
Reads a MethodFlags structure from the AML byte stream.
Definition named.c:518
uint16_t aml_resource_order_t
ResourceOrder structure.
Definition named.h:171
uint64_t aml_def_power_res_read(aml_term_list_ctx_t *ctx)
Reads a DefPowerRes structure from the AML byte stream.
Definition named.c:1058
uint64_t aml_region_offset_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a RegionOffset structure from the AML byte stream.
Definition named.c:46
uint64_t aml_region_len_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a RegionLen structure from the AML byte stream.
Definition named.c:57
uint64_t aml_field_list_read(aml_term_list_ctx_t *ctx, aml_field_list_ctx_t *fieldCtx, const uint8_t *end)
Reads a FieldList structure from the AML byte stream.
Definition named.c:308
uint64_t aml_pblk_addr_read(aml_term_list_ctx_t *ctx, aml_pblk_addr_t *out)
Reads a PblkAddr structure from the AML byte stream. Deprecated in ACPI 6.4 but still supported.
Definition named.c:712
@ AML_ACCESS_TYPE_DWORD
Definition named.h:55
@ AML_ACCESS_TYPE_ANY
Definition named.h:52
@ AML_ACCESS_TYPE_QWORD
Definition named.h:56
@ AML_ACCESS_TYPE_BYTE
Definition named.h:53
@ AML_ACCESS_TYPE_BUFFER
Definition named.h:57
@ AML_ACCESS_TYPE_WORD
Definition named.h:54
@ AML_LOCK_RULE_NO_LOCK
Definition named.h:66
@ AML_LOCK_RULE_LOCK
Definition named.h:67
@ AML_UPDATE_RULE_PRESERVE
Definition named.h:76
@ AML_UPDATE_RULE_WRITE_AS_ZEROS
Definition named.h:78
@ AML_UPDATE_RULE_WRITE_AS_ONES
Definition named.h:77
@ AML_FIELD_LIST_TYPE_FIELD
FieldList is part of a DefField.
Definition named.h:98
@ AML_FIELD_LIST_TYPE_BANK_FIELD
FieldList is part of a BankField.
Definition named.h:100
@ AML_FIELD_LIST_TYPE_INDEX_FIELD
FieldList is part of an IndexField.
Definition named.h:99
@ AML_REGION_PCC
Definition named.h:41
@ AML_REGION_IPMI
Definition named.h:38
@ AML_REGION_PCI_CONFIG
Definition named.h:33
@ AML_REGION_SYSTEM_IO
Definition named.h:32
@ AML_REGION_GENERIC_SERIAL_BUS
Definition named.h:40
@ AML_REGION_PCI_BAR_TARGET
Definition named.h:37
@ AML_REGION_OEM_MIN
Definition named.h:42
@ AML_REGION_SM_BUS
Definition named.h:35
@ AML_REGION_GENERAL_PURPOSE_IO
Definition named.h:39
@ AML_REGION_EMBEDDED_CONTROL
Definition named.h:34
@ AML_REGION_SYSTEM_MEMORY
Definition named.h:31
@ AML_REGION_OEM_MAX
Definition named.h:43
@ AML_REGION_SYSTEM_CMOS
Definition named.h:36
uint64_t aml_integer_t
AML Integer type.
Definition integer.h:20
static block_t field[FIELD_HEIGHT][FIELD_WIDTH]
Definition main.c:131
__UINT32_TYPE__ uint32_t
Definition stdint.h:15
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
__UINT8_TYPE__ uint8_t
Definition stdint.h:11
__UINT16_TYPE__ uint16_t
Definition stdint.h:13
FieldFlags structure.
Definition named.h:86
aml_lock_rule_t lockRule
Definition named.h:88
aml_access_type_t accessType
Definition named.h:87
aml_update_rule_t updateRule
Definition named.h:89
Context passed to lower functions by aml_field_list_read().
Definition named.h:108
aml_field_unit_obj_t * bank
Definition named.h:125
aml_field_flags_t flags
The flags of the FieldList.
Definition named.h:110
aml_integer_t bankValue
Definition named.h:126
aml_bit_size_t currentOffset
The current offset within the opregion.
Definition named.h:111
aml_opregion_obj_t * opregion
Definition named.h:115
aml_field_unit_obj_t * index
Definition named.h:119
aml_field_list_type_t type
The type of FieldList.
Definition named.h:109
aml_field_unit_obj_t * data
Definition named.h:120
Data for a field unit object.
Definition object.h:246
MethodFlags structure.
Definition named.h:142
bool isSerialized
true if method is serialized, false if not
Definition named.h:144
uint8_t argCount
Amount of arguments (0-7)
Definition named.h:143
aml_sync_level_t syncLevel
Synchronization level (0-15)
Definition named.h:145
ACPI object.
Definition object.h:425
Data for an operation region object.
Definition object.h:323
Context for reading a TermList.
Definition term.h:37