vm: include no-caching bits in PTF_ALLFLAGS for flags sanity check.

This commit is contained in:
Ben Gras 2010-04-13 11:08:08 +00:00
parent 1f1f8d2207
commit 5c17d5e02f
2 changed files with 3 additions and 3 deletions

View file

@ -855,8 +855,7 @@ PUBLIC void pt_init(phys_bytes usedlimit)
I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE | I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE |
global_bit; global_bit;
if(flags & VMMF_UNCACHED) if(flags & VMMF_UNCACHED)
kern_mappings[index].flags |= kern_mappings[index].flags |= PTF_NOCACHE;
I386_VM_PWT | I386_VM_PCD;
if(addr % I386_PAGE_SIZE) if(addr % I386_PAGE_SIZE)
panic("VM: addr unaligned: %d", addr); panic("VM: addr unaligned: %d", addr);
if(len % I386_PAGE_SIZE) if(len % I386_PAGE_SIZE)

View file

@ -30,11 +30,12 @@ typedef struct {
#define PTF_USER I386_VM_USER #define PTF_USER I386_VM_USER
#define PTF_GLOBAL I386_VM_GLOBAL #define PTF_GLOBAL I386_VM_GLOBAL
#define PTF_MAPALLOC I386_VM_PTAVAIL1 /* Page allocated by pt code. */ #define PTF_MAPALLOC I386_VM_PTAVAIL1 /* Page allocated by pt code. */
#define PTF_NOCACHE (I386_VM_PWT | I386_VM_PCD)
/* For arch-specific PT routines to check if no bits outside /* For arch-specific PT routines to check if no bits outside
* the regular flags are set. * the regular flags are set.
*/ */
#define PTF_ALLFLAGS (PTF_WRITE|PTF_PRESENT|PTF_USER|PTF_GLOBAL) #define PTF_ALLFLAGS (PTF_WRITE|PTF_PRESENT|PTF_USER|PTF_GLOBAL|PTF_NOCACHE)
#if SANITYCHECKS #if SANITYCHECKS
#define PT_SANE(p) { pt_sanitycheck((p), __FILE__, __LINE__); } #define PT_SANE(p) { pt_sanitycheck((p), __FILE__, __LINE__); }