direct-io.hg

changeset 12473:e343f1850be0

[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>
author kfraser@localhost.localdomain
date Fri Nov 17 09:16:27 2006 +0000 (2006-11-17)
parents 73ef90055339
children ba4c40353fff
files extras/mini-os/include/x86/os.h extras/mini-os/kernel.c extras/mini-os/mm.c
line diff
     1.1 --- a/extras/mini-os/include/x86/os.h	Thu Nov 16 18:29:06 2006 +0000
     1.2 +++ b/extras/mini-os/include/x86/os.h	Fri Nov 17 09:16:27 2006 +0000
     1.3 @@ -19,6 +19,8 @@
     1.4  #include <types.h>
     1.5  #include <hypervisor.h>
     1.6  
     1.7 +#define USED    __attribute__ ((used))
     1.8 +
     1.9  extern void do_exit(void);
    1.10  #define BUG do_exit
    1.11  
     2.1 --- a/extras/mini-os/kernel.c	Thu Nov 16 18:29:06 2006 +0000
     2.2 +++ b/extras/mini-os/kernel.c	Fri Nov 17 09:16:27 2006 +0000
     2.3 @@ -116,6 +116,9 @@ void start_kernel(start_info_t *si)
     2.4      printk("  cmd_line:   %s\n",  
     2.5             si->cmd_line ? (const char *)si->cmd_line : "NULL");
     2.6  
     2.7 +    /* Set up events. */
     2.8 +    init_events();
     2.9 +    
    2.10      arch_print_info();
    2.11  
    2.12      setup_xen_features();
    2.13 @@ -123,9 +126,6 @@ void start_kernel(start_info_t *si)
    2.14      /* Init memory management. */
    2.15      init_mm();
    2.16  
    2.17 -    /* Set up events. */
    2.18 -    init_events();
    2.19 -    
    2.20      /* Init time and timers. */
    2.21      init_time();
    2.22  
     3.1 --- a/extras/mini-os/mm.c	Thu Nov 16 18:29:06 2006 +0000
     3.2 +++ b/extras/mini-os/mm.c	Fri Nov 17 09:16:27 2006 +0000
     3.3 @@ -148,7 +148,7 @@ static chunk_head_t  free_tail[FREELIST_
     3.4   * Prints allocation[0/1] for @nr_pages, starting at @start
     3.5   * address (virtual).
     3.6   */
     3.7 -static void print_allocation(void *start, int nr_pages)
     3.8 +USED static void print_allocation(void *start, int nr_pages)
     3.9  {
    3.10      unsigned long pfn_start = virt_to_pfn(start);
    3.11      int count;
    3.12 @@ -163,7 +163,7 @@ static void print_allocation(void *start
    3.13   * Prints chunks (making them with letters) for @nr_pages starting
    3.14   * at @start (virtual).
    3.15   */
    3.16 -static void print_chunks(void *start, int nr_pages)
    3.17 +USED static void print_chunks(void *start, int nr_pages)
    3.18  {
    3.19      char chunks[1001], current='A';
    3.20      int order, count;
    3.21 @@ -408,7 +408,6 @@ void new_pt_frame(unsigned long *pt_pfn,
    3.22           do_exit();
    3.23           break;
    3.24      }
    3.25 -
    3.26      /* Update the entry */
    3.27  #if defined(__x86_64__)
    3.28      tab = pte_to_virt(tab[l4_table_offset(pt_page)]);
    3.29 @@ -446,7 +445,6 @@ void new_pt_frame(unsigned long *pt_pfn,
    3.30         printk("ERROR: mmu_update failed\n");
    3.31         do_exit();
    3.32      }
    3.33 -
    3.34      *pt_pfn += 1;
    3.35  }
    3.36  
    3.37 @@ -581,7 +579,6 @@ void build_pagetable(unsigned long *star
    3.38          }
    3.39          start_address += PAGE_SIZE;
    3.40      }
    3.41 -
    3.42      *start_pfn = pt_pfn;
    3.43  }
    3.44