Jump to content

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


Mov AX, 0xDEAD

Recommended Posts

1 hour ago, Damnation said:

@WinWord2000

I'm taking a break from working on it for now.

We are waiting impatiently, I hope to see this update before I die :unsure:

I got a lot older and I got sick every day slowly, I will be very thankful to you if you succeed 

WinWord2000 Grazie a tutti !

Link to comment
Share on other sites


@Dietmar Maybe this problem starts in AcpiArbInitializePciRouting I think status must return True to proceed to PciInterfacesInstantiated = TRUE. I would try to force set PciInterfacesInstantiated = TRUE to see difference (I think it will be FALSE). Another idea is - read what is inside PciInterfacesInstantiated at line 3512 / . I think you end in AcpiArbInitializePciRouting which calls ACPIInternalSendSynchronousIrp to set status value.

	  //
    // Call the PCI driver (indirectly.)
    //
	    status = ACPIInternalSendSynchronousIrp(topDeviceInStack,
                                            &irpSp,
                                            &buffer);
	    if (NT_SUCCESS(status)) {
	        //
        // Attach this interface to the Arbiter Extension.
        //
        ((PARBITER_EXTENSION)AcpiArbiter.ArbiterState.Extension)->InterruptRouting = interface;
	        //
        // Reference it.
        //
        interface->InterfaceReference(interface->Context);
	        PciInterfacesInstantiated = TRUE;
	    }
	

Link to comment
Share on other sites

@George King

Yes, the problem is that on the Ryzen board some devices are not recogniced as PCI devices.

And also Linux has big problems with this.

The binary hack does the same as you mentioned.

I think it is a hardware problem of the Ryzen cpu, I remember that they change in the Apic model,

when the Irq is generated from the uprising flank to the downfalling (or vice versa)

Dietmar

Link to comment
Share on other sites

4 hours ago, Dietmar said:

I make a try with Lan Windbg on this Ryzen board with the unpatched acpi.sys V2 "Debug".

 

*** Assertion failed: PciInterfacesInstantiated
***   Source File: e:\nt\base\busdrv\acpi\driver\nt\irqarb.c, line 3512


*** Assertion failed: pciInterface
***   Source File: e:\nt\base\busdrv\acpi\driver\nt\irqarb.c, line 3518

 

line 3512:

Quote

    ASSERT(PciInterfacesInstantiated);

line 3518:

Quote

    pciInterface = ((PARBITER_EXTENSION)AcpiArbiter.ArbiterState.Extension)->InterruptRouting;

    ASSERT(pciInterface);

So we have NULLed PciInterfacesInstantiated and NULLed AcpiArbiter.ArbiterState.Extension->InterruptRouting

PciInterfacesInstantiated can be setted only on one place, AcpiArbInitializePciRouting():

Quote

    //
    // Call the PCI driver (indirectly.)
    //

    status = ACPIInternalSendSynchronousIrp(topDeviceInStack,
                                            &irpSp,
                                            &buffer);

    if (NT_SUCCESS(status)) {

        //
        // Attach this interface to the Arbiter Extension.
        //
        ((PARBITER_EXTENSION)AcpiArbiter.ArbiterState.Extension)->InterruptRouting = interface;

        //
        // Reference it.
        //
        interface->InterfaceReference(interface->Context);

        PciInterfacesInstantiated = TRUE;

pci.sys reject our IRP request and answer with some error

what acpi reqest:

Quote

    //
    // Send an IRP to the PCI driver to get the Interrupt Routing Interface.
    //

    RtlZeroMemory( &irpSp, sizeof(IO_STACK_LOCATION) );

    interface = ExAllocatePoolWithTag(NonPagedPool, sizeof(INT_ROUTE_INTERFACE_STANDARD), ACPI_ARBITER_POOLTAG);

    if (!interface) {
        return STATUS_INSUFFICIENT_RESOURCES;
    }

    topDeviceInStack = IoGetAttachedDeviceReference(PciPdo);

    //
    // Set the function codes and parameters.
    //
    irpSp.MajorFunction = IRP_MJ_PNP;
    irpSp.MinorFunction = IRP_MN_QUERY_INTERFACE;
    irpSp.Parameters.QueryInterface.InterfaceType = (LPGUID) &GUID_INT_ROUTE_INTERFACE_STANDARD;
    irpSp.Parameters.QueryInterface.Version = PCI_INT_ROUTE_INTRF_STANDARD_VER;
    irpSp.Parameters.QueryInterface.Size = sizeof (INT_ROUTE_INTERFACE_STANDARD);
    irpSp.Parameters.QueryInterface.Interface = (PINTERFACE) interface;
    irpSp.Parameters.QueryInterface.InterfaceSpecificData = NULL;

Seems to be complex problem, i think

1) acpi doesn't configured PCI properly before, send irp to pic, pci.sys failed some pre-checks

2) acpi configured PCI properly, but pci.sys still requires certain conditions

 

@Dietmar

Without logging, i can't help with this, compile acpi.sys and replace pci.sys(SP3-KB936929-x86-CHK-enu.exe or sp3 checked iso if you have) to checked versions, enable full loging

ed Kd_ACPI_Mask 0xFFFFFFFF

ed Kd_PCI_Mask 0xFFFFFFFF  - don't sure about this cmmand, i never debugged pci driver

Link to comment
Share on other sites

8 hours ago, Andalu said:

Unfortunately, the A5 bsod is still there for the GA-H470-HD3 although it is now a bit different than before with the first acpi v2.0 release.

Now: 0x11, 0x08, 0xB99AD000, 0x20160527

Before: 0x11, 0x08, 0xB998B000, 0x20160527

@Andalu

Do you have second PC, LAN cable and free time to investigate this bsod ?

You will need setup remote debug connection between two PC and save log files

Link to comment
Share on other sites

@Mov AX, 0xDEAD

I make a new folder for the XP SP3 Debug, here Symbolssss.

Then I put the Debug pci.sys on the AMD compi and the (unmodded) Debug acpi.sys V2 also.

Here is the txt output from Windbg. The ed Kd_PCI_Mask 0xFFFFFFFF gives no extra output.

Also I noticed, that in the PCI files from Source is not a single function with "Tracename" in it

Dietmar

otto4AcpiPci.7z

Link to comment
Share on other sites

1 hour ago, Mov AX, 0xDEAD said:

@Andalu

Do you have second PC, LAN cable and free time to investigate this bsod ?

You will need setup remote debug connection between two PC and save log files

No problem for the first two points. For the third one I will organize.

Trying is the least I can do. Let me know how to proceed.

Link to comment
Share on other sites

29 minutes ago, Dietmar said:

@Mov AX, 0xDEAD

Here is the txt output from Windbg. The ed Kd_PCI_Mask 0xFFFFFFFF gives no extra output.

Also I noticed, that in the PCI files from Source is not a single function with "Tracename" in it

yes, no any output from pci.sys, i will update how to force pci.sys to tell

Tracename - it's acpi.sys only feature for some functions, thanks to MS for it  !

ed Kd_XXX_Mask 0xFFFFFFFF- is standart way to enable extra logging any checked driver

Link to comment
Share on other sites

@Andalu

2 minutes ago, Andalu said:

No problem for the first two points. For the third one I will organize.

Trying is the least I can do. Let me know how to proceed.

Good,

1) what LAN chip do you have on problem H470 board ? (realtek/intel/...)

2) I will prepare requires files for you in PM

 

Link to comment
Share on other sites

@Dietmar

1 hour ago, Dietmar said:

@Mov AX, 0xDEAD

Then I put the Debug pci.sys on the AMD compi and the (unmodded) Debug acpi.sys V2 also.

Here is the txt output from Windbg. The ed Kd_PCI_Mask 0xFFFFFFFF gives no extra output. 27.14 kB · 1 download

I didn't found how enable logging pci.sys by official way, need manual patch

pci.sys  5.1.2600.5512 size 159616 sha1 4de5522539149d32d8508d51cc2a014302c78e75

file offset 0xB020 0x00 0x00 0x00 0x00 -> 0xFF 0xFF 0xFF 0x7F

then recalc driver checksum with any util

sha1 of patched pci.sys bde4352e853e45137b5dc33e0f9846337b41950c

No need enter KD_PCI_Mask anymore, but keep KD_ACPI_Mask on

You also can remove previous patch from IsTraceOn(), no need to see ValidateArgTypes() at present time

 

After i got what wanted output:

Quote

PciCallDownIrpStack ...
PCI - FdoQueryCapabilitiesCompletion (fdox 81b697d8) child status = 00000000
Capabilities
  Lock:0, Eject:0, Remove:0, Dock:0, UniqueId:1
  SilentInstall:1, RawOk:0, SurpriseOk:0
  Address 00000000, UINumber ffffffff, Latencies D1 0, D2 0, D3 0
  System Wake: Unspecified, Device Wake: Unspecified
  DeviceState[PowerState] [ D0 Unspecified Unspecified Unspecified D3 D3 ]
FDO(81b697d8)<-QUERY_PNP_DEVICE_STATE
Pci PassIrp ...
FDO(81b697d8)<-QUERY_DEVICE_RELATIONS
PCI Request to begin transition of Extension 81B697D8 to PciSynchronizedOperation ->->0
PCI Scan Bus: FDO Extension @ 0x81b697d8, Base Bus = 0x0
Scan Found Device 0x8000000 (b=0x0, d=0x0, f=0x0)
  00 - 12378086
  04 - 00000000
  08 - 06000002
  0c - 00000000
  10 - 00000000
  14 - 00000000

 

Edited by Mov AX, 0xDEAD
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...