--- Log opened Wed Oct 02 00:00:21 2013 | ||
poke53282 | Strange the pid is definitely 17. It does not even start with a pid of 1. | 00:03 |
---|---|---|
poke53282 | It happens definitely in the init routine of eglibc | 00:16 |
poke53282 | blueCmd: I get this error in both static or shared compiled binaries. It does not depend on busybox. A simple "hello world" executable is enough. | 00:43 |
poke53282 | blueCmd: For me it looks like the or1k atomic syscall is executed with an OR1K_ATOMIC_CMPXCHG. But this is not implemented in the kernel. The kernel executes always a XCHG instead. | 01:29 |
poke53282 | And you define the OR1K_ATOMIC_XCHG with a different number. | 01:54 |
poke53282 | uclibc: #define OR1K_ATOMIC_XCHG 1 | 01:54 |
poke53282 | eglibc: #define OR1K_ATOMIC_XCHG 3 | 01:54 |
poke53282 | eglibc: #define OR1K_ATOMIC_SWAP 1 | 02:06 |
poke53282 | Ok, what is the difference between XCHG and SWAP? | 02:07 |
poke53282 | blueCmd: Let me guess. You have used only QEMU to test eglibc? :) | 02:15 |
poke53282 | Because there it works. Looks like QEMU is not correctly analyzing for page faults. | 02:16 |
poke53282 | http://pastie.org/8371194 | 03:12 |
poke53282 | That explains it. | 03:12 |
poke53282 | http://pastie.org/8371203 | 03:17 |
poke53282 | And another error in QEMU. Who finds it :) | 03:17 |
stekern | it should probably be (rw == 0) not (rw & 0) ;) | 03:20 |
poke53282 | !(rw & 1) is better because rw could be also 2. But in the pastie it was not evident, so your solution is fine. | 03:47 |
poke53282 | So, this evening I found 3.5-4 bugs. A fifth one with which could enable you to get root rights as user. Or to crash the machine. | 03:50 |
stekern | poke53282: qemu probably haven't been used as much as it should, and some of the bugs are obviously "reversed". i.e. they don't manifest themselves on qemu, only when you rely on qemu's behaviour | 04:51 |
stekern | but nice job finding them nevertheless, will you send patches for them to upstream qemu? | 04:51 |
poke53282 | Yes, almost finished. I am sabotaging blueCmd eglibc project with this patch ;) . eglibc will no longer work for him. | 04:53 |
stekern | that's "good" ;) | 04:55 |
olofk | _franck_: Sorry for the late response. Just run orpsoc sim --simulator=modelsim to override the default simulator | 05:00 |
olofk | It doesn't really matter what is in the core files now, but I want to add functionality to the coremanager so that I can see if any core in a system will fail to run with a certain simulator warn the user if that happens | 05:01 |
stekern | olofk: did you see my privmsg or are you just ignoring it? ;) | 05:09 |
olofk | stekern: Sorry. Running a webchat client, and firefox rebooted 30 minutes ago | 05:10 |
poke53282 | stekern: Message sent to QEMU mailing list | 05:13 |
stekern | poke53282: great | 05:14 |
stekern | speaking about bugs, this arm-linux-gnueabihf-4.7 toolchain is behaving oddly... | 05:53 |
stekern | I'm still trying to get the opencores vga/lcd core to work as a framebuffer device for the ARM on sockit, it works but if I use 16-bit mode the halfwords are swapped (due to endian difference) | 05:54 |
stekern | if I try to swap them the kernel hangs completely | 05:55 |
stekern | or rather, if I enable the kernel option that the framebuffer endianess differ, it hangs | 05:56 |
stekern | so I'm trying to debug what it actually writes to the cores registers | 05:57 |
stekern | but it always claims that the data is zero in my debug printk, but I *know* it's not | 06:00 |
stekern | so I did this: http://pastie.org/8371385 | 06:00 |
stekern | and it outputs this: | 06:01 |
stekern | SJK DEBUG: data != 0 (data = 5f17027f) | 06:01 |
stekern | SJK DEBUG: base = c08c6000, offset = 8, data = 0 | 06:01 |
stekern | am I missing some optimisation that the compiler is allowed to do in that case, or is it just a plain bug? | 06:02 |
stekern | heh, Jia doesn't seem to see the obviousness in that bug... | 06:04 |
stekern | s/in that/in that qemu/ | 06:04 |
stekern | the other part was more interesting, I can't remember seeing something like that in the arch spec | 06:05 |
stekern | better go check | 06:06 |
stekern | it would strike me as odd anyways | 06:08 |
stekern | ah, he probably refers to section 16.3.4, but that doesn't mean what he thinks it means | 06:11 |
poke53282 | Arghh, I wish I could write patches that are immediately accepted and would not lead always to long discussions. And again one hour lost. | 06:41 |
stekern | haha =) | 06:43 |
stekern | FWIW, I thought it was obvious enough, I would just have applied it | 06:43 |
blueCmd | poke53282: i have a kernel patch that adds those atomic operations | 08:48 |
blueCmd | poke53282: i submitted it for upstream in the mailinglist a while ago but i never got around to fix the feedback | 08:49 |
blueCmd | poke53282: the atomic operations are used for pthreads, so some things will work, other will crash horribly, as you found out | 08:49 |
blueCmd | poke53282: also, I would recommend that you look specifically on glibc in the first hand, since that is what's going to be upstreamed | 08:50 |
blueCmd | but it's your choice :P | 08:51 |
blueCmd | poke53282: http://www.mail-archive.com/linux@lists.openrisc.net/msg00179.html | 08:56 |
blueCmd | poke53282: http://www.mail-archive.com/linux@lists.openrisc.net/msg00178.html you also need to incorporate that | 08:57 |
blueCmd | I had a patched kernel tree, but I had to wipe that disk | 08:57 |
stekern | juliusb: did you get all the de0 nano troubles sorted out? | 09:15 |
stekern | or only when you disable instruction cache? | 09:16 |
stekern | and the answer to your first question is: brief | 09:18 |
juliusb | stekern: I got things working, but had to keep icache disabled | 13:13 |
juliusb | anything involving timer interrupts didn't work with icache enabled | 13:14 |
juliusb | so a pre-cooked Linux image would be cool to have | 13:14 |
juliusb | something we can just microwave on the day and dump into the RAM and boot would be great :) | 13:15 |
stekern | juliusb: (icache disabled) that's not acceptable | 13:59 |
stekern | I'll take a look | 13:59 |
stekern | do you have a program for me to test where it fails? | 14:00 |
stekern | I'll try out some linux image at the same time | 14:00 |
_franck_ | blueCmd: what was the status of your work on gdb last time you played with it ? | 14:06 |
_franck_ | did you get gdbserver and a native gdb working ? | 14:07 |
blueCmd | _franck_: sort of. I got gdbserver working in that it could pause the program but not resume it IIRC | 14:08 |
_franck_ | ok, I want to prepare an up-to-date status of our openrisc gdb work for the conference | 14:09 |
_franck_ | thanks | 14:09 |
juliusb | stekern: sw at home, but basically using the simple newlib stuff to set up a timer and make it go off, will cause it to lock up eventually | 14:20 |
juliusb | i was just flashing LEDs and writing stuff to the UART | 14:21 |
stekern | bah... xorg doesn't honour the endian flag of the fb | 14:25 |
stekern | juliusb: ok, I'll try that, but probably later in the evening, so you'll still have a chance to give me the sw ;) | 14:26 |
juliusb | :) yep I can certainly do that | 14:48 |
stekern | juliusb: I can reproduce here, but the interesting thing is that I can reproduce it in mor1kx-dev-env in verilated simulation as well... | 15:38 |
stekern | so either I'm doing something wrong or this should be easy to figure out | 15:39 |
poke53282 | stekern: About the endian flag. I am not sure what you really tried but I patched the xorg-server which could prevent the correct endianess | 16:01 |
poke53282 | http://pastie.org/8372480 | 16:01 |
stekern | poke53282: this is on the arm, I'm connecting that to the wishbone bus | 16:23 |
poke53282 | blueCmd: Thanks for the information. So the kernel needs to be patched. The second patch seems one seems to be outdated because process.c changed significantly. The first one could be corrected in a few hours. | 16:56 |
poke53282 | I can also switch to glibc. No problem. | 16:58 |
blueCmd | poke53282: yes, as I said, I did port the second patch to the newest kernel (it's simple when you know what it is supposed to do, might not be if you haven't read so much TLS docs that you're mumbling the spec in the sleep) | 17:17 |
blueCmd | but the patch was destroyed sadly | 17:17 |
stekern | poke53282: (xorg-server patch) that's exactly what I would need to do on the arm as well to make it work correctly | 17:26 |
poke53282 | blueCmd: I don't have an idea about TLS and how it works. Have never read the docs. But it looks like you can redo this patch easily. Only two lines of code. | 17:34 |
stekern | juliusb: found the problem | 18:09 |
stekern | http://pastie.org/8372804 | 18:11 |
stekern | that should fix it | 18:11 |
stekern | running the step tests to check that it doesn't break those and resynthesizing to check that it works on the board too | 18:12 |
stekern | it works on the board too | 18:18 |
mor1kx | [mor1kx] skristiansson pushed 1 new commit to master: https://github.com/openrisc/mor1kx/commit/d67f9677012373c2ffd53539c89236eef6209cb8 | 18:45 |
mor1kx | mor1kx/master d67f967 Stefan Kristiansson: cappuccino/ctrl: only signal stepped_into_delay_slot when stepping... | 18:45 |
mor1kx | [mor1kx] skristiansson pushed 1 new commit to mor1kx_v1: https://github.com/openrisc/mor1kx/commit/ed4baff12b7b347c2d78a017b4ecf0bdbd3163d4 | 18:46 |
mor1kx | mor1kx/mor1kx_v1 ed4baff Stefan Kristiansson: cappuccino/ctrl: only signal stepped_into_delay_slot when stepping... | 18:46 |
mor1kx | [mor1kx] skristiansson pushed 1 new commit to mor1kx_v1: https://github.com/openrisc/mor1kx/commit/143d9b8b1f3608d06ca82eedfef91471aec67f6c | 18:56 |
mor1kx | mor1kx/mor1kx_v1 143d9b8 Stefan Kristiansson: mor1kx v1.2 | 18:56 |
juliusb | stekern: oh wow! nice | 19:33 |
juliusb | stekern: that's odd, how come that fixes it? | 19:35 |
stekern | because that signal otherwise get set whenever there is a delay slot | 19:36 |
juliusb | oh right! | 19:36 |
stekern | and when stepping npc is set to the branch destination | 19:37 |
stekern | and in or1k-support npc is used to get the exception vector | 19:37 |
juliusb | ahh | 19:38 |
juliusb | ok i'm convinced now :) | 19:38 |
stekern | I think there is a bugfix missing from or1k-support in svn too | 19:38 |
stekern | unrelated to this, but I noticed when I started to look around that stuff | 19:39 |
stekern | interrupt handlers don't work without that fix | 19:39 |
stekern | but the websvn doesn't work properly so I haven't confirmed that it is missing | 19:39 |
juliusb | :-/ | 19:40 |
juliusb | but we've got it on the git branch? | 19:41 |
juliusb | s/branch/copy/ | 19:41 |
stekern | no, the other way around | 19:41 |
stekern | it is in svn, but I don't think it has made it into git | 19:41 |
juliusb | oh right | 19:41 |
juliusb | I have an update I want to make to the newlib libs, too. Just putting a weak function in the timer C code so the user can install an arbitrary function which gets executed whenever the timer exception fires | 19:42 |
juliusb | I can hack around it for the workshop (by installing a custom handler in the C code) but it'd be nice to make it neat and documented | 19:43 |
stekern | that sounds reasonable | 19:43 |
stekern | the weak board globals have became handy many times for me | 19:43 |
juliusb | OK, image built, time to test your fix :) | 19:43 |
stekern | I hardly use the mboard= anymore | 19:44 |
juliusb | varfor? | 19:44 |
juliusb | stekern: looking good ;) | 19:45 |
stekern | in all my baremetal "projects" I've got a board_conf.c file | 19:45 |
juliusb | ?! | 19:46 |
juliusb | overrides the default one of or1ksim? | 19:47 |
juliusb | overrides the symbols, I mean, in or1ksim.S/a ? | 19:47 |
stekern | yes | 19:47 |
juliusb | oh handy | 19:47 |
stekern | it's mostly the clock freq I change | 19:48 |
_franck_ | I ran the gdb testsuite today, not that bad: http://pastie.org/8373000 | 19:52 |
stekern | _franck_: I'm about to push an newly synced version of or1k-src, so it's good that we have a reference now | 19:54 |
juliusb | stekern: any updates to newlib/libgloss in that? | 19:54 |
stekern | I don't think so | 19:58 |
stekern | I can check | 19:58 |
juliusb | ok, just wasn't sure if you were referring to the fix which is in SVN but not git (potentially)? | 19:58 |
stekern | ah, no, this is "just" a sync with upstream | 20:09 |
stekern | but it was good that I checked newlib, I spotted a mismerge now | 20:09 |
stekern | ok, now it's done | 20:35 |
stekern | juliusb: the fixes are missing | 20:48 |
juliusb | hmmm ok | 21:17 |
juliusb | will you bring them across? | 21:19 |
juliusb | stekern: I don't see newlib in the OpenCores SVN repo? expanding gnu-dev/or1k-src gives me nothing in the web interface :( | 21:38 |
juliusb | oh it's under gnu-stable... | 21:41 |
stekern | juliusb: this is the change, I intend to pish it. | 21:45 |
stekern | http://pastie.org/8373259 | 21:45 |
stekern | Right now I'm heading for bed thuogh | 21:45 |
juliusb | ah great, thanks, I was just wrestling with SVN to try and get the diff myself as the web svn diff thing ain't no workin' none | 21:45 |
juliusb | so, adding exception handlers isn't working until this guy goes on there? | 21:46 |
juliusb | oh interrupt handling | 21:48 |
--- Log closed Thu Oct 03 00:00:23 2013 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!