2089 posts in this topic
[Originally posted 3-14-2012 in DIY eGPU experiences (NBR). Relocated to T|I due to being banned by Lenovo fan ZaZ].
Due to it's importance created a new official updated thread.
no more 4GB+ system RAM issues: use a DSDT override to extend the root bridge into 36-bit space (Windows 7/8/10 only - MacOS/Linux are unaffected)
This problem and solution is only relevant to Windows operating systems. MacOS ignores the root bridge and can allocate in 64-bit space as kizwan found here. Linux has a "noCRS" kernel parameter to ignore the root bridge boundaries so the OS can also also allocate in full 64-bit pci-e space.
The this process aims to solve the problem of seeing an error 12 (This device cannot find enough free resources that it can use) issues against a eGPU in Windows Device Manager due to insufficient 32-bit addressing space. By manually adding a memory range outside of this 32-bit space, we can force Windows to operate in 36-bit space instead to host eGPUs.
Know systems that will require this process are Dell Latitude Ex410 series, Samsung Series-4, Sony F-Series and MSI CRx20, HP-Elitebook/Probook xx60x/xx70x with AMD GPUs. Those have insufficient free 32-bit PCI space to accomodate a eGPU if have 4GB or more of RAM installed. They can't use Setup 1.30's PCI compaction to create sufficient space because they either have TOLUD=3.5GB, have lower TOLUD like 3.25GB but with an unmovable systemboard device occupying candidate free pci space making it unusable or are using an AMD or GTX650/GTX750 card that requires over 256MB contiguous space. Refer to Pre-Purchase FAQ #2(>> 2. How can I check if my notebook is compatible with an eGPU?) for details on how to check your TOLUD.
The same solution can be applied to any 3-gens old PM965 chipsets (2007) or newer system. They have a 64-bit CPU and chipset so are fully PAE-36-bit/64-bit compatible. Dell Inspiron 1440/1525 (core2duo) and Dell Vostro 1015 (core2duo) have BIOS-configured 36-bit root bridges already so don't require this workaround.
I happened to run into one of these problematic systems. A Dell E4310 with TOLUD=3.5G which can be maxxed out at 16GB of RAM. It's too nice an ultraportable to be need to downgrade RAM to 3GB of RAM to use an eGPU. I set of in pursuit of how to add a DIY eGPU to it which is documented below.
Using Setup 1.30's 36-bit PCI compaction on the eGPU to relocate it in such space will see the eGPU still give an error 12 in Device Manager. Why is that? Avlan confirmed that the 32-bit root bridge definition limited allocation only to 32-bit space. The fix being a modified DSDT loaded as a registry override that extends the root bridge (ACPI PNP0A08 or PNP0A03 device) into 36-bit space. Avlan's fix was cryptic so wasn't attempted on other systems.
After a bit of digging from the following references I found the QWORDMemory DSDT static resource entry can be used to easily extend root bridge entry into 36-bit space. Ref: [Qemu-devel] [PATCH 6/6] 64bit PCI range in _CRS table plus two examples at virtualbox and Coreboot.
The iasl and asl tools used are in 2570P-dsdt-override or (older) DELL-36b-root-bridge.rar. Allternatively, can download them from their original sources:
The latest Windows Binary Tools (WBT): Download
The Windows Driver Kit (WDK), which contains the Windows ASL Compiler: Download.
Notepad++ (or any other text editor)
Step-by-step DSDT override>>>
Need a 36-bit root bridge DSDT override
The test Dell E4310's root bridge was extended into 36-bit space with the steps below. See also http://forum.techinferno.com/diy-e-g...html#post49833 , user angerthosenear's alternative instructions to those presented below where can use a DSDT Editor to simply the patching process if experience a compilation error:
iasl -g acpidump -b 3.Decompile dsdt.dat to get an output dsdt.dsl text file that can be editted:
iasl dsdt.dat 4. Open the resultant dsdt.dsl file and look for the PNP0A08/PNP0A03 'DWordMemory' resource entries. Under the last DWordMemory entry in that area, add a 'QWordMemory' (64-bit) entry shown as the second paragraph below. I ensure that I stay in the 36-bit range (< 64GB) so the location is compatible with the PAE-capable Win7 32-bit. I also chose a location above 48GB so we won't have issues with maxxed out memory. The range chosen was 48.5GB to 56.25GB.
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0x000A0000, // Range Minimum 0x000BFFFF, // Range Maximum 0x00000000, // Translation Offset 0x00020000, // Length ,, , AddressRangeMemory, TypeStatic) QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x0000000000000000, // Granularity 0x0000000C20000000, // Range Minimum, set it to 48.5GB 0x0000000E0FFFFFFF, // Range Maximum, set it to 56.25GB 0x0000000000000000, // Translation Offset 0x00000001F0000000, // Length calculated by Range Max - Range Min. ,, , AddressRangeMemory, TypeStatic)
5. Create a dsdt.aml file with the 'iasl -oa dsdt.dsl' compiler directive. '-oa' disables all optimizations found necessary to get working solutions. It is unlikely this will succeed first time, as the compiler is very strict. In general warnings are acceptable, but errors may require some fiddling. Those will need to be corrected with common patches in Common DSDT patches for Ivy/Sandy/Haswell laptops, How to fixed DSDT errors? (kizwan). Consider asking for guidance at tonymacx86.com DSDT forums. DSDT editting alone could have it's own forum. Then try compiling your DSDT again.
iasl -oa dsdt.dsl 6. Load the dsdt.aml file into into the registry as a DSDT override. You must be an admin user for this to be successful.
asl /loadtable dsdt.aml 7. [Windows 8.x/10] Enable test signing mode for the registry override to apply. You must be an admin user for this to be successful.
bcdedit -set TESTSIGNING ON An alternative to disabling testsigning in Win8/10 is to do a Win8: Perform a DSDT substitution within Setup 1.30 to overcome TOLUD issues. Win7 users who don't want to do the registry override can also do this DSDT substitution.
8. Check you now have a new Large Memory entry in Device Manager->Resources by Connection->Memory as shown below:
9. The same fix was done on a Dell E4300 and Win7 did automatically allocate the eGPU into the 36-bit space. If you still see error 12 then there are two options to pursue:
Re plug'n'play the devices. Go into Device Manager -> Video cards, delete the eGPU. Also go into Device Manager -> System devices and delete the PCI Express Root Port x entries.
Upon restarting the system, halt Win7 startup with F8, attach and power on your eGPU and then proceed to load Win7. Win7 should now be clever enough to re-allocate the eGPU into 36-bit space upon realizing there is insufficient 32-bit space to host it.
Can go one step further and delete your eGPU NVidia/ATiAMD driver, restart the system and reload it. That may help as well.
Hard allocate the eGPU into 36-bit PCI space before booting Win7 using Setup 1.30. Select PCI compaction->Endpoint=56.25GB (36-bit) and then select Run compact. When prompted for the scope select eGPU.
The result will be similar to that shown in the spoiler in step 8 above, but with the eGPU rather then the Intel HD iGPU being in 36-bit PCI space. Can then proceed to automate this by editting your %DRV%:\config\startup.bat (or V:\config\startup.bat in windows) so can just select the Automated startup via startup.bat Setup 1.30 bootitem and have it do everything for you: call speedup lbacache call vidwait 300 call vidinit -d %eGPU% call pci call chainload mbr
* Lenovo X230 (jay_dark_dry): SUCCESS! Allocated the eGPU into 36-bit space.
* Lenovo T430 (arteart) : SUCCESS! Allocated the eGPU into 36-bit space.
* HP 2570P (nando4): SUCCESS! Allocated the eGPU into 36-bit space.
* Dell E4310 (nando4): SUCCESS! I relocated the Intel HD iGPU into 36-bit space using Setup 1.30 as shown in step 8 above freeing 256MB of contiguous 32-bit space to host an eGPU, so it will definitely work. Plus there is plenty of 36-bit space for the eGPU too. Unfortunately my PE4L 2.1 isn't working so I can't show the iGPU+eGPU both being active but it will work
* Dell Studio 1557 (Kizwan): SUCCESS! His HD5870 successfully relocated to 36-bit pci-e space.
1. When do I need to hotplug my eGPU to overcome the error12 with a DSDT override?(kizwan)
2. How to clean the DSDT override properly? (kizwan)
(*We will need to delete DSDT key in registry)
HKEY_LOCAL_MACHINE\SYSTEM\ControlSetXXX\services\ACPI\Parameters\DSDT * where XXX are 001, 002, 003 & so on. and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ACPI\Parameters\DSDT I didn't really tested whether deleting "DSDT" key in ControlSetXXX (XXX are 001, 002, 003 & so on) really necessary but I will test this when I test your latest Setup 1.30. For sure deleting "DSDT" key in CurrentControlSet is necessary. You can access registry via command line. So, you can put it in .bat file.