1#pragma once
2
3#include <uacpi/types.h>
4#include <uacpi/log.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/**
11 * Set the minimum log level to be accepted by the logging facilities. Any logs
12 * below this level are discarded and not passed to uacpi_kernel_log, etc.
13 *
14 * 0 is treated as a special value that resets the setting to the default value.
15 *
16 * E.g. for a log level of UACPI_LOG_INFO:
17 * UACPI_LOG_DEBUG -> discarded
18 * UACPI_LOG_TRACE -> discarded
19 * UACPI_LOG_INFO -> allowed
20 * UACPI_LOG_WARN -> allowed
21 * UACPI_LOG_ERROR -> allowed
22 */
23void uacpi_context_set_log_level(uacpi_log_level);
24
25/**
26 * Enables table checksum validation at installation time instead of first use.
27 * Note that this makes uACPI map the entire table at once, which not all
28 * hosts are able to handle at early init.
29 */
30void uacpi_context_set_proactive_table_checksum(uacpi_bool);
31
32#ifndef UACPI_BAREBONES_MODE
33/**
34 * Set the maximum number of seconds a While loop is allowed to run for before
35 * getting timed out.
36 *
37 * 0 is treated a special value that resets the setting to the default value.
38 */
39void uacpi_context_set_loop_timeout(uacpi_u32 seconds);
40
41/**
42 * Set the maximum call stack depth AML can reach before getting aborted.
43 *
44 * 0 is treated as a special value that resets the setting to the default value.
45 */
46void uacpi_context_set_max_call_stack_depth(uacpi_u32 depth);
47
48uacpi_u32 uacpi_context_get_loop_timeout(void);
49#endif // !UACPI_BAREBONES_MODE
50
51#ifdef __cplusplus
52}
53#endif
54