--- Log opened Mon Jul 22 00:00:37 2013 | ||
poke53281 | great | 00:43 |
---|---|---|
poke53281 | This weekend I did no progress in running X. | 00:47 |
poke53281 | I followed a reproducible segmentation fault from an xclient to xserver->libXfont->zlib | 00:47 |
poke53281 | From here on I am lost. | 00:47 |
poke53281 | I made a full debug output including very many important pointers. Nothing. | 00:48 |
poke53281 | The same code runs several time without a problem in the same program. | 00:50 |
poke53281 | the pointers show all to valid addresses and are far away from any page boundaries while crashing. | 00:51 |
poke53281 | But 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 |
poke53281 | The whole X-server with libs and data uses a little bit less then 8MB in RAM. | 00:53 |
poke53281 | To get something like is pure luck: http://www.simulationcorner.net/opencore4/X11.png | 00:54 |
poke53281 | One try out of ten. | 00:55 |
poke53281 | The segmentation fault address seems to be completely random | 00:58 |
poke53281 | My best guess is, that there is an error somewhere in the kernel page tables. | 01:01 |
poke53281 | Maybe there is some kernel stress program that I can run. | 01:02 |
poke53281 | Does somebody no if there is a Linux driver for the opencore ata host controller? | 02:28 |
poke53281 | s/no/know/ | 02:28 |
stekern | I didn't even know that there is an ata host controller | 02:37 |
stekern | poke53281: you know what I find the greatest asset when debugging hard bugs like that on openrisc | 02:41 |
stekern | the tracing functionality of or1ksim, especially with the possibility of turning it on off with l.nop 8 and l.nop 9 instructions | 02:41 |
stekern | so, throwing in something similiar in jor1k might help you | 02:43 |
poke53281 | the problem is, that I have a 300MB disk image that I would like to run. I cannot put everything in the initramfs | 02:43 |
poke53281 | Yes, I can do something similar in jor1k, you are right | 02:45 |
stekern | http://pastie.org/8162768 | 02:45 |
stekern | (if you haven't seen the trace output) | 02:45 |
poke53281 | I think I have seen it when I was debugging my emulator. | 02:46 |
stekern | actually, the SR value doesn't normally show, that's something I've added in my or1ksim | 02:47 |
stekern | but you might not even need all that info to start with | 02:48 |
stekern | just the PC trace as a start might be sufficient | 02:48 |
poke53281 | http://opencores.org/websvn,filedetails?repname=openrisc&path=%2Fopenrisc%2Ftrunk%2For1ksim%2Fperipheral%2Fatahost.h | 02:48 |
stekern | but don't you already have ata emulation ongoing? | 02:50 |
poke53281 | I have my own. But I simply emulate a simple ata-device. or1ksim emulates a host controller. | 02:51 |
poke53281 | In principle it should be possible to just access the device. This is what I am trying since one hour. | 02:51 |
stekern | ah, you need it for or1ksim(?) | 02:52 |
poke53281 | Yes | 02:52 |
poke53281 | For some strange reason I get bus errors on the wrong memory address. | 02:52 |
poke53281 | or1ksim emulates a complete host controller. jor1k emulates hust an ata-device. | 02:53 |
poke53281 | ...just... | 02:53 |
stekern | yeah, got it | 02:54 |
poke53281 | ata@9e000000 { | 02:54 |
poke53281 | compatible = "ata-generic"; | 02:54 |
poke53281 | reg = <0x9e000040 0x30 | 02: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 |
poke53281 | This is in my dts file | 02:54 |
poke53281 | the registry addresses should fit exactly the addresses the ata-device addresses of the host-controller. | 02:55 |
stekern | I use a nfs for my 300+ Mb rootfs | 02:55 |
poke53281 | Yes, this is indeed one option | 02:55 |
stekern | -a | 02:55 |
stekern | if you want to get video out on or1ksim, my old hack for that is in this: http://git.openrisc.net/cgit.cgi/stefan/or1ksim/ | 02:56 |
stekern | s/on/in | 02:57 |
poke53281 | no, not at the moment | 02:57 |
stekern | ok, but if/when you do ;) | 02:59 |
stekern | I should really clean that up and get it applied to the main or1ksim repo | 03:00 |
stekern | olofk promised to do that sometime ago though *poke, poke* | 03:00 |
stekern | I think I found out what's the problem in my itlb reload now, my pagefaults from that aren't propagated properly into exceptions | 03:02 |
stekern | ...but that's not the root problem though, it's the reload happening right at the same time as an l.rfe | 03:11 |
poke53281 | maybe a delayed jump problem | 03:15 |
stekern | your's or mine? | 03:20 |
poke53281 | your's | 03:20 |
stekern | l.rfe doesn't have delay slot | 03:21 |
-!- Netsplit *.net <-> *.split quits: X-Scale | 04:18 | |
poke53281 | Yeah, at least got a reply from the ata-device. ATA uses registers of 1 byte length. or1ksim allows only word accesses | 04:26 |
stekern | it got to be able to do byte accesses, since the uart uses that | 04:29 |
stekern | but maybe you are being ata specific? | 04:30 |
poke53281 | Linux uses byte accesses. And the devices in or1ksim have different slots for byte and word accesses. | 04:32 |
poke53281 | ATA registers have a length of 1 byte in the specification. | 04:33 |
poke53281 | But it is possible that the distance of these registers is word-aligned. | 04:33 |
poke53281 | Anyway, corrected it in or1ksim. | 04:33 |
stekern | yeah, I wouldn't expect the more "exotic" peripherals in or1ksim to work out of the box | 04:36 |
stekern | the framebuffer peripheral was (and is still in main or1ksim repo) beyond broken | 04:38 |
-!- X-Scale` is now known as X-Scale | 04:39 | |
poke53281 | I 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 |
poke53281 | https://github.com/s-macke/jor1k/blob/master/js/worker/framebuffer.js | 05:38 |
poke53281 | My Framebuffer device emulation. | 05:38 |
poke53281 | There is not much to do I would say :) | 05:39 |
stekern | =P | 06:23 |
stekern | the one in or1ksim is only more complicated because it supports different modes and resolutions | 06:26 |
poke53281 | Well, these information are given in the other registers. | 06:36 |
poke53281 | But my framebuffer is fixed to one screen. So I don't need this information | 06:37 |
poke53281 | Perfect, ATA is doing his job. Can mount my image :) | 07:16 |
poke53281 | In principle easy. Just a few changes | 07:23 |
poke53281 | And even after I changed the tiimings it is considerable fast. | 07:24 |
poke53281 | To speed up or1ksim you should find the SCHED_ADD commands in the source and change the last arg to zero. That helps a lot | 07:25 |
stekern | ok, I'll take a look at that | 07:27 |
poke53281 | for example you can set in the ethernet device the constant RTX_RESCHED_PERIOD to zero | 07:29 |
poke53281 | SCHED_ADD (eth_controller_rx_clock, dat, 1); | 07:30 |
poke53281 | And in this line you can set it to zero I think. Or you can directly execute those commands. | 07:31 |
poke53281 | the UART_CLOCK_DIVIDER you can set to 1 for example. | 07:35 |
poke53281 | Tried to run the linux test project. ltp.sourceforge.net | 19:13 |
poke53281 | After 5 minutes run: Kernel PANIC :) | 19:13 |
poke53281 | But even the compilation is a small adventure. It shows very nicely what is missing | 19:15 |
stekern | ah,that sounds interesting! | 19:24 |
olofk | poke53281: Did I understand it correctly that you managed to get the ata stuff working in or1ksim? | 19:24 |
olofk | I was wondering because bug 23 (http://bugzilla.opencores.org/show_bug.cgi?id=23) seems to indicate it's not working | 19:25 |
olofk | Would be nice to close it or at least provide some more info | 19:25 |
olofk | and stekern, it hurts when you poke me like that :) | 19:25 |
poke53281 | Yes, 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 wrong | 19:40 |
poke53281 | section ata | 19:40 |
poke53281 | enabled = 1 | 19:40 |
poke53281 | baseaddr = 0x9e000000 | 19:40 |
poke53281 | irq = 15 | 19:40 |
poke53281 | device = 0 | 19:40 |
poke53281 | type = 1 | 19:40 |
poke53281 | file = "ext2fsimage" | 19:40 |
poke53281 | enddevice = 0 | 19:40 |
poke53281 | end | 19:40 |
poke53281 | This is mine | 19:40 |
poke53281 | But the correction of the bug is not enough for running ATA under Linux. | 19:41 |
poke53281 | So question is, what do you want to do. | 19:42 |
poke53281 | If 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 |
poke53281 | anyway, I can think of publishing a full patch that enables ATA for Linux. | 19:52 |
olofk | poke53281: 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.cfg | 22:00 |
olofk | And getting a patch that makes it usable under linux sounds great | 22:01 |
--- Log closed Tue Jul 23 00:00:39 2013 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!