diff --git a/src/sys/vmm/getfreepage.c b/src/sys/vmm/getfreepage.c index b3ded2c..9989ec1 100644 --- a/src/sys/vmm/getfreepage.c +++ b/src/sys/vmm/getfreepage.c @@ -29,6 +29,9 @@ #include #include +#include + +static spinLock_t vmmGFPlock = SPIN_LOCK_INITIALIZER; /************************************************************************ @@ -46,7 +49,9 @@ { uInt16 x = 0x0, y = 0x0; uInt32 *pageTableSrc = 0x0; - + + spinLock(&vmmGFPlock); + /* Lets Search For A Free Page */ for (x = 768; x < 1024; x++) { @@ -61,16 +66,24 @@ /* Clear This Page So No Garbage Is There */ vmmClearVirtualPage((uInt32) ((x * 0x400000) + (y * 0x1000))); /* Return The Address Of The Newly Allocate Page */ + spinUnlock(&vmmGFPlock); return ((void *)((x * 0x400000) + (y * 0x1000))); } } } /* If No Free Page Was Found Return NULL */ + spinUnlock(&vmmGFPlock); return (0x0); } /*** $Log$ + Revision 1.5 2004/07/28 15:05:43 reddawg + Major: + Pages now have strict security enforcement. + Many null dereferences have been resolved. + When apps loaded permissions set for pages rw and ro + Revision 1.4 2004/07/28 00:17:05 reddawg Major: Disconnected page 0x0 from the system... Unfortunately this broke many things