aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-17 09:16:27 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-17 09:16:27 +0000
commit7d58e874105e17c7cd15c1734e66dd8ccb14d996 (patch)
tree1d3621da982485695d9fa4c0901971ef32a4ae20
parentb38e0f65a82591aa44d5693208c248eda280c7dd (diff)
downloadxen-7d58e874105e17c7cd15c1734e66dd8ccb14d996.tar.gz
xen-7d58e874105e17c7cd15c1734e66dd8ccb14d996.tar.bz2
xen-7d58e874105e17c7cd15c1734e66dd8ccb14d996.zip
[MINIOS] Move initialisation of events (masking event channels)
earlier during the boot process. Otherwise 64bit guests would sometimes crash. Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
-rw-r--r--extras/mini-os/include/x86/os.h2
-rw-r--r--extras/mini-os/kernel.c6
-rw-r--r--extras/mini-os/mm.c7
3 files changed, 7 insertions, 8 deletions
diff --git a/extras/mini-os/include/x86/os.h b/extras/mini-os/include/x86/os.h
index eed5bda7c8..80f5586a49 100644
--- a/extras/mini-os/include/x86/os.h
+++ b/extras/mini-os/include/x86/os.h
@@ -19,6 +19,8 @@
#include <types.h>
#include <hypervisor.h>
+#define USED __attribute__ ((used))
+
extern void do_exit(void);
#define BUG do_exit
diff --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c
index 72fc65ae1e..9b3c471fe7 100644
--- a/extras/mini-os/kernel.c
+++ b/extras/mini-os/kernel.c
@@ -116,6 +116,9 @@ void start_kernel(start_info_t *si)
printk(" cmd_line: %s\n",
si->cmd_line ? (const char *)si->cmd_line : "NULL");
+ /* Set up events. */
+ init_events();
+
arch_print_info();
setup_xen_features();
@@ -123,9 +126,6 @@ void start_kernel(start_info_t *si)
/* Init memory management. */
init_mm();
- /* Set up events. */
- init_events();
-
/* Init time and timers. */
init_time();
diff --git a/extras/mini-os/mm.c b/extras/mini-os/mm.c
index 03fb3e9ab5..85f9e92216 100644
--- a/extras/mini-os/mm.c
+++ b/extras/mini-os/mm.c
@@ -148,7 +148,7 @@ static chunk_head_t free_tail[FREELIST_SIZE];
* Prints allocation[0/1] for @nr_pages, starting at @start
* address (virtual).
*/
-static void print_allocation(void *start, int nr_pages)
+USED static void print_allocation(void *start, int nr_pages)
{
unsigned long pfn_start = virt_to_pfn(start);
int count;
@@ -163,7 +163,7 @@ static void print_allocation(void *start, int nr_pages)
* Prints chunks (making them with letters) for @nr_pages starting
* at @start (virtual).
*/
-static void print_chunks(void *start, int nr_pages)
+USED static void print_chunks(void *start, int nr_pages)
{
char chunks[1001], current='A';
int order, count;
@@ -408,7 +408,6 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn,
do_exit();
break;
}
-
/* Update the entry */
#if defined(__x86_64__)
tab = pte_to_virt(tab[l4_table_offset(pt_page)]);
@@ -446,7 +445,6 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn,
printk("ERROR: mmu_update failed\n");
do_exit();
}
-
*pt_pfn += 1;
}
@@ -581,7 +579,6 @@ void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn)
}
start_address += PAGE_SIZE;
}
-
*start_pfn = pt_pfn;
}