fix paging SEG

This commit is contained in:
Sparchatus 2022-03-22 16:12:47 +00:00
parent 2dd4f8d45f
commit 54c9c5d73b

View File

@ -637,8 +637,7 @@ errval_t paging_map_fixed_attr(struct paging_state *st, lvaddr_t vaddr,
// precisely exist as required or not at all, i.e. it is not overlapping multiple existing regions
// TODO rueegges: not sure this is the best way to do this
struct pt_vaddr_reg_t *vaddr_reg = st->vaddr_head;
while(vaddr_reg != NULL) {
vaddr_reg = vaddr_reg->next;
for(;vaddr_reg != NULL; vaddr_reg = vaddr_reg->next) {
// we have found the region it belongs to
if(vaddr_reg->base <= vaddr && vaddr + bytes <= vaddr_reg->base + vaddr_reg->size) {
if (vaddr_reg->free == true) {