Changes

249 bytes added ,  11:53, 18 April 2020
Line 100: Line 100:  
** This fixes the issue that pages were sometimes memset to zero unnecessarily, because they were already zero'd by some previous operation.
 
** This fixes the issue that pages were sometimes memset to zero unnecessarily, because they were already zero'd by some previous operation.
 
** Newly allocated pages being all-zero is now a kernel invariant.
 
** Newly allocated pages being all-zero is now a kernel invariant.
* KPageTable::ChangePermissions was changed substantially.
+
* A new KMemoryPermission bit (0x40) was added. When this bit is set, the page is completely unmapped (for both user and kernel). This is done when e.g. memory is mirrored via MapMemory, when memory is locked for IPC usage, etc.
 +
* KPageTable::ChangePermissions was changed substantially to accommodate this.
 
** Previously, it separated pages, iterated over mappings changing permissions as required (and invalidating + flushing cache if bool arg is true), then merged pages.
 
** Previously, it separated pages, iterated over mappings changing permissions as required (and invalidating + flushing cache if bool arg is true), then merged pages.
 
** Now, the function has a lambda which iterates over all mappings, changing permissions as required and performing additional operations depending on a bitflag parameter.
 
** Now, the function has a lambda which iterates over all mappings, changing permissions as required and performing additional operations depending on a bitflag parameter.