李金华
2014-Nov-19 12:31 UTC
[Nouveau] Is it necessary to parse the VBIOS init table when executable is false?
Hello everyone, The code is at /core/subdev/bios/init.c. When the executable is 0,these functions that parse the VBIOS init table seems to do nothing except the parsing. And in my opinion,init_exec_force does nothing,too! Then I tried to test it on my computer,when the VBIOS parser tries to change a MMIO register or call a function of struct nouveau_devinit (such as devinit->pll_set,etc.),it will print a message into the kernel log. However,I cannot see any message about this in the kernel log! Finally,I decided to just return when executable is zero. Then I found out the driver also works perfectly. So I asked the question here,thanks for your help.
Ben Skeggs
2014-Nov-19 19:42 UTC
[Nouveau] Is it necessary to parse the VBIOS init table when executable is false?
On 20 Nov 2014 01:31, "李金华" <goodqt at outlook.com> wrote:> > Hello everyone, > > The code is at /core/subdev/bios/init.c. > When the executable is 0,these functions that parse the VBIOS init tableseems to do nothing except the parsing. Correct. We do not handle every opcode, only the ones that have been observed so far. The purpose is to be able to test whether we will be able to fully execute the table, to avoid failing in a critical path (such as resume from suspend) where we can't recover. Ben. And in my opinion,init_exec_force does nothing,too!> > Then I tried to test it on my computer,when the VBIOS parser tries tochange a MMIO register or call a function of struct nouveau_devinit (such as devinit->pll_set,etc.),it will print a message into the kernel log. However,I cannot see any message about this in the kernel log!> > Finally,I decided to just return when executable is zero. Then I foundout the driver also works perfectly.> > So I asked the question here,thanks for your help. > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141120/5786d304/attachment.html>
Ilia Mirkin
2014-Nov-19 19:52 UTC
[Nouveau] Is it necessary to parse the VBIOS init table when executable is false?
On Wed, Nov 19, 2014 at 2:42 PM, Ben Skeggs <skeggsb at gmail.com> wrote:> On 20 Nov 2014 01:31, "李金华" <goodqt at outlook.com> wrote: >> >> Hello everyone, >> >> The code is at /core/subdev/bios/init.c. >> When the executable is 0,these functions that parse the VBIOS init table >> seems to do nothing except the parsing. > Correct. We do not handle every opcode, only the ones that have been > observed so far. The purpose is to be able to test whether we will be able > to fully execute the table, to avoid failing in a critical path (such as > resume from suspend) where we can't recover.It also serves as a nice litmus test as to whether we have the right VBIOS, since we also execute various bits during output configuration, reclocking, and probably other things I'm not thinking of. Most of the time, especially with older cards, the reason this would be failing is because it's reading the VBIOS from the wrong place (like PCIROM) and it contains the wrong data. -ilia
Maybe Matching Threads
- Is it necessary to parse the VBIOS init table when executable is false?
- [PATCH 1/3] drm/nouveau: provide a way for devinit to mark engines as disabled
- [RESEND 07/15] drm/nouveau/nvkm/subdev/bios/init: Demote a bunch of kernel-doc abuses
- [PATCH 03/20] drm/nouveau/nvkm/subdev/bios/init: Demote a bunch of kernel-doc abuses
- [PATCH] devinit/gf100-: detect if BIOS invoked devinit