VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/PrmPkg/PrmSsdtInstallDxe/Prm.asl@ 99895

Last change on this file since 99895 was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 3.5 KB
Line 
1/** @file
2 The definition block in ACPI table for PRM Operation Region
3
4 Copyright (c) 2020-2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6**/
7
8DefinitionBlock (
9 "Prm.aml",
10 "SSDT",
11 2,
12 "OEMID ",
13 "PRMOPREG",
14 0x1000
15 )
16{
17 Scope (\_SB)
18 {
19 //
20 // PRM Test Device
21 //
22 Device (PRMT)
23 {
24 Name (_HID, "80860223")
25 Name (_CID, EisaId ("PNP0C02"))
26 Name (_DDN, "PRM Test Device")
27
28 //PRM operation region format
29 OperationRegion (PRMR, PlatformRtMechanism, 0, 1)
30 Field (PRMR, BufferAcc, NoLock, Preserve) //Make it ByteAcc for parameter validation
31 {
32 PRMF, 8
33 }
34
35 /*
36 * Control method to invoke PRM OperationRegion handler
37 * Arg0 contains a buffer representing a _DSM GUID
38 */
39 Method (RUNS, 1)
40 {
41 /* Local0 is the PRM data buffer */
42 Local0 = buffer (26){}
43
44 /* Create byte fields over the buffer */
45 CreateByteField (Local0, 0x0, PSTA)
46 CreateQWordField (Local0, 0x1, USTA)
47 CreateByteField (Local0, 0x9, CMD)
48 CreateField (Local0, 0x50, 0x80, GUID)
49
50 /* Fill in the command and data fields of the data buffer */
51 CMD = 0 // run command
52 GUID = Arg0
53
54 /* Invoke PRM OperationRegion Handler and store the result into Local0 */
55 Local0 = (PRMF = Local0)
56
57 /* Return status */
58 Return (PSTA)
59 }
60
61 /*
62 * Control method to lock a PRM transaction
63 * Arg0 contains a buffer representing a _DSM GUID
64 */
65 Method (LCKH, 1)
66 {
67 /* Local0 is the PRM data buffer */
68 Local0 = buffer (26){}
69
70 /* Create byte fields over the buffer */
71 CreateByteField (Local0, 0x0, STAT)
72 CreateByteField (Local0, 0x9, CMD)
73 CreateField (Local0, 0x50, 0x80, GUID)
74 CMD = 1 // Lock command
75 GUID = Arg0
76 Local0 = (PRMF = Local0)
77
78 /* Note STAT contains the return status */
79 Return (STAT)
80 }
81
82 /*
83 * Control method to unlock a PRM transaction
84 * Arg0 contains a buffer representing a _DSM GUID
85 */
86 Method (ULCK, 1)
87 {
88 /* Local0 is the PRM data buffer */
89 Local0 = buffer (26){}
90
91 /* Create byte fields over the buffer */
92 CreateByteField (Local0, 0x0, STAT)
93 CreateByteField (Local0, 0x9, CMD)
94 CreateField (Local0, 0x50, 0x80, GUID)
95 CMD = 2 // Unlock command
96 GUID = Arg0
97 Local0 = (PRMF = Local0)
98
99 /* Note STAT contains the return status */
100 Return (STAT)
101 }
102
103 /*
104 *Bit [0] Set if the device is present.
105 *Bit [1] Set if the device is enabled and decoding its resources.
106 *Bit [2] Set if the device should be shown in the UI.
107 *Bit [3] Set if the device is functioning properly (cleared if device failed its diagnostics).
108 */
109 Method (_STA, 0, NotSerialized)
110 {
111 Return (0x0B) // Device present, but not shown
112 }
113 }
114 }
115}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette