[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Mini-OS on ARM status



On 22 Apr 2014, at 18:40, Thomas Leonard <talex5@xxxxxxxxx> wrote:

> Hi guys,
> 
> A quick status update on this work:
> 
> - Output to the regular console now works (before, it could only
> output to the emergency console, which requires Xen to be compiled in
> debug mode).
> 
> - I added a simple fault handler that dumps all registers if it gets
> an error (data abort, prefetch abort, undefined instruction, etc).
> That makes debugging easier.
> 
> - It now gets the RAM start and size from the FDT passed in by the
> hypervisor (before, it hard-coded the values). This means that the
> full amount of memory assigned to the guest is available to malloc. I
> also fixed a bug in malloc that was corrupting memory (it was
> calculating offsets into its free map incorrectly). It now mallocs as
> many blocks as possible on start-up, fills them with known values and
> then tests them all (this is how I found the bug).
> 
> - The GIC (interrupt controller) addresses are now read from the FDT
> instead of being hard-coded, and interrupts now work. Before, it would
> hang as soon as interrupts were enabled.
> 
> There's currently no virtual memory support (if the memory gets
> fragmented, malloc may fail, even if there are enough pages available
> in total).

This is something that's interesting with respect to x86_64 Xen, which
requires paging to be turned on.  We could get pretty far with a small
fixed-size malloc for the OCaml runtime to use, and give the majority
of the pages to the OCaml GC in a fixed block that we register with the
runtime system.

Of course, virtual memory support may just be easier...

> My next steps are to check that the rest of it is working and then try
> enabling libc. It might also be interesting to look at debugger
> support (e.g. getting gdbsx working), though I have no idea how hard
> that would be.

Before libc, it's also worth trying a few block device writes from the
guest to check that the higher level ring plumbing is working.  I've
never really used gdb to interactively debug, as printf debugging goes
a long way once you have a working console.

-nil

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.