IRC logs for #openrisc Tuesday, 2014-06-17

--- Log opened Tue Jun 17 00:00:37 2014
stekernok... this 'works' now03:42
stekernwhere 'works = I get some output in the telnet window03:42
stekerncouple of problems:03:42
stekern1) it doesn't seem carriage return03:43
stekern2) the output is messed up (missing characters, double characters)03:45
stekern3) kernel crashes when using it03:45
stekern1 and 2 might be the same issue03:45
stekernolofk: this time it actually wasn't the cache fault, it was's fault for not being available to serve me adbg04:54
stekernassign data_from_wb = wb_dat_i[31:24];  // Data to the FIFO05:07
stekernthat's not really wb spec compliant05:07
stekernbut it should work with mor1kx at least05:07
stekernit should use bsel to pick out where the byte is05:08
stekernah, no that should actually always work05:10
stekernsince the reg is located there05:10
stekernusing bsel would make it endian agnostic though05:11
stekern_franck_: I assume you tested this on the de1 board?05:39
stekernhuh... now I connected the irq back, and now it works... at least better05:56
stekernof_serial: probe of 90000100.serial failed with error -2205:58
stekernbut I get normal output up until that now05:58
stekernah, that was because I had removed the clock-freq from the dts entry as a test06:03
stekernit's still skipping characters though06:03
_franck__stekern: seems like you are missing characters when it uses IRQ. Can you set your UART iRQ to -1 and test again ?06:50
_franck__Ithat should force the UART to work in polling mode06:51
_franck__thanks for testing, I should have done this myself...06:51
stekern_franck__: will do, but I think you are missing characters too ;)06:55
_franck__am I ? (I'm waiting for NSA agen stekern to show me my log)06:56
stekernor you've got an spurious 'I' inserted before 'that'06:56
stekernthis *could* of course be a mor1kx bug too06:57
stekernout of interrest, since you obviously already looked it up, where does it interpret -1 as 'poll-mode'?06:58
stekernhmm, and how/where should I set that?06:59
_franck__in devicetree in your uart node ?07:01
stekernError: arch/openrisc/boot/dts/simple_smp.dts:61.17-18 syntax error07:01
_franck__at least I did this with a platform device....07:03
_franck__"0" should be enough in the dts to make it poll07:06
stekernnot sure about that, I think that get translated07:06
stekerncommenting the interrupts line out might work though07:07
stekern90000100.serial: ttyS1 at MMIO 0x90000100 (irq = 0, base_baud = 3125000) is a 16550A07:08
stekernbut it's still not working right07:08
stekernchanging the type from 16550a to 16550 improves the situation07:13
stekernoutput is all correct now, but I get some spurious character from input07:14
stekernit's rediculously slow though, but that's probably a feature07:16
stekernah, that was due to the polling07:17
stekerneverytime I press enter, it will echo back a '?'07:25
stekern...and there's still occassional missing characters07:31
_franck__if you simply comment /*interrupts = <2>;*/ you got polling08:15
_franck__I confirm it works only in polling mode and it's slooow08:15
_franck__I didn't change ns16550a to ns1655008:16
_franck__so, do we keep this in openocd ?08:16
stekernyes, commenting it out gets polling, but I get the same problems with polling as without08:16
-!- Netsplit *.net <-> *.split quits: xlro, ysionneau, kiwichris, wallento, poke53281, hansfbaier, heroux, fotis2, slp```, mboehnert, (+1 more, use /NETSPLIT to show all of them)08:17
stekernwhy wouldn't we?08:17
stekernI think there are issues, but they can be solved08:17
stekernbut you see the same kind of problems I see?08:20
-!- Netsplit over, joins: heroux, ysionneau, Limb, xlro, hansfbaier, poke53281, wallento, slp```, mboehnert, fotis2 (+1 more)08:21
_franck__I have few missing characters08:21
_franck__and a weird char after I press enter08:22
_franck__TAB key works08:22
-!- Netsplit *.net <-> *.split quits: wallento, poke53281, slp```, heroux, fotis2, mboehnert, hansfbaier08:33
-!- Netsplit over, joins: heroux, hansfbaier, poke53281, wallento, slp```, mboehnert, fotis208:44
stekernyup, that's exactly what I see too08:45
stekernthe missing characters might be hard to debug, but the weird char after enter should be relatively easy08:46
stekernand then we can just cross our fingers that fixing that will fix the missing chars too ;)08:46
stekerndalias: minor feedback from my porting experience, would it be a disadvantage to have all the arch dependent stuff in arch/?08:58
stekernI guess for a libc maintainer, the functionality split might make more sense though ;)08:59
_franck__or1ksim doesn't like baseaddr = 0x93000000 size = 0x02000000. It says it overlaps with eth0 at 0x9200000009:54
olofkwb_intercon doesn't like that either, but I don't think it's complaining :)09:54
_franck__men, when you play with openrisc you have to be ready to jump on something else every day.09:58
_franck__I was implementing zImage on Linux. Then I tried to boot it with barebox which lack openrisc bootm support.09:58
_franck__Then I wanted to work on this under or1ksim which lacks CFI model. Then I wrote a CFI model. Now I have this problem.09:59
stekernthen when you're done with that, you've forgot where you started10:18
stekern...and while you try to remember, you see something and go *oh! shiny!"10:18
stekernwhy do you need to set the baseaddr to 0x93000000 btw?10:23
_franck_I put my CFI here. It's memory mapped and I wanted it to be 128MB10:24
stekernyes, but isn't it easy to fix? just don't map it at 0x9300000010:25
stekernmap it at 0x10000000 or something10:25
_franck_aren't we there to fix things ? :) But yes, you're right10:26
stekernah, well, I don't see how you'd fix that in a sensible way ;)10:26
stekernor more, the restriction that the ranges you use have to be masks is pretty sensible10:29
wallentostekern, I added another patch to the PR11:37
wallentoweird that nobody noticed so far..11:37
stekernwallento: you have to condition that on or1200 (or mor1kx in or1200 pic compat mode)11:40
stekernto elaborate, or1200 have a broken pic implementation, where you have to write a zero to picsr to clear the interrupt11:47
stekernsince there is a lot of sw out there that relies on this bug, we added a compat mode to mor1kx to behave like that too (LATCHED_LEVEL)11:49
stekernI've posted some patches for Linux to make it possible to use LEVEL or EDGE in a sensible way as well:
stekernblueCmd: what kind of problems did you have with ipc?11:59
wallentommh, okay, shouldn't mor1kx rtl then default to compat mode also?12:02
wallentoor should I check VR at this point?12:05
wallentohow is it with or1ksim?12:10
blueCmdstekern: it didn't work with qemu, it would just freeze on some syscalls12:39
blueCmdI don't recall the details12:40
stekernblueCmd: ok, that sounds unrelated to my current problem13:09
stekernwallento: the default is level, isn't it?13:10
_franck__you did run linux in simulation using the de0_nano, right ?15:37
stekernyou need a lot of tricks to run Linux in icarus simulations15:43
_franck__ok so it's up to olofk to answer that :)15:46
_franck__he could say: "it's not supported in the free version on fusesoc. But,..."15:47
stekernhaha, seems plausible15:51
daliasstekern, from a perspective of ppl reading the code, i think having it local to the functional component is highly preferable16:12
daliasand having "long-range" implicit overrides of one file by another is very confusing16:12
daliasat least this is a big point of confusing with the glibc source (sysdeps tree)16:12
stekernyeah, I see that side of the coin too16:14
stekernand yeah, glibc seems to do both... depending on the arch16:14
stekernthat's *really* confusing16:15
stekernbut which way is best is probably down to from what angle you are looking at the code, what needs to be done to get musl to run on a target, or what a part of musl does and what it does on different targets16:23
stekernI guess you are right that the latter is more common and more important16:23
stekern_franck_: how does that profiling stuff in openocd work?17:03
stekerndoes it halt the cpu and then read spr_npc?17:03
_franck_that's what is does17:26
stekernhow often/many times does it do that?17:45
stekernseems to me that you would need to run that over a fairly long period of time to get any useful data17:45
stekernbesides, stalling/unstalling the cpu of course have side effects that running the program normally don't have17:46
_franck_it does that as fast as it can. i.e: not fast17:56
olofkAh so is back17:57
stekern_franck_: yeah, that's what I figured, hence the need of a "fairly long period of time" ;)18:20
stekernI'm trying understand what causes the difference in the mail from inigo18:21
olofkHow do you view the .out files?19:29
olofkI can't find the _reset and or1k_dmu_disable at all in a kernel objdump. Did I misunderstand something?19:31
stekernit's not from a kernel image19:34
stekernit's from a small test program19:34
olofkhmmm... those .out files attached are useless without the elf, aren't they?19:38
stekernI just get this when I try to generate the .out: openocd: target.c:3562: write_gmon: Assertion `addressSpace >= 2' failed19:47
stekernolofk: I like your way of doing it much more...19:59
stekernwhy does it need to halt it btw?19:59
stekernjust read npc on fly, that would actually be a lot better20:00
_franck_my be that some arch cannot do that20:01
stekernyeahm I do realise that20:01
_franck_so the patch fails when it generates the .out ?20:04
_franck_I'll try this tomorrow20:04
stekernI don't know, might be mor1kx that isn't running properly when stalled/unstalled like that20:07
-!- Netsplit *.net <-> *.split quits: slp```, heroux, fotis2, mboehnert, ssvb20:19
-!- Netsplit over, joins: heroux, ssvb, slp```, mboehnert, fotis220:20
-!- Netsplit *.net <-> *.split quits: sb0, poke53281, vr5c20:24
-!- Netsplit over, joins: sb020:33
stekernhmm... single stepping doesn't even work now20:42
olofkstekern: My way?20:43
stekernyes, running stuff in simulator and 'grepping' the stuff20:44
olofkYou mean my combination of awk, sqlite and python? :)20:47
olofkI dropped sqlite though20:47
olofkBut I'm considering adding a binary trace log to mor1kx_monitor that just writes the PC and perhaps time and/or rD contents. I half suspect that my boot stops because the plain text log file grows too large20:50
olofkAs integers I mean20:52
stekernyeah, time and pc is useful20:53
olofkBut for statistic purposes it would probably make way more sense to do this in verilator.20:55
stekernyes ;)20:56
olofkstupid icarus. Not good for anything20:57
stekernactually, for debugging debug stuff, it's pretty good21:14
stekernbecause, if you enable vcd dump in verilator, it takes a minute and you have a 30 gig dump or something21:15
olofkAh true :)21:15
stekernnow, let's see if I remember how to connect openocd and gdb to icarus21:16
olofk--enable-jtag-vpi ?21:20
stekernI need to pull stuff into my (messy) master branch it seems21:27
stekernjtag_vpi: Unable to find a `jtag_vpi.vpi' module on the search path21:30
stekernI get the same kind of feeling _franck_ had this morning...21:31
stekernaha! with a little --force it worked21:32
stekern...but the icarus uart is fake, isn't it?21:57
stekernhmm... I can't connect to the telnet server when trying with verilator22:10
stekernsomething wrong in my personal branch...22:46
--- Log closed Wed Jun 18 00:00:39 2014

Generated by 2.15.2 by Marius Gedminas - find it at!