Files
system76-edk2/PrmPkg/PrmSsdtInstallDxe/Prm.asl
Wei6 Xu 6032b46dce PrmPkg/PrmSsdtInstallDxe: Update PRMT Device CID to PNP0C02.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4141

PRMT device is an unknown device in Device Manager if there is no
Windows Driver installed for it. It will cause WHQL Signed Driver
test failure.

To complete WHQL certification, update PRMT Device CID to PNP0C02.

In this way, PRMT Device will be a Motherboard Resources when no
real driver is loaded (default), but will be shown as the actual
device name when a legitimate Windows Driver is loaded.

Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
2022-11-08 16:08:26 +00:00

116 lines
3.6 KiB
Plaintext

/** @file
The definition block in ACPI table for PRM Operation Region
Copyright (c) 2020-2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
DefinitionBlock (
"Prm.aml",
"SSDT",
2,
"OEMID ",
"PRMOPREG",
0x1000
)
{
Scope (\_SB)
{
//
// PRM Test Device
//
Device (PRMT)
{
Name (_HID, "80860223")
Name (_CID, EisaId ("PNP0C02"))
Name (_DDN, "PRM Test Device")
//PRM operation region format
OperationRegion (PRMR, PlatformRtMechanism, 0, 1)
Field (PRMR, BufferAcc, NoLock, Preserve) //Make it ByteAcc for parameter validation
{
PRMF, 8
}
/*
* Control method to invoke PRM OperationRegion handler
* Arg0 contains a buffer representing a _DSM GUID
*/
Method (RUNS, 1)
{
/* Local0 is the PRM data buffer */
Local0 = buffer (26){}
/* Create byte fields over the buffer */
CreateByteField (Local0, 0x0, PSTA)
CreateQWordField (Local0, 0x1, USTA)
CreateByteField (Local0, 0x9, CMD)
CreateField (Local0, 0x50, 0x80, GUID)
/* Fill in the command and data fields of the data buffer */
CMD = 0 // run command
GUID = Arg0
/* Invoke PRM OperationRegion Handler and store the result into Local0 */
Local0 = (PRMF = Local0)
/* Return status */
Return (PSTA)
}
/*
* Control method to lock a PRM transaction
* Arg0 contains a buffer representing a _DSM GUID
*/
Method (LCKH, 1)
{
/* Local0 is the PRM data buffer */
Local0 = buffer (26){}
/* Create byte fields over the buffer */
CreateByteField (Local0, 0x0, STAT)
CreateByteField (Local0, 0x9, CMD)
CreateField (Local0, 0x50, 0x80, GUID)
CMD = 1 // Lock command
GUID = Arg0
Local0 = (PRMF = Local0)
/* Note STAT contains the return status */
Return (STAT)
}
/*
* Control method to unlock a PRM transaction
* Arg0 contains a buffer representing a _DSM GUID
*/
Method (ULCK, 1)
{
/* Local0 is the PRM data buffer */
Local0 = buffer (26){}
/* Create byte fields over the buffer */
CreateByteField (Local0, 0x0, STAT)
CreateByteField (Local0, 0x9, CMD)
CreateField (Local0, 0x50, 0x80, GUID)
CMD = 2 // Unlock command
GUID = Arg0
Local0 = (PRMF = Local0)
/* Note STAT contains the return status */
Return (STAT)
}
/*
*Bit [0] Set if the device is present.
*Bit [1] Set if the device is enabled and decoding its resources.
*Bit [2] Set if the device should be shown in the UI.
*Bit [3] Set if the device is functioning properly (cleared if device failed its diagnostics).
*/
Method (_STA, 0, NotSerialized)
{
Return (0x0B) // Device present, but not shown
}
}
}
}