55
ACPI In Windows ACPI In Windows Vista Vista Allen Marshall Allen Marshall Lead Program Manager Lead Program Manager Windows Core Platform Windows Core Platform Architecture Architecture Microsoft Corporation Microsoft Corporation

ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows Vista

Allen MarshallAllen MarshallLead Program ManagerLead Program ManagerWindows Core Platform ArchitectureWindows Core Platform ArchitectureMicrosoft CorporationMicrosoft Corporation

Page 2: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

AgendaAgenda

ACPI Support in Windows VistaACPI Support in Windows VistaACPI Version supportACPI Version support

Machine Role FlagsMachine Role Flags

Screen BrightnessScreen Brightness

_OSI_OSI

Processor Power ManagementProcessor Power Management

PCI ExpressPCI Express

ACPI Driver InterfaceACPI Driver Interface

ACPI Test and DebuggingACPI Test and Debugging

Common ACPI ErrorsCommon ACPI Errors

Page 3: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsOverviewOverview

Windows Vista requires ACPI Windows Vista requires ACPI Non-ACPI HALs are not available in Windows VistaNon-ACPI HALs are not available in Windows VistaLegacy power management and BIOS configuration Legacy power management and BIOS configuration implementations are no longer supportedimplementations are no longer supported

Both ACPI and Windows have seen Both ACPI and Windows have seen continual advancementscontinual advancementsACPI offers significant system advantagesACPI offers significant system advantages

Close platform integration with the operating system Close platform integration with the operating system Greatly increased reliability, diagnosabilityGreatly increased reliability, diagnosability

Windows ACPI support promotes Windows ACPI support promotes faster system developmentfaster system development

Rich ACPI feature supportRich ACPI feature supportExtensive ACPI debugging supportExtensive ACPI debugging supportACPI table overload for rapid system bring-upACPI table overload for rapid system bring-up

Page 4: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsMicrosoft ASL compiler updateMicrosoft ASL compiler update

Updated ASL compiler now availableUpdated ASL compiler now availableVersion 3.0.0 releasedVersion 3.0.0 released

Supports ACPI 2.0, 3.0 objects required for Windows VistaSupports ACPI 2.0, 3.0 objects required for Windows Vista

Provides several features to facilitate development Provides several features to facilitate development and debuggingand debugging

Saves ACPI tables from firmware to disk fileSaves ACPI tables from firmware to disk file

Un-assembling AML into ASLUn-assembling AML into ASL

Loading ACPI tables from disk, bypassing BIOS ROMsLoading ACPI tables from disk, bypassing BIOS ROMsSee details later in this presentationSee details later in this presentation

Available for download from Windows Hardware Available for download from Windows Hardware and Driver Central (WHDC)and Driver Central (WHDC)

http://http://go.microsoft.com/fwlink/?LinkIdgo.microsoft.com/fwlink/?LinkId=66535=66535

Page 5: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaACPI version supportACPI version support

Windows Vista supports select objects Windows Vista supports select objects from ACPI 2.0, 3.0 specificationsfrom ACPI 2.0, 3.0 specifications

Windows operating systems typically do not Windows operating systems typically do not support all features of any one version support all features of any one version of the ACPI specificationof the ACPI specification

Key elements from ACPI are selected to support Key elements from ACPI are selected to support development of emerging hardware, e.g.development of emerging hardware, e.g.

PCI ExpressPCI Express

Mobile dual core processorsMobile dual core processors

High Performance Event Timers (HPET)High Performance Event Timers (HPET)

Page 6: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaUsing RSDT versus XSDTUsing RSDT versus XSDT

In Windows Vista, if the RSDP Revision field is > 2In Windows Vista, if the RSDP Revision field is > 2Windows will use the XSDT in place of the RSDTWindows will use the XSDT in place of the RSDT

Windows will calculate the checksum of the entire RSDPWindows will calculate the checksum of the entire RSDPMust match the Extended Checksum fieldMust match the Extended Checksum field

Ensure your XSDT address is valid if you report Ensure your XSDT address is valid if you report Revision > 2 in the RSDPRevision > 2 in the RSDP

Leverage the RSDP to support both older Leverage the RSDP to support both older and newer operating systemsand newer operating systems

RSDT can point to tables with older version supportRSDT can point to tables with older version support

XSDT points to newer tablesXSDT points to newer tables

Page 7: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaFADT implementation detailsFADT implementation details

If the FADT Revision field is > 2, If the FADT Revision field is > 2, Windows Vista will use the extended Windows Vista will use the extended 64-bit addresses in the FADT64-bit addresses in the FADT

X_FIRMWARE_CTRL and X_DSDTX_FIRMWARE_CTRL and X_DSDT

Extended addresses of ACPI fixed hardwareExtended addresses of ACPI fixed hardwareX_PM1a_EVT_BLK, etc.X_PM1a_EVT_BLK, etc.

DSDT Revision field is used to enable DSDT Revision field is used to enable ACPI 2.0 and greater interpreter supportACPI 2.0 and greater interpreter support

A Revision > 1 enables interpreter support A Revision > 1 enables interpreter support for ACPI 2.0 and greaterfor ACPI 2.0 and greater

All integers are treated as 64-bit in ASLAll integers are treated as 64-bit in ASL

Page 8: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaACPI interpreter supportACPI interpreter support

The Windows Vista AML interpreter features The Windows Vista AML interpreter features expanded implicit source data type conversionexpanded implicit source data type conversion

Only enabled for a subset of opcodesOnly enabled for a subset of opcodesIndex()Index()

Two-operand logical operatorsTwo-operand logical operators

Introduction of this change is constrained Introduction of this change is constrained to limit incompatibilities with existing ASLto limit incompatibilities with existing ASL

As a best practice, leverage using explicit conversion As a best practice, leverage using explicit conversion functions in your ASL to ensure the type correctness, e.g.functions in your ASL to ensure the type correctness, e.g.

ToBuffer()ToBuffer()

ToInteger()ToInteger()

See “Debugging type mismatch warnings” See “Debugging type mismatch warnings” in the Backup section of this presentationin the Backup section of this presentation

Page 9: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaScreen brightnessScreen brightness

Laptop LCD brightness controls today are often Laptop LCD brightness controls today are often implemented with proprietary interfacesimplemented with proprietary interfaces

SMM, Embedded Controller firmwareSMM, Embedded Controller firmwareMay required 3rd party driver to enable Fn+n hot keysMay required 3rd party driver to enable Fn+n hot keys

Breaks on OS upgradeBreaks on OS upgradeNo in-box support after clean OS installNo in-box support after clean OS installNot easily debuggedNot easily debuggedOEM code maintenance burdenOEM code maintenance burden

Leveraging ACPI makes tight integration Leveraging ACPI makes tight integration with the operating system easywith the operating system easy

Simplifies the implementationSimplifies the implementationReduces development and support costsReduces development and support costsEnhances reliabilityEnhances reliabilityImproves customer experienceImproves customer experience

Page 10: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaScreen brightnessScreen brightness

Windows Vista supports the ACPI Windows Vista supports the ACPI Appendix B screen brightness objectsAppendix B screen brightness objects

_BCL, _BCM_BCL, _BCM

Screen brightness levels are Screen brightness levels are controlled via Vista power policycontrolled via Vista power policy

When _BCL, _BCM are presentWhen _BCL, _BCM are present

Separate brightness levels for each Separate brightness levels for each power policy, and for AC and DCpower policy, and for AC and DC

Page 11: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaScreen brightnessScreen brightness

Vista provides a temporary Vista provides a temporary override to control brightnessoverride to control brightness

Slider control in Windows Mobility CenterSlider control in Windows Mobility Center

WMI interface exposed WMI interface exposed to control screen brightnessto control screen brightness

Get and set the current brightness levelGet and set the current brightness level

Notification on change eventsNotification on change events

Allows for custom controlsAllows for custom controls

For details, refer to the white paperFor details, refer to the white paper““Integrating with Windows Vista Power Management”Integrating with Windows Vista Power Management”

Page 12: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows Machine role flagsMachine role flags

Windows Vista leverages the FADT Windows Vista leverages the FADT Preferred_PM_Profile flagsPreferred_PM_Profile flags

Allows platform firmware to indicate to OSPM Allows platform firmware to indicate to OSPM if the system is mobile, desktop, server, etc.if the system is mobile, desktop, server, etc.

Enables Windows to accurately determine Enables Windows to accurately determine the default power policy for the systemthe default power policy for the system

Previous Windows operating systems Previous Windows operating systems determine a mobile PC based on the determine a mobile PC based on the presence of a long-term batterypresence of a long-term battery

Vista falls back to this if Preferred_PM_Profile is 0Vista falls back to this if Preferred_PM_Profile is 0

Page 13: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows Machine role flagsMachine role flags

Used throughout Windows Vista to make Used throughout Windows Vista to make mobile versus desktop determinationmobile versus desktop determination

e.g., disable Hybrid Sleep on mobile PCse.g., disable Hybrid Sleep on mobile PCs

Exposed to application software Exposed to application software through new Win32 APIthrough new Win32 API

PowerDeterminePlatformRole()PowerDeterminePlatformRole()

Page 14: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsOperating system interfaceOperating system interface

_OSI method can be used to determine _OSI method can be used to determine the version of Windows running on the systemthe version of Windows running on the system

Windows Vista string is: “Windows 2006”Windows Vista string is: “Windows 2006”

OS vendor is the only interface string supported by Windows VistaOS vendor is the only interface string supported by Windows Vista

Windows will return “true” for all OS interface levels supportedWindows will return “true” for all OS interface levels supported

Other _OSI stringsOther _OSI stringsWindows 2000: “Windows 2000”Windows 2000: “Windows 2000”

Windows XP RTM: “Windows 2001”Windows XP RTM: “Windows 2001”

Windows XP SP1: “Windows 2001 SP1”Windows XP SP1: “Windows 2001 SP1”

Windows XP SP2: “Windows 2001 SP2”Windows XP SP2: “Windows 2001 SP2”

Windows Server 2003: “Windows 2001.1”Windows Server 2003: “Windows 2001.1”

Windows Server 2003 SP1: “Windows 2001.1 SP1”Windows Server 2003 SP1: “Windows 2001.1 SP1”

Page 15: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaProcessor power managementProcessor power management

ACPI 3.0 domain dependency objectsACPI 3.0 domain dependency objects

For multi-processor systems, these For multi-processor systems, these describe any of the relationships betweendescribe any of the relationships between

Physical packagesPhysical packages

Physical coresPhysical cores

Logical coresLogical cores

Describes how OSPM must Describes how OSPM must coordinate state transitionscoordinate state transitions

Performance states, idle Performance states, idle sleep states, throttle statessleep states, throttle states

Page 16: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaProcessor power managementProcessor power management

Methods supportedMethods supported_PSD (CPU performance state dependency)_PSD (CPU performance state dependency)

_TSD (CPU throttle state dependency)_TSD (CPU throttle state dependency)

_CSD (CPU idle state dependency)_CSD (CPU idle state dependency)

C-states on systems with more than one C-states on systems with more than one CPU must be hardware coordinatedCPU must be hardware coordinated

_CSD must report CoordType _CSD must report CoordType 0xFE HW_ALL0xFE HW_ALL

Otherwise, Vista will disable Otherwise, Vista will disable all C-states deeper than C1all C-states deeper than C1

Page 17: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI In Windows VistaACPI In Windows VistaProcessor power managementProcessor power management

New ACPI 3.0 throttling controlsNew ACPI 3.0 throttling controlsExpand the control interface beyond P_BLKExpand the control interface beyond P_BLK

Allows the use of Functional Fixed Hardware address spaceAllows the use of Functional Fixed Hardware address space

Accommodates processor architecture-specific controlsAccommodates processor architecture-specific controls

Allows dynamic throttle statesAllows dynamic throttle states

Objects supportedObjects supported_PTC_PTC

_TSS_TSS

_TPC_TPC

_TDC_TDC

Notify (Notify (cpucpu, 0x82), 0x82)

Page 18: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows PCI ExpressPCI Express

Windows Vista requires _OSC Windows Vista requires _OSC on PCI Express root bridgeson PCI Express root bridges

Enables native OS control of PCI Express featuresEnables native OS control of PCI Express features

Windows will first evaluate _OSC to query Windows will first evaluate _OSC to query for supported capabilitiesfor supported capabilities

Evaluate _OSC again to assume controlEvaluate _OSC again to assume control

Firmware must grant native OS control of Firmware must grant native OS control of allall control field control field feature bits, otherwise Windows takes control of nonefeature bits, otherwise Windows takes control of none

ASPMASPM

Hot plugHot plug

Power Management Event (PME)Power Management Event (PME)

Advanced Error ReportingAdvanced Error Reporting

For details, seeFor details, seeCPA070 “PCI Express In Depth for Windows Vista”CPA070 “PCI Express In Depth for Windows Vista”

Page 19: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows PCI Express errata flagsPCI Express errata flags

Normally, _OSC should control these featuresNormally, _OSC should control these features

Windows Vista will look for FADT flags to Windows Vista will look for FADT flags to globally disable some PCI Express featuresglobally disable some PCI Express features

Message-signaled interruptsMessage-signaled interrupts

Active State Power ManagementActive State Power Management

These flags are intended as a temporary, These flags are intended as a temporary, stop-gap mechanismstop-gap mechanism

These features are required per specThese features are required per spec

Page 20: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows PCI Express FADT errata flagsPCI Express FADT errata flags

However, as PCI Express development However, as PCI Express development continues, there are a number of systems continues, there are a number of systems that fail to work correctlythat fail to work correctly

This necessitates a platform firmware This necessitates a platform firmware override mechanismoverride mechanism

The need for these flags will The need for these flags will diminish as PCI Express chipset diminish as PCI Express chipset development maturesdevelopment matures

Future versions of Windows may Future versions of Windows may require these flags to be clearrequire these flags to be clear

Page 21: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In Windows ACPI Support In Windows PCI Express and legacy GPEPCI Express and legacy GPE

Don’t assert legacy GPE bits whenDon’t assert legacy GPE bits whenWindows is granted control of PCI Express PMEWindows is granted control of PCI Express PME

Firmware must not assert legacy GPE to notify Firmware must not assert legacy GPE to notify OSPM of device wakeOSPM of device wake

Windows is granted control of PCI Express Hot Plug Windows is granted control of PCI Express Hot Plug

If system wakes from PCI Express device, set If system wakes from PCI Express device, set PCIEXP_WAKE_STS bit in PM1_STS registerPCIEXP_WAKE_STS bit in PM1_STS register

Required to accurately notify Windows Vista Required to accurately notify Windows Vista of platform wake sourceof platform wake source

Page 22: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsReporting wake sourcesReporting wake sources

It is important that platform firmware It is important that platform firmware correctly reports wake sourcescorrectly reports wake sources

ACPI Fixed Feature hardwareACPI Fixed Feature hardware

GPE status bitsGPE status bits

PCI Express devicePCI Express device

Ensure your GPE handler issues Ensure your GPE handler issues Notify() on appropriate deviceNotify() on appropriate device

Otherwise, Windows may misrepresent Otherwise, Windows may misrepresent the system wake sourcethe system wake source

Page 23: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsReporting wake sourcesReporting wake sources

Windows Vista will log and Windows Vista will log and display system wake sourcesdisplay system wake sources

Available in the system event logAvailable in the system event log

Can be viewed with the power Can be viewed with the power command line tool command line tool powercfg.exepowercfg.exe

C:\>powercfg /lastwakeWake History Count - 1Wake History [0] Wake Source Count - 1 Wake Source [0] Type: Device Instance Path: USB\ROOT_HUB\4&6a6c62d&0 Friendly Name: Description: USB Root Hub Manufacturer: (Standard USB Host Controller)

Page 24: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsReporting wake sourcesReporting wake sources

Example – system event log entryExample – system event log entry

Page 25: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

- Data 2006-04-07T02:37:27.841Z [ Name] SleepTime - Data 2006-04-07T16:30:55.390Z [ Name] WakeTime - Data 7660 [ Name] SleepDuration - Data 595 [ Name] WakeDuration - Data 5945 [ Name] DriverInitDuration - Data 576 [ Name] BiosInitDuration - Data 147 [ Name] HiberWriteDuration - Data 0 [ Name] HiberReadDuration - Data 0 [ Name] HiberPagesWritten - Data 0 [ Name] Attributes - Data 4 [ Name] TargetState - Data 4 [ Name] EffectiveState - Data 3 [ Name] WakeSourceType - Data 17 [ Name] WakeSourceTextLength - Data ACPI Sleep Button [ Name] WakeSourceText

ACPI Support In WindowsACPI Support In WindowsReporting wake sourcesReporting wake sources

Example – system event log wake detailsExample – system event log wake details

Page 26: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsReporting wake sourcesReporting wake sources

Carefully handle unattended wake eventsCarefully handle unattended wake events

When a machine wakes due to an PME# event When a machine wakes due to an PME# event or a remote event, BIOS ASL should not issue a or a remote event, BIOS ASL should not issue a Notify(btn, 0x02) to the fixed feature power Notify(btn, 0x02) to the fixed feature power button in order to wake the monitorbutton in order to wake the monitor

This indicates User Present to WindowsThis indicates User Present to Windows

The power manager willThe power manager willTurn on the displayTurn on the display

Exit Away Mode, if enabledExit Away Mode, if enabled

Apply the current power policy for system idle timeoutApply the current power policy for system idle timeout

This can break power management scenariosThis can break power management scenariosConsider a Media PCConsider a Media PC

Page 27: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support in WindowsACPI Support in WindowsACPI Driver InterfaceACPI Driver Interface

Currently drivers can callCurrently drivers can callIOCTL_ACPI_EVAL_METHODIOCTL_ACPI_EVAL_METHOD

IOCTL_ACPI_ASYNC_EVAL_METHODIOCTL_ACPI_ASYNC_EVAL_METHOD

Requires a handle to device you Requires a handle to device you want to evaluate method forwant to evaluate method for

No capability to enumerate or evaluate No capability to enumerate or evaluate control methods of child devicescontrol methods of child devices

Workarounds often involve redundant Workarounds often involve redundant information in namespaceinformation in namespace

Page 28: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support in WindowsACPI Support in WindowsACPI Driver InterfaceACPI Driver Interface

Windows does not allow arbitrary Windows does not allow arbitrary execution of control methodsexecution of control methods

Drivers should not evaluate methods Drivers should not evaluate methods on devices they have no knowledge ofon devices they have no knowledge of

Breaks rules of encapsulation Breaks rules of encapsulation

Leads to system instabilityLeads to system instability

Compromise: Allow control method execution on Compromise: Allow control method execution on child devices beneath the device handle openedchild devices beneath the device handle opened

Device should have knowledge of child devicesDevice should have knowledge of child devices

Allows for cleaner BIOS code in the futureAllows for cleaner BIOS code in the futureNo need to duplicate information in namespaceNo need to duplicate information in namespace

Page 29: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsACPI Driver InterfaceACPI Driver Interface

New IOCTLs to enumerate and evaluate child New IOCTLs to enumerate and evaluate child device control methodsdevice control methods

IOCTL_ACPI_EVAL_METHOD_EXIOCTL_ACPI_EVAL_METHOD_EX

IOCTL_ACPI_ASYNC_EVAL_METHOD_EXIOCTL_ACPI_ASYNC_EVAL_METHOD_EX

Take an additional “Name” fieldTake an additional “Name” fieldRelative in namespace to the device Relative in namespace to the device you have a handle toyou have a handle to

Can be arbitrarily deepCan be arbitrarily deep

Support passing/returning 64-bit integersSupport passing/returning 64-bit integers

Page 30: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsACPI Driver InterfaceACPI Driver Interface

IOCTL_ACPI_ENUM_CHILDRENIOCTL_ACPI_ENUM_CHILDRENAllows enumeration of one level, or multi-levelAllows enumeration of one level, or multi-level

Supports passing in a filterSupports passing in a filterOnly return specific children Only return specific children

e.g., return only children with _STA methode.g., return only children with _STA method

Returns back an array of child nodesReturns back an array of child nodesFlags indicate if a child has descendentFlags indicate if a child has descendent

Page 31: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Support In WindowsACPI Support In WindowsECDT TableECDT Table

ECDT – EC Boot Resource TableECDT – EC Boot Resource TableProvides processor-relative resources Provides processor-relative resources of an Embedded Controllerof an Embedded Controller

Allows EC op region access before the Allows EC op region access before the entire namespace has been evaluatedentire namespace has been evaluated

Without this table, EC region space is Without this table, EC region space is not available until EC device is enumeratednot available until EC device is enumerated

Verify by providing a _REG method under the ECVerify by providing a _REG method under the EC

Windows Vista will return 2 when _REV is evaluatedWindows Vista will return 2 when _REV is evaluatedIndicates firmware should use ECDTIndicates firmware should use ECDT

Page 32: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Test And DebuggingACPI Test And DebuggingExtracting ACPI tablesExtracting ACPI tables

The Microsoft ASL compiler supports exporting The Microsoft ASL compiler supports exporting ACPI tables and saving them to a disk fileACPI tables and saving them to a disk file

Extracted as ASLExtracted as ASL

Tables may be modified, temporarily re-loaded on a systemTables may be modified, temporarily re-loaded on a systemFacilitates development and debuggingFacilitates development and debugging

Intended only as a firmware development aid – not for deployment!Intended only as a firmware development aid – not for deployment!

UsageUsage

asl /tab=DSDT

Produces DSDT.asl

- or –

Asl /=tab*

Produces ACPI.TXT (all tables)

Page 33: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

ACPI Test And DebuggingACPI Test And DebuggingLoading ACPI tablesLoading ACPI tables

Tables may be loaded from the Tables may be loaded from the registry instead of from BIOS ROMregistry instead of from BIOS ROM

Requires the checked version of Requires the checked version of acpi.sysacpi.sys

The table to be overloaded must already The table to be overloaded must already be present in the system's BIOS ROMbe present in the system's BIOS ROM

For instance, the DSDT can be overloadedFor instance, the DSDT can be overloaded

If the machine does not have an SSDT, you cannot force an If the machine does not have an SSDT, you cannot force an SSDT to be loaded from this registry override mechanismSSDT to be loaded from this registry override mechanism

The table with the highest version The table with the highest version number will be loaded number will be loaded

The table loaded into the registry for testing must have a The table loaded into the registry for testing must have a higher version number than the same table in the BIOS ROMhigher version number than the same table in the BIOS ROM

Page 34: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsBIOS using OS memoryBIOS using OS memory

Windows Vista validates Windows Vista validates ACPI memory type definitionsACPI memory type definitions

Microsoft has seen instances Microsoft has seen instances of firmware accessing OS memoryof firmware accessing OS memory

This is a fatal errorThis is a fatal error

Stop 0xA5 (ACPI_BIOS_ERROR)Stop 0xA5 (ACPI_BIOS_ERROR)0x10000x1000

<address><address>

<length><length>

Seen when additional memory added to systemsSeen when additional memory added to systemsCarefully design for top of memory rangeCarefully design for top of memory range

Page 35: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsBIOS using OS reclaim memoryBIOS using OS reclaim memory

Windows Vista validates ACPI memory type definitionsWindows Vista validates ACPI memory type definitionsDuring development, Microsoft discovered instances During development, Microsoft discovered instances of table load from ACPI reclaim memoryof table load from ACPI reclaim memory

ACPI reclaim memory is available for OS ACPI reclaim memory is available for OS use after ACPI mode has been enableduse after ACPI mode has been enabled

Problem is that memory operation region Problem is that memory operation region is mapped as ACPI reclaimis mapped as ACPI reclaim

This is incorrect, per the ACPI specificationThis is incorrect, per the ACPI specification

Load opcode was clarified in ACPI 3.0aLoad opcode was clarified in ACPI 3.0a

Common error in example code for handling Common error in example code for handling processor power management capabilitiesprocessor power management capabilities

OEMs and system designers should obtain the latest processor power OEMs and system designers should obtain the latest processor power management ACPI reference code from your processor vendormanagement ACPI reference code from your processor vendor

Page 36: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsGPE index out of rangeGPE index out of range

Windows Vista validates the index of Windows Vista validates the index of general-purpose event bits (GPEs)general-purpose event bits (GPEs)

GPE indexes referenced must be within GPE indexes referenced must be within the length of the GPE register blocksthe length of the GPE register blocks

Validation failure results Validation failure results in a fatal system errorin a fatal system error

Stop 0xA5 (ACPI_BIOS_ERROR)Stop 0xA5 (ACPI_BIOS_ERROR)Subcode 1 = 0x17 ACPI_INVALID_GPE_INDEXSubcode 1 = 0x17 ACPI_INVALID_GPE_INDEX

Subcode 2 = GPE bit index specifiedSubcode 2 = GPE bit index specified

Page 37: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsMemory corruption during sleepMemory corruption during sleep

During Vista development, BIOS During Vista development, BIOS corruptions of the low 1MB of memory corruptions of the low 1MB of memory were observed across suspend/were observed across suspend/resume transitionsresume transitions

BIOS developers need to ensure that BIOS developers need to ensure that their code does not have this issuetheir code does not have this issue

Detect this problem with Driver VerifierDetect this problem with Driver Verifier

Page 38: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsMemory corruption during sleepMemory corruption during sleep

This check is automatically This check is automatically enabled on checked buildsenabled on checked builds

System checksums low 1 MB of memory System checksums low 1 MB of memory before, after suspend/resumebefore, after suspend/resume

Corruption results in stop error 0xC4 Corruption results in stop error 0xC4 DRIVER_VERIFIER_DETECTED_VIOLATIONDRIVER_VERIFIER_DETECTED_VIOLATION

Subcode 0xB7 indicates the BIOS Subcode 0xB7 indicates the BIOS has corrupted low physical memoryhas corrupted low physical memory

Parameters 2,3,4: Number of corrupt Parameters 2,3,4: Number of corrupt pages, first corrupt page, last corrupt pagepages, first corrupt page, last corrupt page

Page 39: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Common ACPI ErrorsCommon ACPI ErrorsUpdate table versionsUpdate table versions

Be sure to update OEM Revision Be sure to update OEM Revision field in your table headersfield in your table headers

Windows applies BIOS work-arounds Windows applies BIOS work-arounds based on this revisionbased on this revision

Failure to update this revision may Failure to update this revision may result in loss of functionalityresult in loss of functionality

Example: BIOS known to have problems Example: BIOS known to have problems with PCI Express ASPM has this feature disabledwith PCI Express ASPM has this feature disabled

Updated ACPI BIOS corrects the problem, but fails Updated ACPI BIOS corrects the problem, but fails to update OEM Revision in description headerto update OEM Revision in description header

Windows will continue to disable this featureWindows will continue to disable this feature

Page 40: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Call To ActionCall To Action

Ensure your systems properly Ensure your systems properly support ACPI for Windows Vistasupport ACPI for Windows Vista

Leverage ACPI in place of proprietary Leverage ACPI in place of proprietary solutions wherever possiblesolutions wherever possible

Test your ACPI implementations Test your ACPI implementations using checked builds or with using checked builds or with Driver Verifier enabledDriver Verifier enabled

Take advantage of Microsoft’s ASL Take advantage of Microsoft’s ASL compiler and debugger extensions compiler and debugger extensions to facilitate ACPI developmentto facilitate ACPI development

Page 41: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

Additional ResourcesAdditional Resources

Web ResourcesWeb ResourcesWhite papers, other resourcesWhite papers, other resourceshttp://www.microsoft.com/whdc/system/pnppwr/powermgmt/defaulhttp://www.microsoft.com/whdc/system/pnppwr/powermgmt/default.mspxt.mspx

Microsoft ACPI Source Language (ASL) Compiler v3.00Microsoft ACPI Source Language (ASL) Compiler v3.00http://http://go.microsoft.com/fwlink/?LinkIdgo.microsoft.com/fwlink/?LinkId=66535=66535

ACPI Specification: ACPI Specification: http://www.acpi.infohttp://www.acpi.info

Related SessionsRelated SessionsCPA075 Power Management in Windows VistaCPA075 Power Management in Windows Vista

CPA060 Kernel Plug and Play Support in Windows VistaCPA060 Kernel Plug and Play Support in Windows Vista

CPA070 PCI Express in Depth for Windows Vista and BeyondCPA070 PCI Express in Depth for Windows Vista and Beyond

For questions about ACPI in Windows, contact Microsoft For questions about ACPI in Windows, contact Microsoft at:at:

aslhelp @ microsoft.comaslhelp @ microsoft.com

Page 42: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupPCI Express FADT override flagsPCI Express FADT override flags

BOOT_ARCHBit

Length

Bit Offset

Description

LEGACY_DEVICESLEGACY_DEVICES 11 00 If set, indicates that the motherboard supports user-visible devices on the If set, indicates that the motherboard supports user-visible devices on the LPC or ISA bus. User-visible devices are devices that have end-user LPC or ISA bus. User-visible devices are devices that have end-user accessible connectors (for example, LPT port), or devices for which the OS accessible connectors (for example, LPT port), or devices for which the OS must load a device driver so that an end-user application can use a device. If must load a device driver so that an end-user application can use a device. If clear, the OS may assume there are no such devices and that all devices in clear, the OS may assume there are no such devices and that all devices in the system can be detected exclusively via industry standard device the system can be detected exclusively via industry standard device enumeration mechanisms (including the ACPI namespace). enumeration mechanisms (including the ACPI namespace).

80428042 11 11 If set, indicates that the motherboard contains support for a port 60 and 64 If set, indicates that the motherboard contains support for a port 60 and 64 based keyboard controller, usually implemented as an 8042 or equivalent based keyboard controller, usually implemented as an 8042 or equivalent micro-controller.micro-controller.

VGA Not PresentVGA Not Present 11 22 If set, indicates to OSPM that it must not blindly probe the VGA hardware If set, indicates to OSPM that it must not blindly probe the VGA hardware (that responds to MMIO addresses A0000h-BFFFFh and IO ports 3B0h-(that responds to MMIO addresses A0000h-BFFFFh and IO ports 3B0h-3BBh and 3C0h-3DFh) that may cause machine check on this system. If 3BBh and 3C0h-3DFh) that may cause machine check on this system. If clear, indicates to OSPM that it is safe to probe the VGA hardware.clear, indicates to OSPM that it is safe to probe the VGA hardware.

MSI Not Supported 1 3 If set, indicates to OSPM that it must not enable Message Signaled Interrupts (MSI) on this platform.

PCIe ASPM Controls 1 4 If set, indicates to OSPM that it must not enable ASPM on this platform.

ReservedReserved 1111 55 Must be 0.Must be 0.

Page 43: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI DebuggingACPI Debugging

Debugging Tools for Windows can be Debugging Tools for Windows can be used to debug issues with ASLused to debug issues with ASL

Microsoft provides a kernel debugger Microsoft provides a kernel debugger extension that enables AML debuggingextension that enables AML debugging

Included with Debugging Tools for WindowsIncluded with Debugging Tools for Windows

Some commands required Some commands required the checked acpi.systhe checked acpi.sys

Page 44: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Common CommandsACPI Debugging – Common Commands

!!amliamli find < find <objobj>>Finds all objects in the ACPI namespace with the specified nameFinds all objects in the ACPI namespace with the specified name

!!amliamli dnsdns /s < /s <full_obj_pathfull_obj_path>>Displays the specified namespace object and all elements underneathDisplays the specified namespace object and all elements underneath

!!amliamli u <method> u <method>Unassembles the corresponding ACPI method into ASL opcodesUnassembles the corresponding ACPI method into ASL opcodes

!!amliamli lclcLists all the AML contexts currently inside the interpreter; the running Lists all the AML contexts currently inside the interpreter; the running context is denoted with a “*” in the beginning of the entry linecontext is denoted with a “*” in the beginning of the entry line

!!amliamli dsdsDisplays the interpreter stack in the current running contextDisplays the interpreter stack in the current running context

!!nsobjnsobjDisplays namespace object informationDisplays namespace object information

These commands are available in the retail (fre) version of the acpi.sys driver

Page 45: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Common CommandsACPI Debugging – Common Commands

!!amliamli lnln <method> | < <method> | <addraddr>>Unassembles the nearest method to the specified lineUnassembles the nearest method to the specified line

!!amliamli set <options> set <options>Sets a variety of options related to ACPI debugging, such as turning Sets a variety of options related to ACPI debugging, such as turning spew on, break on error, break on namespace loading time, etc.spew on, break on error, break on namespace loading time, etc.

!!amliamli [ [bpbp | | blbl | | bcbc | | bdbd | be] | be]Commands that work with AML Breakpoints functioning exactly Commands that work with AML Breakpoints functioning exactly like the equivalent commands inside regular kd environmentlike the equivalent commands inside regular kd environment

!!amliamli [p | t] [p | t]Steps/traces over a line of AML codeSteps/traces over a line of AML code

!!amliamli r rDisplays the current context info, including local variablesDisplays the current context info, including local variables

These commands require the checked version of the acpi.sys driver

Page 46: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Example 1ACPI Debugging – Example 1

Determine why a device is not wake-capableDetermine why a device is not wake-capable

0: kd> !devstack 0x837d4b980: kd> !devstack 0x837d4b98 !DevObj !DrvObj !DevExt ObjectName!DevObj !DrvObj !DevExt ObjectName 837de020 \Driver\pci 837de0d8837de020 \Driver\pci 837de0d8 837d55e8 \Driver\ACPI 837ceb70837d55e8 \Driver\ACPI 837ceb70> 837d4b98 \Driver\pci 837d4c50 NTPNP_PCI0003> 837d4b98 \Driver\pci 837d4c50 NTPNP_PCI0003!DevNode 837daa88 :!DevNode 837daa88 : DeviceInst is "PCI\VEN_xxxx&DEV_yyyy&SUBSYS_00000000&REV_xx\DeviceInst is "PCI\VEN_xxxx&DEV_yyyy&SUBSYS_00000000&REV_xx\a&123b45cd&6&e7"a&123b45cd&6&e7" ServiceName is "pci“ServiceName is "pci“

2.2. From the From the !devstack!devstack output we can get the ACPI device extension output we can get the ACPI device extension

0: kd> dt acpi!_DEVICE_EXTENSION 0: kd> dt acpi!_DEVICE_EXTENSION 837ceb70837ceb70........ +0x164 RemoveEvent : (null)+0x164 RemoveEvent : (null) +0x168 AcpiObject : 0x837c4070 _NSObj+0x168 AcpiObject : 0x837c4070 _NSObj +0x16c DeviceObject : 0x837d55e8 _DEVICE_OBJECT+0x16c DeviceObject : 0x837d55e8 _DEVICE_OBJECT........

1.1. We know this device is a PCI bus, and from the output We know this device is a PCI bus, and from the output of of !pcitree!pcitree, we get the following , we get the following !devstack!devstack

Page 47: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

3.3. From the ACPI device extension, we can see From the ACPI device extension, we can see the namespace object corresponding to itthe namespace object corresponding to it0: kd> !nsobj 0: kd> !nsobj 0x837c40700x837c4070

nsobj: dumping object at 837c4070nsobj: dumping object at 837c4070NameSpace Object NameSpace Object PCI3PCI3 (00000000837c4070) – (00000000837c4070) –

Device ffffffff837ceb70Device ffffffff837ceb70 Flink ffffffff837c4ce8 Blink Flink ffffffff837c4ce8 Blink

ffffffff837c33f8ffffffff837c33f8 Parent ffffffff837c0920 Child Parent ffffffff837c0920 Child

ffffffff837c40bcffffffff837c40bc Value 0000000000000000 Length Value 0000000000000000 Length

00000000000000000000000000000000 Buffer 0000000000000000 Flags Buffer 0000000000000000 Flags

00000000000000000000000000000000

Object Data - 00000000837c4090 Type – 06 Object Data - 00000000837c4090 Type – 06 <Device><Device>4.4. With the namespace object of the device, we can find With the namespace object of the device, we can find

all namespace objects corresponding to itall namespace objects corresponding to it

0: kd> !amli find 0: kd> !amli find PCI3PCI3\_SB.PCI0.PCI3\_SB.PCI0.PCI3

BackupBackupACPI Debugging – Example 1ACPI Debugging – Example 1

Page 48: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Example 1ACPI Debugging – Example 1

5.5. With the full namespace path, we can now display the actual objectWith the full namespace path, we can now display the actual object

0: kd> !amli dns /s 0: kd> !amli dns /s \_SB.PCI0.PCI3\_SB.PCI0.PCI3

ACPI Name Space: \_SB.PCI0.PCI3 (ffffffff837c33f8)ACPI Name Space: \_SB.PCI0.PCI3 (ffffffff837c33f8)Device(PCI3)Device(PCI3)| Method(_S1D:Flags=0x0,CodeBuff=ffffffff837c0d6d,Len=3)| Method(_S1D:Flags=0x0,CodeBuff=ffffffff837c0d6d,Len=3)| Method(_S3D:Flags=0x0,CodeBuff=ffffffff837c34ed,Len=14)| Method(_S3D:Flags=0x0,CodeBuff=ffffffff837c34ed,Len=14)| Method(_S4D:Flags=0x0,CodeBuff=ffffffff837c3565,Len=14)| Method(_S4D:Flags=0x0,CodeBuff=ffffffff837c3565,Len=14)| Method(_S5D:Flags=0x0,CodeBuff=ffffffff837c35dd,Len=14)| Method(_S5D:Flags=0x0,CodeBuff=ffffffff837c35dd,Len=14)| Method(_ADR:Flags=0x0,CodeBuff=ffffffff837c3655,Len=9)| Method(_ADR:Flags=0x0,CodeBuff=ffffffff837c3655,Len=9)| Integer(_UID:Value=0x0000000000000016[22])| Integer(_UID:Value=0x0000000000000016[22])........

6.6. From examining the namespace object we can see From examining the namespace object we can see the object does not have capability to wake the the object does not have capability to wake the system, since no _PRW package is present.system, since no _PRW package is present.

Page 49: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Example 2ACPI Debugging – Example 2

The system has encountered Bug Check 0x7E in acpi.sysThe system has encountered Bug Check 0x7E in acpi.sys

1.1. Using the kernel debugger, we examine the stack traceUsing the kernel debugger, we examine the stack trace::1: kd> kn1: kd> kn *** Stack trace for last set context - .thread/.cxr resets it*** Stack trace for last set context - .thread/.cxr resets it # ChildEBP RetAddr# ChildEBP RetAddr00 f7936cb0 f7365bae ACPI!WriteSystemMem+0x6a00 f7936cb0 f7365bae ACPI!WriteSystemMem+0x6a01 f7936ce0 f7365d1a ACPI!AccessBaseField+0x1f701 f7936ce0 f7365d1a ACPI!AccessBaseField+0x1f702 f7936d04 f7365df0 ACPI!AccessFieldData+0x15c02 f7936d04 f7365df0 ACPI!AccessFieldData+0x15c03 f7936d2c f7367d77 ACPI!WriteFieldObj+0xcb03 f7936d2c f7367d77 ACPI!WriteFieldObj+0xcb04 f7936d54 f7369622 ACPI!RunContext+0x6504 f7936d54 f7369622 ACPI!RunContext+0x65........

2.2. Since the system was running in the ACPI driver, Since the system was running in the ACPI driver, we examine the AML context that was running:we examine the AML context that was running:

1: kd> !amli lc1: kd> !amli lc*Ctxt=ffffffff865be000, ThID=ffffffff865c06a0, Flgs=A--CR----, *Ctxt=ffffffff865be000, ThID=ffffffff865c06a0, Flgs=A--CR----, pbOp=ffffffff865af4a5pbOp=ffffffff865af4a5, , Obj=\_SB.PCI0._INIObj=\_SB.PCI0._INI

1: kd> !amli ds1: kd> !amli dsffffffff865af65b: ffffffff865af65b: \_SB.MSM1()\_SB.MSM1()ffffffff86541627: \_SB.MSM2()ffffffff86541627: \_SB.MSM2()0: \_SB.PCI0._INI() 0: \_SB.PCI0._INI()

3.3. And we display the AML interpreter’s stack and And we display the AML interpreter’s stack and find that it was running the method find that it was running the method \_SB.MSM1()\_SB.MSM1()

Page 50: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Example 2ACPI Debugging – Example 2

4.4. From the AML context, we can see the current opcode points at From the AML context, we can see the current opcode points at ffffffff865af4a5ffffffff865af4a5. However this would be the next opcode run, so . However this would be the next opcode run, so we unassemble \_SB.MSM1() to examine the previous opcodewe unassemble \_SB.MSM1() to examine the previous opcode

1: kd> !amli u \_SB.MSM11: kd> !amli u \_SB.MSM1ffffffff865af469 : If(LEqual(^MSTB, Ones))ffffffff865af469 : If(LEqual(^MSTB, Ones))ffffffff865af473 : {ffffffff865af473 : {ffffffff865af473 : | If(CondRefOf(\_OSI, Local0)) ffffffff865af473 : | If(CondRefOf(\_OSI, Local0)) ffffffff865af47e : | {ffffffff865af47e : | {ffffffff865af47e : | | If(\_OSI("Windows 2001.1"))ffffffff865af47e : | | If(\_OSI("Windows 2001.1"))ffffffff865af495 : | | {ffffffff865af495 : | | {ffffffff865af495 : | | | Store(0x20, ^MSV1)ffffffff865af495 : | | | Store(0x20, ^MSV1)ffffffff865af49d : | | | Store(0x20, ^MSV2)ffffffff865af49d : | | | Store(0x20, ^MSV2)ffffffff865af4a5 : | | }ffffffff865af4a5 : | | }ffffffff865af4a5ffffffff865af4a5 : | | Else : | | Elseffffffff865af4a8 : | | {ffffffff865af4a8 : | | {ffffffff865af4a8 : | | | If(\_OSI("Windows 2001 SP1"))ffffffff865af4a8 : | | | If(\_OSI("Windows 2001 SP1"))ffffffff865af4c1 : | | | {ffffffff865af4c1 : | | | {........

Page 51: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupACPI Debugging – Example 2ACPI Debugging – Example 2

5.5. From the unassembled AML code, we can tell the problem From the unassembled AML code, we can tell the problem is within the Store(0x20, ^MSV2) call. We can display the is within the Store(0x20, ^MSV2) call. We can display the information for ^MSV2information for ^MSV2

1: kd> !amli dns /s \_SB.MSV21: kd> !amli dns /s \_SB.MSV2ACPI Name Space: \_SB.MSV2 (ffffffff865af3d0)ACPI Name Space: \_SB.MSV2 (ffffffff865af3d0)FieldUnit(TPOS:FieldParent=ffffffff865af38cFieldUnit(TPOS:FieldParent=ffffffff865af38c,ByteOffset=0x0,StartBit=0x0,NumBits=8,FieldFlags=0x0),ByteOffset=0x0,StartBit=0x0,NumBits=8,FieldFlags=0x0)

1: kd> !amli dns /s 1: kd> !amli dns /s ffffffff865af38cffffffff865af38cACPI Name Space: \_SB. (ffffffff865af38c)ACPI Name Space: \_SB. (ffffffff865af38c)Field(:Field(:Base=MSO1Base=MSO1))

1: kd> !amli dns /s 1: kd> !amli dns /s \_SB.MS01\_SB.MS01ACPI Name Space: \_SB.MSO1 (ffffffff865af348)ACPI Name Space: \_SB.MSO1 (ffffffff865af348)OpRegion(OSTY:RegionSpace=SystemMemory,OpRegion(OSTY:RegionSpace=SystemMemory,Offset=0x0,Len=-65465Offset=0x0,Len=-65465))

6.6. \_SB.MSV2 is a field unit, which is a part of the field parent \\_SB.MSV2 is a field unit, which is a part of the field parent \_SB.MSO1_SB.MSO1

7.7. From this, we can tell there is something wrong with the object \From this, we can tell there is something wrong with the object \_SB.MSO1, since it has a 0 offset and a negative length. At this point _SB.MSO1, since it has a 0 offset and a negative length. At this point we can go back to looking at the ASL to see how it is defined.we can go back to looking at the ASL to see how it is defined.

Page 52: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupAdditional ACPI Debugger extensionsAdditional ACPI Debugger extensions

!!acpicacheacpicache Displays all of the ACPI tables cached Displays all of the ACPI tables cached by the hardware application layer (HAL) by the hardware application layer (HAL)

!!acpiinfacpiinf Displays ACPI information such as the location of system Displays ACPI information such as the location of system tables and the contents of the ACPI fixed feature hardwaretables and the contents of the ACPI fixed feature hardware

!!acpiirqarbacpiirqarb Displays the contents of the ACPI IRQ arbiter structureDisplays the contents of the ACPI IRQ arbiter structure

!!fadtfadtDisplays the Fixed ACPI Description TableDisplays the Fixed ACPI Description Table

!!mapicmapic Displays an ACPI Multiple APIC Table Displays an ACPI Multiple APIC Table

!!rsdtrsdt Displays the ACPI Root System Description TableDisplays the ACPI Root System Description Table

Page 53: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

BackupBackupDebugging type mismatch warningsDebugging type mismatch warnings

Enable the AML interpreter Enable the AML interpreter to break upon errorto break upon error

Type mismatches can be caught this wayType mismatches can be caught this way!amli set errbkon!amli set errbkon

Turn on full AML debugging spewTurn on full AML debugging spew!amli set spewon!amli set spewon

Page 54: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation

© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,

it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 55: ACPI In Windows Vista Allen Marshall Lead Program Manager Windows Core Platform Architecture Microsoft Corporation