Function uacpi_setup_early_table_access
uacpi_status uacpi_setup_early_table_access(void * temporary_buffer, uacpi_size buffer_size)
Description
Set up early access to the table subsystem. What this means is:
- uacpi_table_find() and similar API becomes usable before the call to uacpi_initialize().
- No kernel API besides logging and map/unmap will be invoked at this stage, allowing for heap and scheduling to still be fully offline.
- The provided 'temporary_buffer' will be used as a temporary storage for the internal metadata about the tables (list, reference count, addresses, sizes, etc).
- The 'temporary_buffer' is replaced with a normal heap buffer allocated via uacpi_kernel_alloc() after the call to uacpi_initialize() and can therefore be reclaimed by the kernel. The 'temporary_buffer' is expected to be aligned on the native pointer size boundary (4 on a 32-bit system, 8 on a 64-bit system), although any misalignment is handled gracefully and does not result in an error. The approximate overhead per table is 56 bytes, so a buffer of 4096 bytes yields about 73 tables in terms of capacity. uACPI also has an internal static buffer for tables, "UACPI_STATIC_TABLE_ARRAY_LEN", which is configured as 16 descriptors in length by default. This function is used to initialize the barebones mode, see UACPI_BAREBONES_MODE in config.h for more information.