return EINVAL;
}
+ /* Contiguous phys memory has to be preallocated. */
+ if((m->VMM_FLAGS & (MAP_CONTIG|MAP_PREALLOC)) == MAP_CONTIG) {
+ return EINVAL;
+ }
+
if(m->VMM_FLAGS & MAP_PREALLOC) mfflags |= MF_PREALLOC;
if(m->VMM_FLAGS & MAP_LOWER16M) vrflags |= VR_LOWER16MB;
if(m->VMM_FLAGS & MAP_LOWER1M) vrflags |= VR_LOWER1MB;
u32_t allocflags;
phys_bytes physaddr;
struct phys_region *newpr;
+ int region_has_single_block;
int written = 0;
#if SANITYCHECKS
written = ph->written;
/* Put new free memory in. */
allocflags = vrallocflags(region->flags);
- assert(!(allocflags & PAF_CONTIG));
+ region_has_single_block = (offset == 0 && length == region->length);
+ assert(region_has_single_block || !(allocflags & PAF_CONTIG));
assert(!(allocflags & PAF_CLEAR));
if(map_new_physblock(vmp, region, offset, length,