X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fmem.c;h=7772582412e69fec0901d9c4ccaf546ba765c971;hb=4939ecae04ce6416f404670640620a23aee9b914;hp=5267ee139b1f1c5feb9f1a2f635544c2f17d5791;hpb=190b2ef9470c23c275754b74745933d973f8c439;p=palacios.git diff --git a/palacios/src/geekos/mem.c b/palacios/src/geekos/mem.c index 5267ee1..7772582 100644 --- a/palacios/src/geekos/mem.c +++ b/palacios/src/geekos/mem.c @@ -2,7 +2,7 @@ * Physical memory allocation * Copyright (c) 2001,2003,2004 David H. Hovemeyer * Copyright (c) 2003, Jeffrey K. Hollingsworth - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -22,6 +22,7 @@ #include #include + /* ---------------------------------------------------------------------- * Global data * ---------------------------------------------------------------------- */ @@ -36,6 +37,18 @@ struct Page* g_pageList; */ uint_t g_freePageCount = 0; + + +/* + * the disgusting way to get at the memory assigned to a VM + */ +extern ulong_t vm_range_start; +extern ulong_t vm_range_end; +extern ulong_t guest_kernel_start; +extern ulong_t guest_kernel_end; + + + /* ---------------------------------------------------------------------- * Private data and functions * ---------------------------------------------------------------------- */ @@ -56,6 +69,9 @@ static struct Page_List s_freeList; */ int unsigned s_numPages; + + + /* * Add a range of pages to the inventory of physical memory. */ @@ -172,7 +188,13 @@ void Init_Mem(struct Boot_Info* bootInfo) vmmMemEnd = Round_Up_To_Page(pageListEnd + VMM_AVAIL_MEM_SIZE); - + /* + * the disgusting way to get at the memory assigned to a VM + */ + vm_range_start = vmmMemEnd; + vm_range_end = endOfMem; + guest_kernel_start = ISA_HOLE_END; + guest_kernel_end = guestEnd; Add_Page_Range(0, PAGE_SIZE, PAGE_UNUSED); // BIOS area Add_Page_Range(PAGE_SIZE, PAGE_SIZE * 3, PAGE_ALLOCATED); // Intial kernel thread obj + stack