IRC logs for #openrisc Monday, 2013-07-22

--- Log opened Mon Jul 22 00:00:37 2013
poke53281This weekend I did no progress in running X.00:47
poke53281I followed a reproducible segmentation fault from an xclient to xserver->libXfont->zlib00:47
poke53281From here on I am lost.00:47
poke53281I made a full debug output including very many important pointers. Nothing.00:48
poke53281The same code runs several time without a problem in the same program.00:50
poke53281the pointers show all to valid addresses and are far away from any page boundaries while crashing.00:51
poke53281But it seems that my debug output changes the position of the crash point. So I think it is a instruction failure. But I don't get an exception for an instruction page fault.00:52
poke53281The whole X-server with libs and data uses a little bit less then 8MB in RAM.00:53
poke53281To get something like is pure luck:
poke53281One try out of ten.00:55
poke53281The segmentation fault address seems to be completely random00:58
poke53281My best guess is, that there is an error somewhere in the kernel page tables.01:01
poke53281Maybe there is some kernel stress program that I can run.01:02
poke53281Does somebody no if there is a Linux driver for the opencore ata host controller?02:28
stekernI didn't even know that there is an ata host controller02:37
stekernpoke53281: you know what I find the greatest asset when debugging hard bugs like that on openrisc02:41
stekernthe tracing functionality of or1ksim, especially with the possibility of turning it on off with l.nop 8 and l.nop 9 instructions02:41
stekernso, throwing in something similiar in jor1k might help you02:43
poke53281the problem is, that I have a 300MB disk image that I would like to run. I cannot put everything in the initramfs02:43
poke53281Yes, I can do something similar in jor1k, you are right02:45
stekern(if you haven't seen the trace output)02:45
poke53281I think I have seen it when I was debugging my emulator.02:46
stekernactually, the SR value doesn't normally show, that's something I've added in my or1ksim02:47
stekernbut you might not even need all that info to start with02:48
stekernjust the PC trace as a start might be sufficient02:48
stekernbut don't you already have ata emulation ongoing?02:50
poke53281I have my own. But I simply emulate a simple ata-device. or1ksim emulates a host controller.02:51
poke53281In principle it should be possible to just access the device. This is what I am trying since one hour.02:51
stekernah, you need it for or1ksim(?)02:52
poke53281For some strange reason I get bus errors on the wrong memory address.02:52
poke53281or1ksim emulates a complete host controller. jor1k emulates hust an ata-device.02:53
stekernyeah, got it02:54
poke53281        ata@9e000000  {02:54
poke53281                compatible = "ata-generic";02:54
poke53281                reg = <0x9e000040 0x3002:54
poke53281                       0x9e000078 0x100>;02:54
poke53281                pio-mode = <4>;02:54
poke53281                reg-shift = <2>;02:54
poke53281                interrupts = <15>;02:54
poke53281        };02:54
poke53281This is in my dts file02:54
poke53281the registry addresses should fit exactly the addresses the ata-device addresses of the host-controller.02:55
stekernI use a nfs for my 300+ Mb rootfs02:55
poke53281Yes, this is indeed one option02:55
stekernif you want to get video out on or1ksim, my old hack for that is in this:
poke53281no, not at the moment02:57
stekernok, but if/when you do ;)02:59
stekernI should really clean that up and get it applied to the main or1ksim repo03:00
stekernolofk promised to do that sometime ago though *poke, poke*03:00
stekernI think I found out what's the problem in my itlb reload now, my pagefaults from that aren't propagated properly into exceptions03:02
stekern...but that's not the root problem though, it's the reload happening right at the same time as an l.rfe03:11
poke53281maybe a delayed jump problem03:15
stekernyour's or mine?03:20
stekernl.rfe doesn't have delay slot03:21
-!- Netsplit *.net <-> *.split quits: X-Scale04:18
poke53281Yeah, at least got a reply from the ata-device. ATA uses registers of 1 byte length. or1ksim allows only word accesses04:26
stekernit got to be able to do byte accesses, since the uart uses that04:29
stekernbut maybe you are being ata specific?04:30
poke53281Linux uses byte accesses. And the devices in or1ksim have different slots for byte and word accesses.04:32
poke53281ATA registers have a length of 1 byte in the specification.04:33
poke53281But it is possible that the distance of these registers is word-aligned.04:33
poke53281Anyway, corrected it in or1ksim.04:33
stekernyeah, I wouldn't expect the more "exotic" peripherals in or1ksim to work out of the box04:36
stekernthe framebuffer peripheral was (and is still in main or1ksim repo) beyond broken04:38
-!- X-Scale` is now known as X-Scale04:39
poke53281I think you are right, the ata device seems to be broken. But it looks complete. Probably it was never tested with a real driver. I think, with two or three corrections it might work.05:17
poke53281My Framebuffer device emulation.05:38
poke53281There is not much to do I would say :)05:39
stekernthe one in or1ksim is only more complicated because it supports different modes and resolutions06:26
poke53281Well, these information are given in the other registers.06:36
poke53281But my framebuffer is fixed to one screen. So I don't need this information06:37
poke53281Perfect, ATA is doing his job. Can mount my image :)07:16
poke53281In principle easy. Just a few changes07:23
poke53281And even after I changed the tiimings it is considerable fast.07:24
poke53281To speed up or1ksim you should find the SCHED_ADD commands in the source and change the last arg to zero. That helps a lot07:25
stekernok, I'll take a look at that07:27
poke53281for example you can set in the ethernet device the constant RTX_RESCHED_PERIOD to zero07:29
poke53281SCHED_ADD (eth_controller_rx_clock, dat, 1);07:30
poke53281And in this line you can set it to zero I think. Or you can directly execute those commands.07:31
poke53281the UART_CLOCK_DIVIDER you can set to 1 for example.07:35
poke53281Tried to run the linux test project. ltp.sourceforge.net19:13
poke53281After 5 minutes run: Kernel PANIC :)19:13
poke53281But even the compilation is a small adventure. It shows very nicely what is missing19:15
stekernah,that sounds interesting!19:24
olofkpoke53281: Did I understand it correctly that you managed to get the ata stuff working in or1ksim?19:24
olofkI was wondering because bug 23 ( seems to indicate it's not working19:25
olofkWould be nice to close it or at least provide some more info19:25
olofkand stekern, it hurts when you poke me like that :)19:25
poke53281Yes, it is working. Run Linux with ata support with a ext2 image.  But the question is, what do you want. The Bug is simply solved. The syntax is a little bit wrong19:40
poke53281section ata19:40
poke53281  enabled = 119:40
poke53281  baseaddr = 0x9e00000019:40
poke53281  irq = 1519:40
poke53281  device = 019:40
poke53281    type = 119:40
poke53281    file = "ext2fsimage"19:40
poke53281  enddevice = 019:40
poke53281This is mine19:40
poke53281But the correction of the bug is not enough for running ATA under Linux.19:41
poke53281So question is, what do you want to do.19:42
poke53281If you just want to correct the bug then it is nothing else then changing one or two lines in the standard or1ksim.cfg file.19:43
poke53281anyway, I can think of publishing a full patch that enables ATA for Linux.19:52
olofkpoke53281: It's jeremybennett who filed the bug initially, so maybe he can provide more info on the failed parsing, but I would be fine with closing the bug with an updated sim.cfg22:00
olofkAnd getting a patch that makes it usable under linux sounds great22:01
--- Log closed Tue Jul 23 00:00:39 2013

Generated by 2.15.2 by Marius Gedminas - find it at!