Jump to content

pappyN4

Members
  • Posts

    25
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by pappyN4

  1. On 11/25/2023 at 2:02 PM, George King said:

    @pappyN4 Do you have syssetup patch for x86 5.2 too please?

    I have not tried since I only use 2003x86/64 for testing to see if a problem is with x64 vs x86 or with NT5.1 vs NT5.2.

    Is there a server 2003x86 update pack with all latest post SP2 updates?

  2. "Installed INF does not contain digital signature" warning

    infdigitalsignature.jpg

    I got this warning after integrating the USB3 drivers.  You will need to patch syssetup.dll file to get rid of it.  Original patch is from @ Mattiwatti.  I updated the x64 patch to match the one found in the 2019 updates. 

    x86 syssetup.dll 5.1.2600.5512
    @33bfe	8B F8 3B FE 75 20 -> 31 C0 31 FF 90 90
    @33da6	8B F0 85 F6 75 17 -> 31 C0 31 F6 90 90
    @35535	0F 84 9F 00 00 00 -> E9 A0 00 00 00 90
    @37f03	3B C6 -> 31 C0
    @37f0b	75 3E -> 90 90
    
    
    x64 syssetup.dll 5.2.3790.4226
    @423dc	75 4C 0F B6 0D 8C A2 08 00 -> 90 90 31 C9 90 90 90 90 90
    @42431	75 4C 0F B6 0D 36 A2 08 00 -> 90 90 31 C9 90 90 90 90 90
    @424cb	0F 85 D5 00 00 00 -> E9 D6 00 00 00 90
    @425a6	40 8A 74 24 30 -> 31 F6 90 90 90	
    @3fe50	85 DB 0F 84 E3 00 00 00 -> 31 DB E9 E4 00 00 00 90	
    @41d2b	85 C0 8B F8 75 25 -> 31 C0 8B F8 90 90
    @41fb6	85 C0 8B D8 75 1C -> 31 C0 8B D8 90 90
    @4204b	0F 84 84 03 00 00 -> E9 85 03 00 00 90
    @46bf9	85 C0 8B D8 75 47 -> 31 C0 8B D8 90 90
    @571ab	0F 85 DB 00 00 00 -> E9 DC 00 00 00 90
    @5728c	40 8A 74 24 40 -> 31 F6 90 90 90
    @7204b	85 C0 75 1F -> 31 C0 90 90
    @78a22	75 61 0F B6 0D 46 3C 05 00 -> E9 B9 00 00 00 90 90 90 90

     

  3. @AndaluYes, my uasp restart issue is fixed with the test1 driver.  Coexistence \Device\UaspPort is already changed in the stor_uas from test1.

    Only cosmetic issue remain is that stor_ua8->stor_uas->storport somewhere.  So test1 driver is not fully "self contained", but still works.  Uasp via stor_ua8 uses the patched stor_uas  and since both XP/XP64 both need storport for ahci/nvme drivers, the two imports that stor_uas asks from storport exist.

    Would be cleaner if we could get that last storport dependency removed from stor_uas/stor_uas8.

  4. USB Attached SCSI (UASP)

    When using the AMD USB drivers for the motherboard with a UASP capable device it defaults to using the default USB Mass Storage Device (usbstor), same as a standard USB stick.

    With the backported Win8 drivers it's different.  If you do not have a UASP driver installed (USB\Class_08&SubClass_06&Prot_62) then it will not find a driver by default.  You can force install by manually selecting Universal Serial Bus Controllers - USB Mass Storage Device, or install a uasp driver.

    Note that some motherboards may have a deadlock issue when using the uasp driver during reboots with the USB adapter still connected.  If you select Safe Remove, reboot works fine, otherwise it doesn't finish the reboot.  You will need to use a deadlock patched version of the driver if thats the case.


    The following test is with a JMicron USB to PCIE adapter, VID152D PID0583 and a XG5 256GB NVMe.  The Gen2 port on the B450 chipset and the Gen1 port on the B450 and on the Ryzen2.  Drivers are the default XP usbstor 5.2.3790.5829, VIA uasp 6.1.7600.4002, and win8 uaspstor 6.2.9200.16384.
    combined-USB.png

  5. 2 hours ago, Andalu said:

    Edit: I see you're using an updated storport.sys (I think it's already patched) that I was not able to find. Could you please upload it somewhere?

     

     

    It's nothing special.  There was a win7 update a few months ago that had newer version for a couple of files.  storport is 2kb bigger now.  I updated the readme on github, I dont think its merged yet.

    https://github.com/pappyN4/NTOSKRNL_Emu/blob/master/README.md

    https://ufile.io/s8cp2lko

     

     

  6. @canonkongGood to know.  I tested daniel_k's usb3/uaspstor on Windows 7 and it worked fine at least on there.

    @Andalu Thanks for the testing. I havent tried the Etron, I have tried the VIA one from GeorgeKing drivers pack and from the Integral ISO.  It works, but is slower.  The Win8uasptor is super fast.

    MovAX sent me a copy of the 2003/w8_storport versions he had.  Restart worked fine with both of those, but as soon as I put back the one using w7_storport restart stopped again.  Must be something with my motherboard.

    I patched the deadlock on the win7_storport using the 2003 method from MovAX.  It is not "pretty", since  uaspstor needs the storpor8.sys extended function then the w7_storport.  So two extra files for uasp driver to keep storports separate, but it does reboot now.  Ideal would be to use w8_storport, but looking at it, it is not a simple thing, I would not be able to make one for x64 or update the Emu_extender readme to make it accessible for anyone to make.

    Here's x86 version using w7_storport. https://ufile.io/u28mfr1v

    There is still one little change left to make to make it completely self contained.  Right now it looks to me that the renamed stor_uas still has contact with the original storport.sys somewhere.

    changesstillneeded.png

    Need to figure out how to change that.  It's probably simple but I'm too tired to see it now. 

    Maybe @Mov AX, 0xDEAD can take a quick look?  Or if you see a simpler way to do uasp/storpor8/w7_storport ?

     

  7. 19 minutes ago, Andalu said:

    I have too an adapter with the same chipset. I'll try it on the motherboard where the restart fails with a connected PS/2 keyboard and the uaspstor from win8.

    Thanks.  Just for clarity, the PS2 keyboard is only used when installing windows (at least until i figure out how to integrate win8 usb into DOSNET/HIVESYS/etc...)  While I was testing the adapter, keyboard was USB, no PS2 port was being used.

    Did you use the adapter in another computer without the PS2 issue and it works?  Same win7_storport, ntoskrn8,usbd8,storpor8 combination?

  8. I bought a USB to NVME adapter to test out uasp.  Can anyone confirm if win8_uaspstor+win7storport doesnt need any special fixes?  I gave it a few crystaldiskmark tests and it seems ok to me.

    storport 6.1.7601.25735, uaspstor 6.2.9200.16384, with uasp security_cookie changed, patched to ntoskrn8,usbd8,storpor8, and wpprecorder.

    thanks

     

    edit: I did find one quirk.  With usbstor, or the VIAuasp, restart/shutdown works normally.  But with uaspstor from win8 I have to do "Safe remove" to be able to restart normally.  If I dont, then Windows goes through all the login off steps, screen goes black, but stops right before the reboot.

    This is very similar to the restart issue when a PS2 keyboard is attached to the mobo, so might just be a quirk with my Gigabyte...

  9. Samsung NVMe and SMART with CrystalDiskInfo

    The samsung nvme driver is able to display SMART data in XP/Win7.  To get CrystalDiskInfo to work instead of crashing when you start it in XP/XP64 you will have stop it from using WMI.  Open DiskInfo32 or DiskInfo64 with a hex editor, find where "\ \ . \ r o o t \ c i m v 2" is and change it to something like "\ \ . \ r o o t \ n o w m i".  Tested on version 8.15.2

    630069006D00760032 -> 6E006F0077006D0069

     

    Samsung NVMe potential issues

    When I installed the latest nvidia 368.81 driver it caused the Samsung 3.3.0.2003 to stop working on XP64.  @Andalu tested the same drivers on an Intel B250/GT730 and worked fine. After playing around with it, installing nvidia 355.98 appears to work/coexist with the Samsung NVMe driver on XP64.  I've only tested on a GT710 so far but hopefully same result for my GTX750.  Something to keep in mind if you have a amd/B450/gigabyte combo.  On XP32 the Samsung driver did not work (code10), using the default non patched, or with the PAE patch /4GB.  It did however work when PAE patched using /128GB or /all.  Both with 355.98 and 368.81

     

    Trim tests

    O&O Defrag 17.5 is the best from all the ones I tested.  Works on SATA and NVMe SSDs.  AMD/Samsung/nativeWin7 drivers were all able to TRIM.  Can be run from CMD line so you can schedule it if you want.

    NVMe Trim
    ADataSSDToolbox        doesnt see (Win7/samsung/SchtromOFA13 driver)
    TxBENCH            see but no trim (Win7/samsung/SchtromOFA13 driver)
    SSDTool 0.95        see but trim didnt work (../../samsung)
    Naraeon5.4.0        win7 no see, SchtromOFA13 trim didnt work, samsung TRIM WORKS
    O&O Defrag 17.5        win7 TRIM WORKS, SchtromOFA13 see but no trim, samsung TRIM WORKS


    SSD Trim
    Naraeon5.4.0        AMD yes, Win7msahci yes, SchromAHCI no see, Win8ahci no see
    O&O Defrag 17.5        AMD yes, Win7msahci yes, SchromAHCI no trim, Win8ahci no trim

    used trimcheck0.7 to see if it worked (https://github.com/CyberShadow/trimcheck)

    *trimcheck x64 works also if Major/Minor changed from 6,0
    *Naraeon has a "not a valid date and time error", doesnt affect functionality
    *O&O can be run from CMD line, needed to change Major/Minor from 6,0 down to 5,2 (or 5,1) to install

     

    Nvidia GPU driver & custom resolution

    Based on a few posts i found, Nvidia 355.98 is that last version where you can add custom resolution if for example you have a ultrawide screen or 4k monitor that you want to use.  It looks like XP is limited to displayport HBR1 (8.64 Gbit/s).  There is a bit of other stuff as well but roughly, horizontal pixels × vertical pixels × (3 × bits per color channel) × refresh rate in Hertz = Bits per second.  Calculator https://tomverbeure.github.io/video_timings_calculator

    Ex:
    2560 × 1600 × (3 × 😎 × 75 = 5898240000 bits/s / 1024³ = 6.86 Gbit/s
    3840 x 2160 x (3 x 😎 x 40 = 7962624000 bits/s / 1024³ = 7.41 Gbit/s


    https://www.vogons.org/viewtopic.php?f=63&t=72471
    http://wp.xin.at/archives/5616

     

  10. On 3/2/2022 at 5:08 PM, Andalu said:

    @pappyN4

    Thank you for the modified DiskInfo.exe and for explaining how to make it work.

    As for the Samsung NVMe driver, I've installed XP on NVMe drives like WD SN750, Crucial P5, and Sabrent Rocket with no problems. Now I can get smart data for all of them with CrystalDiskInfo.

    I add that if @Dietmar said that this driver doesn't work all the time, I have no reason to have doubts.

    @Andalu

    Glad that it works for you.  Unfortunately for me, when I install nvidia 368.81 video card drivers the samsung nvme driver stops working with code10 on my B450 motherboard.  If the video driver is not installed then it works fine.  Win7nvme works, but that driver does not have SMART.  

    Tried changing PCIe Gen version and PCIe Bifurcation settings in BIOS no luck.  Older win7 23403 storport with MSI only patch or newest 25735 with MSI/smart patch still no good.  Even tried older samsung driver, 3.3, 3.2, 3.1, and 2.4.7.0.

    Does not look like there is IRQ conflict or memory range overlap.

     

    Update:

    Got it to work when using a PAE 128GB or /all patched version.  With no PAE patch, or PAE 4GB is when it does not work.

     

     

  11. On 3/2/2022 at 12:18 PM, Dietmar said:

    In this nvme win8.1 package is a storport.sys

    modded from win8.0 for XP SP3.

    May be, this is what you are looking for

    Dietmar

    https://ufile.io/139f81qr

     

    On 3/2/2022 at 3:01 PM, Mov AX, 0xDEAD said:

    storpor8.sys is emulator of some new functions for win7's storport.sys

    I have experimental ported win8.0 storport.sys, it has many manual injected calls to PoStartNextPowerIrp(), perfectly works with win8's storahci

    Me and Daniel chose win7's storport.sys as base for ported storage drivers because it was last version who stills call PoStartNextPowerIrp() at proper places

    @Dietmar@Mov AX, 0xDEAD

    Thanks.  I wanted to test a win8 driver/storport to see if it had same problem I was having with win7 backport.

     

    I updated the readme with newer version and some missing patches.

    https://github.com/pappyN4/NTOSKRNL_Emu/blob/master/README.md

    I did not add uaspstor as I do not have anything to test it with, not sure if it works when using win7_storport or storpor8.

  12. @Andalu

    Crystal Disk Info modded to stop WMI from loading.

    https://ufile.io/16asy5na

    I tried both 32 and 64bit version on my XP64.  Both worked with my samsung nvme (didnt load NVMe size like for SSD/HDD but that info should be in the model names anyway).

    Now for the real question.  Has anyone tried to use the samsung NVMe driver with a not samsung nvme?  I only have the one so I cant test but I would be interested to see if the driver would work and pass through SMART for other manufactures.

    I tested the generic driver inf for samsung originally posted by Fernando and it worked for my samsung.  Here's the same one for x86. (I leave it to you guys to mod the secnvme for x86).

    ;
    ; Copyright ©Samsung Electronic Co,. Ltd 2019
    ;

    [Version]
    Signature="$Windows NT$"
    Provider=%SAM%
    ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
    Class=SCSIAdapter
    CatalogFile=secnvme.cat
    DriverVer=01/21/2020,3.3.0.2003

    [Manufacturer]
    %SAM% = COMM, NTx86

    [SourceDisksNames]
    1 = %DiskId1%,,,""

    [DestinationDirs]
    DefaultDestDir   = 12

    [nvme_Service_Inst]
    ServiceType    = %SERVICE_KERNEL_DRIVER%
    StartType      = %SERVICE_BOOT_START%
    ErrorControl   = %SERVICE_ERROR_NORMAL%
    ServiceBinary  = %12%\secnvme.sys
    LoadOrderGroup = SCSI miniport
    AddReg         = pnpsafe_pci_addreg
    AddReg         = Parameters


    [nvme_EventLog_Inst]
    AddReg = nvme_EventLog_AddReg

    [nvme_EventLog_AddReg]
    HKR, , EventMessageFile, %REG_EXPAND_SZ%, "%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\secnvme.sys"
    HKR, , TypesSupported, %REG_DWORD%, 7


    [pnpsafe_pci_addreg]
    HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001
    HKR, "Parameters", "BusType", %REG_DWORD%, 0x00000011

    [msi_addreg]
    HKR, Interrupt Management, 0x00000010
    HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
    HKR, Interrupt Management\Affinity Policy, 0x00000010
    HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, %REG_DWORD%, 0
    HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, %REG_DWORD%, 2048
    HKR, Interrupt Management\Affinity Policy, DevicePolicy, %REG_DWORD%, 5 ;IrqPolicySpreadMessagesAcrossAllProcessors
    HKR, Interrupt Management\Affinity Policy, DevicePriority, %REG_DWORD%, 3
    HKR, Interrupt Management\Affinity Policy, GroupPolicy, %REG_DWORD%, 1

    [Parameters]
    HKR, Parameters\Device, Namespaces,            %REG_DWORD%, 0x00000010
    HKR, Parameters\Device, MaxTXSize,             %REG_DWORD%, 0x00020000
    HKR, Parameters\Device, AdQEntries,            %REG_DWORD%, 0x00000080
    HKR, Parameters\Device, IoQEntries,            %REG_DWORD%, 0x00000400
    HKR, Parameters\Device, IntCoalescingTime,        %REG_DWORD%, 0x00000000
    HKR, Parameters\Device, IntCoalescingEntries,        %REG_DWORD%, 0x00000000
    HKR, Parameters\Device, InitErrorLog,           %REG_DWORD%, 0x00000000
     
    [SourceDisksFiles.amd64]
    secnvme.sys = 1,,,


    [COMM.NTx86]
    %COMMNvme.DeviceDesc%         = nvme_inst, PCI\CC_010802

     

    [nvme_inst.NTx86]
    CopyFiles=@secnvme.sys
    FeatureScore=0x80

    [nvme_inst.NTx86.HW]
    AddReg = msi_addreg


    [nvme_inst.NTx86.Services]
    AddService = secnvme, 0x00000002 , nvme_Service_Inst, nvme_EventLog_Inst

     

    [Strings]
    ;
    ; Localizable Strings
    ;
    diskId1 = "NVME Installation Disk"
    COMMNvme.DeviceDesc      = "Samsung NVMe Controller"

     

    SAM = "Samsung Electronics Co., Ltd"

    ;
    ; Non-Localizable Strings
    ;

    REG_EXPAND_SZ  = 0x00020000
    REG_DWORD      = 0x00010001
    SERVICE_KERNEL_DRIVER  = 1
    SERVICE_BOOT_START     = 0
    SERVICE_ERROR_NORMAL   = 1
    SERVICE_ERROR_CRITICAL = 3

     

  13. https://itm4n.github.io/windows-dll-hijacking-clarified/
    This explains better but Dependency Walker only checks if DLL is the import table.  At runime a program can use LoadLibrary() to call other dlls.  I looked through all the DLL from DepWalker that Crystal uses, but didnt see one that was "wbem" or "wmi" sounding...

    I tried replacing the 4 WMI related DLLs that Crystal needs into the windows sys folder.  Dependency wise there was no issues, but Crystal still crashed.

    In IDA, there is a "Suspended on Library load/unload".  Running it, it looks like ntdll.dll is where wbmprox first loads, but a bunch of other DLLs load in that same spot is how it looked to me in IDA.  No idea how to look up where it was in ntdll.dll itself...

    Sumbled upon a "debug" setting that can be turned on in Crystal's ini. In there, the last entry before failure was "CMD_TYPE_NVME_INTEL".  Opening up DiskInfo.exe, subroutine was findable with that name.  A lot of IdentifyDevice, AddDevice calls, most ending up at a block with many inputs (all the Info/Add Devices Intel/Samsung/etc...) just before sub exits.  Adding a breakpoint, it looks like Crystal gets through the NVME_INTEL block, and errors out at the MultiBlock..  Jumped out @4cf96 74 -> EB to skip "AddDiskNVMe - CMD_TYPE_NVME_INTEL".  CDI starts at least, but nvme does not show up.  Then tried skiping "DoIdentifyDeviceNVMeIntel" which calls ""AddDiskNVMe - CMD_TYPE_NVME_INTEL" @4ced8    74 77 -> 90 90    @4cf4b    0F 85 0A 01 00 00 -> E9 0B 01 00 00 90.  Same things starts, but no nvme.

    00001110 DoIdentifyDeviceNVMeStorageQuery
    00001110 DoIdentifyDeviceNVMeIntelRst
    00001110 DoIdentifyDeviceNVMeSamsung
    00001110 DoIdentifyDeviceNVMeIntel
    00001110 AddDiskNVMe - CMD_TYPE_NVME_INTEL

     

    Looked further up the logfile.  Compared one with wbemprox removed to a normal one.

    no wbem / works

    00000000 dlg.DoModal()
    00000015 InitAta
    00000015 CAtaSmart::Init WMI on - Start
    00000015 CoInitializeSecurity()
    00000031 CoCreateInstance()
    00000031 NG:WMI Init 1

    wbem / fails

    00000016 dlg.DoModal()
    00000032 InitAta
    00000032 CAtaSmart::Init WMI on - Start
    00000032 CoInitializeSecurity()
    00000032 CoCreateInstance()
    00000032 ConnectServer()
    00000032 CoSetProxyBlanket()
    00000047 OK:WMI Init
    00000782 OK:Win32_IDEController
    00000813 OK:Win32_SCSIController

    Searched around on on those keywords.  ConnectServer() to a wmi server maybe?  Ended up in two subroutines that sounded interesting.  Saw "\\.\root\cimv2" which was familiar... 

    Borrowed a quick vbscript to try wmi.  Breaking the path stops it from working.

    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") 
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process" & _
               " WHERE Name = 'cscript.exe'" & " OR Name = 'wscript.exe'",,48) 
    For Each objItem in colItems 
        Wscript.Echo "-------------------------------------------"
        Wscript.Echo "CommandLine: " & objItem.CommandLine
        Wscript.Echo "Name: " & objItem.Name
    Next

    useWMI.png

    Connect-Server.png

    So in DiskInfo32 or DiskInfo64, find where "\ \ . \ r o o t \ c i m v 2" is with hex editor and change it to something like "\ \ . \ r o o t \ n o w m i".  630069006D00760032 -> 6E006F0077006D0069

    Then let DiskInfo handle the error of a missing wmi the same way as if wbemprox file was missing.

     

  14. Not much to go on in IDA to my untrained eyes.  I assume all the dll loading happens at the very beginning of "start", errors out, then it quickly gets sent to trap.  Error looks like it happens before we can do anything in Crystal.  Playing with it there did nothing useful.

    CDI.png

    ProcMon shows it using a couple of wbem dlls.  Yet no dependency for it with Dependency Walker, or any mention of them in Crystal's dissembled EXE.

    procmon.png

    diss.png

    I guess one of the known dlls causes the webm to be loaded without any explicitly defined imports.  Something using LoadLibrary maybe...

     

    So the question is then.  How does one use IDA or something else to trace where and in what DLL does wbemprox.dll first load?

  15. @Andalu

    ...continuing from PM.  Yeah, I tested renaming wbemprox.dll as a test yesterday it it fixed it for me as well on x64.  I agree that renaming it is not the best since windows must need WBEM for other stuff. 

    I looked at dropping the windows 7 wbem related files into the CrystalDiskInfo to load from there first, but its a lot a extra files, and some dependencies are missing.  Easiest would be to simply stop Crystal from loading it at all, since it looks like it works well enough without it.

    Looked over the source code last night, there is a include <wbemcli.h> in AtaSmart.cpp and SlotSpeedGetter.cpp.  I was thinking if maybe if I run it with IDA or something maybe we can track to where it breaks and hopefully jump over to the "file not found" case where it loads fine without it.  Never used it that way before.  Need to find an older version of IDA Free that works on XP.  The one I have is to new.

     

  16. If anyone is interested, there is a new storport for Windows 7 in KB5010404

     

    x86 storport 6.1.7601.25735
    msi patch
    hexposition: 4E1A	change:	8B 8E 3C 01 00 00	->	B9 00 00 00 00 90
    
    smart patch
    hexposition: 1030A	75 36 	->	90 90
    hexposition: 10316	75 2A	->	90 90
    
    ==========================================================================
    x64 storport 6.1.7601.25735
    msi patch
    hexposition: 156AE	change:	8B 83 C0 01 00 00	->	B8 00 00 00 00 90
    
    smart patch
    hexposition: 192D5	change:	75 36	->	90 90
    hexposition: 192DE	change:	75 2D	->	90 90

     

  17. Ok, now for something new.  Sadly doesnt seem to be much interest for x64 ACPIs.  I started using it back in 2005, so I broke away from 16bit applications long time ago.  I didnt actually use XP, I went from 2000 to XP64.  Anyways...

    I'll start by saying I have no idea about patching ACPIs.  I have no idea what each specific patch was made for.  I dont know how to debug errors from ACPI.  In the words of Mov AX, 0xDEAD, blindly turning off checks is not always the best idea.  All I've done was compare the latest x86 5048 acpi (which worked on my ryzen), and tried to match existing patches and missing patches based on any calls or values by patterns and general structure/flow in IDA Free on the x64 5048.  Some I feel confident I found the right one, others are reasonable, and one that is a total guess as it had nothing guess from.  Feel free to open IDA and see for yourself.

     

    5048 x86	"2020.10.24 - daniel_k, diderius6", all patches below are based on compare to original unpatched / patched file
    =Matched in x64
    @27a80	00 00 00 -> A8 97 03
    @27c58	28 92 03 -> 00 00 00
    =Matched in x64
    @d443	75 -> EB
    =MaybeMatch in x64
    @15f15	8B F7 -> 89 FF
    
    
    
    -ex1 to x64
    @283d6	7D -> EB
    -ex2 to x64
    @d2b0	74 -> EB
    -exClose1 to x64
    @f7e1	74 -> EB
    -exClose2 to x64
    @4511	0F 84 39 01 00 00 -> E9 3A 01 00 00 90
    -experiNotSure1 to x64
    @317ac	75 -> EB
    @317c5	21 -> 00

     

    5048 x64	"2019.6.30 (Ryzen) - diderius6"
    =Matched from x86
    @4ae40	00 00 00 -> B8 C8 05
    @4b1f0	18 BF 05 -> 00 00 00
    =Matched from x86
    @18ca4	0A -> 00
    =MaybeMatch from x86
    @26337	08 00 14 C0 -> 00 00 00 00
    @26429	74 -> EB
    --end of origial 2019.06.30 patch
    ----------------------EXPERIMENT---------everything below this is untested guess from x86
    -experi1
    test		@51bf1	79 -> EB
    -experi2
    test		@198dc	0F 84 7F -> E9 80 00
    -experiClose1
    test		@1c666	74 -> EB
    -experiClose2
    test		@9638	0F 84 A8 01 00 00 -> E9 A9 01 00 00 90
    -experiNotSure1
    test		@5fa63	74 -> EB
    test		@5fa94	78 -> 00

     

    experi1
    in subroutine that has \\_S1,2,3,4,5 in the beginning
    shorty before the end, block just after a ZwPowerInformation and 2 ExFreePoolWithTag, x86 stop jump to 2001, 0A5, call: extern KeBugCheckEx:Dword
    so we do same, stop jump to __stdcall __noreturn extern KeBugCheckEx:qword

    experi1.png
    ===========
    experi2
    in function shortly after x64@18ca4,x86@d443 with 58080206h,4449485Fh push/mov, PNP0C0F is jumped so that it doesnt get to a 5349445Fh, which then goes to 10006h,0A5h ds:keBugCheckEx
    x64 version has a lot more paths to 0A5h, but same one jump to get away, good idea? I dont know.

    Another learning experience.  This one I used the same E9 jump as from expericlose2, but this time I just tried with my own guess for the offset.  I ended up with a bit longer jump then I wanted so I guess my math wasnt exactly correct, but was able to get it there eventually.

    experi2.png
    ===========
    experiClose1
    similar structure, compares 0FFFFFFFFh has 2 KeBugCheckEx, and ends with ExFreePoolWithTag
    first KeBugCheckEx is left alone, goes straight from head to bugcheck, other one near end is the one that is jumped out

    experi-Close1.png
    ===========
    experiClose2
    similar structure,  4449555Fh,0Dh,0A5h to KeBugCheckEx at end, mentions 800h vs 80000000000h and 0A000h vs 0A00000000000h between x86 and x64
    on x86 jumped to "retn" block,

    This one was a learning experience.  Using the same E9 3A 01 landed in the wrong spot.  Makes sense after looking up E9 (JMP) is based on offset distance entered.  On the x64 where you want to go wasnt in the same spot.  So used IDA free in text mode to see where the text jump landed with the wrong value from x86, in hex calculated the difference on how much further was needed, then added it to the JMP.  So 31 01 (aka in hex calculator 0131 + 6F = 01A9), so A9 01.

    experi-Close2.png
    ===========
    experiNotSure1
    not much to guess with, short subroutine, 2 KeBugCheckEx to avoid, total guess on this one

    experi-Not-Sure1.png

     

     

    Update

    https://www.mediafire.com/file/ietiycbz6eueacz/xp64_acpi5048_2022.04.12.rar/file

  18. SATA driver speed tests (XP64 vs Win7x64)
    combined-SATA.png

     

    NVME driver speed tests (XP64 vs Win7x64)
    combined-NVME.png

     

    storport tests

     


    XPx86 storport 5.2.3790.4485 (from server 2003 x86) (default XP has no storport and drivers will not work)
    AMD 1.2.1.321       yes
    AMD 1.2.1.402+ntos8   no boothang
    StorAHCI schtrom   yes
    NVME schtrom w2k3OFA1.3   no code10
    NVME schtrom w2k3OFA1.5   no code10
    NVME win7+ntos8       no code37

    XPx86 storport 6.1.7601.23403 +ntos8
    AMD 1.2.1.321       yes
    AMD 1.2.1.402+ntos8   yes
    StorAHCI schtrom   yes
    NVME schtrom w2k3OFA1.3   no code10
    NVME schtrom w2k3OFA1.5   no code10
    NVME win7+ntos8       yes
    NVME Samsung+ntos8   no
    ================================
    XPx64 storport 5.2.3790.4485 (default)
    AMD 1.2.1.321       yes
    AMD 1.2.1.402+ntos8   yes
    StorAHCI schtrom   yes
    NVME schtrom w2k3OFA1.3   yes
    NVME schtrom w2k3OFA1.5   no boothang
    NVME win7+ntos8       no boothang

    XPx64 storport 6.1.7601.23403 +ntos8
    AMD 1.2.1.321       yes
    AMD 1.2.1.402+ntos8   yes
    StorAHCI schtrom   yes
    NVME schtrom w2k3OFA1.3   yes
    NVME schtrom w2k3OFA1.5   no boothang
    NVME win7+ntos8       yes
    NVME Samsung+ntos8   yes
    NVME OFA 1.3       no
    NVME OFA 1.3+nt8+sto8   no
    NVME OFA 1.5+nt8   no

     

     

    SMART tests

     


    Seagate HDD, Sandisk SSD, Samsung NVME

                       CrystalDisk8.9.0a/HWiNFO640/GSmartControl0.90   

    XPx64 storport 6.1.7601.23403(msi patch/SMART patch) +ntos8
    SATA AMD 1.2.1.321           Yes/Yes/Yes
    SATA StorAHCI schtrom 1.0_20200928   Yes/Yes**/Yes
    SATA storahci 6.2.9200.16384       Yes/Yes/Yes
    NVME schtrom w2k3 1.3           No/Yes/No
    NVME win7.23403+ntos8           No/No/No
    NVME Samsung+ntos           EXEcrash*/Yes/No        

    **StorAHCI schtrom 1.0_20200928   (when started HWi BSOD0x51(0x04,0x01,..., changed to other driver for test, no BSOD when changed back)


    XPx64 storport 6.1.7601.23403(msi patch) +ntos8
    SATA AMD 1.2.1.321           Yes/Yes/Yes
    SATA StorAHCI schtrom 1.0_20200928   No/1stSATA/Yes
    SATA storahci 6.2.9200.16384       No/1stSATA/Yes   
    NVME schtrom w2k3 OFA1.3       No/Yes/No
    NVME win7.23403+ntos8           No/No/No
    NVME Samsung+ntos           EXEcrash*/Yes/No       

    *EXEcrash Crystal8.3.0 last version to work with Samsung NVME driver on XP, newer ones crash)


    Win7x64 6.1.7601.23403 (default)
    AMD 1.2.1.402   Yes/Yes/Yes
    Win7msahci   Yes/Yes/Yes
    NVME win7   No/No/No       
    NVME Samsung   Yes/Yes/No
    NVME OFA1.3   noboot
    NVME OFA1.5   noboot

     

     

     

    ACPI tests

     


    x64
    Bad   acpi 5048 - 2019.10.19 (Intel&AMD Final) - daniel_k
    Bad   acpi 5048 - 2019.5.15 - skullteria
    Good   acpi 5048 - 2019.9.1 (Ryzen) - diderius6

    x86
    G   acpi 5048 - 2019.10.11 - diderius6
    G   acpi 5048 - 2019.10.19 (Intel&AMD Final) - daniel_k
    G   acpi 5048 - 2019.11.1 - diderius6
    Bad   acpi 5048 - 2019.5.15 - skullteria
    G   acpi 5048 - 2019.6.25 - infuscomus
    G   acpi 5048 - 2019.6.30 (Ryzen) - diderius6
    G   acpi 5048 - 2019.8.25 - daniel_k
    G   acpi 5048 - 2019.8.27 (Intel&AMD Final) - daniel_k
    G   acpi 5048 - 2020.10.24 - daniel_k, diderius6
    Bad   acpi 6666 - 2019.10.18 - OuterSpace, diderius6
    Bad   acpi 6666 - 2019.10.20#1 - OuterSpace, diderius6
    G   acpi 6666 - 2019.10.20#2 (Intel&Ryzen) - OuterSpace, diderius6
    untest   acpi 6666 - 2020.10.22 - daniel_k
    G   acpi 6666 - 2020.10.22 - OuterSpace, daniel_k
    G   acpi 6666 - 2020.10.23 - diderius6
    G   acpi 6666 - 2020.12.28 - diderius6
    G   acpi 6666 - 2021.2.1#1 - daniel_k               (2013none, 2015both amdi0030, amdif0030)
    G   acpi 6666 - 2021.2.1#2 - daniel_k               (2013none, 2015both amdi0030, amdif0030)
    G   acpi 6666 - 2021.8.28 - daniel_k, diderius6

     

  19. Build ISO with nLite

    WinXP64 ISO and updates
    en_win_xp_pro_x64_with_sp2_vl_x13-41611.iso
    5eraph_Windows_XP_x64_Post-SP2_UpdatePack_ENU_v2019-08.7z; https://www.mediafire.com/folder/x6qqeye5y0a0x/x64

    WinXP ISO and updates
    en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso
    XPSP3_QFE_UpdatePack_20210829_Pro.7z; https://www.4shared.com/web/directDownload/0t47E_Vhea/B8-gUmU2.8a5c8b6a84dcde59d76300e08ab95fac
    XPSP3_QFE_POSReady_Addon_20200528_5er.7z;  https://www.4shared.com/web/directDownload/pCl2jGEqea/B8-gUmU2.7befe8c26d0ff79f226742fccad3d4c3
    Note: order matters, in nlite have the UpdatePack run first, then the POSReady updates
    Note2: in POSReady updates, entries_POSUpdates.ini has a bug with nlite, you will need to comment out these lines

    ;Prevents Windows Setup copying drivers from driver.cab that the integrator failed to update
    ;drvindex.inf|ks.sys||2
    ;drvindex.inf|termdd.sys||1
    ;drvindex.inf|hsf_fs|hsf_fsks.sys|1


    Compile NTOSKRNL_Emu; https://github.com/MovAX0xDEAD/NTOSKRNL_Emu
    Backport drivers/ create whatever patch files from above.

    Install nLite 1.4.9.3
    extract Windows ISO to folder
    run nlite, customize as you want, make sure to import the update packs
    once you get to the create ISO stage stop


    ==============ACPI/NTOSKRNL/STORPORT/WIN8AHCI/WIN7NVME/WIN8USB3========================

    open nlited ISO folder and extract SP3.cab (XP), SP2.cab (XP64) to a folder
    replace acpi.sys, add storport.sys, storpor8.sys, ntoskrn8.sys to folder
    use CabPack1.4 to recreate SP#.cab and replace cab file from ISO folder
    replace ACPI.SY_, add STORPORT.SY_, STORPOR8.SY_, NTOSKRN8.SY_ to I386 (XP), AMD64 (XP64) folder

    use cabsdk  to compress eg: "CABARC -m LZX:21 N ACPI.SY_ ACPI.SYS"
    ------------------------------------------------
    (I386 folder for XP) (AMD64 folder for XP64)

    in DOSNET.INF add    (x64 already has a storport.sys line)

    Quote

    [FloppyFiles.1]
    d1,ntoskrn8.sys
    d1,storpor8.sys
    d1,storport.sys
    d1,storahci.sys
    d1,stornvme.sys

    [Files]
    d1,ntoskrn8.sys
    d1,storpor8.sys
    d1,storport.sys
    d1,storahci.inf
    d1,storahci.sys
    d1,stornvme.inf
    d1,stornvme.sys
    d1,wdf01011.inf
    d1,wdf01000.sys
    d1,wdfldr.sys
    d1,ksecd8.sys
    d1,ucx01000.sys
    d1,usb8.sys
    d1,usbhub3.inf
    d1,usbhub3.sys
    d1,usbxhci.inf
    d1,usbxhci.sys
    d1,wpprecor.sys

    [FloppyFiles.2]
    d1,ksecd8.sys
    d1,ucx01000.sys
    d1,usb8.sys
    d1,usbhub3.sys
    d1,usbxhci.sys
    d1,wpprecor.sys

    in TXTSETUP.SIF    add    (x64 already has a storport.sys line)

    Quote


    [SourceDisksFiles]
    storport.sys = 1,,,,,,3_,4,0,0,,1,4
    usbd.sys = 1,,,,,,4_,4,0,0,,1,4        ;force load for mb that has xhci only
    wdf01011.inf = 1,,,,,,,20,0,0

    [SourceDisksFiles.amd64]    OR     [SourceDisksFiles.x86]
    ntoskrn8.sys = 1,,,,,,3,4,0,0,,1,4
    storpor8.sys = 1,,,,,,3,4,0,0,,1,4
    storahci.inf = 1,,,,,,,20,0,0
    storahci.sys = 1,,,,,,3_,4,0,0,,1,4
    stornvme.inf = 1,,,,,,,20,0,0
    stornvme.sys = 1,,,,,,3_,4,0,0,,1,4
    wdf01000.sys = 100,,,,,,3_,4,0,0,,1,4
    wdfldr.sys = 100,,,,,,3_,4,0,0,,1,4
    ksecd8.sys = 1,,,,,,4_,4,0,0,,1,4
    ucx01000.sys = 1,,,,,,4_,4,0,0,,1,4
    usb8.sys = 1,,,,,,4_,4,0,0,,1,4
    usbhub3.inf = 1,,,,,,,20,0,0
    usbhub3.sys = 1,,,,,,4_,4,0,0,,1,4
    usbxhci.inf = 1,,,,,,,20,0,0
    usbxhci.sys = 1,,,,,,4_,4,0,0,,1,4
    wpprecor.sys = 1,,,,,,4_,4,0,0,,1,4

    [HardwareIdsDatabase]
    PCI\CC_010601 = "storahci"
    PCI\CC_010802 = "stornvme"
    USB\USB20_HUB = "usbhub3"
    USB\USB30_HUB = "usbhub3"
    USB\ROOT_HUB30 = "usbhub3"
    PCI\CC_0C0330 = "usbxhci"

    [SCSI.Load]
    storahci = storahci.sys,4
    stornvme = stornvme.sys,4
    usbxhci  = usbxhci.sys,4
    usbhub3  = usbhub3.sys,4

    [SCSI]
    storahci = "Standard SATA AHCI Controller"
    stornvme = "Standard NVM Express Controller"
    usbhub3  = "USB 3.X Hub Driver"
    usbxhci  = "USB 3.X Host Controller"

    [FileFlags]
    ntoskrn8.sys = 16
    storpor8.sys = 16
    storport.sys = 16
    storahci.sys =16
    stornvme.sys =16
    wdf01000.sys =16
    wdfldr.sys =16
    wpprecor.sys =16
    usbxhci.sys =16
    usbhub3.sys =16
    usb8.sys =16
    ucx01000.sys =16
    ksecd8.sys =16

    [BootBusExtenders.Load]
    wdf01000 = wdf01000.sys

    [BusExtenders.Load]
    ucx01000 = ucx01000.sys

    [InputDevicesSupport.Load]
    usbxhci  = usbxhci.sys
    usbhub3  = usbhub3.sys

    [InputDevicesSupport]
    usbhub3  = "USB 3.X Hub Driver",files.usbhub3,usbhub3
    usbxhci  = "USB 3.X Host Controller",files.usbxhci,usbxhci

    [files.usbxhci]
    hid.dll,2
    hidclass.sys,4
    hidparse.sys,4
    usb8.sys,4
    usbport.sys,4
    usbxhci.sys,4
    wdfldr.sys,4
    [files.usbhub3]
    usbhub3.sys,4
    usb8.sys,4
    ksecd8.sys,4
    wdfldr.sys,4
    [files.ucx01000]
    ucx01000.sys,4
    wpprecor.sys,4
    wdfldr.sys,4
    [files.wdf01000]
    wdf01000.sys,4
    wdfldr.sys,4

    [BootBusExtenders]
    wdf01000 = "Kernel-Mode Driver Framework 1.11",files.wdf01000,wdf01000

    [BusExtenders]
    ucx01000 = "USB 3.0 Controller Extension",files.ucx01000,ucx01000

    in HIVESYS.INF    add

    Quote


    [AddReg]
    HKLM,"SYSTEM\CurrentControlSet\Services\storahci\Parameters\PnpInterface","5",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\storahci\Parameters","BusType",0x00010001,"b"
    HKLM,"SYSTEM\CurrentControlSet\Services\storahci\Parameters","IoTimeoutValue",0x00010001,"0x0000001e"
    HKLM,"SYSTEM\CurrentControlSet\Services\stornvme\Parameters\PnpInterface","5",0x00010003,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\stornvme\Parameters","BusType",0x00010001,"0x00000011"
    HKLM,"SYSTEM\CurrentControlSet\Services\stornvme\Parameters","IoTimeoutValue",0x00010001,"a"
    HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\Setup","X1-WDF01011_INSTALL",0x00000000,"RunDll32.exe SetupAPI.dll,InstallHinfSection PostSetup 132 wdf01011.inf"
    HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","Type",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","Start",0x00010003,"0"
    HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","ImagePath",0x00020000,"system32\drivers\wdf01000.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","Group",0x00000000,"Boot Bus Extender"
    HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","ErrorControl",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBXHCI","Type",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBXHCI","Start",0x00010003,"0"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBXHCI","ImagePath",0x00020000,"system32\drivers\usbxhci.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBXHCI","Group",0x00000000,"Input Device Support"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBXHCI","ErrorControl",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBHUB3","Type",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBHUB3","Start",0x00010003,"0"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBHUB3","ImagePath",0x00020000,"system32\drivers\usbhub3.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBHUB3","Group",0x00000000,"Input Device Support"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBHUB3","ErrorControl",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\Ucx01000","Type",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Services\Ucx01000","Start",0x00010003,"0"
    HKLM,"SYSTEM\CurrentControlSet\Services\Ucx01000","ImagePath",0x00020000,"system32\drivers\ucx01000.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\Ucx01000","Group",0x00000000,"System Bus Extender"
    HKLM,"SYSTEM\CurrentControlSet\Services\Ucx01000","ErrorControl",0x00010001,"1"
    HKLM,"SYSTEM\CurrentControlSet\Control\Wdf\Kmdf\Ucx\Versions\1\1","Service",0x00000000,"ucx01000"


    for SETUPREG.HIV use offlinereg-win32.exe by Erwan to add

    Quote


    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Kmdf\1" setvalue "Version" "1.11" 1
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Kmdf\KmdfLibrary\Versions\1" setvalue "Service" "Wdf01000" 1
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Kmdf\Ucx\Versions\1\1" setvalue "Service" "ucx01000" 1
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Schema\KmdfService" setvalue "Type" "0" 4
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Schema\KmdfService\Object" setvalue "KeyPath" "CurrentControlSet\Services" 1
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Control\Wdf\Schema\KmdfService\Object" setvalue "KeyRoot" "SYSTEM" 1
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Services\Wdf01000\Parameters" setvalue "BuildNumber" "0" 4
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Services\Wdf01000\Parameters" setvalue "MajorVersion" "1" 4
    offlinereg-win32.exe SETUPREG.HIV "ControlSet001\Services\Wdf01000\Parameters" setvalue "MinorVersion" "11" 4


    REPLACE

    Quote

    in storahci.inf
    [SourceDisksNames]
    1 = %DiskId%,,,"\AMD64"        OR 1 = %DiskId%,,,"\I386"

    in stornvme.inf
    [SourceDisksNames]
    1 = %DiskId%,,,"\AMD64"        OR 1 = %DiskId%,,,"\I386"

    in wdf01011.inf
    [SourceDisksNames]
    1 = "Kernel-Mode Driver Framework 1.11",,,"\AMD64"    OR    1 = "Kernel-Mode Driver Framework 1.11",,,"\I386"

    in usbxhci.inf
    [SourceDisksNames]
    1="Generic USB xHCI Host Controller",,,"\AMD64"    OR    1="Generic USB xHCI Host Controller",,,"\I386"

    in usbhub3.inf
    [SourceDisksNames]
    1="Generic USB Hub Driver",,,"\AMD64"    OR    1="Generic USB Hub Driver",,,"\I386"

     

    copy to AMD64 folder or I386 folder

    Quote

    storahci.inf
    storahci.sys
    stornvme.inf
    stornvme.sys
    wdf01011.inf
    wdf01000.sys
    wdfldr.sys
    ksecd8.sys
    ucx01000.sys
    usb8.sys
    usbhub3.inf
    usbhub3.sys
    usbxhci.inf
    usbxhci.sys
    wpprecor.sys

    =================================================================

    =================Other Patches=====================================
    replace SHELL32.DL_ patched version to AMD64 or I386 folder
    replace TCPIP.DL_ and TCPIP6.DL_ patched version to AMD64 or I386 folder

    for x86 replace sndrec32,disk,partmgr, and other files from AVX/PAE patch to the I386 folder or the SP#.cab as needed

    etc...
    =================Make ISO======================================
    make ISO in nLite and test. 

  20. Patches

    shell32 missing icon notification patch (x86/x64)

     

    patch shell32.dll by setting the timeout from 4000ms to 60000 ms and removing the SMTO_ABORTIFHUNG flag

    x86    6.0.2900.7551
    @63CC9    A0 0F 00 00 6A 03    ->    60 EA 00 00 6A 01

    x64    6.0.3790.6501
    @29A50    A0 0F 00 00 C7 44 24 20 03     ->    60 EA 00 00 C7 44 24 20 01
     

    where 0x0FA0 = 4000ms and 0xEA60 = 60000ms

    shell32-fixmissingiconnotification.png

     

    tcpip & tcpip6 max connection limit patch (x86/x64)

     

    x86 tcpip.sys 5.1.2600.7510
    @4fbc6    0A 00 00 -> FF FF FF

    x86 tcpip6.sys 5.1.2600.7510
    @33EB3    0A 00 00 -> FF FF FF

    x64 tcpip.sys 5.2.3790.6527
    @c00cc    0A 00 00 -> FF FF FF

    x64 tcpip6.sys 5.2.3790.6527
    @5e9a0    0A 00 00 -> FF FF FF

    where 0x0A = 10 and 0xFFFFFF = 16777215

    maybe 0xFFFF = 65535 would have been enough?😀

    tcpip-patch.png

     

     

    WinXPPAE v3.5 patch not needed, XP64 is good up to 128GB of ram.

     

    AVX/AVX2 patch (only x86 version exists)

     

    MovAX0xDEAD said:
    Let's make another dirty hack :)

    This time is AVX/AVX2 Enabler for Windows XP (x32 only)
    Again as Proof-of-Concept, only ntkrpamp.exe (MultiCPU+PAE) is done (still BETA v1), v5.1.2600.7581 (KB4463103 update, 2029056 bytes)

    Do it yourself (you need change kernel file on disk, remember about Microsoft's EULA):
    1) xdelta3.exe -v -f -d -s ntkrpamp.exe ntkrpamp.delta ntkrpamp_avx.exe
    2) put ntkrpamp_avx.exe as new ntkrnlpa.exe in /system32 folder, ntkrnlpa.exe will be selected by bootloader only if windows was installed as MultiCPU+PAE. Also you can force exact filename in boot.ini: add /kernel=ntkrnlpa.exe

    Links:
    ntkrpamp.delta v1 - ⇗ http://www.unibytes.com/facSy3u_83gLqw-Us4P3UgBB / ⇗ https://www.mediafire.com/file/a692j6ymc..._delta.zip/file
    ASM sources (FASM format) v1 - ⇗ https://pastebin.com/CbBFd5tM
    xdelta3.exe - ⇗ https://github.com/MovAX0xDEAD/KDNET/raw/master/xdelta3.exe


    P.S. Some test/diag utils fail with AVX detection due wrong coding, but proper projects like Prime95 do it right

    P.S. WinXP x64 kernel has different FPU context format, but i think it is possible to do same trick, but i'm not interested

    P.S.S Don't ask for AVX512, there is no free space in FPU context to store additional 16*AVX512_H(256bit) regs. WinXP x32 kernel allocates only 520 bytes(see _FXSAVE_FORMAT struct) for store all (2*ControlWords(128bit) + 8*FPU/MMX(128bit) + 8*SSE(128bit) + 8*AVX_H(128bit)) regs, this "520" harcoded to structs and code :(

     

    GPT native support on data volume.  With XP32 you have to copy disk.sys and partmgr.sys  from server2003x86, but with XP64 its based on 5.2 (like 2003x64).

     

    sndrec32 2GB patch (only needed for x86, x64 does not need patch)

     

    5.1.2600.5671


    @6C4B  change  7E 2E -> 76 2E
    sndrec322gbfix.png

     

    Patch for applications
    4GB patcher to add /LARGEADDRESSAWARE flag for EXEs. Otherwise 32bit process is limited to 2GB. This would allow it to use all 4GB. Useful for some games or apps that can use a lot of RAM.
    https://ntcore.com/?page_id=371

     

  21. XP64 SP2 + post SP2 update pack
    Gigabyte B450 Aorus M
    F52 BIOS AGESA 1.0.0.6 (original F41 AGESA 1.0.0.3 also worked), (booted to XP64 on a different PC with F62d, so maybe Zen3 as well?)
    Ryzen Zen2 Matisse CPU

    devices-GA-B450-Aorus-M.png

    Issues
    Restart does not work with XP/XP64 with any of the acpis when using a PS2 keyboard.  Have to manually push the restart button. Shutdown works fine.  Workaround, use USB keyboard after it is installed (or integrate backported USB3 driver)

    BIOS
    Gigabyte B450 Aorus M BIOS settings
    So I noticed that by default virtualization (AMD-V) aka "SVM" was disabled by default.
    BIOS > MIT > Advanced Freq Settings > Advanced CPU Settings > SVM Mode Enabled & CoolNQuiet Enabled
    BIOS > MIT > XMP Profile 1
    BIOS > BIOS > CSM Support Enabled & Fastboot Disabled & Full Logo Disabled

    You can also enable a PPT limit on the CPU lower than default.  Lose a little bit of performance for a nice drop in heat.  
    BIOS > Peripherals > AMD Overclocking > PBO to Enabled
    BIOS > Peripherals > AMD CBS > Package Power Limit > Manual & ##

    Picture shows a nice spot for power/performace around 50W
    hub5d3548568d248f412caaad99252b98c-48682

    ACPI
    ACPI needed for new motherboards.  First versions were based on longhorn 5048 with some BSODs patched.  There was a x86 version based on the original XP acpi with new instructions patched in assembly as well (6666).  Latest version for XP/XP64 (7777) is here,

    https://www.mediafire.com/file/wsqgptapdrxhidf/ACPI2.0_v4_x86+x64_5.1+5.2.7z/file

     

    Drivers
    GPU Drivers (Tested nvidia GT710, GTX750Ti, and amd HD5450 video cards)
    NVIDIA 368.81       7/10/2016
    AMD 14.4           09/05/2014


    Onboard LAN/Audio drivers
    Realtek Audio   5.10.0.7514           8/23/2016
    Realtek LAN   5.836.125.2018       1/25/2018


    AMD CPU CoolNQuiet Driver 1.3.2.53       8/22/2007
    Download AMD Processor Driver 1.3.2.53 and turn on power management if you want CPU to clock down during idle.


    Chipset Drivers (works with native storport on XP64, for XP you will need to integrate backported storport from Advanced)


    DEV7901/43C8   FCH/400 Series SATA Controller       Option1: AMD 1.2.1.321

    Download an old 13.4 XP/XP64 chipset pack from AMD.  

    Open up amd_sata.inf and add in these lines underneath existing DEVs (a non B450 may have different DEV_):
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_7901&CC_0106
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_7904&CC_0106
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_43C8&CC_0106[/spoiler][spoiler=DEV7901/43C8   FCH/400 Series SATA Controller       Option2: StorAhci_V1.0_20200928]Download Schtrom's StorAhci SATA AHCI Driver from sourceforge.

    Pros: Universal driver.  Not limited to just AMD controllers.
    Cons: Sequential speed is slower compared to AMD 1.2.1.321

    Needs SMART patch on backported win7 storport to enable SMART.

    DEV7901/43C8   FCH/400 Series SATA Controller       Option2: StorAhci_V1.0_20200928

    Download Schtrom's StorAhci SATA AHCI Driver from sourceforge.

    Pros: Universal driver.  Not limited to just AMD controllers.
    Cons: Sequential speed is slower compared to AMD 1.2.1.321

    Needs SMART patch on backported win7 storport to enable SMART.

    NVMe           OFA NVMe 1.3 Storport Miniport       Option1: 20180719

    Download Schtrom's OFA NVMe 1.3 Storport Miniport from sourceforge.

    You will need to integrate a new version of storport.sys for it to work. Version 4173 (KB943545) or newer.  You can also use the postSP2 update pack.

    Tested with a Samsung PM981 and storport 5.2.3790.4485.
    -Version 1.3 works.  Version 1.5 stalled in the TXT setup just before format partition page.
    -Use MBR for boot drive.  Native XP/XP64 does not boot from GPT.
    -Use NTFS.  FAT32 starts install but hangs in the GUI setup halfway through Installing Devices.
    -No SMART data from CrystalDiskInfo, SMART with HWiNFO.

    DEV43D5           400 Series USB 3.1 XHCI Controller   1.0.5.3

    Download the Windows 7 chipset pack for the B450 from AMD.

    1.0.5.3 USB driver from USB31_PT for the controller and the hub works with the motherboard USB ports.  But you get a Code 39 error.  To fix, you will have to copy usbd.sys to your \system32\drivers folder for a live system.  You can also modify the inf file in two spots to also copy over the usbd.sys file when it copies over the driver sys file like the amdxhc31.sys or amdhub31.sys.

    Use can decompress the usbd.sy_ file from your ISO or extract latest version from an unofficial service pack.  In CMD, "expand usbd.sy_"

    Chipset Drivers (advanced)
    NTOSKRNL Emu_Extender   required

    -Download NTOSKRNL Emu_Extender from sourceforge.
    https://github.com/MovAX0xDEAD/NTOSKRNL_Emu
    -Follow the instructions and compile backported drivers.

    THe USB driver needs Kernel Mode Driver Framework 1.11 (WDF 1.11).  
    -Follow the instructions from above and create updated wdf files.

    Useful Tools:
    -Hexplorer or equivalent hex editor
    -Dependency Walker
    -PEChecksum.exe

    DEV7901/43C8   FCH/400 Series SATA Controller       Option3: AMD 1.2.1.402

    -Download the Windows 7 chipset pack for the B450 from AMD.  

    -Open up amd_sata.inf and change the two lines that have NTAMD64.6.1 -> NTAMD64 (NTx86 if doing the 32bit version)

    -Add in these lines underneath existing DEVs if not already there (non B450 board may have different DEV_):
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_7901&CC_0106
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_7904&CC_0106
    %AMDSATA.DeviceDesc% = amd_sata_inst, PCI\VEN_1022&DEV_43C8&CC_0106

    -Open up amd_xata.sys with hexplorer or equivalent, find and change ntoskrnl.exe -> ntoskrn8.sys.
    -Apply PEChecksum.exe on amd_xata.sys

    DEV149C           Matisse USB 3.0 Host Controller       usbxhci 6.2.9200.xxxxx

    Backported generic Win 8 USB3 driver from NTOSKRNL_Emu works. Needs WDF1.11 backport as well.

    NVMe           Generic Windows 7 NVMe           Option2: stornvme 6.1.7601.23403

    Backporting Windows 7 NVMe drive works.  No SMART info.

    NVME           Samsung Option3: 3.3.0.2003

    Backport the Samsung NVME driver.  secnvme.sys and secnvme.sys imports need to be changed to NTOSKRN8.SYS like with the other drivers.   No SMART with CrystalDiskInfo but it does work with HWiNFO.

    I only have a Samsung NVME so havent tested if the generic works with other brands.

     

    Chipset Drivers (null)

    DEV790B           FCH SMBus Controller             

    Null driver.  Download an old 13.4 XP/XP64 chipset pack from AMD or get Windows 7 for the B450 chipset.  

    Open up SMBUSamd.inf and add in these two lines underneath existing DEVs:
    %AMD.DeviceDesc0% = AMDSMBus, PCI\VEN_1022&DEV_790B
    %AMD.DeviceDesc0% = AMDSMBus64, PCI\VEN_1022&DEV_790B
     

    DEV1481           Starship/Matisse IOMMU              

    Null driver.  Download an old 13.4 XP/XP64 chipset pack from AMD or get Windows 7 for the B450 chipset.

    Open up AmdIOV.inf and add in this line underneath existing DEVs:
    %IOMMU.DeviceDesc%=NULL_DRIVER,PCI\VEN_1022&DEV_1481

    DEV1486           Starship/Matisse Cryptographic Coprocessor PSPCPP

    Install null driver to remove from missing devices.

    DEV1485/148A   Starship/Matisse Reserved SPP/PCIe Dummy Function

    According to the readme this should also be a null driver. Unlike the SMBus and IOMMU, this one has a sys file that tries to install.

    Update inf to add DEV1485 and DEV148A.

    ACPI\AMDI0030          

    Install null driver to remove from missing devices

    Extra Stuff
    VMware and USB flash drive passthrough

    When using VMware, if you connect a USB flash drive and try to pass it through to the guest OS, you will need to use a USB port that is using the generic backported USB driver in the host OS. It does not work then using the AMD USB31_PT 1.0.5.3 chipset drivers from the motherboard. From the article it looks like other motherboard specific drivers will have the same issue with a few exceptions.  Once you get the Win8 USB3 up and running, you can replace the AMD motherboard USB drivers.
    https://kb.vmware.com/s/article/2041591

    Tested with: XP64host with VM10.0.7(last XP version) and Win7x64host with VM10.0.7 & 15.5.6(last Win7 version).

    Testing passthrough with a Kingston USB2.0 flash drive works fine. But when connecting a Kingston USB3.0 flash drive vmware gets a "unable to connect to ideal host", and the drive does not load properly in the WinXP guest OS.


    VMware and USB3.0 flash drive

    If you change the USB compatibility in vmware in Settings from 2.0 to 3.0, then install the backported generic drivers to the XP guest OS, it will work properly.

    Note that the vm image hardware compatibility mode has to be 8 or higher, if you are using an image set to 6.5-7.x mode or lower then the USB 3.0 drop down menu will not show up.
     

×
×
  • Create New...