Giter VIP home page Giter VIP logo

Comments (6)

geekette86 avatar geekette86 commented on August 15, 2024 3

I change this line and it works.
FOOTER_REGEX = (
b'564e(([a-z]|[0-9]){348})(4e504453)(([a-z]|[0-9]){56})(4e504445)'
with
FOOTER_REGEX = (
b'564e(([a-z]|[0-9]){124})(4e504453)(([a-z]|[0-9]){56})(4e504445)'
)

from nvidia-vbios-vfio-patcher.

ploth avatar ploth commented on August 15, 2024

How do you extracted the rom?

from nvidia-vbios-vfio-patcher.

marcosscriven avatar marcosscriven commented on August 15, 2024

Hi there

I found your tool via https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/P50-Quadro-M1000M-GPU-Passthrough-to-VM/td-p/3483650

I have a Dell Precision 5520 that has an Nvidia Quadro M1200 - which is the 'enterprise' equivalent of the Nvidia GTX1050 (and seems to have the same board code of GM107).

I get the same error, even though it parses correctly with @awilliam's rom-parser https://github.com/awilliam/rom-parser

I extracted both via the windows registry and the the firmware file downloaded from Dell, and they resulted in the same thing.

Here's the rom.zip

from nvidia-vbios-vfio-patcher.

Matoking avatar Matoking commented on August 15, 2024

The script has only been tested with discrete consumer GPUs in the Pascal series (eg. GTX 10xx), and far as I've heard no one has managed to make it work with a laptop GPU. I originally created it to solve a VFIO passthrough issue with my GTX 1070, and shared it since I figured people could find it useful since it worked with other ROMs I found in the internet.

Unlike rom-parser, this script has no real idea of the underlying structure of the ROM; it's basically two regular expressions to locate and split a desired area of the ROM into its own file, plus a few checks for markers that were constant in all the different ROMs I tested the tool with; I don't know why there are three NDPE markers before the footer (or what that "footer" actually is!), but since they exist in all of the samples I tried, might as well be a little more confident and check for them as well.

If you have two copies of a ROM, one of them a partial copy that works for VFIO passthrough, and the other a full copy that does not work for VFIO passthrough, you could use a hex editor to compare the two files and find out what section of the file you need to cut out to make the full copy identical to the partial one. And, if you'd want to make a script like this one, you could create a script that locates the desired section and splices it for you automatically.

from nvidia-vbios-vfio-patcher.

marcosscriven avatar marcosscriven commented on August 15, 2024

@Matoking - That's for the help here - not 100% sure what you mean by a 'partial' copy, but I think looking through you mean 'full' is the ones with a header from a firmware updater?

In that case I think the one I have already is 'partial' - it starts with:

00000000: 55aa cceb 4b37 3430 30e9 4c19 77cc 5649  U...K7400.L.w.VI
00000010: 4445 4f20 0d00 0000 9001 7519 0000 4942  DEO ......u...IB
00000020: 4d20 5647 4120 436f 6d70 6174 6962 6c65  M VGA Compatible
00000030: 0100 0000 4000 3456 3039 2f31 322f 3136  [email protected]/12/16

Which looks just like the one described in https://www.youtube.com/watch?v=1IP-h9IKof0

What's confusing is I think I need a 'UEFI' patched bios, per https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#UEFI_.28OVMF.29_Compatibility_in_VBIOS

This is all an attempt to run Windows using the dGPU (headless) on the laptop, and iGPU on host.

from nvidia-vbios-vfio-patcher.

Matoking avatar Matoking commented on August 15, 2024

@marcosscriven For partial copies, I used ROMs provided by the people in this discussion thread: https://lime-technology.com/forums/topic/51230-video-guidehow-to-pass-through-an-nvidia-gpu-as-primary-or-only-gpu-in-unraid/

I then compared them to full copies you can find on TechPowerup:
https://www.techpowerup.com/vgabios/

After testing the tool on a few ROMs and getting identical results, I decided to test it on my GPU which worked perfectly.

from nvidia-vbios-vfio-patcher.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.