On 2005-10-25, 11:39, Simon Kagstrom wrote:
> Hello!
>
> I've created a patch to get the mini-os to compile in Xen-unstable. The patch
> is pretty big, but this is mostly because I've replaced hypervisor.h with the
> hypercalls.h header file from Linux (which seems easier to maintain
> anyway). I've ignored X86_64.
>
> I also had to disable some code in mini-os/xenbus/xenbus_xs.c since
> XS_WATCH_ACK is no longer available, I'm not sure what the proper fix would
> be.
>
> With the patch, the mini-os is possible to compile, but unfortunately crashes
> during startup. Specifically, __sti() called from kernel.c:105 causes a page
> fault in os.h:83
I'll reply myself on this. This problem turned out to be the __pte()
definition in kernel.c which seems incorrect to me - see patch below.
Then the mini-os gets slightly further, but seems to crash in the xenbus code
(but again, I don't really know how to fix that).
// Simon
diff -r e47f04c55eb1 extras/mini-os/kernel.c
--- a/extras/mini-os/kernel.c Mon Oct 24 11:57:37 2005
+++ b/extras/mini-os/kernel.c Tue Oct 25 12:09:32 2005
@@ -61,7 +61,7 @@
extern char shared_info[PAGE_SIZE];
-#define __pte(x) ((pte_t) { (0) } )
+#define __pte(x) ((pte_t) { (x) } )
static shared_info_t *map_shared_info(unsigned long pa)
{
@@ -88,6 +88,8 @@
/* Grab the shared_info pointer and put it in a safe place. */
HYPERVISOR_shared_info = map_shared_info(start_info.shared_info);
+
+ printf("si: 0x%08x, Hs: 0x%08x, Hsvcpu: 0x%08x", si,
HYPERVISOR_shared_info,
&(HYPERVISOR_shared_info->vcpu_data));
/* Set up event and failsafe callback addresses. */
#ifdef __i386__
@@ -150,5 +152,5 @@
void do_exit(void)
{
printk("do_exit called!\n");
- for ( ;; ) HYPERVISOR_shutdown();
+ for ( ;; ) HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_crash);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|