Jump to content

Compiling ACPI v2.0 driver for Windows XP SP3 and Windows 2003 SP2 (x32/x64)


Mov AX, 0xDEAD

Recommended Posts

@Dietmar@Mov AX, 0xDEAD@George King@daniel_k@Damnation

Just a thought guys.
Do you think I should move the posts here which are specifically about my Lenovo Flex 10 machine to this thread?
They are possibly relevant to the general discussion about ACPI for XP on newer hardware, but I don't want to hijack the thread with my own specific issues.
:dubbio:

Link to comment
Share on other sites


@Dave-H

I think it is better to have only one thread for XP.

Here we solve the problems for XP on newer hardware, especially because auf acpi.sys.

About the Flex 10 I still do not know, where the problem is.

When you make a Standard PC install of XP SP3, can you reboot compi or does always the message appear

"It is now safe to shut the compi down" or does it hang?

This problem and also that with sound can be Acpi related

Dietmar

PS: Today I make an install of XP SP3 on the Flex 10 with XP SP3 Debug version.

Maybe, that then Windbg has a chance to see, what is going on.

Edited by Dietmar
Link to comment
Share on other sites

OK thanks.

When I did the new installs, the machine would shut down OK, but hung on restart.
With my old installation with the previous acpi.sys it was using, it would restart fine, and it would partially shut down, but with the "it's now safe to turn off your computer" message so I then had to actually shut down manually.
With your latest acpi.sys, it now freezes on restart, but does shut down correctly, although it takes a while to do so.
I can't quite see what the difference is between restarting and shutting down as far as unloading the drivers is concerned.
Surely it's the same process, so why does one hang and not the other?
I would more understand it if it would restart but not shut down, but it's the other way around!
:dubbio:

Link to comment
Share on other sites

Hi All

1) Little analyze of INT32/ULONG using in XP acpi sources

Quote

sizeof(ULONG)         -  55 matches
OBJTYPE_INTDATA -  98 matches
dwDataValue           -  20 matches
uipDataValue           - 314 matches
pnsAlias                   -  12 matches
pdataAlias               -  11 matches

Windows 7 decompiled acpi.sys:

Quote

"%I64"                                       - 102 matches
__PAIR64__                             - 103 matches
IsCompatableDSDTRevision    -  21 matches


2) Windows 7 x32 driver probably has problem with accessing 64-bit values from/to memory in ReadSystemMem()/WriteSystemMem(). It doesn't read/write high 32 bit, set it to ZERO instead
 

Link to comment
Share on other sites

@Dietmar

I've discovered something else with the sound on the Flex 10.
You don't have to uninstall and reinstall the 'Microsoft UAA High Definition Audio' device to get the sound back.
Just disabling it is enough. If I disable it and then enable it again, the Realtek audio device magically appears and the sound works, without any messages popping up!
I'm wondering if this is a timing thing. The Realtek driver works through the 'Microsoft UAA High Definition Audio' device, so is it possible that the Realtek driver is starting first before the 'Microsoft UAA High Definition Audio' device is started, and therefore it can't load?
:dubbio:

Link to comment
Share on other sites

Sounds like a similar scenario, but my 'Microsoft UAA High Definition Audio' device is apparently working all the time, but the Realtek audio device does not appear at all until the Microsoft device is uninstalled and reinstalled or disabled and re-enabled, at which point the Realtek device appears.
I wonder if there are any alternative drivers for 'Microsoft UAA High Definition Audio'?
As it's an Intel based machine I wonder if there is an Intel driver that might work better.
:dubbio:

Link to comment
Share on other sites

@Dave-H

Seems to be a problem with hdaudbus.sys in XP SP3 and this version of the Realtek device.

Microsoft offers a fix named KB88111 has to be installed before the audiodriver.

But in update catalog and nowhere I can find it

Dietmar

Link to comment
Share on other sites

1 hour ago, Dietmar said:

Seems to be a problem with hdaudbus.sys in XP SP3 and this version of the Realtek device.

Unfortunately, I'm almost 100% sure it's not.

Probably related to GPIO, again.

Related code in DSDT, HDA device:
 

Quote

        Device (HDEF)
        {
            Name (_ADR, 0x001B0000)  // _ADR: Address
            OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
            Field (HDAR, WordAcc, NoLock, Preserve)
            {
                DCKA,   1, 
                Offset (0x01), 
                DCKM,   1, 
                    ,   6, 
                DCKS,   1, 
                Offset (0x08), 
                Offset (0x09), 
                PMEE,   1, 
                    ,   6, 
                PMES,   1
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (LEqual (HDAD, Zero))
                {
                    Return (0x0F)
                }

                Return (Zero)
            }

            Method (_DSW, 3, NotSerialized)  // _DSW: Device Sleep Wake
            {
            }
        }


Virtual GPIO Controller may change HDAD variable:

Quote

        Device (GPED)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, "INT0002" /* Virtual GPIO Controller */)  // _HID: Hardware ID
            Name (_CID, "INT0002" /* Virtual GPIO Controller */)  // _CID: Compatible ID
            Name (_DDN, "Virtual GPIO controller")  // _DDN: DOS Device Name
            Name (_UID, One)  // _UID: Unique ID
            Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
            {
                Name (RBUF, ResourceTemplate ()
                {
                    Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
                    {
                        0x00000009,
                    }
                })
                Return (RBUF) /* \_SB_.GPED._CRS.RBUF */
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (Zero)
            }

            Method (_AEI, 0, Serialized)  // _AEI: ACPI Event Interrupts
            {
                Name (RBUF, ResourceTemplate ()
                {
                    GpioInt (Edge, ActiveHigh, ExclusiveAndWake, PullDown, 0x0000,
                        "\\_SB.GPED", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x0002
                        }
                })
                Return (RBUF) /* \_SB_.GPED._AEI.RBUF */
            }

            Method (_E02, 0, NotSerialized)  // _Exx: Edge-Triggered GPE
            {
                If (LEqual (PWBS, One))
                {
                    Store (One, PWBS) /* \PWBS */
                }

                If (LEqual (PMEB, One))
                {
                    Store (One, PMEB) /* \PMEB */
                }

                If (LEqual (^^PCI0.SATA.PMES, One))
                {
                    Store (One, ^^PCI0.SATA.PMES) /* \_SB_.PCI0.SATA.PMES */
                    Notify (^^PCI0.SATA, 0x02) // Device Wake
                }

                If (LAnd (LEqual (^^PCI0.EM41.PMES, One), LEqual (PCIM, One)))
                {
                    Store (One, ^^PCI0.EM41.PMES) /* \_SB_.PCI0.EM41.PMES */
                    Notify (^^PCI0.EM41, 0x02) // Device Wake
                }

                If (LAnd (LEqual (^^PCI0.EM45.PMES, One), LEqual (PCIM, One)))
                {
                    Store (One, ^^PCI0.EM45.PMES) /* \_SB_.PCI0.EM45.PMES */
                    Notify (^^PCI0.EM45, 0x02) // Device Wake
                }

                If (LEqual (HDAD, Zero))
                {
                    If (LEqual (^^PCI0.HDEF.PMES, One)) >>> IF THIS CHECK FAILS, WILL NOT WAKE HDA CONTROLLER
                    {
                        Store (One, ^^PCI0.HDEF.PMES) /* \_SB_.PCI0.HDEF.PMES */
                        Notify (^^PCI0.HDEF, 0x02) // Device Wake
                    }
                }

                If (LEqual (^^PCI0.EHC1.PMES, One))
                {
                    Store (One, ^^PCI0.EHC1.PMES) /* \_SB_.PCI0.EHC1.PMES */
                    Notify (^^PCI0.EHC1, 0x02) // Device Wake
                }

                If (LEqual (^^PCI0.XHC1.PMES, One))
                {
                    Store (One, ^^PCI0.XHC1.PMES) /* \_SB_.PCI0.XHC1.PMES */
                    Notify (^^PCI0.XHC1, 0x02) // Device Wake
                }

                If (LEqual (^^PCI0.SEC0.PMES, One))
                {
                    Or (^^PCI0.SEC0.PMES, Zero, ^^PCI0.SEC0.PMES) /* \_SB_.PCI0.SEC0.PMES */
                    Notify (^^PCI0.SEC0, 0x02) // Device Wake
                }
            }
        }

As GPIO code is not properly parsed, may result in malfunctional devices.

Hmm, it seems that Method (_E02, 0, NotSerialized)  // _Exx: Edge-Triggered GPE may not be executed at all?
Can't find any document saying that XP supports this?

Edited by daniel_k
Link to comment
Share on other sites

@daniel_k

You are right.

I succeed to install all the files from patch KB88111

and a look in device manager shows me, that now I have indeed hdaudbus.sys

from XP SP2 at work.

But the symptoms are exact the same, hdaudbus.sys is sleeping.

I also set Group from hdaudbus.sys in Registry to System Reserved

and Start=0

does not help

Dietmar

Link to comment
Share on other sites

@daniel_k

Windbg tells, that hdaudbus is started,

very strange

Dietmar

0: kd> !devnode 8a498008
DevNode 0x8a498008 for PDO 0x8a3c2ce8
  Parent 0x8a49d2c8   Sibling 0x8a498ed8   Child 0000000000   
  InstancePath is "PCI\VEN_8086&DEV_0F04&SUBSYS_398517AA&REV_0C\3&11583659&0&D8"
  ServiceName is "HDAudBus"
  State = DeviceNodeStarted (0x308)

  Previous State = DeviceNodeEnumerateCompletion (0x30d)
  StateHistory[09] = DeviceNodeEnumerateCompletion (0x30d)
  StateHistory[08] = DeviceNodeStarted (0x308)
  StateHistory[07] = DeviceNodeEnumerateCompletion (0x30d)
  StateHistory[06] = DeviceNodeStarted (0x308)
  StateHistory[05] = DeviceNodeStartPostWork (0x307)
  StateHistory[04] = DeviceNodeStartCompletion (0x306)
  StateHistory[03] = DeviceNodeResourcesAssigned (0x304)
  StateHistory[02] = DeviceNodeDriversAdded (0x303)
  StateHistory[01] = DeviceNodeInitialized (0x302)
  StateHistory[00] = DeviceNodeUninitialized (0x301)
  StateHistory[19] = Unknown State (0x0)
  StateHistory[18] = Unknown State (0x0)
  StateHistory[17] = Unknown State (0x0)
  StateHistory[16] = Unknown State (0x0)
  StateHistory[15] = Unknown State (0x0)
  StateHistory[14] = Unknown State (0x0)
  StateHistory[13] = Unknown State (0x0)
  StateHistory[12] = Unknown State (0x0)
  StateHistory[11] = Unknown State (0x0)
  StateHistory[10] = Unknown State (0x0)
  Flags (0x000000f0)  DNF_ENUMERATED, DNF_IDS_QUERIED,
                      DNF_HAS_BOOT_CONFIG, DNF_BOOT_CONFIG_RESERVED

Link to comment
Share on other sites

@daniel_k

Dietmar

ba930322: Device(GPED)OSNotifyCreate: 8A44AD38 (GPED) = 00000103

ba93032a: {
ba93032a: Name(_ADR,Zero)
ba930330: Name(_HID,"INT0002")
ba93033e: Name(_CID,"INT0002")
ba93034c: Name(_DDN,"Virtual GPIO controller")
ba93036a: Name(_UID,One)
ba930370: Method(_CRS,0x8)
ba930390: Method(_STA,0x0)
ba930399: Method(_AEI,0x8)
ba9303d3: Method(_E02,0x0)
ba93058a: }

Link to comment
Share on other sites

21 hours ago, Dave-H said:

I'm wondering if this is a timing thing. The Realtek driver works through the 'Microsoft UAA High Definition Audio' device, so is it possible that the Realtek driver is starting first before the 'Microsoft UAA High Definition Audio' device is started, and therefore it can't load?

@Dave-H

Microsoft UAA High Definition Audio is driver for HDA controller integrated to  Southbridge/PCH

When it started, it look for any devices on dedicated HDA bus, each device on Bus has VEN_ID & DEV_ID (similar to PCI)

Realtek audio chip answer to Bus, microsoft UAA driver detect it and load vendor driver based on VEN_ID & DEV_ID

Vendor's HDA drivers usualy installed as START = MANUAL, so realtek driver never started without UAA driver before

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...