--- Log opened Tue Jun 17 00:00:37 2014 | ||
stekern | ok... this 'works' now | 03:42 |
---|---|---|
stekern | where 'works = I get some output in the telnet window | 03:42 |
stekern | couple of problems: | 03:42 |
stekern | 1) it doesn't seem carriage return | 03:43 |
stekern | 2) the output is messed up (missing characters, double characters) | 03:45 |
stekern | 3) kernel crashes when using it | 03:45 |
stekern | 1 and 2 might be the same issue | 03:45 |
stekern | olofk: this time it actually wasn't the cache fault, it was opencores.org's fault for not being available to serve me adbg | 04:54 |
stekern | assign data_from_wb = wb_dat_i[31:24]; // Data to the FIFO | 05:07 |
stekern | that's not really wb spec compliant | 05:07 |
stekern | but it should work with mor1kx at least | 05:07 |
stekern | it should use bsel to pick out where the byte is | 05:08 |
stekern | ah, no that should actually always work | 05:10 |
stekern | since the reg is located there | 05:10 |
stekern | using bsel would make it endian agnostic though | 05:11 |
stekern | _franck_: I assume you tested this on the de1 board? | 05:39 |
stekern | huh... now I connected the irq back, and now it works... at least better | 05:56 |
stekern | of_serial: probe of 90000100.serial failed with error -22 | 05:58 |
stekern | but I get normal output up until that now | 05:58 |
stekern | ah, that was because I had removed the clock-freq from the dts entry as a test | 06:03 |
stekern | it's still skipping characters though | 06:03 |
stekern | http://pastie.org/9297885 | 06:05 |
_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 mode | 06: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 |
_franck__ | :) | 06:56 |
stekern | or you've got an spurious 'I' inserted before 'that' | 06:56 |
stekern | this *could* of course be a mor1kx bug too | 06:57 |
stekern | out of interrest, since you obviously already looked it up, where does it interpret -1 as 'poll-mode'? | 06:58 |
stekern | hmm, and how/where should I set that? | 06:59 |
_franck__ | in devicetree in your uart node ? | 07:01 |
stekern | Error: arch/openrisc/boot/dts/simple_smp.dts:61.17-18 syntax error | 07:01 |
_franck__ | http://lxr.free-electrons.com/source/drivers/tty/serial/8250/8250_core.c#L1267 | 07:02 |
_franck__ | http://lxr.free-electrons.com/source/drivers/tty/serial/8250/8250_core.c#L2092 | 07:02 |
_franck__ | at least I did this with a platform device.... | 07:03 |
_franck__ | "0" should be enough in the dts to make it poll | 07:06 |
stekern | not sure about that, I think that get translated | 07:06 |
stekern | commenting the interrupts line out might work though | 07:07 |
stekern | http://lxr.free-electrons.com/source/drivers/tty/serial/of_serial.c#L104 | 07:07 |
stekern | 90000100.serial: ttyS1 at MMIO 0x90000100 (irq = 0, base_baud = 3125000) is a 16550A | 07:08 |
stekern | but it's still not working right | 07:08 |
stekern | changing the type from 16550a to 16550 improves the situation | 07:13 |
stekern | output is all correct now, but I get some spurious character from input | 07:14 |
stekern | it's rediculously slow though, but that's probably a feature | 07:16 |
stekern | ah, that was due to the polling | 07:17 |
stekern | everytime I press enter, it will echo back a '?' | 07:25 |
stekern | ...and there's still occassional missing characters | 07:31 |
_franck__ | if you simply comment /*interrupts = <2>;*/ you got polling | 08:15 |
_franck__ | I confirm it works only in polling mode and it's slooow | 08:15 |
_franck__ | I didn't change ns16550a to ns16550 | 08:16 |
_franck__ | so, do we keep this in openocd ? | 08:16 |
stekern | yes, commenting it out gets polling, but I get the same problems with polling as without | 08: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 | |
stekern | why wouldn't we? | 08:17 |
stekern | I think there are issues, but they can be solved | 08:17 |
_franck__ | agree | 08:17 |
stekern | but 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 characters | 08:21 |
_franck__ | and a weird char after I press enter | 08:22 |
_franck__ | TAB key works | 08:22 |
-!- Netsplit *.net <-> *.split quits: wallento, poke53281, slp```, heroux, fotis2, mboehnert, hansfbaier | 08:33 | |
-!- Netsplit over, joins: heroux, hansfbaier, poke53281, wallento, slp```, mboehnert, fotis2 | 08:44 | |
stekern | yup, that's exactly what I see too | 08:45 |
stekern | the missing characters might be hard to debug, but the weird char after enter should be relatively easy | 08:46 |
stekern | and then we can just cross our fingers that fixing that will fix the missing chars too ;) | 08:46 |
stekern | dalias: minor feedback from my porting experience, would it be a disadvantage to have all the arch dependent stuff in arch/? | 08:58 |
stekern | I 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 0x92000000 | 09:54 |
olofk | wb_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 |
_franck__ | :) | 09:59 |
stekern | then when you're done with that, you've forgot where you started | 10:18 |
stekern | ...and while you try to remember, you see something and go *oh! shiny!" | 10:18 |
stekern | why 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 128MB | 10:24 |
stekern | yes, but isn't it easy to fix? just don't map it at 0x93000000 | 10:25 |
stekern | map it at 0x10000000 or something | 10:25 |
_franck_ | aren't we there to fix things ? :) But yes, you're right | 10:26 |
stekern | ah, well, I don't see how you'd fix that in a sensible way ;) | 10:26 |
stekern | or more, the restriction that the ranges you use have to be masks is pretty sensible | 10:29 |
wallento | stekern, I added another patch to the PR | 11:37 |
wallento | https://github.com/wallento/or1k-src/commit/770a4b0c9364fc346ad443e7b25f3038a3b0cbd6 | 11:37 |
wallento | weird that nobody noticed so far.. | 11:37 |
stekern | wallento: you have to condition that on or1200 (or mor1kx in or1200 pic compat mode) | 11:40 |
stekern | to elaborate, or1200 have a broken pic implementation, where you have to write a zero to picsr to clear the interrupt | 11:47 |
stekern | since 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 |
stekern | I've posted some patches for Linux to make it possible to use LEVEL or EDGE in a sensible way as well: https://lkml.org/lkml/2014/5/26/541 | 11:52 |
stekern | blueCmd: what kind of problems did you have with ipc? | 11:59 |
wallento | mmh, okay, shouldn't mor1kx rtl then default to compat mode also? | 12:02 |
wallento | or should I check VR at this point? | 12:05 |
wallento | how is it with or1ksim? | 12:10 |
blueCmd | stekern: it didn't work with qemu, it would just freeze on some syscalls | 12:39 |
blueCmd | I don't recall the details | 12:40 |
stekern | blueCmd: ok, that sounds unrelated to my current problem | 13:09 |
stekern | wallento: the default is level, isn't it? | 13:10 |
_franck__ | olofk: http://opencores.org/forum,OpenRISC,0,5499 | 15:36 |
_franck__ | you did run linux in simulation using the de0_nano, right ? | 15:37 |
stekern | you need a lot of tricks to run Linux in icarus simulations | 15: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 |
stekern | haha, seems plausible | 15:51 |
dalias | stekern, from a perspective of ppl reading the code, i think having it local to the functional component is highly preferable | 16:12 |
dalias | and having "long-range" implicit overrides of one file by another is very confusing | 16:12 |
dalias | at least this is a big point of confusing with the glibc source (sysdeps tree) | 16:12 |
dalias | confusion* | 16:12 |
stekern | yeah, I see that side of the coin too | 16:14 |
stekern | and yeah, glibc seems to do both... depending on the arch | 16:14 |
stekern | that's *really* confusing | 16:15 |
stekern | but 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 targets | 16:23 |
stekern | I guess you are right that the latter is more common and more important | 16:23 |
stekern | _franck_: how does that profiling stuff in openocd work? | 17:03 |
stekern | does it halt the cpu and then read spr_npc? | 17:03 |
_franck_ | that's what is does | 17:26 |
stekern | how often/many times does it do that? | 17:45 |
stekern | seems to me that you would need to run that over a fairly long period of time to get any useful data | 17:45 |
stekern | besides, stalling/unstalling the cpu of course have side effects that running the program normally don't have | 17:46 |
_franck_ | it does that as fast as it can. i.e: not fast | 17:56 |
olofk | Ah so opencores.org is back | 17:57 |
stekern | _franck_: yeah, that's what I figured, hence the need of a "fairly long period of time" ;) | 18:20 |
stekern | I'm trying understand what causes the difference in the mail from inigo | 18:21 |
olofk | How do you view the .out files? | 19:29 |
olofk | I can't find the _reset and or1k_dmu_disable at all in a kernel objdump. Did I misunderstand something? | 19:31 |
stekern | it's not from a kernel image | 19:34 |
stekern | it's from a small test program | 19:34 |
olofk | hmmm... those .out files attached are useless without the elf, aren't they? | 19:38 |
stekern | I just get this when I try to generate the .out: openocd: target.c:3562: write_gmon: Assertion `addressSpace >= 2' failed | 19:47 |
stekern | olofk: I like your way of doing it much more... | 19:59 |
stekern | why does it need to halt it btw? | 19:59 |
stekern | just read npc on fly, that would actually be a lot better | 20:00 |
_franck_ | my be that some arch cannot do that | 20:01 |
stekern | yeahm I do realise that | 20:01 |
_franck_ | so the patch fails when it generates the .out ? | 20:04 |
_franck_ | I'll try this tomorrow | 20:04 |
stekern | I don't know, might be mor1kx that isn't running properly when stalled/unstalled like that | 20:07 |
-!- Netsplit *.net <-> *.split quits: slp```, heroux, fotis2, mboehnert, ssvb | 20:19 | |
-!- Netsplit over, joins: heroux, ssvb, slp```, mboehnert, fotis2 | 20:20 | |
-!- Netsplit *.net <-> *.split quits: sb0, poke53281, vr5c | 20:24 | |
-!- Netsplit over, joins: sb0 | 20:33 | |
stekern | hmm... single stepping doesn't even work now | 20:42 |
olofk | stekern: My way? | 20:43 |
stekern | yes, running stuff in simulator and 'grepping' the stuff | 20:44 |
stekern | stuff'n'stuff | 20:44 |
olofk | You mean my combination of awk, sqlite and python? :) | 20:47 |
olofk | I dropped sqlite though | 20:47 |
olofk | But 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 large | 20:50 |
olofk | As integers I mean | 20:52 |
stekern | yeah, time and pc is useful | 20:53 |
olofk | But for statistic purposes it would probably make way more sense to do this in verilator. | 20:55 |
stekern | yes ;) | 20:56 |
olofk | stupid icarus. Not good for anything | 20:57 |
stekern | actually, for debugging debug stuff, it's pretty good | 21:14 |
stekern | because, if you enable vcd dump in verilator, it takes a minute and you have a 30 gig dump or something | 21:15 |
olofk | Ah true :) | 21:15 |
stekern | now, let's see if I remember how to connect openocd and gdb to icarus | 21:16 |
olofk | --enable-jtag-vpi ? | 21:20 |
stekern | I need to pull stuff into my (messy) master branch it seems | 21:27 |
stekern | jtag_vpi: Unable to find a `jtag_vpi.vpi' module on the search path | 21:30 |
stekern | I get the same kind of feeling _franck_ had this morning... | 21:31 |
stekern | aha! with a little --force it worked | 21:32 |
stekern | ...but the icarus uart is fake, isn't it? | 21:57 |
stekern | hmm... I can't connect to the telnet server when trying with verilator | 22:10 |
stekern | something wrong in my personal branch... | 22:46 |
--- Log closed Wed Jun 18 00:00:39 2014 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!