IRC logs for #openrisc Thursday, 2014-07-17

--- Log opened Thu Jul 17 00:00:23 2014
stekernblueCmd_: that looks good, how did you do it? some libreoffice export-to-html feature?04:02
stekernI'd really would like to have a 'plain-text' intermediate markup version of it though04:03
maxpalnSo, after adding some printk's (well pr_info's) to the alloc_workqueue_key() function I have managed to induce an UNHANDLED_EXCEPTION from the Linux kernel. This looks like a good place to diagnose a HW problem :-)07:51
maxpalnI am trying to decipher the stack trace from the crash to find an address to trigger for the ELA -07:52
chan1stekern: hi, I managed to run linux on qemu-or32 using or1k-linux-uclibc tools. thanks!07:54
maxpalnThe register dump lists PC, SR and SP - what's SP - this would appear to be the last address at the point when the crash occurred but I can't see any reference to it in the docs07:55
maxpalnHmmm, the stack dump is here:
maxpalnThe bottom of the stack trace looks like this:08:00
maxpalnsp + 368: 0xc01c21f408:00
maxpalnsp + 372: 0x0000000008:00
maxpalnsp + 376: 0xc01d0f0008:00
maxpalnsp + 380: 0x0000000008:00
maxpalnsp + 384: 0x0000000008:00
maxpalnsp + 388: 0x0000000008:00
maxpalnsp + 392: 0x0000000008:00
maxpalnsp + 396: 0x0000000008:00
maxpaln0xc01c21f4 -s the function unknown_bootoption() in the disassembled Linux Kernel08:00
maxpalnwhat's interesting is that the crash occurred way before the point where I just added the printk's - the link above actually shows the previous boot and my debug code, the additional printk's were supposed to appear after the 'Inside init_workqueues 13' comment!!08:03
stekernchan1: great!08:06
stekernmaxpaln: what's at 0xc0099268?08:10
maxpalnIt's a few instructions into slob_alloc_node()08:10
maxpalnc0099258 <slob_alloc_node>:08:10
maxpalnc0099258:d7 e1 77 f8 l.sw 0xfffffff8(r1),r1408:10
maxpalnc009925c:d7 e1 4f fc l.sw 0xfffffffc(r1),r908:10
maxpalnc0099260:d7 e1 17 f4 l.sw 0xfffffff4(r1),r208:10
maxpalnc0099264:a9 c3 00 00 l.ori r14,r3,0x008:10
maxpalnc0099268:84 43 00 04 l.lwz r2,0x4(r3)08:10
maxpalnc009926c:18 60 c0 1b l.movhi r3,0xc01b08:10
maxpalnc0099270:9c 21 ff f4 l.addi r1,r1,0xfffffff408:10
stekern0xbc050000 doesn't look like an address that would make sense as the first address of that function08:12
maxpaln0xb0000000 is the SPI peripheral - but Linux doesn't know about that, I haven#t placed it in the dts file yet.08:14
maxpalnI am trying to understand the stack trace enough to know where to jump into HW08:14
maxpalnBut to your point, yes: 0xbc050000 makes no sense for that function08:16
maxpalnok, I'm in business - I'm struggling to find a sensible address to jump into the middle of the error, so I'm tracing back from the call to die()08:42
maxpalnseemingly it was caused by a page fault, I'm going in....08:42
maxpalninterestingly - this appears to have originated from a DLTB Miss08:55
maxpalnI thought I had seen plenty of these - there are certainly plenty of ITLB Misses - not sure yet why this one results in an unhandled exception08:56
maxpalnah, the lightbulb moment: a good strategy would have been to trigger on the EPCR holding the value of PC in the register dump (i.e. 0xC0099268) - that's worth remembering!08:57
stekernmaxpaln: 0xbc050000 is a virtual address, not physical09:09
ysionneau10:55 < maxpaln> interestingly - this appears to have originated from a DLTB Miss < a page fault either come from itlb or dtlb miss (or access  violation). Here since the fault address is different from the "PC of exception" (c0099268) and since the instruction in itself is a load, then it was almost surely a DTLB miss09:12
stekernyeah, and that makes sense, since the address doesn't make sense09:13
stekerni.e. backtrack what puts that wrong value in r309:13
blueCmd_stekern: yes, and a sed to remove CSS and background color09:17
maxpalninterestingly, that is just where I had got to -09:25
maxpalnI have found the point where r3 gets written with 0xbc05000009:25
maxpalnbut haven't worked out why yet09:25
-!- raja is now known as Guest3125509:25
maxpalnit comes from here:09:25
maxpalnc000222c <i_pmd_none>:09:25
maxpalnc000222c:84 40 00 64 l.lwz r2,0x64(r0)09:25
maxpalnc0002230:84 60 00 68 l.lwz r3,0x68(r0)09:25
Guest31255i have a query reagrding installation of GNU tool chain in linux09:27
Guest31255occuring some errors09:27
Guest31255can anybdy help me09:27
Guest31255in instaling tools09:27
Guest31255easy way09:27
_franck__Guest31255: what's your problem ?09:29
blueCmd_Guest31255: please post a log of the errors you're getting09:29
stekernmaxpaln: you have to check in the beginning of that exception, is r3 already that value there?09:30
amsand please use a pastebin for that ..09:30
Guest31255i am publishing errors please find it09:30
Guest31255make[4]: *** [or1k-asm.lo] Error 1 make[4]: Leaving directory `/home/aceic18/openrisc/build-or1k-src/opcodes' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/aceic18/openrisc/build-or1k-src/opcodes' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/aceic18/openrisc/build-or1k-src/opcodes' make[1]: *** [all-opcodes] Error 2 make[1]: Leaving directory `/home/aceic18/openrisc/build-or1k-src' make09:30
amsGuest31255: please .. PLEASE use a pastebin09:31
_franck__...and full log09:31
amsGuest31255: and when you do use a pastebin, PLEASE post the FULL log09:31
amsor at least the full error.09:31
Guest31255i am following OpenRISC GNU tool chain  : liunux installation guideliens09:32
Guest31255ok i will do it09:32
Guest31255may i know how to use pastebin09:32
maxpalnhmmm, the plot thickens - address 0x68 had already been written with the wrong value during a previous ITLB miss09:32
maxpalnthe witch hunt continues...09:33
amsGuest31255: if you don't know how to use, or find a pastebin, i think then you have no business in compiling a tool chain.  but that is me.09:33
Guest31255hi ams09:44
Guest31255i am copying reruning the script09:44
Guest31255once it reports i will paste and send it09:44
Guest31255in detalis09:44
Guest31255it took time to explore pastebin09:44
Guest31255can you have alook now09:49
_franck__NOTE: on 32-bit machines --disable-werror is needed due to an enum acting as bit mask is considered signed09:51
amspass --disable-werror.09:51
_franck__don't you have a 32-bits machine ?09:51
blueCmd_actually that is needed for newer gccs I'm pretty sure09:53
Guest31255my machine is 32-bit09:53
blueCmd_so then it's definitely needed09:53
blueCmd_Guest31255: it's important to read all of the instructions, these are complex stuff09:53
Guest31255can you let me know where the installation procedure has bee published in detail09:56
Guest31255i am following the procedure mentined in  the opencores09:57
amsthat is the detailed document.09:58
amswhere it says, as _franck__ already mentioned, that you need to pass --disable-werror for 32-bit hosts.09:58
amsyou even pasted the same line yourself.10:00
Guest31255yeah aplozie i have missed the line10:02
Guest31255and tryingto debug the script10:03
amshow about following the instructions first ...10:04
Guest31255yeah every thing is goingfine until now10:05
Guest31255with the option for 32-bit machine able to solve the problem10:05
amsok, you clearly do not want help.10:06
* ams goes back to hacking.10:06
Guest31255right now i dont have anyproblem ams10:07
Guest31255as i am new from one week i am exploring this open risc and trying t study it on my own reading documents10:07
Guest31255i am working ne an example created by waqas ahmed developed for cpu subsystem level10:08
Guest31255i am going through the code and installing the gnu tools10:08
blueCmd_Who is Waqas Ahmed?10:08
Guest31255mentioned in the opencores only10:09
Guest31255wait will point to that10:09
Guest31255section verification10:10
Guest31255you can find his name and dwonload link to it10:10
Guest31255i am using his code and trying to understand the arch of openrisc10:11
Guest31255if there is any way to understand risc processor better please let me know10:11
Guest31255digging my self is becoming really deifficult10:12
Guest31255my intension is to lear risc processor and stich and soc with some peripherals using opencores ips10:12
Guest31255please help me for that10:13
Guest31255i mean give a direction to rpoceed further10:13
Guest31255proceed further10:13
blueCmd_"to learn"10:13
Guest31255thats will be really help ful10:13
blueCmd_what do you want to learn?10:13
Guest31255i mean understand risc processor architecture10:13
blueCmd_you cannot just "absorb" openrisc, it's huge10:13
blueCmd_that would be the document to read then10:14
Guest31255i want to work on architeture and integarte it in UVM envirorment10:14
Guest31255with existing opencores ip in it10:15
Guest31255that is my main internetion10:15
maxpalnOk, an update - tracing back through with the ELA, I have traced the errant assignment to r3: A call to kmem_cache_alloc() from within copy_process() triggers an ITLB miss - just prior to the call to kmem_cache_alloc() r3 is written with the contents of address 0xc031c0b4 - the ELA shows me this is 0xbc05000010:16
maxpalnc0008ff0:18 e0 c0 31 l.movhi r7,0xc03110:16
maxpalnc0008ff4:9c 80 00 d0 l.addi r4,r0,0xd010:16
maxpalnc0008ff8:a8 e7 c0 b4 l.ori r7,r7,0xc0b410:16
maxpalnc0008ffc:04 02 40 be l.jal c00992f4 <kmem_cache_alloc> // This call to kmem_cache_alloc10:16
maxpalnc0009000:84 67 00 00 l.lwz r3,0x0(r7) // address 0xc031c0ba contains 0xbc05000 at this stage10:16
maxpalnThis is a very specific address - I am going to trigger on this address and see if I can spot anything odd.10:16
blueCmd_Guest31255: that's not an intention, that's a losely defined approach. what do you want to do more exactly?10:16
Guest31255understand risc processor and tring to  create an envirorment in UVM based soc with ( processors+ opencore ips)10:18
blueCmd_Guest31255: and the problem is?10:19
blueCmd_what you're saying is 'I want to use one of multiple CPU implementations and 1000's of cores'10:20
blueCmd_it doesn't make it easy to help you10:20
Guest31255ok may i know the reason10:20
Guest31255you mean its really huge10:20
Guest31255to understand10:21
stekernmaxpaln: if you objdump with -D and search for c031c0ba, you should find the global too10:21
blueCmd_.. because the permutations of the configurations you can do is like 1000^100010:21
blueCmd_Guest31255: just pick something practial to build ('I want to run a Hello World program') and do that10:22
blueCmd_that will bring down the problem to a manageable size10:22
Guest31255ok blueCmd10:23
Guest31255then can you suggest me how to understand Open Risc10:23
Guest31255in aplication point f view10:24
stekernread the architecture specification?10:24
blueCmd_which I already linked10:24
Guest31255like creating hex file and converting and linking into rom and read through the processor - creating this flow using verilog and c10:25
Guest31255i want to understand this follow in depth with architecture knowledge10:25
blueCmd_"creating hex file and converting and linking into rom". I would start by learning how linking works10:25
blueCmd_and not OpenRISC specific, generally. You seem to lack knowledge there10:25
Guest31255yes i dont have knowledge on it10:26
Guest31255i want to know diggin aboutit came to this webpage10:26
Guest31255Any reference on linking working procedure10:27
blueCmd_or bing.com10:27
Guest31255ok thanks for sugesstions sorry to disturb with basic doubts10:27
blueCmd_ams: did we talk about a non-wiki website before?10:31
blueCmd_or was that someone else?10:31
maxpalnstekern: nice tip!10:32
blueCmd_stekern: I want to learn openrisc, please do the work for me10:43
maxpalnhmmm, interesting - I can trace 3 accesses to this memory address: An initial write of 0x0, A second write of a valid address (didn't take note but something like 0xc0210000) then a read that returns oxbc05000010:49
maxpalnMy expert eye tells me this is suspicious....10:49
maxpalnas usual, the finger is pointing back towards me :-)10:49
maxpalnrecompiling the FPGA code with new triggers - lunch time for me...10:50
amsblueCmd_: someone else i think10:54
amsblueCmd_: i don't do much openrisc work ... non actually is a more apt explanation of what i do :-)10:54
amsi just hang here cause you guys are awesome.10:55
* ysionneau just likes to read the nerdy stuff that are going on here10:58
ams(and i have a secret crush on olofk's beard)10:58
blueCmd_ams: who doesn't?11:01
amsblueCmd_: I KNOW!!!11:01
blueCmd_ams: ysionneau: would you prefer or ?11:02
amsassuming it is some offical wiki and such ..11:02
blueCmd_how come?11:02
amswell... it is a wiki for or1k, by or1k people?11:03
blueCmd_it's not by or1k people, that's the problem11:03
blueCmd_opencores is.. weird11:03
amswell, i'd still prefer that one ..11:03
amsthe other one makes me think that it is your wiki11:04
amsfor your stuff11:04
blueCmd_ams: it will be relocated to '' if it becomes official11:04
amsoh, so just a test thing?11:04
blueCmd_so don't think much of the domainname11:04
blueCmd_ams: yes11:04
amsoh, then i don't care :-)11:04
amspick one that is easiest to setup!11:04 is just a git repo that is hosted by github, and they support CNAMEs, so we can use for it if we want to. and if anyone wants to change something they can just fork the repository and submit a pull request, or add a github Issue11:05
blueCmd_so I think "my" thing is easier, but I'm biased11:06
amsmore important is to make things work, than to make them pretty.11:07
blueCmd_for this demo I just ran some of our biggest wiki pages through a converter and stuck it up on that thing11:09
ysionneaublueCmd_: the 2nd page is definetely more sexy11:09
ysionneauand I never very liked the mixing of opencores and openrisc11:10
amsi love people mirroring shit ..11:18
blueCmd_ams: then you will looove my next trick11:25
amsblueCmd_: what? :)11:25
blueCmd_ams: it's not ready yet, but later today! :)11:25
* ams mirrors a mirror.11:27
rajasravanhi all i am having build GCC error , Any sugesstions12:21
amsreading the error message?12:21
blueCmd_rajasravan: configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.12:22
amsnor is it a build error.12:22
amsno building was commenced.12:22
rajasravantried with options --with-gmp, --with-mpfr and/or --with-mpc but how to locate the GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+12:23
blueCmd_rajasravan: *sigh* you need to install those libs12:23
amswhat is it today with these questions?12:23
blueCmd_apt-get install libmpc-dev libmpfr-dev libgmp-dev12:23
blueCmd_if you're running debian12:23
amsis a kernel.12:24
rajasravanok thanks12:24
maxpalnIt's confirmed as a bug - and the finger of blame is hovering like damocles' sword! Tracking it down now - but thank you all again for your assistance. It's getting a little easier with each bit I learn...12:47
blueCmd_maxpaln: what was the bug?12:50
maxpalnnot sure yet - but it is in my memory controller. Which is predictable once this had been established as a HW problem - the rest of the HW is largely vanilla ORPSOC12:50
maxpalnams: My cat is sitting on my papers. Can you help?12:50
amsmaxpaln: take a butane torch, light the cat on fire.12:51
amsmaxpaln: that will solve the problem.12:51
maxpalnthanks, but I am trying to understand the cat - why is it sitting on the papers?12:52
maxpalnCan you help?12:52
amsmaxpaln: ask the cat12:52
amsor, zap it with a dog transofmration gun, and then i can ask it for you .. since i only speak dog.12:53
amsmy services are free for newly converted cats12:53
maxpalnI need information on this gun - it sounds great. Can you help?12:54
maxpaln[let me know if this gets boring - I am smiling a lot as I type]12:54
amsmaxpaln: do you  mean if it is working properly?12:54
maxpalnIt definitely isn't working12:54
maxpalnwhich end is the front12:55
amsmaxpaln: oh, ok. load it up with some ammo, and give it to the dog, or cat .. depending on if you have converted the cat.12:55
maxpalnhang on - I think I have it12:55
maxpalnwoof woof12:55
blueCmd_what is goooing on12:59
amsblueCmd_: dunno, maxpaln was trying a transformation gun ... i think he transformed himself into a chiwawa (or whatever the spelling is) and now is incapable of coneverting himself back to human shape..13:00
blueCmd_happens to me at the worst of times13:00
ysionneauthat's what happen when you try to debug a DDR controller :)13:00
maxpalnback in the room now - thankfully the cat helped me out! :-)13:01
maxpalnit can sit on the papers as much as it wants now :-)13:01
maxpalnThatll teach me for asking dumbass questions!13:01
stekernman cat?13:21
olofkblueCmd_: Is that a dump of the opencores svn repos?14:22
olofkAnd btw, yes, OpenCores is a registered trademark, and OpenRISC might be too actually14:23
blueCmd_olofk: yes, it is14:23
blueCmd_olofk: good that I didn't use OpenCores then14:24
olofkJesus christ, what a mess :)14:24
blueCmd_there are ~100 projects I was unable to mirror in the first sync, because the SVN server sucks14:24
blueCmd_I skipped the 300 empty projects14:25
olofkBut isn't freecores already a thing?14:25
olofkYep. They have their stuff on sourceforge14:26
blueCmd_seems to be super dead14:26
blueCmd_anyway, changing name is easy14:26
olofkYes, extremely dead14:26
olofkYeah, it's nice to have a backup of opencores14:27
blueCmd_so, about that14:31
blueCmd_is it possible to make this the primary source?14:31
blueCmd_I mean, we track patches and stuff in orpsoc, wouldn't it be nice to actually merge them in the repos?14:32
blueCmd_also, you could remove the hard dependency on svn ;)14:32
stekernolofk: openrisc is not registered14:46
stekernat least not afaik14:47
blueCmd_even so I think it would not be enforceable14:48
blueCmd_prior work and so on14:48
blueCmd_stekern: juliusb: jeremy_bennett: _franck_: you got mail14:49
stekernblueCmd_: nice!14:54
-!- Netsplit *.net <-> *.split quits: mafm, bentley`15:02
blueCmd_I'm stirring the hornet's nest15:11
stekernwho's the queen b(ee)?15:16
blueCmd_whoever is behind OpenCores I guess :P15:18
blueCmd_dalias: remeind me, what kind of compability are you looking at for musl compared to glibc?18:57
daliasat the source or binary level?18:59
daliasbasically musl implements the posix interfaces, plus some yet-to-be-documented set of extensions (both additional functions and extensions to standard functions) which aim to be compatible with glibc in what's implemented19:03
daliasthe main criteria for exclusion of extensions is when they have severely incompatible definitions across different systems (e.g. qsort_r with opposite argument order on bsd vs gnu) or preclude an efficient or fail-safe implementation of something that would otherwise be efficient/fail-safe19:04
daliasfor inclusion, there generally also needs to be some level of demand, and some argument that adding the extensions is easier or better than making the software work without them19:06
daliasbtw i have a possible counter-proposal for explicit_bzero:19:10
daliasbasically you pass a pointer to it, and it doesn't do anything except formally depend on the value of the object pointed to19:12
blueCmd_dalias: ack!19:13
blueCmd_thanks for explaining19:13
daliasoops wrong place19:14
daliasi meant for that last part in #musl :)19:14
blueCmd_Invalid mime type "text/html" detected in message text or19:14
blueCmd_attachment.  Please send plain text messages only.19:14
daliasthat probably does improve the quality of posts to the list...19:15
daliasi've never seen html email without horribly-broken quoting/threading19:15
rahburn blueCmd_!20:52
daliasstekern, i found one bug but i can fix it if you like21:01
dalias+#ifdef __clang__21:01
dalias+       char *tp;21:01
dalias+       __asm__ __volatile__ ("l.ori %0, r10, 0" : "=r" (self) );21:01
daliastp vs self :)21:01
stekerndalias: nice catch, reveals that I haven't tried compiling with clang ;)21:07
daliasis there even clang support for or1k yet?21:08
stekernyes, I did a backend some 2 years ago21:08
stekernand recently some italian(?) students have brought it in sync with current upstream21:09
stekernbeen on my todo list to merge their work in to our repo21:10
daliasoh about __syscall and stack args21:12
daliasis that right for variadic?21:12
daliasnow that i think about it, i think we already discussed this in a different area and the answer was yes21:12
stekernshould be21:13
blueCmd_rah: :P21:17
olofkblueCmd_: Put the text in a word document and attach it instead21:43
stekernblueCmd_: <- shouldn't that be: #define __JMP_BUF_SP 021:43
blueCmd_what is it? :)21:44
blueCmd_I wrote this a long time ago..21:45
stekernok, I think that's actually right now, but it will be wrong after we consolidate it with musl21:46
blueCmd_it's supposed to be r1 right?21:46
blueCmd_or r2?21:46
stekernthe name suggest r1 at least21:47
blueCmd_I think jumpbuf[0] is SR21:47
blueCmd_ seems to say that anyway21:47
blueCmd_which is disabled in setjmp21:48
blueCmd_and not restored21:48
blueCmd_I would agree on changing it21:49
blueCmd_(so far 3/3 people are supportive of my crusade, it's nice knowing i'm not insane)21:58
stekernanother note, iirc, we use the byte syntax for asm .align22:08
stekernI've done the setjmp/__longjmp changes btw22:14
blueCmd_stekern: in musl?22:18
blueCmd_once I get my mexiko platform up and running I will put some effort into glibc I think, getting it to a stage where it's upstreamable is paramount to Debian22:19
blueCmd_stekern: thanks! you forgot the align though ;)22:19
stekernyou said 'fixed' already ;)22:20
stekernI can fix that and do a proper commit for you22:20
blueCmd_stekern: I have a proper commit for alignment22:21
blueCmd_stekern: pastebin mangles the tab though so the patch doesn't apply22:21
blueCmd_but I can apply it myself, it's easy enough22:22
stekernreally? even if you use this?
* stekern thinks blueCmd_ didn't try22:26
blueCmd_stekern: I ctrl-c'd the /text version22:27
blueCmd_if that's not the same, I didn't try22:27
stekernthe download is not the same22:27
blueCmd_then I didn't try22:28
blueCmd_and I'm a bad person for lying22:28
blueCmd_now we're equally bad22:31
stekernI probably should get one of these
blueCmd_maybe it's very small22:34
stekern"For Adults with advanced keyboard needs, who require large keys in order to locate and operate a keyboard."22:36
blueCmd_everything is relative22:37
blueCmd_maybe it's adult ants22:37
stekernthere's this too:
stekernthat states the size22:39
blueCmd_I might be able to expense one of those keyboards at work...22:39
stekern"I've got advanced keyboard needs"22:40
-!- Netsplit *.net <-> *.split quits: ssvb, heroux22:51
-!- Netsplit *.net <-> *.split quits: jonmasters, rah, chan1, Amadiro, ysionneau, xlro, wallento, arokux, fotis2, zama, (+19 more, use /NETSPLIT to show all of them)22:52
-!- Netsplit over, joins: FreezingCold, O01eg, trevorman, rah, jeremy_bennett, xlro, _franck_, simoncook, olofk, rokka (+21 more)22:53
-!- Netsplit *.net <-> *.split quits: wallento, trevorman, Amadiro, rokka22:54
-!- Netsplit *.net <-> *.split quits: zama, simoncook, knz, olofk22:55
-!- Netsplit over, joins: trevorman, rokka, Amadiro, wallento22:55
blueCmd_hm, I should revert
--- Log closed Fri Jul 18 00:00:24 2014

Generated by 2.15.2 by Marius Gedminas - find it at!