ia64/xen-unstable

changeset 10115:852a1fd80f42

[MINIOS] PAE support.
Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 19 16:52:52 2006 +0100 (2006-05-19)
parents 9b11eeab4558
children d0d9f50517f7
files extras/mini-os/Makefile extras/mini-os/include/mm.h extras/mini-os/include/types.h extras/mini-os/kernel.c extras/mini-os/mm.c extras/mini-os/traps.c extras/mini-os/x86_32.S
line diff
     1.1 --- a/extras/mini-os/Makefile	Fri May 19 16:30:21 2006 +0100
     1.2 +++ b/extras/mini-os/Makefile	Fri May 19 16:52:52 2006 +0100
     1.3 @@ -1,4 +1,5 @@
     1.4  debug ?= y
     1.5 +pae ?= n
     1.6  
     1.7  include $(CURDIR)/../../Config.mk
     1.8  
     1.9 @@ -19,6 +20,11 @@ CFLAGS += -m32 -march=i686
    1.10  LDFLAGS += -m elf_i386
    1.11  endif
    1.12  
    1.13 +ifeq ($(TARGET_ARCH)$(pae),x86_32y)
    1.14 +CFLAGS  += -DCONFIG_X86_PAE=1
    1.15 +ASFLAGS += -DCONFIG_X86_PAE=1
    1.16 +endif
    1.17 +
    1.18  ifeq ($(TARGET_ARCH),x86_64)
    1.19  CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
    1.20  CFLAGS += -fno-asynchronous-unwind-tables
     2.1 --- a/extras/mini-os/include/mm.h	Fri May 19 16:30:21 2006 +0100
     2.2 +++ b/extras/mini-os/include/mm.h	Fri May 19 16:52:52 2006 +0100
     2.3 @@ -43,6 +43,8 @@
     2.4  
     2.5  #if defined(__i386__)
     2.6  
     2.7 +#if !defined(CONFIG_X86_PAE)
     2.8 +
     2.9  #define L2_PAGETABLE_SHIFT      22
    2.10  
    2.11  #define L1_PAGETABLE_ENTRIES    1024
    2.12 @@ -51,6 +53,30 @@
    2.13  #define PADDR_BITS              32
    2.14  #define PADDR_MASK              (~0UL)
    2.15  
    2.16 +#define UNMAPPED_PT_FRAMES        1
    2.17 +#define PRIpte "08lx"
    2.18 +typedef unsigned long pgentry_t;
    2.19 +
    2.20 +#else /* defined(CONFIG_X86_PAE) */
    2.21 +
    2.22 +#define L2_PAGETABLE_SHIFT      21
    2.23 +#define L3_PAGETABLE_SHIFT      30
    2.24 +
    2.25 +#define L1_PAGETABLE_ENTRIES    512
    2.26 +#define L2_PAGETABLE_ENTRIES    512
    2.27 +#define L3_PAGETABLE_ENTRIES    4
    2.28 +
    2.29 +#define PADDR_BITS              44
    2.30 +#define PADDR_MASK              ((1ULL << PADDR_BITS)-1)
    2.31 +
    2.32 +#define L2_MASK  ((1UL << L3_PAGETABLE_SHIFT) - 1)
    2.33 +
    2.34 +#define UNMAPPED_PT_FRAMES        2
    2.35 +#define PRIpte "016llx"
    2.36 +typedef uint64_t pgentry_t;
    2.37 +
    2.38 +#endif /* !defined(CONFIG_X86_PAE) */
    2.39 +
    2.40  #elif defined(__x86_64__)
    2.41  
    2.42  #define L2_PAGETABLE_SHIFT      21
    2.43 @@ -81,6 +107,10 @@
    2.44  #define L2_MASK  ((1UL << L3_PAGETABLE_SHIFT) - 1)
    2.45  #define L3_MASK  ((1UL << L4_PAGETABLE_SHIFT) - 1)
    2.46  
    2.47 +#define UNMAPPED_PT_FRAMES        3
    2.48 +#define PRIpte "016lx"
    2.49 +typedef unsigned long pgentry_t;
    2.50 +
    2.51  #endif
    2.52  
    2.53  #define L1_MASK  ((1UL << L2_PAGETABLE_SHIFT) - 1)
    2.54 @@ -90,9 +120,11 @@
    2.55    (((_a) >> L1_PAGETABLE_SHIFT) & (L1_PAGETABLE_ENTRIES - 1))
    2.56  #define l2_table_offset(_a) \
    2.57    (((_a) >> L2_PAGETABLE_SHIFT) & (L2_PAGETABLE_ENTRIES - 1))
    2.58 -#if defined(__x86_64__)
    2.59 +#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
    2.60  #define l3_table_offset(_a) \
    2.61    (((_a) >> L3_PAGETABLE_SHIFT) & (L3_PAGETABLE_ENTRIES - 1))
    2.62 +#endif
    2.63 +#if defined(__x86_64__)
    2.64  #define l4_table_offset(_a) \
    2.65    (((_a) >> L4_PAGETABLE_SHIFT) & (L4_PAGETABLE_ENTRIES - 1))
    2.66  #endif
    2.67 @@ -111,14 +143,21 @@
    2.68  #if defined(__i386__)
    2.69  #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED)
    2.70  #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY |_PAGE_USER)
    2.71 +#if defined(CONFIG_X86_PAE)
    2.72 +#define L3_PROT (_PAGE_PRESENT)
    2.73 +#endif /* CONFIG_X86_PAE */
    2.74  #elif defined(__x86_64__)
    2.75  #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
    2.76  #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    2.77  #define L3_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    2.78  #define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    2.79 +#endif /* __i386__ || __x86_64__ */
    2.80 +
    2.81 +#ifndef CONFIG_X86_PAE
    2.82 +#define PAGE_SIZE       (1UL << L1_PAGETABLE_SHIFT)
    2.83 +#else
    2.84 +#define PAGE_SIZE       (1ULL << L1_PAGETABLE_SHIFT)
    2.85  #endif
    2.86 -
    2.87 -#define PAGE_SIZE       (1UL << L1_PAGETABLE_SHIFT)
    2.88  #define PAGE_SHIFT      L1_PAGETABLE_SHIFT
    2.89  #define PAGE_MASK       (~(PAGE_SIZE-1))
    2.90  
    2.91 @@ -129,23 +168,31 @@
    2.92  /* to align the pointer to the (next) page boundary */
    2.93  #define PAGE_ALIGN(addr)        (((addr)+PAGE_SIZE-1)&PAGE_MASK)
    2.94  
    2.95 +/* Definitions for machine and pseudophysical addresses. */
    2.96 +#ifdef CONFIG_X86_PAE
    2.97 +typedef unsigned long long paddr_t;
    2.98 +typedef unsigned long long maddr_t;
    2.99 +#else
   2.100 +typedef unsigned long paddr_t;
   2.101 +typedef unsigned long maddr_t;
   2.102 +#endif
   2.103 +
   2.104  extern unsigned long *phys_to_machine_mapping;
   2.105  extern char _text, _etext, _edata, _end;
   2.106  #define pfn_to_mfn(_pfn) (phys_to_machine_mapping[(_pfn)])
   2.107 -static __inline__ unsigned long phys_to_machine(unsigned long phys)
   2.108 +static __inline__ maddr_t phys_to_machine(paddr_t phys)
   2.109  {
   2.110 -    unsigned long machine = pfn_to_mfn(phys >> L1_PAGETABLE_SHIFT);
   2.111 -    machine = (machine << L1_PAGETABLE_SHIFT) | (phys & ~PAGE_MASK);
   2.112 -    return machine;
   2.113 +	maddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT);
   2.114 +	machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK);
   2.115 +	return machine;
   2.116  }
   2.117  
   2.118 -
   2.119  #define mfn_to_pfn(_mfn) (machine_to_phys_mapping[(_mfn)])
   2.120 -static __inline__ unsigned long machine_to_phys(unsigned long machine)
   2.121 +static __inline__ paddr_t machine_to_phys(maddr_t machine)
   2.122  {
   2.123 -    unsigned long phys = mfn_to_pfn(machine >> L1_PAGETABLE_SHIFT);
   2.124 -    phys = (phys << L1_PAGETABLE_SHIFT) | (machine & ~PAGE_MASK);
   2.125 -    return phys;
   2.126 +	paddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT);
   2.127 +	phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
   2.128 +	return phys;
   2.129  }
   2.130  
   2.131  #define VIRT_START                 ((unsigned long)&_text)
   2.132 @@ -155,7 +202,7 @@ static __inline__ unsigned long machine_
   2.133  
   2.134  #define virt_to_pfn(_virt)         (PFN_DOWN(to_phys(_virt)))
   2.135  #define mach_to_virt(_mach)        (to_virt(machine_to_phys(_mach)))
   2.136 -#define mfn_to_virt(_mfn)          (mach_to_virt(_mfn << PAGE_SHIFT))
   2.137 +#define mfn_to_virt(_mfn)          (to_virt(mfn_to_pfn(_mfn) << PAGE_SHIFT))
   2.138  #define pfn_to_virt(_pfn)          (to_virt(_pfn << PAGE_SHIFT))
   2.139  
   2.140  /* Pagetable walking. */
     3.1 --- a/extras/mini-os/include/types.h	Fri May 19 16:30:21 2006 +0100
     3.2 +++ b/extras/mini-os/include/types.h	Fri May 19 16:52:52 2006 +0100
     3.3 @@ -43,14 +43,19 @@ typedef long long           quad_t;
     3.4  typedef unsigned long long  u_quad_t;
     3.5  typedef unsigned int        uintptr_t;
     3.6  
     3.7 +#if !defined(CONFIG_X86_PAE)
     3.8  typedef struct { unsigned long pte_low; } pte_t;
     3.9 +#else
    3.10 +typedef struct { unsigned long pte_low, pte_high; } pte_t;
    3.11 +#endif /* CONFIG_X86_PAE */
    3.12 +
    3.13  #elif defined(__x86_64__)
    3.14  typedef long                quad_t;
    3.15  typedef unsigned long       u_quad_t;
    3.16  typedef unsigned long       uintptr_t;
    3.17  
    3.18  typedef struct { unsigned long pte; } pte_t;
    3.19 -#endif
    3.20 +#endif /* __i386__ || __x86_64__ */
    3.21  
    3.22  typedef  u8 uint8_t;
    3.23  typedef  s8 int8_t;
     4.1 --- a/extras/mini-os/kernel.c	Fri May 19 16:30:21 2006 +0100
     4.2 +++ b/extras/mini-os/kernel.c	Fri May 19 16:52:52 2006 +0100
     4.3 @@ -63,7 +63,12 @@ void failsafe_callback(void);
     4.4  
     4.5  extern char shared_info[PAGE_SIZE];
     4.6  
     4.7 +#if !defined(CONFIG_X86_PAE)
     4.8  #define __pte(x) ((pte_t) { (x) } )
     4.9 +#else
    4.10 +#define __pte(x) ({ unsigned long long _x = (x);        \
    4.11 +    ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); })
    4.12 +#endif
    4.13  
    4.14  static shared_info_t *map_shared_info(unsigned long pa)
    4.15  {
    4.16 @@ -71,7 +76,7 @@ static shared_info_t *map_shared_info(un
    4.17          (unsigned long)shared_info, __pte(pa | 7), UVMF_INVLPG) )
    4.18      {
    4.19          printk("Failed to map shared_info!!\n");
    4.20 -        *(int*)0=0;
    4.21 +        do_exit();
    4.22      }
    4.23      return (shared_info_t *)shared_info;
    4.24  }
    4.25 @@ -126,6 +131,10 @@ void start_kernel(start_info_t *si)
    4.26      /* WARN: don't do printk before here, it uses information from
    4.27         shared_info. Use xprintk instead. */
    4.28      memcpy(&start_info, si, sizeof(*si));
    4.29 +    
    4.30 +    /* set up minimal memory infos */
    4.31 +    phys_to_machine_mapping = (unsigned long *)start_info.mfn_list;
    4.32 +
    4.33      /* Grab the shared_info pointer and put it in a safe place. */
    4.34      HYPERVISOR_shared_info = map_shared_info(start_info.shared_info);
    4.35  
     5.1 --- a/extras/mini-os/mm.c	Fri May 19 16:30:21 2006 +0100
     5.2 +++ b/extras/mini-os/mm.c	Fri May 19 16:52:52 2006 +0100
     5.3 @@ -368,7 +368,7 @@ void free_pages(void *pointer, int order
     5.4  void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn, 
     5.5                                  unsigned long offset, unsigned long level)
     5.6  {   
     5.7 -    unsigned long *tab = (unsigned long *)start_info.pt_base;
     5.8 +    pgentry_t *tab = (pgentry_t *)start_info.pt_base;
     5.9      unsigned long pt_page = (unsigned long)pfn_to_virt(*pt_pfn); 
    5.10      unsigned long prot_e, prot_t, pincmd;
    5.11      mmu_update_t mmu_updates[1];
    5.12 @@ -382,40 +382,45 @@ void new_pt_frame(unsigned long *pt_pfn,
    5.13         as a page table page */
    5.14      memset((unsigned long*)pfn_to_virt(*pt_pfn), 0, PAGE_SIZE);  
    5.15   
    5.16 -    if (level == L1_FRAME)
    5.17 +    switch ( level )
    5.18      {
    5.19 +    case L1_FRAME:
    5.20           prot_e = L1_PROT;
    5.21           prot_t = L2_PROT;
    5.22           pincmd = MMUEXT_PIN_L1_TABLE;
    5.23 -    }
    5.24 -#if (defined __x86_64__)
    5.25 -    else if (level == L2_FRAME)
    5.26 -    {
    5.27 +         break;
    5.28 +#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
    5.29 +    case L2_FRAME:
    5.30           prot_e = L2_PROT;
    5.31           prot_t = L3_PROT;
    5.32           pincmd = MMUEXT_PIN_L2_TABLE;
    5.33 -    }
    5.34 -    else if (level == L3_FRAME)
    5.35 -    {
    5.36 +         break;
    5.37 +#endif
    5.38 +#if defined(__x86_64__)
    5.39 +    case L3_FRAME:
    5.40           prot_e = L3_PROT;
    5.41           prot_t = L4_PROT;
    5.42           pincmd = MMUEXT_PIN_L3_TABLE;
    5.43 -    }
    5.44 +         break;
    5.45  #endif
    5.46 -    else
    5.47 -    {
    5.48 +    default:
    5.49           printk("new_pt_frame() called with invalid level number %d\n", level);
    5.50           do_exit();
    5.51 -    }    
    5.52 +         break;
    5.53 +    }
    5.54  
    5.55      /* Update the entry */
    5.56 -#if (defined __x86_64__)
    5.57 +#if defined(__x86_64__)
    5.58      tab = pte_to_virt(tab[l4_table_offset(pt_page)]);
    5.59      tab = pte_to_virt(tab[l3_table_offset(pt_page)]);
    5.60  #endif
    5.61 -    mmu_updates[0].ptr = (tab[l2_table_offset(pt_page)] & PAGE_MASK) + 
    5.62 -                         sizeof(void *)* l1_table_offset(pt_page);
    5.63 -    mmu_updates[0].val = pfn_to_mfn(*pt_pfn) << PAGE_SHIFT | 
    5.64 +#if defined(CONFIG_X86_PAE)
    5.65 +    tab = pte_to_virt(tab[l3_table_offset(pt_page)]);
    5.66 +#endif
    5.67 +
    5.68 +    mmu_updates[0].ptr = ((pgentry_t)tab[l2_table_offset(pt_page)] & PAGE_MASK) + 
    5.69 +                         sizeof(pgentry_t) * l1_table_offset(pt_page);
    5.70 +    mmu_updates[0].val = (pgentry_t)pfn_to_mfn(*pt_pfn) << PAGE_SHIFT | 
    5.71                           (prot_e & ~_PAGE_RW);
    5.72      if(HYPERVISOR_mmu_update(mmu_updates, 1, NULL, DOMID_SELF) < 0)
    5.73      {
    5.74 @@ -434,8 +439,8 @@ void new_pt_frame(unsigned long *pt_pfn,
    5.75  
    5.76      /* Now fill the new page table page with entries.
    5.77         Update the page directory as well. */
    5.78 -    mmu_updates[0].ptr = (prev_l_mfn << PAGE_SHIFT) + sizeof(void *) * offset;
    5.79 -    mmu_updates[0].val = pfn_to_mfn(*pt_pfn) << PAGE_SHIFT | prot_t;
    5.80 +    mmu_updates[0].ptr = ((pgentry_t)prev_l_mfn << PAGE_SHIFT) + sizeof(pgentry_t) * offset;
    5.81 +    mmu_updates[0].val = (pgentry_t)pfn_to_mfn(*pt_pfn) << PAGE_SHIFT | prot_t;
    5.82      if(HYPERVISOR_mmu_update(mmu_updates, 1, NULL, DOMID_SELF) < 0) 
    5.83      {            
    5.84         printk("ERROR: mmu_update failed\n");
    5.85 @@ -450,16 +455,13 @@ void build_pagetable(unsigned long *star
    5.86      unsigned long start_address, end_address;
    5.87      unsigned long pfn_to_map, pt_pfn = *start_pfn;
    5.88      static mmu_update_t mmu_updates[L1_PAGETABLE_ENTRIES + 1];
    5.89 -    unsigned long *tab = (unsigned long *)start_info.pt_base;
    5.90 +    pgentry_t *tab = (pgentry_t *)start_info.pt_base, page;
    5.91      unsigned long mfn = pfn_to_mfn(virt_to_pfn(start_info.pt_base));
    5.92 -    unsigned long page, offset;
    5.93 +    unsigned long offset;
    5.94      int count = 0;
    5.95  
    5.96 -#if defined(__x86_64__)
    5.97 -    pfn_to_map = (start_info.nr_pt_frames - 3) * L1_PAGETABLE_ENTRIES;
    5.98 -#else
    5.99 -    pfn_to_map = (start_info.nr_pt_frames - 1) * L1_PAGETABLE_ENTRIES;
   5.100 -#endif
   5.101 +    pfn_to_map = (start_info.nr_pt_frames - UNMAPPED_PT_FRAMES) * L1_PAGETABLE_ENTRIES;
   5.102 +
   5.103      start_address = (unsigned long)pfn_to_virt(pfn_to_map);
   5.104      end_address = (unsigned long)pfn_to_virt(*max_pfn);
   5.105      
   5.106 @@ -468,7 +470,7 @@ void build_pagetable(unsigned long *star
   5.107  
   5.108      while(start_address < end_address)
   5.109      {
   5.110 -        tab = (unsigned long *)start_info.pt_base;
   5.111 +        tab = (pgentry_t *)start_info.pt_base;
   5.112          mfn = pfn_to_mfn(virt_to_pfn(start_info.pt_base));
   5.113  
   5.114  #if defined(__x86_64__)
   5.115 @@ -480,6 +482,8 @@ void build_pagetable(unsigned long *star
   5.116          page = tab[offset];
   5.117          mfn = pte_to_mfn(page);
   5.118          tab = to_virt(mfn_to_pfn(mfn) << PAGE_SHIFT);
   5.119 +#endif
   5.120 +#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
   5.121          offset = l3_table_offset(start_address);
   5.122          /* Need new L2 pt frame */
   5.123          if(!(start_address & L2_MASK)) 
   5.124 @@ -498,9 +502,9 @@ void build_pagetable(unsigned long *star
   5.125          mfn = pte_to_mfn(page);
   5.126          offset = l1_table_offset(start_address);
   5.127  
   5.128 -        mmu_updates[count].ptr = (mfn << PAGE_SHIFT) + sizeof(void *) * offset;
   5.129 +        mmu_updates[count].ptr = ((pgentry_t)mfn << PAGE_SHIFT) + sizeof(pgentry_t) * offset;
   5.130          mmu_updates[count].val = 
   5.131 -            pfn_to_mfn(pfn_to_map++) << PAGE_SHIFT | L1_PROT;
   5.132 +            (pgentry_t)pfn_to_mfn(pfn_to_map++) << PAGE_SHIFT | L1_PROT;
   5.133          count++;
   5.134          if (count == L1_PAGETABLE_ENTRIES || pfn_to_map == *max_pfn)
   5.135          {
   5.136 @@ -557,9 +561,6 @@ void init_mm(void)
   5.137      printk("  stack start:  %p\n", &stack);
   5.138      printk("  _end:         %p\n", &_end);
   5.139  
   5.140 -    /* set up minimal memory infos */
   5.141 -    phys_to_machine_mapping = (unsigned long *)start_info.mfn_list;
   5.142 -   
   5.143      /* First page follows page table pages and 3 more pages (store page etc) */
   5.144      start_pfn = PFN_UP(to_phys(start_info.pt_base)) + 
   5.145                  start_info.nr_pt_frames + 3;
   5.146 @@ -569,7 +570,7 @@ void init_mm(void)
   5.147      printk("  max_pfn:      %lx\n", max_pfn);
   5.148  
   5.149      build_pagetable(&start_pfn, &max_pfn);
   5.150 -    
   5.151 +
   5.152      /*
   5.153       * now we can initialise the page allocator
   5.154       */
     6.1 --- a/extras/mini-os/traps.c	Fri May 19 16:30:21 2006 +0100
     6.2 +++ b/extras/mini-os/traps.c	Fri May 19 16:52:52 2006 +0100
     6.3 @@ -95,25 +95,26 @@ DO_ERROR(18, "machine check", machine_ch
     6.4  
     6.5  void page_walk(unsigned long virt_address)
     6.6  {
     6.7 -        unsigned long *tab = (unsigned long *)start_info.pt_base;
     6.8 -        unsigned long addr = virt_address, page;
     6.9 +        pgentry_t *tab = (pgentry_t *)start_info.pt_base, page;
    6.10 +        unsigned long addr = virt_address;
    6.11          printk("Pagetable walk from virt %lx, base %lx:\n", virt_address, start_info.pt_base);
    6.12      
    6.13  #if defined(__x86_64__)
    6.14          page = tab[l4_table_offset(addr)];
    6.15 -        tab = to_virt(mfn_to_pfn(pte_to_mfn(page)) << PAGE_SHIFT);
    6.16 -        printk(" L4 = %p (%p)  [offset = %lx]\n", page, tab, l4_table_offset(addr));
    6.17 -
    6.18 +        tab = pte_to_virt(page);
    6.19 +        printk(" L4 = %"PRIpte" (%p)  [offset = %lx]\n", page, tab, l4_table_offset(addr));
    6.20 +#endif
    6.21 +#if defined(__x86_64__) || defined(CONFIG_X86_PAE)
    6.22          page = tab[l3_table_offset(addr)];
    6.23 -        tab = to_virt(mfn_to_pfn(pte_to_mfn(page)) << PAGE_SHIFT);
    6.24 -        printk("  L3 = %p (%p)  [offset = %lx]\n", page, tab, l3_table_offset(addr));
    6.25 +        tab = pte_to_virt(page);
    6.26 +        printk("  L3 = %"PRIpte" (%p)  [offset = %lx]\n", page, tab, l3_table_offset(addr));
    6.27  #endif
    6.28          page = tab[l2_table_offset(addr)];
    6.29 -        tab =  to_virt(mfn_to_pfn(pte_to_mfn(page)) << PAGE_SHIFT);
    6.30 -        printk("   L2 = %p (%p)  [offset = %lx]\n", page, tab, l2_table_offset(addr));
    6.31 +        tab = pte_to_virt(page);
    6.32 +        printk("   L2 = %"PRIpte" (%p)  [offset = %lx]\n", page, tab, l2_table_offset(addr));
    6.33          
    6.34          page = tab[l1_table_offset(addr)];
    6.35 -        printk("    L1 = %p (%p)  [offset = %lx]\n", page, tab, l1_table_offset(addr));
    6.36 +        printk("    L1 = %"PRIpte" (%p)  [offset = %lx]\n", page, tab, l1_table_offset(addr));
    6.37  
    6.38  }
    6.39  
     7.1 --- a/extras/mini-os/x86_32.S	Fri May 19 16:30:21 2006 +0100
     7.2 +++ b/extras/mini-os/x86_32.S	Fri May 19 16:52:52 2006 +0100
     7.3 @@ -4,9 +4,15 @@
     7.4  .section __xen_guest
     7.5  	.ascii	"GUEST_OS=Mini-OS"
     7.6  	.ascii	",XEN_VER=xen-3.0"
     7.7 +	.ascii	",VIRT_BASE=0xc0000000" /* &_text from minios_x86_32.lds */
     7.8 +	.ascii	",ELF_PADDR_OFFSET=0xc0000000"
     7.9  	.ascii	",HYPERCALL_PAGE=0x2"
    7.10 +#ifdef CONFIG_X86_PAE
    7.11 +	.ascii	",PAE=yes"
    7.12 +#else
    7.13 +	.ascii	",PAE=no"
    7.14 +#endif
    7.15  	.ascii	",LOADER=generic"
    7.16 -	.ascii	",PT_MODE_WRITABLE"
    7.17  	.byte	0
    7.18  .text
    7.19