bitkeeper revision 1.903 (40a35338ZpUgNaqcF2wHoseyC85T4Q)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Thu, 13 May 2004 10:51:36 +0000 (10:51 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Thu, 13 May 2004 10:51:36 +0000 (10:51 +0000)
manual merge

1  2 
tools/examples/xc_dom_control.py
xen/common/domain.c
xen/common/kernel.c
xen/common/memory.c

Simple merge
Simple merge
Simple merge
index 99931bb51551ba6f01b534759b8ee8a1491bd4ab,3f8ee288ee66f32179599fd31f485013e1dc2541..ddb2778bc3e1ade1cffa96ed83c0eb2fb952ba37
@@@ -209,20 -208,13 +208,19 @@@ void __init init_frametable(unsigned lo
      INIT_LIST_HEAD(&free_list);    
      free_pfns = 0;
  
-     /* so that we can map them latter, set the ownership of pages
-        belonging to the machine_to_phys_mapping to CPU0 idle task */
-     
-     mfn = virt_to_phys((void *)RDWR_MPT_VIRT_START)>>PAGE_SHIFT;
 +    /* initialise to a magic of 0x55555555 so easier to spot bugs later */
 +    memset( machine_to_phys_mapping, 0x55, 4*1024*1024 );
 +
 +    /* The array is sized for a 4GB machine regardless of actuall mem size. 
 +       This costs 4MB -- may want to fix some day */
-     for(i=0;i<1024*1024;i+=1024,mfn++)
++
+     /* Pin the ownership of the MP table so that DOM0 can map it later. */
+     for ( mfn = virt_to_phys((void *)RDWR_MPT_VIRT_START)>>PAGE_SHIFT;
+           mfn < virt_to_phys((void *)RDWR_MPT_VIRT_END)>>PAGE_SHIFT;
+           mfn++ )
      {
        frame_table[mfn].count_and_flags = 1 | PGC_allocated;
-       frame_table[mfn].type_and_flags = 1 | PGT_gdt_page; // anything non RW
+       frame_table[mfn].type_and_flags = 1 | PGT_gdt_page; /* non-RW type */
        frame_table[mfn].u.domain = &idle0_task;
      }
  }