Mon, 14 Jan 2013 09:22:12 +0000
More bus error fixes for FreeBee
I have fixed two more bus error handling bugs in FreeBee. First, the CPU core was executing the instruction regardless of whether a bus error occurs when fetching the opcode (which caused it to execute a bogus instruction in such cases). The other one was related to one of my previous fixes - the jump to the bus error vector was at the beginning of the main loop, so it wouldn't be called immediately after the bus error occurred if the timeslot expired, causing the return address to be off.
With these fixes, Unix now runs enough to get into userspace and run the install script (it is also possible to break out and get a shell prompt). However, many commands segfault semi-randomly (or more specifically, it seems that some child processes forked by the shell might be segfaulting before they can exec the command program), so installing the system isn't possible yet. I am not sure exactly what the bug is, but it seems to be related to some function in the shell returning null when the code calling it is assuming that it won't. What the function is, or why it is returning null, I'm not sure (the shell is built without the shared libc and is stripped, making identifying the function harder). I suspect that the function might be in libc, but that is hard to tell.
Author: Andrew Warkentin <andreww591 gmail com>
philpem@0 | 1 | From private email, dated 2010-Nov-26, 20:43 GMT: |
philpem@0 | 2 | |
philpem@0 | 3 | From: Karl Stenerud <kstenerud@gmail.com> |
philpem@0 | 4 | Subject: Re: Musashi 68k emulator |
philpem@0 | 5 | |
philpem@0 | 6 | On 2010-11-26, at 12:36 PM, Philip Pemberton wrote: |
philpem@0 | 7 | |
philpem@0 | 8 | > > I do have one question, though more related to licensing than the core itself... |
philpem@0 | 9 | > > |
philpem@0 | 10 | > > I was planning to release my emulator under an open-source licence, probably the GPL or something along those lines (the worst case scenario IMO would be someone adding a ton of nice features then refusing to release the source). |
philpem@0 | 11 | > > |
philpem@0 | 12 | > > The "non-commercial use only" restriction in the Musashi license would seem to be at odds with the GPL, and would make it somewhat more difficult to tie in GPL-licensed libraries. Is there any possibility of getting v3.31 released under a less restrictive license, maybe GPL or LGPL? |
philpem@0 | 13 | > > |
philpem@0 | 14 | |
philpem@0 | 15 | Sure, no problem. I usually release stuff under an Apache license nowadays, but feel free to pick any FOSS license. |
philpem@0 | 16 |