Commit 2250244b authored by imirkin's avatar imirkin Committed by nouveau

Fix up formatting, add a note about video firmware being easier to extract using script.

parent 1cbdf3a8
......@@ -12,20 +12,20 @@ do an [[MmioTrace]] of the blob (version < 270.xx preferred)
* Ensure that your kernel has MMIO tracing enabled
Kernel Hacking -> Tracers -> Memory mapped IO tracing
Kernel Hacking -> Tracers -> Memory mapped IO tracing
* Boot up the system, without loading the blob or nouveau
* Mount debugfs and start the tracer
mount -t debugfs debugfs /sys/kernel/debug
echo mmiotrace > /sys/kernel/debug/tracing/current_tracer
cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt &
mount -t debugfs debugfs /sys/kernel/debug
echo mmiotrace > /sys/kernel/debug/tracing/current_tracer
cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt &
* Load the blob kernel module (insmod nvidia)
* run X or a CUDA application
* Stop the tracer
echo nop > /sys/kernel/debug/tracing/current_tracer
echo nop > /sys/kernel/debug/tracing/current_tracer
Extract register writes from the trace and put them in binary files:
......@@ -33,13 +33,14 @@ Extract register writes from the trace and put them in binary files:
* 4091c4 -> fuc409d
* 41a184 -> fuc41ac
* 409184 -> fuc409c
The important lines in the trace will look like this:
W 4 433.851950 1 0xXX41a1c4 0x2072614d 0x0 0
where 0xXX41a1c4 is the register and 0x2072614d the value written
where `0xXX41a1c4` is the register and `0x2072614d` the value written
and put them in binary files in /lib/firmware/nouveau/
and put them in binary files in `/lib/firmware/nouveau/`
For Kepler, prefix the file names with "nvXX_", XX being the chipset id (so, nve4_fuc409c, for example).
......@@ -74,8 +75,7 @@ For Kepler, prefix the file names with "nvXX_", XX being the chipset id (so, nve
# Video firmware
Unlike the firmware you need above, there is no requirement on version. Up to nvidia 310.* will likely work. Newer versions are untested, but should still work.
Unlike the firmware you need above, there is no requirement on version. Up to nvidia 310.* will likely work. Newer versions are untested, but should still work. Note that there is a script which performs the extraction from the blob directly, see [[VideoAcceleration|VideoAcceleration#firmware]].
## Extracting kernel video firmware on fermi and kepler.
......@@ -121,5 +121,6 @@ Requirements:
* [[Valgrind-mmt]]
* build a recent envytools.git, and go to envytools.git/vdpow directory
* with nvidia drivers enabled and X server running, do:
* ` /usr/local/bin/valgrind --tool=mmt --mmt-trace-file=/dev/nvidia0 --mmt-trace-file=/dev/dri/card0 --mmt-trace-nvidia-ioctls --mmt-trace-nouveau-ioctls ./mmt_ufw 2>&1 | ./dumpstruct -m 10 `
Copy the resulting vuc-* files to /lib/firmware/nouveau/
* `/usr/local/bin/valgrind --tool=mmt --mmt-trace-file=/dev/nvidia0 --mmt-trace-file=/dev/dri/card0 --mmt-trace-nvidia-ioctls --mmt-trace-nouveau-ioctls ./mmt_ufw 2>&1 | ./dumpstruct -m 10`
Copy the resulting `vuc-*` files to `/lib/firmware/nouveau/`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment