PatchworkOS
Loading...
Searching...
No Matches
namespace.h File Reference
#include <kernel/acpi/aml/encoding/name.h>
#include <kernel/utils/map.h>
#include <kernel/defs.h>
#include <stdint.h>
#include <sys/list.h>

Go to the source code of this file.

Data Structures

struct  aml_namespace_overlay_t
 Namespace overlay. More...
 

Macros

#define AML_NAME(a, b, c, d)
 Macro to create an aml_name_t from 4 characters.
 
#define AML_NAME_UNDEFINED   AML_NAME('x', 'x', 'x', 'x')
 Macro for an undefined name.
 
#define AML_NAME_TO_STRING(name)    (char[]){((name)) & 0xFF, ((name) >> 8) & 0xFF, ((name) >> 16) & 0xFF, ((name) >> 24) & 0xFF, '\0'}
 Macro to convert an aml_name_t to a stack allocated string.
 

Typedefs

typedef uint32_t aml_name_t
 Name type.
 

Functions

uint64_t aml_namespace_init (aml_object_t *root)
 Initialize the namespace heirarchy.
 
uint64_t aml_namespace_expose (void)
 Expose the entire namespace heirarchy to sysfs.
 
aml_object_taml_namespace_get_root (void)
 Get the root object of the namespace heirarchy.
 
aml_object_taml_namespace_find_child (aml_namespace_overlay_t *overlay, aml_object_t *parent, aml_name_t name)
 Find a child object directly under a parent object in the namespace heirarchy.
 
aml_object_taml_namespace_find (aml_namespace_overlay_t *overlay, aml_object_t *start, uint64_t nameCount,...)
 Find an object in the namespace heirarchy by name segments.
 
aml_object_taml_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_object_taml_namespace_find_by_path (aml_namespace_overlay_t *overlay, aml_object_t *start, const char *path)
 Find an object in the namespace heirarchy by a path string.
 
uint64_t aml_namespace_add_child (aml_namespace_overlay_t *overlay, aml_object_t *parent, aml_name_t name, aml_object_t *object)
 Add an child to a parent in the namespace heirarchy.
 
uint64_t aml_namespace_add_by_name_string (aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString, aml_object_t *object)
 Add an object to the namespace heirarchy using a name string.
 
void aml_namespace_remove (aml_object_t *object)
 Remove an object from the namespace heirarchy it was added to.
 
uint64_t aml_namespace_commit (aml_namespace_overlay_t *overlay)
 Commit all names in a namespace overlay to the global namespace heirarchy.
 
uint64_t aml_namespace_overlay_init (aml_namespace_overlay_t *overlay)
 Initialize a namespace overlay.
 
void aml_namespace_overlay_deinit (aml_namespace_overlay_t *overlay)
 Deinitialize a namespace overlay.
 
void aml_namespace_overlay_set_parent (aml_namespace_overlay_t *overlay, aml_namespace_overlay_t *parent)
 Set the parent of a namespace overlay.
 
aml_namespace_overlay_taml_namespace_overlay_get_highest_that_contains (aml_namespace_overlay_t *overlay, aml_object_t *object)
 Search a overlay and its parents for the first overlay that contains the given object.