IRC logs for #openrisc Friday, 2014-07-25

--- Log opened Fri Jul 25 00:00:34 2014
stekernheh, is this the kernel folks new strategy to kill off the systemd project?03:59
stekernhttp://lkml.iu.edu//hypermail/linux/kernel/1407.3/00492.html03:59
stekernblueCmd: I actually had a feeling that something was off when I saw r9 in the end of your clone function04:35
stekernbecause I had a vague recollection that I had avoided using r9 in the end of mine for some reason04:37
stekernI was just too tired yesterday to figure it out ;)04:37
stekernI screamma for less quit/joins from gbaway in the mornings04:48
blueCmdstekern: subtle things06:51
stekernobviously it breaks easily in qemu. in mor1kx it'd break even more subtle, it works until you hit an exception in the delay slot06:57
blueCmd*sigh* ctype init crashes. that means with 99% certainty that this segfault is TLS related06:59
stekernbut you are our TLS expert, should be a piece of cake for you to sort out! ;)07:02
stekernhmm, can you turn off support for instructions in or1ksim?07:04
stekerndoesn't seem you can07:10
blueCmdstekern: well, as your expert I can tell you it's a pain to debug :P07:22
ysionneau05:59 < stekern> http://lkml.iu.edu//hypermail/linux/kernel/1407.3/00492.html < it's a bit mean08:24
ysionneauto the poster and to gnome/systemd08:26
blueCmd current_locale: 0000000109:06
blueCmdthat's not right09:06
blueCmdvery bad address09:06
stekernysionneau: perhaps, but not uncalled for =P09:14
ysionneau=)09:18
olofkDoes anyone have a nice and clean synchronous FIFO? I want to avoid going through hundreds of potential candidates10:08
olofkNeed configurable depth and width + an element counter10:09
stekernolofk: single clock?10:09
olofkyep10:09
stekernwait10:09
stekernhttps://github.com/openrisc/mor1kx/blob/master/rtl/verilog/mor1kx_store_buffer.v10:10
stekernI remembered that I would have seperated it more though10:11
stekernbut a single clock fifo is so trivial10:11
stekernthen there's this: https://github.com/skristiansson/wb_sdram_ctrl/blob/master/rtl/verilog/dual_clock_fifo.v10:12
olofkYes, it's trivial, but it still takes a little time do one and test it10:12
olofkstekern: None of those have element counters exposed10:13
stekernoh, I missed that10:13
olofkI can still just compare the pointers myself though. It's just one of those things that I assume we have somewhere :)10:13
olofkAnd if I get a nice and clean one, I'll do a .core for it as well10:14
olofkLooking at the wayback machine I must say that opencores looked better 2003-2007 than it does today10:25
olofkI guess that is true for a lot of sites though10:26
stekernmmm10:38
stekernback then it was easier to find quality stuff too10:39
stekernwe used this core in a couple of projects at our university back in 2002-2003: http://opencores.org/project,ax810:41
stekernI have some changes to that make it a90s8535 compatible10:45
stekernamong the changes is an addition of a SPI slave10:49
stekernhttp://pastie.org/941985110:51
* stekern get back from nostalgia lane10:54
rahstekern: what course did you study?10:56
rahif you don't mind me asking? :-)10:56
stekernhmm... I think it was called 'digital design' or something10:57
rahI mean, what degree?10:57
stekernaha, EE master10:58
rahI see10:58
blueCmdstekern: what uni?11:50
stekernmidsweden, in sundsvall11:57
blueCmdstekern: fix the openrisc12:00
blueCmdI get crashes when accessing my int with address 0x112:00
blueCmdI'm sure it's not a software fault, so it must be in the specification12:01
* blueCmd is super-duper serious12:01
rahsundsvall looks like a nice place12:02
rahon openstreetmap12:02
* stekern disconnects the alignment exception and exclaims, fixed!12:02
stekernrah: it was pretty nice, a small city, but not *too* small. I decided to study there instead of in stockholm (where I was living when I applied), because I wanted to get out of my parents house and get at least a taste of student life.12:05
stekernI was kind of lucky when it came to the studies there too, they made some changes right when there was time for the third year. Instead of normal lecture type of studies, we were assigned an open office space with our own desks and the studies were in the form of projects that ended in 'products'12:07
stekernI think they only did that for a couple of years though.12:09
blueCmdstekern: pretty sure I need something mapped to 0x0 as well12:12
blueCmdbetter just disable bus errors12:12
stekernlet's just disable all exceptions, they are just distractions from the code we wnat to run anyway, right?12:13
blueCmdstekern:12:19
blueCmdhow can I do multi-threads without exceptions?!12:19
blueCmdstupid idea12:20
rahstekern: interesting mode of teaching13:06
rahand I can understand wanting to get away from parents :-)13:07
* rah did the same13:07
fnunesstekern: Hi, good afternoon. The other day you posted a .cfg file for a Digilent Atlys board for OpenOCD. Could you please poste it again ? It's tha tmy computer broke down and I lost it. Thanks.13:38
stekernfnunes: http://juliusbaxter.net/openrisc-irc/%23openrisc.2014-07-22.log.html#t15:5713:52
fnunesstekern: Thanks a lot stekern.13:55
maxpalnWhat a week! The archived project that successfully boots Linux has been sent to customer :-) Thanks a LOT to those of you who helped me debug this far - I owe you a beer in Munich! Have a good weekend all - next marks the start of the transition to newer code ... ooooh!14:51
blueCmdso whyyy doesn't TLS sections get loaded properly...15:37
daliasbluecmd, ?15:51
blueCmdI have this:15:51
blueCmd__thread __locale_t __libc_tsd_LOCALE = &_nl_global_locale;15:51
blueCmd&global_locale: 302c2af815:52
blueCmdthis is loaded into something called 'current_locale' on thread startup15:52
blueCmdfirst thread:15:52
daliasare global_locale and _nl_global_locale the same?15:52
blueCmdcurrent        302c2af815:52
blueCmddalias: yes15:52
daliasok15:52
blueCmdsecond thread:15:52
blueCmd   current        0000000115:52
daliassounds like pthread_create is either setting the thread pointer wrong, or not copying TLS right15:53
blueCmdit gets a value (or just reuses memory)15:53
daliasthis is in glibc i assume?15:53
blueCmddalias: yes, glibc15:53
daliasi would check clone15:53
daliasand make sure it's passing the right pointer15:53
blueCmdsetting the TP is the kernel job, but sure15:54
blueCmdI'll make sure r10 is correct15:54
daliaswell you have to _pass_ the right value for the kernel to set the right one15:54
daliasalso you might, in gdb, do x/16x $r1015:54
blueCmdyes, it's a good point15:54
blueCmdsure, If I had gdb15:54
daliaswell you could use inline asm to read r10 and then print an array startin there15:55
blueCmdI don't really know what the real value should be though15:56
daliaswell for example if you saw it being off by a few slots, you'd know that there was just a wrong constant offset somethere16:02
blueCmdI looked at the memory around it, it has data but nothing that looks correct16:02
blueCmdI _think_ this broke when I rebased stuff to 2.1916:07
blueCmdbut I have no easy way to test that hypothesis16:07
olofkblueCmd: Why no gdb?16:14
blueCmdolofk: because I haven't set it up and I don't think anybody implemented userland support16:14
olofkuserland support? (I know close to zero about gdb)16:16
blueCmdolofk: running stuff in userspace16:21
olofkStill don't understand, but I also realize I'm not _that_ interested in the subject. Just thought that we had a proper gdb port16:24
blueCmdolofk: I don't think you can run gdb on or1k, that's what I'm saying16:25
olofkah yes.. you need to run it on target16:25
blueCmddalias: I think I found my TLS problem16:35
blueCmdit was in the rebase16:35
daliassomething glibc changes in the layout of the TLS-related stuff?16:39
blueCmdhttps://github.com/bluecmd/or1k-glibc/blob/121f056932594385bd9e09e8eeffd15b942e4e99/sysdeps/unix/sysv/linux/or1k/nptl/createthread.c16:39
blueCmdthat override isn't needed for 2.1916:39
blueCmdso I removed it16:40
blueCmdI forgot to move TLS_VALUE to what is now called TLS_DEFINE_INIT_TP16:40
blueCmdand the default is just (char *) pd16:40
daliasyeah figured it was something like thast16:40
dalias(wrong adjustment passed to clone)16:40
daliasthat's why i suggested printing a range around the thread pointer and trying to see how much it was off by16:41
blueCmddalias: right, but that wouldn't have worked16:41
blueCmd1) it's wrong by much16:41
blueCmd2) this is pointer->pointer->pointer16:41
blueCmdthe possibility of having a crash when scanning 2 is quite big16:42
blueCmdanyway, this works now \o/16:42
olofkUsing emacs is a pain with a half-working ctrl k18:33
olofkey18:33
olofkI hate that I can't decide if parameters should be uppercase or lowercase in verilog18:54
stekernuppercase19:01
olofkLOWERCASE19:02
olofkBut yes, uppercase is better. They are constants after all19:02
stekernyou can also consider eLiTE19:03
olofkGood thinking, but we should reserve that for mostly static signals, like reset19:04
blueCmdolofk: clock is static19:08
blueCmdno?19:08
blueCmdstekern: did you see that kernel guy's other patches?19:09
stekernyou mean the fix mes? yeah19:34
stekernthose were more sad than funny though, but they probably fueled the funny one19:38
blueCmdstekern: yeah20:06
stekernthe all time funniest lkml post is this though: https://lkml.org/lkml/1996/3/6/6520:27
stekernand the follow-up: https://lkml.org/lkml/1996/3/7/9720:27
hansfbaierHello folks, openocd already seems to have USB Blaster II support: http://openocd.sourceforge.net/doc/doxygen/html/usb__blaster_8c_source.html20:36
hansfbaierBut looks like https://github.com/openrisc/openOCD20:37
hansfbaierdid not pull those changes yet.20:37
olofkstekern: ps. sheesh, i hope these mails dont get archived! :)20:37
olofkhansfbaier: Good to hear from you. Are you leaving asia for the upcoming OpenRISC conference? :)20:37
hansfbaierolofk: I'd like to, but it's quite expensive...20:42
hansfbaierstekern: How is sublime doing? I am quite into synthesis right now (bought an Novation UltraNova)20:42
hansfbaierolofk: Wow, it's in Munich, so close to home.20:43
olofkhansfbaier: Yes, I can understand that it might be a bit hard on the wallet. Some day we'll hopefully move this road show to a location near your hideout20:43
hansfbaierolofk: Bali might be a great choice ;)20:44
hansfbaierolofk: Or Kuala Lumpur a very cost effective one20:44
hansfbaierThanks to Air Asia20:44
olofkhansfbaier: Very good idea. We really should take the opportunity to host the conference where the weather is nice20:44
olofkCambridge was surprisingly warm though20:45
olofkIs there any reason to allow writes to a full FIFO? I'm a bit inspired by AXI4 stream, where it's not really possible to overflow and underflow FIFOs20:47
blueCmdso somewhere I have some code that passes the wrong fini when linked with -pie20:50
olofkstekern: Do you know if mor1kx_simple_dpram_sclk.v uses FFs for small FIFO sizes?20:51
olofkand maps to tech-specific RAMs otherwise20:52
blueCmd\o/ fixed21:00
hansfbaierolofk: Is orpsocv3 superseded by fusesoc?21:14
olofkhansfbaier: Yes21:14
hansfbaierthanks21:14
blueCmdhansfbaier: i think it's techincally a rename, but olofk can correct me there21:16
olofkThat's true. There isn't anything OpenRISC-related in the codebase, so I wanted a new name to indicate that it can be used for FPGA stuff in general21:17
olofkRenaming stuff is always a pain. I think stekern called it confusesoc :)21:19
hansfbaierolofk: The Readme still contains links to orpsocv321:19
olofkdoh :(21:19
hansfbaierolofk: sorry wrong21:20
hansfbaierI should go to bed again...21:20
olofk:)21:20
blueCmdstekern: I get super-weird lockups in qemu with virtio21:31
blueCmdi I have threads that just stop and wait for reads on my 9p virtfs mount, the way to make them continue is to do "ls " or something else that "touches" the mount and everythign continues21:32
blueCmdso I have a while [ true ]; ls /srv/build/; done in another ssh session running21:33
blueCmdpoke53281: have you heard of something like that?21:34
blueCmdstekern: also, I get these ethoc lockups from time to time (they resolve themselves after a while, might be related): http://78220df5d984d274.paste.se/21:52
blueCmdyeah now it deadlocked to the point where sshd would just refuse connections22:13
blueCmdbut existing sessions were alive so I could look at /proc/interrupt to see ethoc interrupts go up, but not virtio22:14
poke53281blueCmd: I am currently programming a virtio device for jor1k.22:28
poke53281exactly on 9p :)22:28
poke53281According to what I know, that shouldn't happen22:29
rahfree hardware designs have an economic advantage over proprietary designs in that they leverage the work of many people, bazaar style22:30
rahso why aren't free hardware chip designs taking over the silicon industry?22:30
poke53281blueCmd: 9p should raise the interrupt every time it has finished one request.22:31
poke53281might be a strange problem with the big endianness.22:31
blueCmdpoke53281: hm weird22:31
blueCmdyeah22:32
blueCmdpoke53281: how are you tackling that btw?22:32
blueCmdI just s/readl/ioread32be/g22:32
poke53281the virtioring must be swapped. The 9p commands are already in small endian as far as I see.22:32
poke53281How do I tackle this? Trial and error. And everytime I have to test it I ask myself who the hell made the initial definition for openrisc to make it big endian and what was he thinking.22:33
blueCmd:-)22:34
poke53281So far I think you are correct with the substitution.22:34
poke53281I am still at the init part of the 9p filesystem. But I want to implement a small hello world filesystem (like http://fuse.sourceforge.net/helloworld.html) this weekend. Then I hopefully know more.22:36
poke53281If I encounter any further endianess problem I will tell you.22:36
blueCmdpoke53281: please do, thanks22:36
poke53281So far 9p seems to be fine.22:36
poke53281So everything send and received is small endian.22:36
blueCmdpoke53281: I think what I'm having problems with are general lockups though, something that seems to be locking parts of the system22:36
blueCmdnot sure what that is22:36
blueCmdethoc spits out that its trasmit queue is stuck every now and then22:37
poke53281So far the virtio descriptors in the virtioring are big endian. Therefore qemu doesn't know how to handle this. I am not sure if this is a bug in Linux or a bug in Qemu.22:37
poke53281Yes, there is a limit of the buffer. 9p must handle all requests, otherwise the transmit buffer will be full.22:39
blueCmdfor ethoc?22:39
poke53281No22:39
blueCmdthat sounds unrelated :P22:39
poke53281the virtio ring.22:39
blueCmdbut yeah, might be related22:39
blueCmdI got lockups when I used NFS over ethoc as well IIRC22:39
blueCmdthat was a while ago though22:39
poke53281Let's see if I can implement my filesystem without such problems. But I don't use ethoc. I use the virtio memory device.22:40
blueCmdpoke53281: don't you offer connectivity to the outside world?22:40
poke53281I do22:40
blueCmdthrough?22:41
poke53281Through a "anonymous" proxy in the USA.22:41
blueCmdwell, through ethoc?22:41
poke53281Yes22:41
blueCmdright, then our setups are the same22:41
blueCmdI'm using virio for /dev/sda (root), virtfs for /srv/build and /home/bluecmd/or1k-devel and ethoc for connectivity22:42
poke53281Yes, but I don't run 9p over ethernet. I run it over the virtio memory device. According to one your last emails you did the same.22:42
blueCmdyes, I run it mmio22:42
blueCmdyes, I run virtio over mmio*22:43
blueCmdethoc is just standard ethoc whatever that is22:43
blueCmdhttps://github.com/bluecmd/or1k-devel/blob/master/tests/qemu-system22:43
blueCmdthat's my configuration for qemu22:43
poke53281But do you rund virtfs (9p) over virtio/mmio?22:44
blueCmdyes22:44
poke53281Yes, then our configurations are indeed the same. I will tell you about any lookup problems. But I don't hope so. I want to run everything from virtfs in future.22:46
blueCmdcool! I haven't attempted running root over it, I saw some notice / patch to do that though22:47
poke53281NFS as rootfs is also possible. So, why not 9p.22:48
poke53281I can run a script which mounts this via chroot.22:48
blueCmdthat should work yes22:49
poke53281Unfortunately I need a small initramfs for this. But Ok.22:49
blueCmdshould be possible to do without that, that's the patch I saw22:50
poke53281Unfortunetly the patch for virtio-framebuffer from 2009 never made it into the kernel. Don't know why.22:51
poke53281Also there is no virtio-sound.22:51
poke53281Both would be great additions.22:51
blueCmdIndeed22:51
poke53281But there is a virtio-pci.22:51
blueCmdbut that's PCI slave right? not complex? (or what it's called for pci)22:52
blueCmdI think virtio-pci is a "replacement" for virtio-device/mmio22:52
poke53281Not sure. Probably it works only with simple devices.22:52
poke53281No, I think, this is for using real pci devices from the host inside the guest.22:53
blueCmdDefault to -virtfs is to use virtio-pci I think, and not mmio22:53
blueCmdhm, maybe22:53
poke53281http://www.ibm.com/developerworks/library/l-virtio/22:53
poke53281figure 322:53
poke53281the virtio-pci is a normal device like bulk,net,console22:54
blueCmdah, I'm thinking of virtio-9p-pci I think22:55
blueCmdyes22:55
blueCmdsorry for the confusion22:55
-!- Netsplit *.net <-> *.split quits: ssvb, jeremybennett23:29
poke53281blueCmd: There might be indeed a problem with virtio.23:40
poke53281and big endian23:40
poke53281you changed only the mmio part?23:40
poke53281so only drivers/virtio/virtio_mmio.c?23:41
blueCmdpoke53281: https://github.com/bluecmd/or1k-linux/commit/b1d42a4c86262d46007c4c2245be40b6147689cf23:43
blueCmdthat's the only thing I changed I think23:43
poke53281I am not quite sure, but one problem is, that this only one part. The other part is the virtioring, a buffer which the host reads and writes.23:46
poke53281And of course, there is an endian problem as well.23:47
poke53281But it looks like, that qemu tackles this.23:47
poke53281But is this part well tested in QEMU? The host has to "consume" descriptors in order to free the buffer.23:48
blueCmdstuff is working for me, except for the lockup, so I wouldn't think that something with the data transfer is broken23:48
--- Log closed Sat Jul 26 00:00:36 2014

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!