KarimAllah/xen — pull request #2 by talex5 (2014-04-24 09:43:10+00:00)
Title: Fixes and updates for Mini-OS/arm32

I'm working on getting the Mini-OS ARM port in a state to run Mirage. It's not complete yet, but I think the patches so far are useful on their own and I'd appreciate any review comments.

The main changes are:

- It now works on my Cubieboard 2 (A20). I fixed some compiler errors and a caching configuration problem in the page table which was leading to failed hypercalls.
- Turned on caching and branch prediction (seems to be working).
- It now outputs printk messages to its configured console (not just the Xen emergency console).
- If an unexpected exception is taken, it dumps the registers instead of just looping.
- RAM details are read from the FDT, so it can now use all allocated RAM.
- The page allocator was corrupting memory due to incorrect indexes in alloc_bitmap.
- The GIC base registers are now read from the FDT.
- Enabling interrupts was making it hang on my system. Changing the order fixed it for me.
- Changed FIQ handler to panic, rather than clobber the IRQ stack (it shouldn't ever get called anyway, though).
- The shutdown thread now works. Before, it incorrectly detected a shutdown attempt immediately, but didn't shutdown. Now it waits correctly and then shuts down the VM using a hypercall.
- The monotonic timer now works (using the ARM Generic Timer).
- block_domain now works (using the Virtual Count register and WFI).