1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
3 * User API methods for ACPI-WMI mapping driver
5 * Copyright (C) 2017 Dell, Inc.
7 #ifndef _UAPI_LINUX_WMI_H
8 #define _UAPI_LINUX_WMI_H
10 #include <linux/ioctl.h>
11 #include <linux/types.h>
13 /* WMI bus will filter all WMI vendor driver requests through this IOC */
16 /* All ioctl requests through WMI should declare their size followed by
17 * relevant data objects
19 struct wmi_ioctl_buffer
{
24 /* This structure may be modified by the firmware when we enter
25 * system management mode through SMM, hence the volatiles
27 struct calling_interface_buffer
{
30 volatile __u32 input
[4];
31 volatile __u32 output
[4];
34 struct dell_wmi_extensions
{
40 struct dell_wmi_smbios_buffer
{
42 struct calling_interface_buffer std
;
43 struct dell_wmi_extensions ext
;
46 /* Whitelisted smbios class/select commands */
47 #define CLASS_TOKEN_READ 0
48 #define CLASS_TOKEN_WRITE 1
49 #define SELECT_TOKEN_STD 0
50 #define SELECT_TOKEN_BAT 1
51 #define SELECT_TOKEN_AC 2
52 #define CLASS_FLASH_INTERFACE 7
53 #define SELECT_FLASH_INTERFACE 3
54 #define CLASS_ADMIN_PROP 10
55 #define SELECT_ADMIN_PROP 3
57 #define SELECT_RFKILL 11
58 #define SELECT_APP_REGISTRATION 3
59 #define SELECT_DOCK 22
61 /* whitelisted tokens */
62 #define CAPSULE_EN_TOKEN 0x0461
63 #define CAPSULE_DIS_TOKEN 0x0462
64 #define WSMT_EN_TOKEN 0x04EC
65 #define WSMT_DIS_TOKEN 0x04ED
67 /* Dell SMBIOS calling IOCTL command used by dell-smbios-wmi */
68 #define DELL_WMI_SMBIOS_CMD _IOWR(WMI_IOC, 0, struct dell_wmi_smbios_buffer)