WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] getting mini-os to compile again

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] getting mini-os to compile again
From: Simon Kagstrom <simon.kagstrom@xxxxxx>
Date: Tue, 25 Oct 2005 12:11:42 +0200
Delivery-date: Tue, 25 Oct 2005 10:08:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051025093905.GC5660@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20051025093905.GC5660@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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

<Prev in Thread] Current Thread [Next in Thread>