1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #define NVPCF_FUNC_SUPPORT 0
4 #define NVPCF_FUNC_GET_STATIC_CONFIG_TABLES 1
5 #define NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS 2
7 Method (NPCF, 2, Serialized)
9 Switch (ToInteger (Arg0))
11 Case (NVPCF_FUNC_SUPPORT)
14 (1 << NVPCF_FUNC_SUPPORT) |
15 (1 << NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) |
16 (1 << NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS)))
18 Case (NVPCF_FUNC_GET_STATIC_CONFIG_TABLES)
21 /* System Device Table Header (v2.0) */
24 /* System Device Table Entries */
25 0x00, /* [3:0] CPU type (0=Intel, 1=AMD),
26 [7:4] GPU type (0=Nvidia) */
28 /* System Controller Table Header (v2.2), 1 controller entry */
29 0x22, 0x04, 0x05, 0x01,
31 /* Controller #1 Flags */
32 0x01, /* [3:0] Controller class
33 0=Disabled, 1=Dynamic Boost,
35 [7:4] Reserved. Set to 0. */
36 /* Controller #1 Params */
37 /* Class = Dynamic Boost
39 0=Not supported, 1=Supported
40 [31:1] Reserved. Set to 0. */
41 0x00, 0x00, 0x00, 0x00,
43 /* Twos-complement checksum */
47 Case (NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS)
49 Local0 = Buffer (0x31) {
50 /* Dynamic Params Table Header (1 controller entry, 0x1c bytes) */
51 0x22, 0x05, 0x10, 0x1c, 0x01 }
53 CreateWordField (Local0, 0x1d, MAGA)
54 CreateWordField (Local0, 0x19, TPPA)
55 CreateDWordField (Local0, 0x15, CEO0)
57 MAGA = 0x50 /* TGP on AC = 10W in 1/8-Watt increments */
58 TPPA = 0xc8 /* TPPA = 25W in 1/8-Watt increments */
59 CEO0 = 0x200 /* [7:0] Controller index
60 [8:8] Disable controller on AC
61 [9:9] Disable controller on DC */
66 Return (NV_ERROR_UNSUPPORTED)