ReactOS 0.4.16-dev-1946-g52006dd
osi.h
Go to the documentation of this file.
1#pragma once
2
3#include <uacpi/types.h>
4#include <uacpi/status.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#ifndef UACPI_BAREBONES_MODE
11
38
39/*
40 * Returns the "latest" AML-queried _OSI vendor interface.
41 *
42 * E.g. for the following AML code:
43 * _OSI("Windows 2021")
44 * _OSI("Windows 2000")
45 *
46 * This function will return UACPI_VENDOR_INTERFACE_WINDOWS_11, since this is
47 * the latest version of the interface the code queried, even though the
48 * "Windows 2000" query came after "Windows 2021".
49 */
51
58
59/*
60 * Install or uninstall an interface.
61 *
62 * The interface kind is used for matching during interface enumeration in
63 * uacpi_bulk_configure_interfaces().
64 *
65 * After installing an interface, all _OSI queries report it as supported.
66 */
69);
71
79
80/*
81 * Same as install/uninstall interface, but comes with an enum of known
82 * interfaces defined by the ACPI specification. These are disabled by default
83 * as they depend on the host kernel support.
84 */
87
89 (const uacpi_char *name, uacpi_bool supported);
90
91/*
92 * Set a custom interface query (_OSI) handler.
93 *
94 * This callback will be invoked for each _OSI query with the value
95 * passed in the _OSI, as well as whether the interface was detected as
96 * supported. The callback is able to override the return value dynamically
97 * or leave it untouched if desired (e.g. if it simply wants to log something or
98 * do internal bookkeeping of some kind).
99 */
101
106
107/*
108 * Bulk interface configuration, used to disable or enable all interfaces that
109 * match 'kind'.
110 *
111 * This is generally only needed to work around buggy hardware, for example if
112 * requested from the kernel command line.
113 *
114 * By default, all vendor strings (like "Windows 2000") are enabled, and all
115 * host features (like "3.0 Thermal Model") are disabled.
116 */
119);
120
121#endif // !UACPI_BAREBONES_MODE
122
123#ifdef __cplusplus
124}
125#endif
bool uacpi_bool
Definition: types.h:31
char uacpi_char
Definition: types.h:44
uacpi_status
Definition: status.h:10
action
Definition: namespace.c:707
uacpi_host_interface
Definition: osi.h:72
@ UACPI_HOST_INTERFACE_3_0_THERMAL_MODEL
Definition: osi.h:75
@ UACPI_HOST_INTERFACE_3_0_SCP_EXTENSIONS
Definition: osi.h:76
@ UACPI_HOST_INTERFACE_MODULE_DEVICE
Definition: osi.h:73
@ UACPI_HOST_INTERFACE_PROCESSOR_AGGREGATOR_DEVICE
Definition: osi.h:77
@ UACPI_HOST_INTERFACE_PROCESSOR_DEVICE
Definition: osi.h:74
uacpi_interface_kind
Definition: osi.h:52
@ UACPI_INTERFACE_KIND_ALL
Definition: osi.h:55
@ UACPI_INTERFACE_KIND_FEATURE
Definition: osi.h:54
@ UACPI_INTERFACE_KIND_VENDOR
Definition: osi.h:53
uacpi_bool(* uacpi_interface_handler)(const uacpi_char *name, uacpi_bool supported)
Definition: osi.h:89
uacpi_interface_action
Definition: osi.h:102
@ UACPI_INTERFACE_ACTION_ENABLE
Definition: osi.h:104
@ UACPI_INTERFACE_ACTION_DISABLE
Definition: osi.h:103
uacpi_status uacpi_enable_host_interface(uacpi_host_interface)
Definition: osi.c:304
uacpi_status uacpi_install_interface(const uacpi_char *name, uacpi_interface_kind)
Definition: osi.c:173
uacpi_status uacpi_uninstall_interface(const uacpi_char *name)
Definition: osi.c:226
uacpi_status uacpi_set_interface_query_handler(uacpi_interface_handler)
Definition: osi.c:314
uacpi_vendor_interface uacpi_latest_queried_vendor_interface(void)
Definition: osi.c:136
uacpi_status uacpi_disable_host_interface(uacpi_host_interface)
Definition: osi.c:309
uacpi_vendor_interface
Definition: osi.h:12
@ UACPI_VENDOR_INTERFACE_WINDOWS_VISTA_SP2
Definition: osi.h:23
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_RS3
Definition: osi.h:30
@ UACPI_VENDOR_INTERFACE_WINDOWS_11_22H2
Definition: osi.h:36
@ UACPI_VENDOR_INTERFACE_WINDOWS_10
Definition: osi.h:27
@ UACPI_VENDOR_INTERFACE_WINDOWS_11
Definition: osi.h:35
@ UACPI_VENDOR_INTERFACE_WINDOWS_8
Definition: osi.h:25
@ UACPI_VENDOR_INTERFACE_WINDOWS_XP_SP2
Definition: osi.h:18
@ UACPI_VENDOR_INTERFACE_WINDOWS_SERVER_2003
Definition: osi.h:17
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_RS5
Definition: osi.h:32
@ UACPI_VENDOR_INTERFACE_WINDOWS_VISTA_SP1
Definition: osi.h:22
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_RS4
Definition: osi.h:31
@ UACPI_VENDOR_INTERFACE_WINDOWS_SERVER_2003_SP1
Definition: osi.h:19
@ UACPI_VENDOR_INTERFACE_WINDOWS_SERVER_2008
Definition: osi.h:21
@ UACPI_VENDOR_INTERFACE_WINDOWS_XP_SP1
Definition: osi.h:16
@ UACPI_VENDOR_INTERFACE_NONE
Definition: osi.h:13
@ UACPI_VENDOR_INTERFACE_WINDOWS_7
Definition: osi.h:24
@ UACPI_VENDOR_INTERFACE_WINDOWS_XP
Definition: osi.h:15
@ UACPI_VENDOR_INTERFACE_WINDOWS_8_1
Definition: osi.h:26
@ UACPI_VENDOR_INTERFACE_WINDOWS_VISTA
Definition: osi.h:20
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_20H1
Definition: osi.h:34
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_19H1
Definition: osi.h:33
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_RS1
Definition: osi.h:28
@ UACPI_VENDOR_INTERFACE_WINDOWS_10_RS2
Definition: osi.h:29
@ UACPI_VENDOR_INTERFACE_WINDOWS_2000
Definition: osi.h:14
uacpi_status uacpi_bulk_configure_interfaces(uacpi_interface_action action, uacpi_interface_kind kind)
Definition: osi.c:337
Definition: name.c:39