23: Manually controlling the FIFO interface

(5 comments)

We have basically exhausted the RE possibilities of manual instruction submission. I suppose DMA transfers could be REd that way too, but since their target assignments are very likely to depend on the microcode piece being executed (context switch or method), we're probably better off postponing it.

So, it's time to actually start the processor for testing. Unfortunately, all three ways of launching microcode involve PFIFO commands, and that's rather unwieldy. However, the engine may have some kind of alternate PIO command submission (like PMPEG does). It'd be a good idea to look for it before going around messing with PFIFO.

Consider this little area of MMIO added on G80:

...
00fc90: 00000000 00000001 00000000 *
00fc94: 00000000 ffffffff 00000000 *
00fc98: 00000000 00001fff 00000000 *
00fc9c: 00000000 ffffffff 00000000 *
...

0xfc98 looks like it's about the right width for a method (although it should be 0x1ffc). Let's try poking it.

mwk@adios ~ $ nvapeek -c2 f400 200
...
0000f430: 00000044 00000000 00000111 00000000
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 7571b3b8 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...
mwk@adios ~ $ nvapoke -c2 fc98 ffffffff
mwk@adios ~ $ nvapeek -c2 f400 200
...
0000f430: 00000044 00000000 00000111 00000000
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 1de8924c 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...

Yeah, well, not that simple. Let's get angry.

mwk@adios ~ $ nvafuzz -c2 fc90 10
^C
mwk@adios ~ $ nvapeek -c2 f400 200
0000f400: 00000100 00000000 00000000 00000000
...
0000f430: 00000044 a3a4798d 00000010 00000101
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 03f74e1d 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...

No luck with method submission,  but it seems we submitted a context switch request! OK, that looks like the right direction.

After a bit of narrowing that down, we find out the correct way to submit a method is:

mwk@adios ~ $ nvapoke -c2 fc90 1
mwk@adios ~ $ nvapoke -c2 fc9c deadbeef
mwk@adios ~ $ nvapoke -c2 fc98 11234
mwk@adios ~ $ nvapeek -c2 f400 200
0000f400: 00001000 00000000 00000000 00000000
...
0000f420: 00000000 00000000 00001234 deadbeef
0000f430: 00000044 00000000 00000111 00000000
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 6e44ea6c 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...

And to request a context switch:

mwk@adios ~ $ nvapoke -c2 fc90 1
mwk@adios ~ $ nvapoke -c2 fc94 c1234567
mwk@adios ~ $ nvapeek -c2 f400 200
0000f400: 00000100 00000000 00000000 00000000
...
0000f430: 00000044 81234567 00000010 00000101
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 405723b1 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...

Apparently 0xfc90 is a master enable for the manual FIFO control - it probably disconnects PFIFO, too. And bit 16 of 0xfc98 is the "method trigger" bit. As for context switches, bit 30 of 0xfc94 is the trigger, and bit 31 is "valid" bit - unsetting it probably requests a context unload.

I'm a little curious about why the method is 0x1fff instead of 0x1ffc though...

mwk@adios ~ $ nvapoke -c2 fc90 1
mwk@adios ~ $ nvapoke -c2 fc98 10123
mwk@adios ~ $ nvapeek -c2 f400 200
0000f400: 00001000 00000000 00000000 00000000
...
0000f420: 00000000 00000000 00000120 00000000
0000f430: 00000044 00000000 00000111 00000000
0000f440: 00000000 00000000 df000000 4f000000
0000f450: bf000000 ef000000 00000000 00000000
...
0000f470: 00000000 00000000 784cada6 00000000
...
0000f510: df000000 4f000000 bf000000 ef000000
...

Eh. Maybe the extra bits are just ignored.

Well, that's a win. Now we can test all VP1 functionality without even touching PFIFO.

Elapsed time: 2h.

Currently unrated

Comments

Comment awaiting approval 9 months, 3 weeks ago

Comment awaiting approval 7 months, 3 weeks ago

Comment awaiting approval 7 months, 2 weeks ago

Comment awaiting approval 3 months, 1 week ago

Comment awaiting approval 2 months, 1 week ago

New Comment

required

required (not published)

optional

required