IRC logs for #openrisc Wednesday, 2013-08-28

--- Log opened Wed Aug 28 00:00:31 2013
hansfbaierstekern: got your message from the log01:02
hansfbaierthanks01:03
hansfbaierwill try01:03
stekerngetting the right epcr for dbus error exceptions is going to be even harder with the storebuffer than I first anticipated...03:42
stekernbecause I'd need to not only the pc for each store in the storebuffer, but also information wether it's in a delay slot or not03:45
stekernmaybe it's better to just feed the delay slot information back into the lsu and just save the potential epcr in the storebuffer03:46
stekernor even better, just feed the potential epcr into the lsu and storebuffer04:46
hansfbaier_franck_: running the blinky04:58
hansfbaier2 leds light up04:58
hansfbaierbut then it jumps to nirvana04:58
hansfbaierreason:04:58
hansfbaierthe jump destination addrs get garbled somehow04:58
hansfbaierfor instance:04:59
hansfbaier 12c:   0f ff ff fe     l.bnf 124 <t1>04:59
hansfbaierThatis how it should be with label t1 on04:59
hansfbaier00000124 <t1>:04:59
hansfbaierbut in the gdb disassembly it looks like that:04:59
hansfbaier   0x0000012c <t1+8>:l.bnf 0xff83fffe05:00
hansfbaierdestination address garbled05:00
hansfbaierCould it be that sdram does not work correctly?05:00
hansfbaierBut if so the instructions could be garbled too, but they aren't05:00
hansfbaierstekern: any idea?05:00
stekernhansfbaier: hmm, the instruction us garbled isn't it?05:05
stekerns/us/us05:05
stekern*is05:05
hansfbaierstekern05:06
stekernman, I can't even write properly in my corrections..05:06
hansfbaierparts05:06
hansfbaieryes05:06
hansfbaierwait a moment send a screenshot05:06
knzhi all05:07
stekernif you've got timing problems, usually you'd get a result like that, some bits doesn't arrive in time05:08
hansfbaierhttp://i.imgur.com/wTBePBy.png05:08
stekernbut could of course be a bug somewhere too05:08
hansfbaierstekern: Yes that makes sense05:09
hansfbaierTimeQuest complains about some negative setup times05:09
knzsorry to disturb, small questions: 1) trying to build or1knd-gcc: which binutils should I get beforehand? 2) ork1nd = no delay branches, correct?05:09
hansfbaierunfortunately I don't know how to fix timing problems yet.....05:09
hansfbaierThe reading on timing constraints is a bit heavy and I don't know where to start05:09
hansfbaierstekern: could you give me any pointers?05:10
stekernhansfbaier: what board and memory controller are you using?05:10
hansfbaierOr maybe there is a set of constraints05:10
stekernknz: http://github.com/openrisc/or1k-src05:11
knzstekern: thx05:11
hansfbaierstekern: I use this board: http://www.wvshare.com/product/OpenEP4CE10-C-Standard.htm05:12
hansfbaierMemory is a H57V1262GTR05:12
hansfbaiermemory controller is wb_sdram_ctrl05:13
hansfbaierI modified the orpsoc de0_nano project05:13
hansfbaiersince it came pretty close to my setup05:13
hansfbaierbut I halved cpu data and isn caches to make it fit into the EP4CE1005:14
stekernknz: you can use the build instructions from here: http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Newlib_toolchain_.28or1k-elf.2905:14
stekernjust change the target to or1knd-elf05:14
hansfbaierstekern: I used this one so far: http://kevinmehall.net/openrisc/guide/05:15
hansfbaieris it outdated?05:15
knzthanks to both05:15
knzbut I won't do either05:15
knzI am targeting a barebones binutils+gcc install05:15
knzno libc, no sysroot05:15
hansfbaierstekern: sorry05:16
stekernknz: ah well, the instructions are still valid, sans the newlib05:16
hansfbaierthat post was to knx :]05:16
knzstekern: I just hope I can limit myself to the binutils in or1k-src05:17
knzthere's a lot of stuff there otherwise05:17
stekernknz: I usually just build the whole newlib thing, even though I have a couple of projects where I'm not using anything of newlib (i.e. bare-bare-metal)05:18
knziirc newlib assumes you have something of an OS to provide services, doesn't it?05:19
stekernno05:19
knzaha05:19
knzthen I might consider05:20
stekernit's a "baremetal" libc05:20
knzwell a "bare metal" libc that provides pthreads is an oxymoron05:20
stekern=)05:21
knzseriously, newlib is a bitch when you don't use linux headers05:21
stekernanyway, the way we are using it is kind of a convinence layer to build bare metal apps05:22
knzok05:22
stekernso basically you can just do 'or1k-elf-gcc a.c -o a' and load a to the board and you're ready05:23
knzfor the time being my use is for an architecture course and the students will not have the luxury of a libc05:23
stekernand startup code and friends is pulled in from newlib/libgloss05:23
knzhm05:24
stekernhansfbaier: ok, so I should be quite familiar with that, since I've been using the de0 nano alot, and I wrote that sdram controller05:24
knzany of you going at orconf?05:25
stekernhansfbaier: one thing that caused me problems was that the sdram clock phase had to be tweaked, otherwise problems as you are seeing would sometimes occur05:25
stekernknz: I am and olofk, _franck_, juliusb and jeremybennett at least too05:26
knzcool05:27
stekernknz: out of curiousity, at what institution are you giving the students the great benefit of working with or1k?05:28
knzhehe :)05:28
knztwo of them05:28
knzuniversity of amsterdam & university of leiden05:29
knzthey got MIPS last year, and this year I wanted something different05:29
hansfbaierstekern: Thanks. There is one PLL in the design. Am I able to do it there or will I need to insert another PLL?05:29
knzplus, if I'm happy with the docs & tool chain I might use it in my research05:29
knzactually05:30
hansfbaierstekern: Ah I see05:30
hansfbaierit is that one PLL05:30
hansfbaierit is c005:31
stekernhansfbaier: yes, and there are some phase parameters in there. and they are usually board specific05:31
hansfbaierclock phase shift in ns05:33
stekernknz: cool, as a learning aid I think or1k is very well suited and similiar to MIPS, but with the added benefit of a lot more transparency (and open source implementations available)05:33
knzother practical question: any affordable dev boards that run or1k?05:33
hansfbaierstekern: Here it says phase shift: requested settings: -1.81ns, actual settings -1.7505:33
hansfbaierstekern: How would I proceed here....05:33
stekernhansfbaier: as a test, try to connect the sdram clock to the wb clock05:34
hansfbaierstekern: lower the requested settings?05:34
hansfbaierwb clock is much slower?05:34
hansfbaierlooks like sdram is 2x the main clock05:34
stekernthe default settings for de0 nano is 50 MHz for wb and 100 MHz for sdram05:35
knzok I'm changing desks, ttyl05:35
stekernknz: the de0 nano board is pretty affordable and used a lot05:35
stekernhansfbaier: for more information about the actual phase shifting, look at this commit where I added that: http://git.openrisc.net/cgit.cgi/stefan/orpsoc/commit/?id=192293d3ea08ebb826583d013ef2c67e7d7980f705:37
stekernthere are links to some altera documentation regarding how you should decide on the value of it05:38
stekernbut try using the wb clock first05:39
hansfbaierstekern: Great! Thanks a lot....05:41
stekernhansfbaier: and to take a step back, where did you have those timing failures?05:43
hansfbaierstekern: where in which context?05:45
hansfbaierstekern: in altera timequest analyzer, I had a couple of complaints05:45
hansfbaierabout negative slack times related to the sdram controller05:46
hansfbaierstekern: wait for screenshot05:46
hansfbaierstekern: screenshot not coming, just compiling with sdram clock connected to wb clock05:46
stekernheh, ok. so perhaps the phase is ok, but the timing constraints isn't met for the 100 MHZ clock05:48
stekernwe can hope that reducing that clk freq by /2 will make those disappear too05:49
hansfbaierstekern: with sdram clock connected to wb clock05:52
hansfbaierI get different timing errors in timequest related to altsyncram, not sdram anymore05:53
hansfbaierless is garbled05:53
hansfbaierbut the address pointers of absolute jumps05:53
hansfbaierstekern: or maybe I try go back to 100MHz and shift the phase like in the diff, let me try that05:54
stekernhmm, didn't you have the phase shift as in the diff?05:57
hansfbaierstekern: Yes it was already in my code05:58
hansfbaierbut I used -1900 instead of -1807 now05:58
hansfbaierstekern: kindof blind shoot-in-the-bush approach05:59
stekernbut the timing errors sounds worrying, exactly what altsyncram is it complaining about05:59
hansfbaierstekern: sorry compiling again with -1900,05:59
hansfbaierwill send the report05:59
stekernyeah, no problem, I'm in no hurry05:59
hansfbaierstekern: we need to adjust our phase shift haha06:00
hansfbaierstekern: Thanks for your patience and kindness06:00
stekernbut I'd leave the sdram clock connected to the wb clock, that should at least be pretty safe and you avoid the CDC between the clocks (which *should* be handled properly in the memory controller, I've put effort into that, but taking away possible errro producing variables is always good)06:02
stekernand the second thing to try is to reduce the wb clock, just to get rid of the timing errors06:03
stekernif that works, then you can be pretty sure that your problems are caused by the timing errors and we can start looking into if/how they can be fixed06:04
hansfbaierstekern: https://dl.dropboxusercontent.com/u/3377727/orpsoc-TimeQuest%20Timing%20Analyzer.rpt06:08
hansfbaierstekern: If I connect sdram clock to wb clock I need to set the frequency parameter of the sd controller to 50MHz (or whatever), right?06:09
hansfbaierstekern: What would be the most elegant way to connect the wb to sdram clk, I did it with an assign in the pll module06:10
hansfbaierstekern: or would be top better?06:10
stekernhansfbaier: yes, the frequency parameter should be adjusted06:31
stekernbut as long as you're not clocking it faster than what you state there, it shouldn't brake it if you don't change it06:31
stekernit will just do the refreshes more often06:32
stekernumm, no, scratch that.. I've got my logic turned the wrong way around...06:33
stekern... so let's just say, "yes, you need to adjust the parameter"06:34
stekern=)06:34
hansfbaierstekern: Ok now I'm compiling the whole design for 25MHz06:34
hansfbaierchanged the divider on c1 to 206:34
hansfbaierand06:35
hansfbaierassign sdram_clk_o = wb_clk_o;06:35
hansfbaierin clkgen.v06:35
stekernyes, that is the "cleanest" place to do that I think06:35
hansfbaierstekern: great, thanks06:36
hansfbaierWarning (15064): PLL "clkgen:clkgen0|pll:pll0|altpll:altpll_component|pll_altpll:auto_generated|pll1" output port clk[1] feeds output pin "sdram_clk_pad_o~output" via non-dedicated routing -- jitter performance depends on switching rate of other design elements. Use PLL dedicated clock outputs to ensure jitter performance06:36
hansfbaierOr better use clk0 and clk1 separately, but with identical settings?06:37
stekernyeah, I know, but lets ignore that for now06:37
hansfbaierstekern: now the timing errors are gone06:43
hansfbaierbut06:43
hansfbaierit says Fmax is 36.36 MHz06:44
hansfbaieron clkgen0|pll0|altpll_component|auto_generated|pll1|clk[1]06:44
hansfbaierI don't really know how i should read this. The oscillator which feeds sysclk_pad_i06:45
hansfbaierruns 50MHz06:45
stekernmmm... and you divided that by 2, to get the 25 MHz clock, right?06:46
stekernthe Fmax is just an indication on how fast you *could* clock your design06:46
hansfbaierstekern: http://i.imgur.com/hRM3D3x.png06:47
stekernand now it is > than what you *are* clocking it, which means you're fine06:47
hansfbaierstekern: ok that's what I thought06:47
hansfbaiergreat06:47
hansfbaierthanks06:47
hansfbaierthe code seems to be fine right now06:47
stekernyup06:47
hansfbaierbut the addresses of the jumps goes nowhere06:47
hansfbaierthat's weird06:48
hansfbaierstekern: saw the screenshot?06:48
stekernyes06:48
stekerngoes nowhere? what do you mean?06:48
hansfbaierl.bnf 0xfffffffe06:49
hansfbaiervs l.bnf 124 <t1>06:49
hansfbaierwhich should be equivalent to:06:49
hansfbaierl.bnf 12406:49
hansfbaierbut it's 0xfffffffe06:50
hansfbaierweird06:50
stekernah, no, that's all fine06:50
hansfbaierstekern: really/06:50
hansfbaier?06:50
hansfbaierHow so?06:50
hansfbaierRTFM06:50
stekernthe branches use relative addresses (relative to the current pc)06:50
hansfbaier?06:50
hansfbaieraaaah negative06:50
hansfbaierI see06:50
stekernso what's encoded in the instruction is just a -8 offset06:51
hansfbaierstekern: yes, thats ok06:51
stekernyup06:51
hansfbaiercool06:51
hansfbaierlet's run this baby06:51
stekernlet's ;)06:52
hansfbaierstekern: ok fine06:53
hansfbaiernow the PC doesn't go into outer space any more06:53
hansfbaierstekern: weird thing, the LEDs don't light up anymore grrrr06:53
stekern:(06:54
hansfbaierstekern: before the LEDs lit before it jumped into outer space06:54
hansfbaierhmmmm06:54
hansfbaierwhat could it be...06:54
stekernoh, I might know06:57
hansfbaierstekern: you have my undivided attention06:57
hansfbaierstekern: are you german BTW?06:58
stekernno, I'm swedish, but currently living in finland06:59
hansfbaierstekern: ah I am german living in indonesia :)07:00
stekernin <board-path>/rtl/verilog/gpio/gpio.v change this row: gpio_dir[7:0] <= ~wb_dat_i; to: gpio_dir[7:0] <= wb_dat_i;07:00
stekernthat's a workaround for a bug in a linux driver, it shouldn't be there in the rtl, it should be fixed in the driver07:01
stekernI have a fix for that in my working dir that I need to push, but I've made some other changes to how the direction logic works (removed the 'inout') and I'll need to adapt to all other boards before I can push that07:03
_franck_hansfbaier: great to here your are making progress07:04
hansfbaier_franck_: Yes, with a lot of handholding.... Thanks so much guys07:05
hansfbaierI'll try to be brave and try boot linux now hehe07:05
hansfbaierwhile the synthesizer runs07:05
stekernhansfbaier: remember to change the clock frequency in the device tree configuration file then07:07
hansfbaierstekern: good idea :)07:07
hansfbaierWOOOOOOOOOOOOOOT!07:10
hansfbaierthe LEDs blink07:10
hansfbaierawesome!!!!07:10
_franck_welcome to the openrisc world !07:11
hansfbaierTHANKS a lot!07:11
hansfbaierTHE LINUX KERNEL BOOTS07:13
stekernyup, in the openrisc world blinking with leds is our greatest satisfaction!07:13
hansfbaierCompiled-in FDT at c026584007:13
hansfbaierLinux version 3.4.0 (jack@jack-desktop) (gcc version 4.5.1-or32-1.0rc4 (GCC) ) #3 Wed Aug 28 14:10:53 WIT 201307:13
hansfbaierCPU: OpenRISC-12 (revision 8) @25 MHz07:13
hansfbaier-- dcache: 8192 bytes total, 16 bytes/line, 1 way(s)07:13
hansfbaier-- icache: 8192 bytes total, 16 bytes/line, 1 way(s)07:13
hansfbaier-- dmmu:   64 entries, 1 way(s)07:13
hansfbaier-- immu:   64 entries, 1 way(s)07:13
hansfbaier...07:13
stekerncool!07:13
hansfbaierThanks a lot!07:14
hansfbaierYour patience with me was extraordinary07:14
_franck_you can now run barebox and add a lot of drivers in there ;)07:15
hansfbaierMay thanks07:15
hansfbaier_franck_: barebox is a bootmanager, right?07:15
_franck_it's like uboot07:16
stekernhansfbaier: you know how to ask questions without straining peoples patience, that helps a lot07:16
_franck_kind of an uboot v207:16
hansfbaierstekern: thanks for the kind words07:16
hansfbaierI try to be the 'minimally dump' newbie07:16
hansfbaiers/dump/dumb/07:16
hansfbaierI know spare time is precious07:17
hansfbaiernevertheless07:17
hansfbaieryour effort was out of the ordinary07:17
_franck_during my dayjob I have more spare time than at night sometime ;)07:17
hansfbaierquestion: Is linux supposed to start a shell or something07:17
hansfbaierjust seems to hang there07:18
_franck_how did you get cpuinfo ? Not using a shell ?07:19
stekern_franck_: that's what it spits out during boot07:20
hansfbaierJust the bootmessages from the serial07:20
_franck_ah ok, sorry07:20
hansfbaiermaybe I have too little memory07:20
stekernhansfbaier: where does it hang? i.e., what's the last message?07:20
stekernhow much memory do you have?07:21
stekern(i probably could find out from the part nr you gave me, but it's easier to ask)07:21
hansfbaierhttp://pastebin.com/r99Jh5Nq07:22
hansfbaier128MBit07:23
hansfbaierThat would be 16MB07:23
hansfbaiershould be enough07:23
hansfbaierI started using linux on a 386SX with 4MB RAM07:23
stekernhmm, yes, that should be enough07:23
stekernheh, yes, but you can't make that analogy, linux has became "bloated" since then07:24
stekernI think you should be able to go down to 8MB, but 16MB should be enough07:25
stekernhow large is your vmlinux?07:25
stekern...and if you break with gdb, what is it doing when it's frozen?07:28
hansfbaiervmlinux is 475905407:30
hansfbaiershould be alright07:30
hansfbaierMemory: 12368k/16384k available (2054k kernel code, 4016k reserved, 299k data, 1416k init, 0k highmem)07:37
hansfbaiermem_init_done ...........................................07:37
hansfbaierUnpacking initramfs07:37
hansfbaierSerial: 8250/16550 driver, 4 ports, IRQ sharing disabled07:37
hansfbaier90000000.serial: ttyS0 at MMIO 0x90000000 (irq = 2) is a 16550A07:37
hansfbaierconsole [ttyS0] enabled, bootconsole disabled07:37
hansfbaierconsole [ttyS0] enabled, bootconsole disabled07:37
hansfbaierNET: Registered protocol family 1707:37
hansfbaierFreeing unused kernel memory: 1416k freed07:37
hansfbaierweird07:37
hansfbaierbut bootconsole = ttyS0????07:38
hansfbaierlooks like a linux config problem...07:38
stekernnah, that seems fine07:38
hansfbaierstekern: hmmm but where would my shell prompt be...??07:39
hansfbaierI only have one uart07:40
stekernah, it's that one07:40
_franck_ah, the bug hno found07:41
_franck_?07:41
stekernyes, but that's not yet introduced in the kernel he is using07:41
hansfbaierit's looping somewhere around 0x000f60b007:43
stekernweird07:43
hansfbaierlinux$ git pull07:44
hansfbaierremote: Counting objects: 95830, done.07:44
hansfbaierremote: Compressing objects: 100% (12968/12968), done.07:44
hansfbaierthat's quite a bunch of patches07:44
hansfbaierlet's see if it fixes something07:44
_franck_https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=258a9fd17b92552637bc74776c11737e0472dc8607:45
_franck_but your seem ok07:45
enghongdu coup, 100M, c'est un peu violent, mais bon :)07:45
enghongoups, sorry :)07:45
stekernthis is what you would expect to see after your output: http://pastie.org/827642407:46
hansfbaierhaha, the linux kernel does not like the LED blinky being flashed to RAM while it is running.07:46
stekernpresumably not =) but how do you even do that?07:47
hansfbaierstekern: used the download script from tcl-tools07:48
hansfbaierI thought that would reset the machine, but no....07:48
hansfbaierbehaved funny the linux kernel haha07:49
stekernoh, of course, I thought you were using gdb07:49
hansfbaierKernel panic - not syncing: Attempted to kill init! exitcode=0x0000000707:49
hansfbaierUnable to handle kernel NULL pointer dereference at virtual address 0x0000010007:49
hansfbaierOops#: 000007:49
hansfbaiereven then impressive it still manages to get the message out to serial07:49
stekernyeah, that's funny. so what happened was that the loader script tried to jump to 0x100, but the mmu is turned on so a tlb miss will occur when the fetch from that address is performed07:51
stekernand the kernel will scream and shout when it doesn't find a valid mapping for that address07:52
stekernthat's why I always do the spr sr 0x1 in gdb, that will turn off mmu's, caches and interrupts07:53
stekernpresumably that can be added to the loader script as well07:54
_franck_stekern: if I can remember how it works ;)07:54
stekern=)07:55
hansfbaierstekern: After I pulled the fix is already in there, so let's compile the kernel...07:55
stekernwhere did you pull from and what was your starting point?08:07
hansfbaierstekern: [submodule "linux"]08:11
hansfbaierurl = git://openrisc.net/jonas/linux08:11
hansfbaierstekern: one weird thing is, when I try to start linux inside gdb like you wrote: spr sr 1; spr npc 0x100; c08:14
hansfbaierwon't work08:14
hansfbaierbut when I input those commands08:14
hansfbaierone by one without semicolon it works08:14
hansfbaiergdb bug?08:14
hansfbaierLooks like the spr command does not like the semicolons08:15
hansfbaiergrr after the pull and recompile the kernel won't boot anymore08:24
hansfbaiermaybe I need to pull everything the whole toolchain08:24
hansfbaierstekern: _franck_: which tag should I use08:30
hansfbaieris head ok?08:30
_franck_don't know08:31
hansfbaier_franck_: what baudrate to use for serial08:34
hansfbaieron barebox?08:34
hansfbaierspits out garbage08:34
hansfbaieron 11520008:34
hansfbaieraah need to adapt clock freq08:34
hansfbaierBingo08:37
hansfbaierbut hangs08:37
hansfbaier$ miniterm.py /dev/ttyUSB0 11520008:37
hansfbaier--- Miniterm on /dev/ttyUSB0: 115200,8,N,1 ---08:37
hansfbaier--- Quit: Ctrl+]  |  Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---08:37
hansfbaierbarebox 2013.08.0-00167-g14ac2e4-dirty #2 Wed Aug 28 15:36:20 WIT 201308:37
hansfbaierBoard: or1k08:37
stekernhansfbaier: ah, sorry, I was just lazy and delimited each command row by ';'08:44
stekernthey were indeed meant to be entered seperately08:45
stekernand master from jonas repo should be fine, I've booted that on de0 nano08:48
hansfbaierstekern: git://openrisc.net/stefan/orpsoc08:52
hansfbaierthat's yours08:52
stekernmmm08:52
hansfbaierthis is orpsocv3,right?08:52
stekernno, it's orpsocv208:52
hansfbaierah08:52
hansfbaierok08:52
hansfbaierstekern: weird, just hangs08:53
hansfbaierlinux that is08:53
hansfbaiergrrr08:53
hansfbaierregression08:53
stekernare you sure it's not just the gdb loading that acts up, it can be a bit tempramental sometimes08:54
hansfbaiermaybe08:55
hansfbaierhe's getting tired08:55
stekernusually, the best way to ensure that it succeeds is to: de-attach gdb and and openocd, reset the board (or reprogram it) attach openocd and gdb08:56
stekernand then load08:56
hansfbaierstekern: ah08:58
hansfbaierstekern: thanks08:58
* hansfbaier blinks some LEDs while kernel compiles to refresh his mind08:58
hansfbaierstekern: you were right09:02
hansfbaierboots again09:02
hansfbaierbut still hangs :-|09:02
hansfbaierahhhh09:04
* hansfbaier messed up his Linux USB stack need reboot :{09:10
hansfbaierstekern: Kernel command line: console=uart,mmio,0x90000000,11520009:25
hansfbaierEarly serial console at MMIO 0x90000000 (options '115200')09:25
hansfbaierstill hangs :[09:26
hansfbaierI probably should call it a day09:27
stekernthat miniterm.py seemed so nice that I had to give it a go =)09:27
stekernI don't like minicom, and screen is good, but a pain when you use it inside another screen09:28
stekernbut, it seems like it's somewhere in init that you freeze... hard to say what cause that09:29
stekernpossibly still some hardware issue09:29
hansfbaierstekern: when I break09:35
hansfbaierI only get disassembly09:35
hansfbaieraren't I supposed to get source code?09:35
hansfbaierlist just returns09:35
hansfbaierthe beginning of the source09:36
hansfbaiermabe this helps: http://elinux.org/Debugging_The_Linux_Kernel_Using_Gdb09:36
hansfbaierah might have to enable compiling with debug info09:37
stekernthat and you have to do: file vmlinux09:38
stekernI hardly use that though, I just check where it breaks and then run obdjump -d vmlinux manually09:38
hansfbaiergot it09:38
hansfbaierah09:39
hansfbaiergood to know09:39
stekernand then just grep the source for the function that indicates09:39
stekernbut perhaps I just have masochistic tendencies ;)09:41
hansfbaiernfs3_rpc_wrapper.clone.809:41
hansfbaierNFS3????09:42
stekernhumm, exactly: ???09:42
hansfbaierwrong09:42
hansfbaierwait09:42
hansfbaierno correct09:43
hansfbaierweird09:43
hansfbaiermaybe try to disable NFS3 in kernel.09:43
hansfbaierOr might have been a wild jump09:43
hansfbaier(gdb) bt09:44
hansfbaier#0  0x000f60b4 in ?? ()09:44
hansfbaier#1  0x000f60b4 in ?? ()09:44
hansfbaierBacktrace stopped: previous frame identical to this frame (corrupt stack?)09:44
hansfbaierthat's looks suspicious09:44
stekernif you do spr info sys, what does r9 say?09:45
_franck_you should try to disable icache and dcache. I had some hanging problem we fixed here: http://git.openrisc.net/cgit.cgi/stefan/orpsoc/commit/?id=7ccad7e1c122b7289c3a361059b4a4f3438da6e909:47
_franck_I didn't have those problems with caches disabled09:47
hansfbaier(gdb) spr info sys09:48
hansfbaierGroup or register name not recognized.09:48
hansfbaierr9             0x108ad4108411609:48
hansfbaierinfo reg09:48
_franck_stekern: FYI "spr info sys" is be deprecated in or1k-elf-gdb (because of openocd). That will be "info registers system"09:49
stekernyes, sorry: info spr sys09:50
stekernI always forget the order of those09:50
stekernanyways, waht do you have at 0x108ad4?09:52
hansfbaierWeird, I wonder why NFS client support is enabled in the kernel09:54
hansfbaierthrew it out09:54
hansfbaier18 80 c0 21     l.movhi r4,0xc02109:55
hansfbaierbelongs to <kobject_uevent_env>09:56
stekernI think jonas used to mount the rootfs over nfs at some point in the history, probably a reminiscent of that09:56
hansfbaieridentical to objdump09:56
stekernok, what do you have at 0x108ad4 - 809:57
stekernbecause that's presumably the wild jump source09:57
stekernnot sure if this is going to lead us anywhere, but it's usually good to have some clue about what's happening09:58
hansfbaierstekern: In gdb or objdump?09:58
hansfbaiergdb i assume09:58
hansfbaierwait need to reboot09:59
hansfbaierwrecked the linux usb stack again09:59
hansfbaierc0108ac4:       a4 84 00 01     l.andi r4,r4,0x109:59
hansfbaierc0108ac8:       9c 60 00 0c     l.addi r3,r0,0xc09:59
hansfbaierc0108acc:       d4 02 18 34     l.sw 0x34(r2),r309:59
hansfbaierc0108ad0:       84 8e 00 00     l.lwz r4,0x0(r14)09:59
hansfbaierc0108ad4:       a4 84 00 01     l.andi r4,r4,0x109:59
hansfbaierobjdump09:59
hansfbaier                                         ^09:59
stekernhumm, why does that differ from 18 80 c0 21     l.movhi r4,0xc021?10:07
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b4 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b0 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b4 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b0 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b4 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b0 in ?? ()10:08
hansfbaier(gdb) nexti10:08
hansfbaier0x000f60b4 in ?? ()10:08
hansfbaiersame behavior10:08
hansfbaiertotally different instructions (NFS disabled)10:09
hansfbaierlooks like a hardware bug10:09
hansfbaierwill try now with caches disabled10:09
stekernyeah, that's a good idea10:09
hansfbaier=> 0x000f60b0:l.jal 0x3086910:09
hansfbaier   0x000f60b4:l.addi r3,r3,0x36010:09
hansfbaier   0x000f60b8:l.jal 0x3107910:09
hansfbaier   0x000f60bc:l.nop 0x010:09
hansfbaiersame thing with caches disabled :(10:13
hansfbaiersame address10:13
hansfbaiergrrrr10:13
hansfbaierat least it is deterministic10:13
hansfbaierCPU: OpenRISC-12 (revision 8) @25 MHz10:14
hansfbaier-- dcache: 8192 bytes total, 16 bytes/line, 1 way(s)10:14
hansfbaier-- icache: 8192 bytes total, 16 bytes/line, 1 way(s)10:14
hansfbaierwait doesn't look like that.10:14
hansfbaierweird.10:14
stekernhow did you disable them?10:14
stekernyou have to do that in the or1200-defines.v file10:14
hansfbaieryes I thought I did10:14
hansfbaierwait10:14
stekern(and in the right place)10:14
stekernit's a bit messy, something we are doing better in mor1kx ;)10:15
hansfbaier`define OR1200_NO_DC10:15
hansfbaier`define OR1200_NO_IC10:15
hansfbaierbut10:16
hansfbaieralso10:16
hansfbaier`define OR1200_IC_1W_8KB10:16
hansfbaier`define OR1200_DC_1W_8KB10:16
hansfbaiermaybe I have to comment the latter two10:16
hansfbaieraaaa10:16
hansfbaierthat was in ASIC10:16
hansfbaierstekern: now it gives me lots of compile errors10:19
hansfbaierI commented `define OR1200_IC_1W_8KB10:19
hansfbaieretc10:19
hansfbaiershouldn't I?10:19
stekernno, just uncomment the  OR1200_NO_xC10:20
stekernfor FPGA10:20
hansfbaierok10:20
hansfbaierCPU: OpenRISC-12 (revision 8) @25 MHz10:28
hansfbaier-- dcache disabled10:28
hansfbaier-- icache disabled10:28
hansfbaierstill hangs10:28
hansfbaiergrrrrrr10:28
hansfbaierbut on a different address now10:28
hansfbaierfunction __lshrdi310:30
hansfbaierstekern, _franck_: ^10:30
hansfbaierbut same behavior:10:31
hansfbaier(gdb) nexti10:31
hansfbaier0x000ea740 in ?? ()10:31
hansfbaier(gdb)10:31
hansfbaier0x000ea744 in ?? ()10:31
hansfbaier(gdb)10:31
hansfbaier0x000ea740 in ?? ()10:31
hansfbaier(gdb)10:31
hansfbaier0x000ea744 in ?? ()10:31
hansfbaier(gdb)10:31
hansfbaier0x000ea740 in ?? ()10:31
hansfbaier(gdb)10:31
hansfbaierweird10:31
hansfbaierSo I'd call it a day now10:31
hansfbaieror I'll get family problems :)10:31
hansfbaierAnyway, thanks a LOT10:31
* hansfbaier blinks some LEDs for enjoyment10:31
stekern=)10:32
stekernnext step would be to attach signaltap and look at some waveforms from the failure10:32
hansfbaierstekern: Will have to read up on signaltap10:32
hansfbaieris that the altera logic analyzer?10:33
stekernyes10:33
hansfbaierstekern: recommended readings?10:33
hansfbaierwill google10:33
stekernit's pretty straight forward, open it up and play with it from quartus10:34
stekernyour biggest problem will be that it will hog your usb-blaster port10:34
hansfbaier_franck_: barebox also hans10:34
hansfbaierhangs10:34
hansfbaierYes, already put that into its own roothub10:35
hansfbaierYes, I will put it into ...10:35
hansfbaierstekern: Which nodes to inspect?10:38
stekernhmm, it was quite a long time since I looked inside or1200, I'm more familiar with mor1kx, but the execute pc would be a good candidate to just get a nice trace of instruction flow10:39
stekern...that's another thing you could try, swap in mor1kx for or120010:42
hansfbaierstekern: Ok I've got to call it a day now.10:43
hansfbaiertimeout10:43
hansfbaierMany thanks!10:43
knzsuccess: got my or1knd toolchain running12:13
stekernknz: yay!12:18
knzhmm12:22
knzsmall practical quesiton, is the standard ABI in the reference manual?12:22
knzyeah, found it12:22
knzother question: what are the .cfi_* directives for?12:27
knz(to the point: can I strip them away from my gcc-generated, hand-modified assembly?)12:28
knznever mind (exception handling)12:39
stekernknz, yeah exception handling (as in c++) exceptions14:20
stekernyou can safely strip them for your purposes I'd say14:21
knzyes I did14:21
knzI am surprise that they are still generaed when I compile with -fno-exceptions14:21
knz+d14:21
stekernblueCmd is our cfi guru, maybe he has some insight on that14:26
olofkJesus christ. That was the busiest backlog I have read in ages14:28
stekernbut -fno-asynchronous-unwind-tables should prevent them at least14:29
stekernolofk: great isn't it ;)14:30
olofkYep. Every new face in the channel is a possible future code generator :)14:31
blueCmdknz: they are used for other things than exceptions IIRC14:31
blueCmdbeen a while since I did things with cfi, but stekern's -fno-asynchronous-unwind-tables is what I used to remove them IIRC14:31
blueCmdlibc uses them all the time, I think one can use them to get stack traces and stuff like that14:34
olofkstekern: If I have understood things correctly, the mem model doesn't precharge because cas is low. Is precharge something that is normally done first?14:44
knzblueCmd: many thanks14:45
stekernolofk: I don't remember the details, but I don't think I did that sequence randomly14:47
olofkAh. I had a very long powerup_delay set14:47
olofkWhat's that for anyway?14:47
stekernthe chips need that, but I don't think the models care, so you can reduce that14:48
olofkWouldn't the same effect be achieved by delaying the reset release?14:49
stekernbasically yes, but the same logic would be needed to hold the reset line, so it can as well be explicit14:55
olofkstekern: I found the problem. I inverted ras, cas and we, as the were named *_n in the model19:46
olofkbtw, WB_PORTS=1 doesn't seem to work19:47
olofkStill having some trouble though. Are bursts required to be of a certain length?20:34
olofkHmm.. I'm getting acks without valid data from wb_sdram_ctrl20:53
olofkAhh.. might be because I'm doing writes :)20:54
_franck_hope this time my openocd patch will pass the review stage...20:55
_franck_so I can focus on orpsocv320:55
olofk_franck_: Yeah, I hope so too. Both for openocd and orpsocv321:27
--- Log closed Thu Aug 29 00:00:32 2013

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