Specifications
©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 73
///////////////////////////////////////////////////////////////////////////////////////////////////////////
//Code for Lid Switch control. //
// This code is based on Lid switch connected to ExtEvent0. //
// ExtEvent0 causes ACPI event 16 or 0x10 //
// ExtEvent0 trigger polarity is controlled by GPIO register 37h, bit 0 //
// PMIO reg 37h bit 0 = 0 Trigger ACPI event on falling edge //
// PMIO reg 37h bit 0 = 1 Trigger ACPI event on rising edge //
// //
// In addition, ExtEvent0 needs to be enabled for ACPI event. Device 14h, //
// function 0, register 66h, bit 6 should be set to 1 in the BIOS //
// initialization code for ExtEvent0 to be ACPI event causing SMI. //
///////////////////////////////////////////////////////////////////////////////////////// //
OperationRegion (PMIO, SystemIO, 0xCD6, 0x2)
Field (PMIO, ByteAcc, NoLock, Preserve)
{
INPM,8,
DAPM,8
}
IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve) //R07
{
Offset(0x37), // To change trigger polarity for ExtEvent0
LPOL,1, // 1 = rising edge, 0 = falling edge
//
} //end of indexed field
// Define the Lid Device. Lid switch is connected to ExtEvent0 which
// causes ACPI event 16 (0x10)
Device(\_SB.LID)
{
Name(_HID, EISAID("PNP0C0D"))
Method(_LID)
{










