09:22 Aziroshin: Hello. :)
09:23 Aziroshin: It's possible I have a hardware-failed GTX 780 Ti on my hands, and I'd like to find out what's wrong with it at some point, if that is at all possible. It's failing in different ways depending on the system (and driver I suppose). With a stock live USB Kubuntu 17.04, I get lines such as the following as spam:
09:23 Aziroshin: ** printk messages dropped ** [ nouveau 0000:01:00.0: gr: GPC2/TCPO/MP trap: gobal 00000000 [] warp 0000 []
09:24 Aziroshin: If anyone has a hint as to what direction to head in terms of further investigation based on such slim evidence, I'd be grateful. :)
09:26 Aziroshin: As to the failure itself, it happened during playing World of Warcraft with wine, nvidia binary drivers (different computer), when the picture all of a sudden froze and the computer followed suit in a hard lockup about 2-3 seconds later. The card would still display a console after reboot, but the X server (nvidia-persistenced fail) wouldn't initialize anymore.
09:28 Aziroshin: One thing I am wondering is whether the on-board firmware could potentially have been compromised (if that's at all possible during a lockup), and re-flash of the firmware (if at all possible) might help matters.
09:50 RSpliet: Aziroshin: unlikely. Apart from the VBIOS all firmware is uploaded during boot
09:51 RSpliet: the most likely component to die in a system is the fan (killing the GPU slowly), followed by DRAM. Or you got unlucky. Either way nouveau doesn't support any kind of BIST routines to test hardware
11:14 RSpliet: codimwk: before I make changes to envydis, a brief consultation: I know that some ops are displayed wrong (the one I care about is fp atomic add - or rather "RED.E.ADD.F32.FTZ.RN" as nvdisasm displays it being displayed as "add" in demmt), and I'd like to correct some of that
11:15 RSpliet: Is there a preferred display format?
11:18 mwk: not really
11:19 mwk: just try to make it consistent with previous ISAs if possible
12:35 karolherbst: mwk: did you read my message regarding breakpoints on falcons?
12:59 mwk: karolherbst: I might've missed it
13:09 pmoreau: xexaxo1: You can completely disregards my comments from yesterday evening: I was running autogen from the wrong git worktree, so yeah, of course it would not pick up my changes… --"
13:22 smusiland: Allah is doing
13:59 karolherbst: mwk: somehow whenever I let the falcon hit the breakpoint I set, the falcon stops instead of pausing, so that I can't continue or single step from there
14:13 mwk: what kind of break?
14:31 RSpliet: tea break, apparently
14:32 RSpliet: I'm sure all of this is supposed to be parameterisable...
14:34 karolherbst: mwk: a breakpoint
14:35 karolherbst: mwk: falonc+0x098
14:35 karolherbst: it indeed stops at the address I put into it, but it hard stops
14:35 karolherbst: and can't be continued
14:39 RSpliet: karolherbst: what's bit 29 in that reg for?
14:48 karolherbst: RSpliet: dunno
14:51 karolherbst: RSpliet: did you see it through nvascan?
14:51 RSpliet: well, no, I didn't want to ruin my system
14:51 RSpliet: but nvapoke 0x10a098 0x7fffffff, nvapeek 0x10a098
14:54 karolherbst: okay
14:55 karolherbst: well it is very unlikely that you hit the breakpoint at 0x3ffffff
14:56 karolherbst: maybe bit 29 is something like "pause on break" or so
14:56 karolherbst: will check it out today at hom
14:56 karolherbst: e
14:56 RSpliet: well, the mask was 0x60ffffff
14:56 karolherbst: ohh right, make sense
14:57 karolherbst: PC is 0-23
15:04 Aziroshin: RSpliet: Thanks for your reply. :)
15:08 jamm: hakzsam, pmoreau: check out https://hastebin.com/toberuripi.bash line 25
15:08 jamm: i just can't seem to get proper results with (st 0x6 wt 0x1), it seems to screw up all my fonts and window shadows become big squares
15:09 jamm: everything else works perfectly so far
15:09 jamm: i'm surely missing something above or below
15:10 jamm: (see st 0x0, it should be (st 0x6 wt 0x1) i think
15:10 RSpliet: jamm: are these shaders automatically appended with nops?
15:18 pmoreau: jamm: Do you have a link to the solution for the previous shader? I don't remember where the rd were needed
15:20 pmoreau: I am not sure about the wt 0x4 in (st 0xf wr 0x2 wt 0x4) line 20
15:21 pmoreau: I'll have another look in a bit
15:26 karolherbst: jamm: just curious: were you thinking about moving that logic into the assembler so that nobody needs to do that by hand anymore?
15:49 jamm: RSpliet: not sure, i haven't looked at what the assembler does exactly yet
15:49 jamm: karolherbst: haven't thought of that yet
15:51 jamm: pmoreau: well, with the (st 0x0) on fmul ftz $r3 $r3 $r4, it seems to work well
15:52 jamm: karolherbst: it's probably nice to have something like that, but i'm not sure if it's justified given that it's just 8 shaders with most of them almost identical to each other
16:03 mwk: karolherbst: have you set the break mask through the debug port?
16:03 mwk: it selects which events pause to debug port vs causing an in-processor trap
16:03 karolherbst: ohh, okay
16:04 karolherbst: I think I forgot to do that then
16:04 karolherbst: how does the mask work? I thought there are only two hw breakpoints?
16:05 karolherbst: or what kind of value do I set with the break mask?
16:05 mwk: you can set break on lots of events, not just brekpoints
16:05 karolherbst: ohhhhh, I see
16:05 mwk: but umm
16:05 mwk: seems I haven't REd it :(
16:05 karolherbst: so this 16-31 value in DEBUG_CMD has only two bits for the breakpoints
16:05 mwk: anyhow, bit 7 controls the breakpoints
16:05 mwk: according to my notes
16:06 karolherbst: you mean value 7 in CMD
16:06 karolherbst: <value value="0x7" name="SET_BREAK_MASK"/>
16:06 karolherbst: and the mask is in 16-31
16:06 mwk: no
16:06 mwk: bit 7 of the mask
16:06 karolherbst: so you mean 16+7?
16:06 karolherbst: k
16:06 mwk: yes
16:06 karolherbst: and 16+8 is breakpoint 2?
16:06 mwk: not sure
16:06 mwk: maybe bit 7 controls both...
16:06 karolherbst: okay, I will figure that out then
16:06 karolherbst: mhhh
16:06 mwk: I only have bit 7 mentioned
16:06 karolherbst: why though....
16:06 mwk: but if I had to guess
16:07 mwk: you could also set breaks on other conditions
16:07 karolherbst: yeah
16:07 mwk: interrupts, CPU exceptions
16:07 karolherbst: I will play around with it a bit then
16:07 mwk: maybe the weirdo syscall insns
16:07 mwk: ISTR I found more bits, but envytools mentions only the breakpoint
16:07 karolherbst: maybe in the end I will be able to write a debugger where we can even execute random code
16:08 karolherbst: I meant, code we put into the debuger
16:08 mwk: that'd be nice
16:08 karolherbst: div by 0 might be a good reason to break as well :)
16:08 mwk: doubtful
16:09 mwk: ordinarily div by 0 just returns ffffffff and doesn't trap
16:09 karolherbst: okay
16:09 mwk: unless they changed it on v4+ or something
16:09 mwk: ehh
16:09 mwk: I need to finish my falcon hwtest
16:10 mwk:got up to opcode 0x33, but failed on the fused compare+branch insns
16:10 karolherbst: but the debugging interface is somewhat fun to work with :)
16:10 mwk: yep
16:10 mwk: my hwtest uses it :p
16:10 karolherbst: it already helped me a lot
16:10 karolherbst: :D
17:03 smusiland: Allah is doing
17:04 mupuf: I'm sure he is doing great, but unless he is willing to do Nouveau development, summoning him is no interest to us and thus, we do not want to hear about this
17:05 karolherbst: mwk: mhh, I set a breakpoint to 0x810, but the falcon stopped at 0x420....
17:05 mupuf: close enough :D
17:05 karolherbst: now it stopped at 0x813
17:06 karolherbst: mhhh interesting
17:06 karolherbst: it stopped
17:06 smusiland: Nouveau can't be developed without Allah permission
17:06 karolherbst: now at 0x400, mhhh interesting
17:07 mupuf: smusiland: then, he obviously gave us the permission. Can you please go talk about this in a religion-oriented chanel?
17:08 smusiland: Smusiland can't go talking in religion channels without Allah permission
17:09 AllahOneTrueGod: smusiland: I hereby gave you the permission to go hang out somewhere else
17:10 smusiland: Smusiland can't talk to fake Allahs without Allah permission
17:16 karolherbst: mwk: somehow that doesn't work as expected
17:18 karolherbst: poke falcon+0x200 0x00800007 ; poke falcon+0x98 0x80000810
17:19 karolherbst: and it stops kind of between 0x400 and 0x410
17:19 mupuf: karolherbst: how do you read PC?
17:19 karolherbst: through 0x200
17:19 karolherbst: REG_READ
17:19 karolherbst: and then I read the spcial pc register
17:19 mupuf: oh, cool
17:19 smusiland: Sun is not doing, Allah is doing
17:20 karolherbst: mupuf: I can also write registers already :) and data+io
17:20 karolherbst: and single stepping also works, and breaking current execution
17:20 karolherbst: just breakpoints don't
17:20 mupuf: Ah ah, I guess they remembered to lock it down, when in HS mode :D
17:20 karolherbst: I am on my kepler
17:21 karolherbst: ohh, I guess you tried it on maxwell or so
17:21 karolherbst: k, I see
17:21 karolherbst: well it makes sense that they locked it down
17:22 mupuf: karolherbst: no, I said: I guess they remembered to lock it down ;)
17:22 karolherbst: ahh
17:22 karolherbst: k
17:22 mupuf: Would be fun if they had forgotten about this :D
17:22 karolherbst: :D
17:22 karolherbst: hihi
17:23 karolherbst: well maybe after I understood how it works on mine, I might to go and checkout other GPUs
17:23 karolherbst: *s/to//
17:24 mupuf: yep!
17:25 karolherbst: like always, I wrote my debugger in bash
17:25 karolherbst: but maybe if I find some time I rewrite it to have a nice ncurses based client
17:25 karolherbst: maybe something gdb alike
17:27 karolherbst: okay, so something is funky with the breakpoints
17:28 karolherbst: uhhh... I think I know
17:29 karolherbst: maybe not
17:29 karolherbst: I was thinking, maybe, this enable bit is important
17:29 karolherbst: doesn't seem to be
17:30 karolherbst: :O
17:30 karolherbst: RSpliet: thank you for pointing out that one bit
17:30 karolherbst: allthough now hell breaks loose
17:31 RSpliet: wotsitdo?
17:31 karolherbst: no clue, at least the falcon stopped at 0x810
17:31 karolherbst: but
17:31 karolherbst: the then it jumped to 0xf7
17:32 karolherbst: which is intr:
17:32 karolherbst: mhhhh
17:32 karolherbst: maybe it makes sense
17:32 RSpliet: well, easy enough. check the interrupt status register when you trigger it and see :-)
17:32 karolherbst: yeah
17:32 karolherbst: I think it says: hey breakpoint triggered
17:33 karolherbst: it says WATCHDOG
17:33 karolherbst: silly watchdog
17:33 RSpliet: arf
17:34 karolherbst: okay
17:34 karolherbst: after the interrupt handler I am back at 0x810
17:35 karolherbst: and finally able to step from there
17:36 karolherbst: this is only slightly annoying
17:39 karolherbst: step from code :D
17:39 karolherbst: I like it that you can continue from any random address you want
17:40 karolherbst: of course you can also continue from 0x811 even if the instruction is at 0x810
17:40 karolherbst: cause the falcon doesn't really care as long as there is something valid starting at 0x811
17:48 smusiland: Allah is doing
18:07 mwk: karolherbst: try stuffing 0xffff to the break mask
18:07 Lyude: huh, don't think I see imirkin in here. that's a new one
18:07 mwk: I'd be interested to know what the other breaks are
18:08 mwk: ISTR the interrupts were there, somehow
18:14 karolherbst: mwk: well, it kind of works, but I need to step through the interrupt handler first, or I just step out of it
18:15 karolherbst: mhh
18:15 karolherbst: there is a flag for interrupts
18:15 karolherbst: let me find it
18:17 karolherbst: ahh
18:17 karolherbst: okay
18:17 karolherbst: nice
18:17 karolherbst: 0x0100 is break on interrupt
18:20 mwk: which interrupt?
18:20 karolherbst: any
18:21 karolherbst: afik
18:21 karolherbst: mhh
18:21 karolherbst: ohh
18:21 mwk: so, both iv0 and iv1?
18:21 karolherbst: I think only iv0?
18:21 mwk: ISTR they were separatre
18:21 karolherbst: well the falcon breaks on intr when I set it to 0x100
18:21 karolherbst: I could check for iv1
18:21 pmoreau: Lyude: It happens, very very rarely, but it is not unheard of. :-)
18:23 Lyude: pmoreau: hehe
18:24 karolherbst: mwk: iv0 and iv1 are USER1 and USER2?
18:24 karolherbst: ohh wait
18:24 karolherbst: that makes no sense
18:24 karolherbst: INTR_ROUTING :)
18:26 mwk: yep
18:26 mwk: routing is complicated
18:26 karolherbst: well but if I route USER1 and USER2 to M2, I should get the interrupt handler behind iv1 executed, right?
18:27 karolherbst: or not?
18:27 mwk: yeah
18:28 karolherbst: nice
18:28 karolherbst: 0200 is IV1
18:29 mwk: and that belongs in falcon.xml :)
18:29 karolherbst: yeah
18:29 karolherbst: should I call them IV0 and IV1?
18:29 mwk: yep
18:29 mwk: AFAICT there should also be breaks for trap 0 - trap 3, TLB miss, TLB multihit, invalid opcode
18:30 karolherbst: mhh okay
18:30 mwk: and who knows what else
18:32 karolherbst: mhh
18:32 karolherbst: breakmask: 0xfcff and I still step into the interrupt handler
18:33 karolherbst: I mean the falcon breaks at 0x810
18:33 karolherbst: and single steping gets me into the interrupt handler
18:34 karolherbst: and with 0xfc7f the falcon stops
18:34 karolherbst: so I guess there is no flag for handling this alright
18:34 Lyude: mind if I ask what kind of code you're trying to debug on the falcon out of curiosity?
18:34 karolherbst: Lyude: the PMU code I wrote myself for dynamic recocking
18:34 karolherbst: *reclocking
18:34 Lyude: !!!!!!!!!!!!
18:35 Lyude: no way, you actually got it to load?
18:35 karolherbst: what do you mean?
18:35 karolherbst: I wrote that myself for my kepler
18:35 karolherbst: of course it loads
18:35 Lyude: i mean like, you got the falcon to actually execute the code in high security mode? or are you still working on that
18:35 Lyude: oh I thought you were talking about pascal
18:35 karolherbst: noooo
18:35 karolherbst: nooooo
18:35 Lyude: got my hopes up, whoops. lol
18:36 karolherbst: I have much better lines for that, like "mupuf check your maxwell2 fan :O" (keeping it spin up and down alternatly)
18:38 Lyude: wow, good to see nvidia hasn't stopped complaining about the VGA console in their kernel blob since I stopped buying from them
18:38 karolherbst: ....
18:38 karolherbst: yeah well
18:38 karolherbst: their fault basically
18:38 Lyude: yeah
18:38 Lyude: like I said I won't ever report any bugs I find with their driver :)
18:38 Lyude: good luck figuring out your broken i2c stack nvidia
18:39 karolherbst: hey, we might need it without bugs to RE stuff :O
18:39 Lyude: eh, it's not something that would prevent us from doing that
18:40 karolherbst: well depends on how much broken it is
18:40 Lyude: i mean, it only really is a bug with broken hardware I happen to have that you can't really buy
18:40 Lyude: but i am sure somewhere out there something else hits it
18:41 karolherbst: mwk: will figure out invalid opcode now :)
18:41 karolherbst: that sounds like the best fun to me right now
18:41 mwk: karolherbst: I suppose the correct thing to do would be to disable watchdog :p
18:41 Lyude: i need to continue playing with power saving stuff
18:41 karolherbst: mwk: funny though, my code I need to debug is triggered via watchdog
18:41 mwk: I mean, interrupts are enabled, so single stepping should enter them by definition...
18:42 mwk: hmm
18:42 mwk: that's an interesting question
18:42 mwk: maybe these extra $flags bits on Falcon v4+ are related to debugging somehow?
18:42 karolherbst: I think it is the watchdog though
18:42 mwk: like "please break on interrupt return, kthx"
18:42 karolherbst: not quite sure what #timer does
18:42 karolherbst: yeah, it configures some watchdog stuff
18:43 karolherbst: mwk: maybe there is a difference between ret and iret?
18:43 karolherbst: but I like your idea
18:43 karolherbst: k, iret/ret first, then invalid opcode
18:44 mwk: please check with various flags combinations if you're doing that :0
18:44 karolherbst: you mean $flags?
18:45 mwk: yep
18:47 karolherbst: okay mhh I doubt they have break on ret
18:47 karolherbst: $flags is 0x00110501
18:49 karolherbst: in the docs are some fields missing
18:49 karolherbst: are those no used?
18:49 karolherbst: like 12-15
18:53 karolherbst: okay, they do not exist indeed
18:55 karolherbst: mwk: funny though, if I fully step through the interrupt handler, the falcon won't jump back to it
18:55 karolherbst: ohh it does
18:55 karolherbst: I still need to wait
18:55 karolherbst: *just
20:52 pmoreau: jamm: No clue, sorry, It seems good to me.
21:09 karolherbst: mwk: odd, either I hit an instruction which we don't know but exists, or there is no breakpoint on invalid instruction
21:44 mwk: karolherbst: what opcode are you using?
21:44 mwk: you need to use an invalid first byte of an opcode to trigger the trap
21:44 karolherbst: 0xee
21:44 mwk: Falcon only triggers the exception when it can't decode the instruction's form
21:45 karolherbst: ohh, I see
21:45 karolherbst: I am currently checking the traps, I could do that after that
21:45 mwk: if it can decode the form, but the opcode is invalid, it's just a nop
21:45 karolherbst: what is a good example?
21:45 mwk: or maybe an instruction that clears dst to 0
21:45 mwk: depends on opcode
21:45 mwk: hmm, Falcon v4 or v5?
21:45 karolherbst: v4
21:45 mwk: try 0x3f
21:46 karolherbst: returning with iret from a trap handler makes the falcon totally confused
21:46 mwk: 0xee is definitely considered valid
21:54 karolherbst: mwk: there is one bit for all traps
21:54 karolherbst: and it is 0x8000
21:55 karolherbst: mhh at least I thought, odd
21:57 karolherbst: ohhh, I am stupid
21:59 mwk: by all traps, you mean the trap X instructions?
21:59 karolherbst: yeah
21:59 karolherbst: but it doesn't work
21:59 karolherbst: the falcon just stopped
22:00 karolherbst: but... I found something else
22:01 mwk: then what does it do?
22:01 karolherbst: a breakpoint hit at ticks_from_ns_quit
22:01 karolherbst: after "mov b32 $r14 $r12"
22:01 mwk: um?
22:02 karolherbst: breakmask is 0xfc7f
22:03 mwk: what is ticks_from_ns_quit?
22:03 karolherbst: mov b32 $r14 $r12; push....
22:03 karolherbst: uhm
22:03 karolherbst: *pop
22:04 karolherbst: $pc is 0x200 though
22:04 karolherbst: odd number
22:04 mwk:wonders if there are memory breakpoints on that thin
22:04 mwk: g
22:04 karolherbst: mhhh
22:04 karolherbst: then it wouldn't explain why it triggers there
22:04 karolherbst: $sp is 5fb8
22:07 karolherbst: mhh
22:09 karolherbst: now it is at 0x3ef, but same $sp
22:11 karolherbst: okay, I don't get the software traps and I think that other thing might be a memory breakpoint indeed, allthough this feels odd
22:15 karolherbst: cool
22:15 karolherbst: maybe I can'set the regs from the PMU itself
22:16 karolherbst: but it indicates it executed it
22:16 karolherbst: odd
22:16 karolherbst: 0x3f works by the way
23:07 mwk: what the flying fuck.
23:08 mwk: hwtest running on my GM107's PVDEC engine says that div and mod instructions are NOPs iff their destination register is %r0
23:09 mwk: at least in the "divide by imm8" forms
23:09 mwk: that.... is potentially very good to know
23:13 phoenixz: Hello there, I know this is the channel for the open source nvidia driver, is there also a channel for the closed source binary drivers?
23:14 mupuf: mwk: ah ah
23:14 mupuf: that's the sort of things one would not catch without randomized testing like you do
23:15 mwk: but... why :(