23 if (unresolved ==
NULL)
43 if (unresolved ==
NULL)
84 if (unresolved->
callback(&state, match, obj) ==
ERR)
87 LOG_ERR(
"Failed to patch up unresolved object\n");
95 LOG_ERR(
"Unresolved object did not change type\n");
aml_object_t * aml_namespace_find_by_name_string(aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString)
Find an object in the namespace heirarchy by a name string.
@ AML_UNRESOLVED
Not in the spec, used internally to represent unresolved references.
uint64_t aml_patch_up_init(void)
Initialize the patch-up system.
uint64_t aml_patch_up_unresolved_count(void)
Get the number of unresolved references in the global list.
void aml_patch_up_remove_unresolved(aml_unresolved_obj_t *unresolved)
Removes an unresolved reference from the global list.
uint64_t aml_patch_up_resolve_all(void)
Attempts to resolve all unresolved references.
uint64_t aml_patch_up_add_unresolved(aml_unresolved_obj_t *unresolved)
Adds a unresolved reference to the global list.
uint64_t aml_state_init(aml_state_t *state, aml_object_t **args)
Initialize an AML state.
void aml_state_deinit(aml_state_t *state)
Deinitialize an AML state.
const char * aml_name_string_to_string(const aml_name_string_t *nameString)
Convert an aml NameString to a string.
#define LOG_ERR(format,...)
#define LOG_DEBUG(format,...)
#define LOG_PANIC(format,...)
#define EINVAL
Invalid argument.
#define errno
Error number variable.
#define EILSEQ
Illegal byte sequence.
#define LIST_FOR_EACH(elem, list, member)
Iterates over a list.
static uint64_t list_length(list_t *list)
Gets the length of the list.
#define LIST_FOR_EACH_SAFE(elem, temp, list, member)
Safely iterates over a list, allowing for element removal during iteration.
static void list_remove(list_t *list, list_entry_t *entry)
Removes a list entry from its current list.
static void list_push(list_t *list, list_entry_t *entry)
Pushes an entry to the end of the list.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
static void list_init(list_t *list)
Initializes a list.
#define NULL
Pointer error value.
#define ERR
Integer error value.
#define CONTAINER_OF(ptr, type, member)
Container of macro.
static list_t unresolvedObjects
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
Entry in the global list of unresolved references.
aml_unresolved_obj_t * unresolved
The unresolved object.
list_entry_t entry
List entry for the global list of unresolved references.
aml_namespace_overlay_t overlay
Holds any named objects created during parsing.
Data for an unresolved object.
aml_name_string_t nameString
The NameString representing the path to the target object.
aml_object_t * from
The object to start the search from when resolving the reference.
aml_patch_up_resolve_callback_t callback
The callback to call when a matching object is found.