Skip to contentSkip to conversation

New: Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

Bug 91319 [email protected] 1 participant 19 messages Jul 13, 2015 – Dec 1, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=91319

Bug ID: 91319
Summary: Nouveau driver cannot extract FCODE ROM / DCB Block
from OpenFirmware Device tree
Product: xorg
Version: unspecified
Hardware: PowerPC
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 117079
--> https://bugs.freedesktop.org/attachment.cgi?id=117079&action=edit
kernel dmesg log & NVDA,BMP FCODE ROM

Hi,

When running a Powermac 11.2, (G5 Quad - powerpc64) with a Quadro FX4500 (NV47), previous kernels had no issue extracting the FCODE ROM / DCB block via the OpenFirmware device tree.
Last vanilla kernel that i have compiled that seemed to work fine was kernel 3.18.16.
Normally, it will find the "BIT SIGNATURE" via OpenFirmware method.

However, when compiling a newer vanilla kernel 4.1.2, nouveau seems to have an issue reading the FCODE ROM / DCB block / from the OpenFirmware device tree. Also, interestingly, this time around it attempts to use the PROM method and attempts to find the "BIT SIGNATURE" via this method.
Apparently it found a signature, but looks like garbage and seems like it cant extract the DCB BLOCK.

As instructed, i have attached a dmesg.log along with a dump of the NVDA,BMP image out of the following folder:
/sys/firmware/devicetree/base/pci@0,f0000000/NVDA,Parent@0/.

Not sure if this is correct, but i have passed the following nouveau module options as i understood:

options nouveau config="NvMSI=0,debug=debug,VBIOS=trace"

I have placed the kernel dmesg log along with the NVDA,BMP dump in the attached nouveau_powerpc64_pmac11.2.tar.xz archive.

Please let me know if there is any more info required.

Thanks for your help!

Best Regards,
Peter

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#2 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #117079|text/plain                  |application/octet-stream
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#3 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

Peter Saisanas <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Peter Saisanas <[email protected]> --- Created attachment 117085
--> https://bugs.freedesktop.org/attachment.cgi?id=117085&action=edit
dmesg log with "nouveau.debug=debug,VBIOS=trace"

booting kernel 4.1.2 with "nouveau.debug=debug,VBIOS=trace" appended on kernel command line.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #2 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- Aha, looks like the issue is that your VBIOS in OF does not have a PCIR section, and the nouveau VBIOS parser has come to expect that. Going to have to read more code to work out a proper solution to that.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#5 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #3 from Peter Saisanas <[email protected]> --- Hi,
I have managed to extract the actual Open Firmware nVidia Quadro FX4500 PCI expansion ROM which i have attached.

The actual ROM itself seems to have a PCIR header located @ offset 0x20.

Could it be that nouveau is actually trying to read the PCIR header directly off the XROM (which is how i assume it would be done in x86) and not via the OF device tree for ppc arch in the newer versions of nouveau by any chance?

Regards,
Peter

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #4 from Peter Saisanas <[email protected]> --- Created attachment 117271
--> https://bugs.freedesktop.org/attachment.cgi?id=117271&action=edit
OF Powermac Quadro FX4500 ROM

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #5 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- Actually that's not from OF, it's from the PROM. And while it has a PCIR header, it doesn't contain the various other tables we expect. However the one in OF (i.e. the NVDA,BMP thing) does. But it's missing the PCIR header so the nouveau vbios reader logic throws it out, and falls back on the PROM one, which, in turn, fails.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#8 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #6 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- You can try this patch, in Ben's tree which is ~4.3-rcN :

http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=5b5cc342d3154120f9bb5ca7839ab556e728c786

This worked for me, but could use more testing.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #7 from Peter Saisanas <[email protected]> --- Created attachment 118662
--> https://bugs.freedesktop.org/attachment.cgi?id=118662&action=edit
4.3-rc4 dmesg with "nouveau.debug=debug,VBIOS=trace"

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#10 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #8 from Peter Saisanas <[email protected]> --- Hi,
I assume the patch is within 4.3-rc4?

If so, it still doesn't seem to extract the VBIOS via the OpenFirmware.

I have compiled and booted the 4.3-rc4 kernel and booted with "nouveau.debug=debug,VBIOS=trace" which is attached.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#11 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #9 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Peter Saisanas from comment #8)

Quoted 7 lines

Hi,
I assume the patch is within 4.3-rc4?

If so, it still doesn't seem to extract the VBIOS via the OpenFirmware.

I have compiled and booted the 4.3-rc4 kernel and booted with "nouveau.debug=debug,VBIOS=trace" which is attached.

Odd.

[   10.214404] nouveau 0000:0a:00.0: bios: trying OpenFirmware...
[   10.214499] nouveau 0000:0a:00.0: bios: image 0 invalid

With my patch it's pretty much rigged to always accept the OF vbios. Are you sure you were able to apply it properly?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#12 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #10 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Ilia Mirkin from comment #9)

Quoted 9 lines

(In reply to Peter Saisanas from comment #8)

Quoted 7 lines

Hi,
I assume the patch is within 4.3-rc4?

If so, it still doesn't seem to extract the VBIOS via the OpenFirmware.

I have compiled and booted the 4.3-rc4 kernel and booted with "nouveau.debug=debug,VBIOS=trace" which is attached.

Quoted 7 lines

Odd.

[   10.214404] nouveau 0000:0a:00.0: bios: trying OpenFirmware...
[   10.214499] nouveau 0000:0a:00.0: bios: image 0 invalid

With my patch it's pretty much rigged to always accept the OF vbios. Are you sure you were able to apply it properly?

In fact, after my patch,

            nvkm_debug(subdev, "image %d invalid\n", idx);

is in a section that should never get hit by the OF logic (since it will specify no_pcir=true, which in turn skips the whole image validation thing).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#13 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #11 from Peter Saisanas <[email protected]> --- No i didn't apply the patch, i assumed that it was already in vanilla 4.3-rc4.

Sorry, my misunderstanding.

I have tried to patch vanilla 4.3-rc4 but the patch will not apply cleanly.

Ill try to patch it manually when i get a chance.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#14 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #12 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Peter Saisanas from comment #11)

Quoted 8 lines

No i didn't apply the patch, i assumed that it was already in vanilla 4.3-rc4.

Sorry, my misunderstanding.

I have tried to patch vanilla 4.3-rc4 but the patch will not apply cleanly.

Ill try to patch it manually when i get a chance.

Try it from the drivers/gpu directory.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#15 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #13 from Peter Saisanas <[email protected]> --- I can confirm that the patch works with my config which is great news.

However, the patch does not apply cleanly to vanilla 4.3-rc4, it seems to reject parts of the patch to shadowof.c.

After manually changing shadowof.c, i.e. the parts of the patch that was rejected, compiled and hooray, it works!

Awesome, thanks imirkin!

Do you require any more info?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#16 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #14 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Peter Saisanas from comment #13)

Quoted 1 line

Do you require any more info?

Nope. Will leave this open until the fix hits mainline.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#17 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- This patch is in 4.3-rc6.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#18 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #16 from [email protected] --- I'm having this exact same problem on kernel 4.9.49 on ppc 32-bit. I see that this was previously fixed. Should this be re-opened or should I file a new bug report?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#19 lore raw

[Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=91319

--- Comment #17 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to reeskm from comment #16)

Quoted 3 lines

I'm having this exact same problem on kernel 4.9.49 on ppc 32-bit. I see that this was previously fixed. Should this be re-opened or should I file a new bug report?

When in doubt, file a new bug report. When not in doubt, file a new bug report. Reports are trivial to merge but impossible to tease apart.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau