-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code 12 in Windows with Tesla M40 (24gb) and Asus P8Z77-V Deluxe with Enable 4G and ReBarUEFI activated #45
Comments
@skenizen how much ram is installed in your system ? It looks like 32 GB so it won't work because the firmware uses top to bottom allocation leaving no space for the 16GB BAR M40. It should work with less RAM if you have applied UEFIPatch It is possible to do bottom to top but that would require hooking Most UEFI allocate will like this (top to bottom) with 4G decode. Keep in mind BARs must be aligned with their size and that Ivy Bridge only has 64GB (36-bit) of physical address space.
You can see the only 2 other remaining places the 16GB BAR M40 can be allocated at are 16GB and 32GB using this allocation method. Bottom to top allocation should look like this (with 32GB RAM)
FYI if you do want to try writing a hook for
|
Thanks for the answer and the explanation. You were right about the RAM I have, it has 32gb (which is the maximum for that CPU). After reading your initial message, I've removed 3 of the RAM sticks and left the computer with only one 8GB RAM stick and tried again. I don't have the RX 590 plugged in the system at the same time than the Tesla, I've only mentioned it because I used it to validate that the patches were properly done. When I try the Tesla, I only have the Tesla in a PCIe port and I'm using the intel iGPU (I've set 32mb of vram use for it in the bios). I've applied the UEFIPatch and unless I made a mistake somewhere, all should be fine on that front (I can send you the bios I flashed if that could help validating all is fine on that end). Is there a way for me to read the allocation table to check how much the motherboard already allocated for the other devices and how much is free for the Tesla? Update: I've tried with a 2GB and 4GB single RAM stick and it was showing similar issue. |
@skenizen i just realized you have the 24GB Tesla M40 which uses a 32GB BAR. In that case you will need to use bottom to top allocation with less than 32GB of RAM (28GB should work). So you will need to write the It should look like this once done (24GB RAM)
If you want to use the RX 590 at the same too you will need to use less than ~22GB RAM. It will look like this (16GB RAM)
|
I'm going to look at setting up the build environment for building the module, and writing the allocator. Do you have an advice on how to setup a test environment for iterating when I will do the allocator? I'd like to avoid having to flash my motherboard for testing the code, I suppose it's possible to patch a VM UEFI bios and using virtual machines, any advice setting up that? On a different note, do I understand rightly that the hexadecimal numbers on the left of the devices are the memory range allocated for the hardware and that on this screenshot the memory is still allocated despite the device being disabled in the bios (the device is appearing with a lighter color for showing it's unused, but the address seems to be still reserved ?) : Thanks a lot for the pointers, it's an interesting problem to try to solve, and if you are right the solution doesn't look so hard to implement. |
@skenizen greyed out items are just those that were there before but aren't now. you can disable show hidden devices in view to remove them. you can use QEMU OVMF to test it which is what I used to figure out hooking in this module with, ovmf firmware can just be opened in UEFITool. there are alot of examples/articles about hooking efi functions so those can be useful you'd want to the hook to only affect 64-bit allocations which is why i've provided an example of the call by PciHostBridge in a previous comment. So you'd want to only use the alternate method when
You'd have to get the EFI Memory Map and find a valid (proper alignment and fits BAR) address using bottom to top search starting at |
@skenizen any update ? |
Hi @xCuri0 No, I unfortunately only have my weekends on this, and although I'm finding the prospect fun to do I end up ordering a new motherboard in order to both use 32gb of RAM and 2 Tesla M40 (I bought a used x299 for more pci lanes). I'm still interested in writing the custom allocator, but as a low priority. I will keep you informed if I have updates on this, feel free in the meantime to close this ticket. One note though: Contrary to what you said in your last comment, the greyed devices were not history of what was connected in windows device manager, the motherboard seems to assign memory addresses regardless of them being activated or not in the bios. If you look at my screenshot, the addresses are not overlapping. I checked switching on/off showing hidden devices and the screen I took was with "show hidden device" off. |
It's working on Linux Ivy Bridge LGA1155, see #77 |
System
Description
I'm trying to get an Nvidia Tesla M40 (24gb) working on an Asus P8Z77-V Deluxe. I've did all the modifications required/advised here but the card still report a code 12 in windows. I succeed to get a ReBar working on a Polaris RX 590 (it was showing 8gb on GPU-Z and properly displayed in Large Memory on Device Manager on Windows (as can be seen on the screenshots). I've tried the registry trick for the AMD drivers but wasn't seeing the option appearing in the Adrenalin software.
When I plug the Tesla M40, only the PCI bus is displayed in Large Memory.
Trying to boot on Linux (Ubuntu 20.04 Server) the kernel is spamming the following error (extract from dmesg):
I'm not sure what size was set with ReBarState.exe when I saved this specific dmesg log file so the first line telling the memory available for PCI devices might be different. Although the rest (specifically NVRM: BAR1 is 0M @ 0x0 (PCI:0000:01:00.0) ) was always displayed regardless of the size specified.
Troubleshooting tried
I've noticed that the GPU-Z on windows when the Polaris card was displayed was mentionning 8GB of VRAM on BAR0 and the linux drivers complains about BAR1. I thought that this could maybe be the issue? But I have no idea how to change that.
I'm at my wit end on this issue, I've seen in a different issue that it was stated that what a Tesla M40 requires is not exactly ResizableBar but only large address, but I would have expected it to work with this activated as that's what I had to activate on another motherboard to get it working there.
If you have ideas of what is wrong and can help, that would be nice. Thanks for the great project!
The text was updated successfully, but these errors were encountered: