Jump to content

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


Mov AX, 0xDEAD

Recommended Posts

XP installs smoothly on the Asus Prime Z790-P WiFi D4 but this board has a strange behavior: after POST completion, once XP is selected to boot, it takes 35 seconds to display the XP logo with the scroll bar below. No activity of the HDD led during this time. Regardless of whether XP is installed on SSD or NVMe, the elapsed time is always the same.

Adding these 35 seconds to the 12 seconds that this system takes to complete boot, it results in it being 4 times slower than the MSI Z590-A in the same conditions.

Nothing changed by modifying the options in the BIOS, and there were no results by trying previous versions of acpi.sys (v6666 and v5048 included) (strangely, the acpiV6 that gave BSOD A5 on the MSI Z590 here allows booting without problems).

Since this behavior does not occur in XP x64, Win7, Win8, Win10 because the respective logos appear after a few seconds, I wonder if this oddity could be considered acpi-related.

Link to comment
Share on other sites


5 hours ago, Andalu said:

Since this behavior does not occur in XP x64, Win7, Win8, Win10 because the respective logos appear after a few seconds, I wonder if this oddity could be considered acpi-related.

@Andalu

Booting OS is very complex, many drivers wait hardware response, try different storage/vga/usb3 driver or classic acpi v6666 if it possible.

There is special util to measure boottime (Microsoft Bootvis), it shows kernel boot time (as i remember)

Edited by Mov AX, 0xDEAD
Link to comment
Share on other sites

@Dietmar  @Mov AX, 0xDEAD

I forgot to report that the boot delay already occurs during XP installation before GUI-mode starts. No matter which ISO is used, the 35-second delay occurs anyway.

I had already tried acpi6666 from outer space but without success.

I did other tests such as installing an ISO with only the acpi.sys and sata driver integrated as well as switching the video card from ATI to nVidia but did not get the desired results.

Bootvis doesn't seem to detect anything unusual either:

Bootvis.png

Link to comment
Share on other sites

@Andalu

Make a try with all Security and TPM devices disabled in Bios.

Set OS to "Other OS", disable Fast Boot.

Make a try with an original XP SP3 *.iso.

With the Ramsey XP I noticed sometimes also a strange boot delay, but may be about 10 sec.

Make try with the Kai Sata and no nvme, no USB, only basic drivers, no changes in ntoskrnl.exe.

When this behavior already in GUI Setup of XP happens, it can be detected as "bad" driver

Dietmar

Edited by Dietmar
Link to comment
Share on other sites

@Dietmar  @Mov AX, 0xDEAD

I have found the culprit! It is the usual approximative BIOS that accompanies Asus motherboards.

The item responsible for the boot delay is "Boot performance mode" which I had left on "Auto" by default. It is located in the Advanced -> CPU Configuration -> CPU Power Management Control menu and has 4 options: Auto, Turbo Performance, Max Non-Turbo Performance, and Max Battery. Here is how the options behave for booting in XP:

Max Battery = no delay
Maximum non-turbo performance = no delay
Turbo performance = 35-second delay

 

By logic, the Turbo Performance option should be the one that allows faster startup, but instead it is the one that causes the 35-second delay and therefore, the "Auto" option corresponds to "Turbo Performance".

Obviously, there is no reference to these options in the motherboard user's manual, but neither is there any reference to all the others BIOS options, another usual habit for Asus.

Edited by Andalu
Link to comment
Share on other sites

@Mov AX, 0xDEAD Out of curiosity, I wonder if the 2.0 acpi driver compiled from your tool can run on XP on computers that lack CSM support (uefi class 3), like my computer in case:

System Manufacturer: ASUSTeK COMPUTER INC.
System Model: VivoBook_ASUSLaptop X509FA_X509FA

System Type: x64-based PC

Processor: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz, 1992 Mhz, 4 Core(s), 8 Logical Processor(s)

BIOS Version/Date:    American Megatrends Inc. X509FA.306, 24.09.2021

Restart after boot crash is enabled, so if I use the 2.0 acpi.sys compiled using your tool, no crashes but xp (made using XP2ESD with latest backported drivers including nvme, custom acpi drivers and uefi support using vista beta files) still doesn't boot but the boot logo stays that way until I press power button to restart. If acpi.sys had BSODs, it would restart immediately so maybe the acpi.sys works and the problem is caused by something else that hangs at win32k session and yes I use vga emulator (FlashBootPro/UefiSeven) to provide fake int10h handler to try to boot XP on uefi-only hardware (on an older model, xp would boot even without CSM, but on an newer model it refuses to boot, keyboard unresponsive because of possible user-mode BSOD).

I know I wouldn't be able to debug using a single hardware but I wonder if I can try to add my host pc's DSDT into virtualbox's bios so I can debug acpi.sys from virtualbox (I know how to start a basic windbg session using windbg preview with virtualbox's serial COM1 port to debug a windows from the virtual machine).

Edited by UsefulAGKHelper
Link to comment
Share on other sites

16 hours ago, Dietmar said:

@UsefulAGKHelper

Make a try with integrating my time delayed acpi.sys bit64 for XP SP2

and report

Dietmar

https://ufile.io/b1e6d45s

File downloaded.

I can only debug on virtualbox because I have one computer. If I can add my laptop's DSDT into the bios of the virtual machine then debugging acpi.sys through virtualbox should be possible.

 

Edited by UsefulAGKHelper
Link to comment
Share on other sites

Tested the "new" nvme driver.  

XP64
win7 - good
samsung - needs to use nvidia 355.98 to work.  Does not work when 368.81 is insatlled.
"new" - good.  Tested with 355.98 and 368.81.

XP32
win7 - good
samsung - needs to use PAE with >4GB.  When using nonPAE or PAE4GB does not work.
"new" - Need PAE>4GB to work.  Did not work with PAE4GB.  Did not test nonPAE.

server2003x86
"new" - good

Both samsung and "new" able to show SMART on MZVLW256HEHP using modded CrystalDiskInfo

Link to comment
Share on other sites

On 1/8/2023 at 1:20 PM, Dietmar said:

And here is the patch for intelppm.sys version 5.2.3790.4143 (srv03_sp2_qfe.070831-1432)

Modd vs original

128:	CC	4E
129:	7B	FC
12A:	01	00
65F2:	4A	8A
65F9:	43	03
65FA:	A1	A2
7C1E:	1E	5E
7CD3:	69	29
7CD4:	8A	8B

 

Dietmar

@Dietmar Question.  Copy of intelppm for x86 that I have only makes C2/C3 change in InitializeAcpi2IoSpaceCstates.  The x64 version here makes change in both InitializeAcpi2IoSpaceCstates AND InitializeAcpi1Cstates.

Should I update my x86 to also change C2/C3 in InitializeAcpi1Cstates?  or is it only needed for x64?

thanks

-pappy

 

Link to comment
Share on other sites

@pappyN4

The XP SP2 bit64 intelppm.sys is a little bit different than its XP SP3 counterpart.

But the idea is just the same: Fake all the C3 and C2 states to go to C1

AcpiC3ArbdisIdle ==> AcpiC1Idle

and

AcpiC2Idle ==> AcpiC1Idle

 

By the way: Does your Ida Pro version allows you to write back the open and edited file back to its original?

I mean, do you have in your Ida Pro

Edit-->Patch Program->Apply patches to input file

I have 6.1 version, there this possibility not exist and you have to write back your changes all by hand

Dietmar

 

 

Link to comment
Share on other sites

4 minutes ago, Dietmar said:

@pappyN4

The XP SP2 bit64 intelppm.sys is a little bit different than its XP SP3 counterpart.

But the idea is just the same: Fake all the C3 and C2 states to go to C1

AcpiC3ArbdisIdle ==> AcpiC1Idle

and

AcpiC2Idle ==> AcpiC1Idle

Yes, but the x86 InitializeAcpi1Cstates function looks very similar to one from x64.  So if needs to be changed in x64 then I would have assumed that x86 would need same change.  I dont have Intel CPU to test :)  Just trying to have complete ISO so I could use for Intel if I get one :)

 

5 minutes ago, Dietmar said:

By the way: Does your Ida Pro version allows you to write back the open and edited file back to its original?

I mean, do you have in your Ida Pro

Edit-->Patch Program->Apply patches to input file

I have 6.1 version, there this possibility not exist and you have to write back your changes all by hand

I have IDA Free 7.0.191002 x64.  It does have that ability.  If you use CFF explorer to change to 5.2, then it works on XP64 :)  Too many features that I do not know how to use.  I use IDA to see changes with graphics/flowcharts.  Then simple hex editor/pechecksum to make final versions.

Link to comment
Share on other sites

On 12/29/2022 at 4:34 PM, Andalu said:

I, too, have a board (even if desktop system) that has the same problem of freezing on restart. In my case it occurs when using a PS/2 keyboard. No issues with a USB keyboard.

@AndaluI think I asked you before, maybe on old winraid..  Yours is Intel CPU?  Is the motherboard Gigabyte or does it use an ITE LCPIO?

Every so often I get annoyed using a PS2-USB adapter for my keyboard and do bit of testing.  With ASRock and with MSI no PS2 reboot issue.  Just with Gigabyte.  And only with XP/server2003x86/XP64.  On win7 its fine.  The ASRock and MSI both use a Nuvoton LCPIO.  The Gigabyte an ITE one.

gigabyte-B450m-Aorus.pngasrock-B450-MSteel-Legend.pngmsi-B450m-PROVDHMAX.png

I think it was in this thread back in august where loading dsdt table into registry was discussed.  So I tried to trick the gigabyte table to use same OSVR as for win7 but no change.  I even loaded the entire asrock table into registry just to see.  To my surprise the gigabyte board has no issues running with it.  Unfortunately, the PS2 reboot issue was still there.  Seems weird since I'm assuming it's something with the gigabyte DSDT not working with the ACPI from XP causing the soft-reboot to not finish.

https://ufile.io/lm3nsvmp

Link to comment
Share on other sites

@pappyN4

I think, it is a problem of shared IRQ lines, bad managment on the board itself.

Hardware problem, as you already think about.

I have a similar problem with an AMD Asrock fatal1ty AB350 gaming K4 board with Ryzen 1700x or 3700x cpu.

Only sound or lan (both integrated on board), not possible both together under XP SP3.

Even I also succeed to integrate an working DSDT table from other compi to registry via asl.exe,

this crazy behavior stays.

On later Bios for this board they "solved" this problem but the whole board becomes unstable

Dietmar

 

Edited by Dietmar
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...