fix: correction sur la réservation/liberation de mémoire physique (bitmap), limitation à 4Go de RAM en 32 bits

This commit is contained in:
Nicolas Hordé 2018-11-21 17:25:00 +01:00
parent c91c2a1e45
commit f04bb66ec8
1 changed files with 9 additions and 1 deletions

View File

@ -50,6 +50,10 @@ void bitmap_page_setused(u64 addr,u64 len)
u32 pagesrc=TOPAGE(addr); u32 pagesrc=TOPAGE(addr);
if (len & 0b1111111111 > 0) if (len & 0b1111111111 > 0)
nbpage++; nbpage++;
if (addr>0xFFFFFFFF)
return;
if (len>0xFFFFFFFF)
len=0xFFFFFFFF;
for(u32 page=pagesrc;page<pagesrc+nbpage;page++) for(u32 page=pagesrc;page<pagesrc+nbpage;page++)
bitmap_page_use(page); bitmap_page_use(page);
} }
@ -63,6 +67,10 @@ void bitmap_page_setfree(u64 addr,u64 len)
u32 pagesrc=TOPAGE(addr); u32 pagesrc=TOPAGE(addr);
if (len & 0b1111111111 > 0) if (len & 0b1111111111 > 0)
nbpage++; nbpage++;
if (addr>0xFFFFFFFF)
return;
if (len>0xFFFFFFFF)
len=0xFFFFFFFF;
for(u32 page=pagesrc;page<pagesrc+nbpage;page++) for(u32 page=pagesrc;page<pagesrc+nbpage;page++)
bitmap_page_free(page); bitmap_page_free(page);
} }