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

[Xen-devel] [PATCH (Mini-OS, trivial)] documentation and questions for b

To: xen-devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH (Mini-OS, trivial)] documentation and questions for build_pagetable
From: Simon Kagstrom <simon.kagstrom@xxxxxx>
Date: Fri, 10 Feb 2006 11:28:39 +0100
Delivery-date: Fri, 10 Feb 2006 10:40:01 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Wanderlust/2.11.30 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
Hello!

A Mini-OS question for mm.c: I'm trying to understand what
build_pagetable does, and if I'm not mistaken, the purpose is to map
all the physical pages passed to the domain by Xen, right? And later
these are used for the memory allocation.

The patch adds documentation to build_pagetable and makes
print_allocation and print_chunks non-static to allow the compilation
to go through with MM_DEBUG enabled (-Werror is specified).

// Simon

Signed-off by: Simon Kagstrom <simon.kagstrom@xxxxxx>

===File ~/shared/mini-os.patch==============================
diff -r 57e6d7218427 extras/mini-os/hypervisor.c
--- a/extras/mini-os/hypervisor.c       Fri Feb  3 18:45:14 2006
+++ b/extras/mini-os/hypervisor.c       Fri Feb 10 11:26:48 2006
@@ -56,7 +56,7 @@
             l2 &= ~(1 << l2i);
 
             port = (l1i << 5) + l2i;
-                       do_event(port, regs);
+           do_event(port, regs);
         }
     }
 }
diff -r 57e6d7218427 extras/mini-os/mm.c
--- a/extras/mini-os/mm.c       Fri Feb  3 18:45:14 2006
+++ b/extras/mini-os/mm.c       Fri Feb 10 11:26:48 2006
@@ -150,7 +150,7 @@
  * Prints allocation[0/1] for @nr_pages, starting at @start
  * address (virtual).
  */
-static void print_allocation(void *start, int nr_pages)
+void print_allocation(void *start, int nr_pages)
 {
     unsigned long pfn_start = virt_to_pfn(start);
     int count;
@@ -165,7 +165,7 @@
  * Prints chunks (making them with letters) for @nr_pages starting
  * at @start (virtual).
  */
-static void print_chunks(void *start, int nr_pages)
+void print_chunks(void *start, int nr_pages)
 {
     char chunks[1001], current='A';
     int order, count;
@@ -366,6 +366,20 @@
     free_head[order] = freed_ch;   
    
 }
+
+/* Build an initial page table. This will fill in the page table with
+ * the physical pages passed to the Mini OS kernel and return the page
+ * frame numbers of the first free page.
+ *
+ * @param start_pfn a pointer to the first (physical) page frame
+ * number of the free physical pages. When the function returns, this
+ * will be updated to refer to the first free (unmapped) page frame
+ * that can be used by the memory allocator.
+
+ * @param max_pfn a pointer to the last page frame number that was
+ * passed to this domain. This will be sanity checked and updated
+ * accordingly.
+ */
 void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn)
 {
     unsigned long pfn_to_map, pt_frame;
============================================================

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH (Mini-OS, trivial)] documentation and questions for build_pagetable, Simon Kagstrom <=