Paging cleanup

This commit is contained in:
Jonathan Campbell
2025-01-22 12:04:20 -08:00
parent ea866e57f9
commit 4e21a21b39
4 changed files with 6 additions and 6 deletions

View File

@@ -200,7 +200,7 @@ void PAGING_LinkPage_ReadOnly(Bitu lin_page,Bitu phys_page);
void PAGING_UnlinkPages(Bitu lin_page,Bitu pages);
/* This maps the page directly, only use when paging is disabled */
void PAGING_MapPage(Bitu lin_page,Bitu phys_page);
bool PAGING_MakePhysPage(Bitu & page);
bool PAGING_MakePhysPage(PageNum &page);
void MEM_SetLFB(Bitu page, Bitu pages, PageHandler *handler, PageHandler *mmiohandler);
void MEM_SetPageHandler(Bitu phys_page, Bitu pages, PageHandler * handler);

View File

@@ -103,8 +103,8 @@ static bool MakeCodePage(LinearPt lin_addr,CodePageHandler * &cph) {
cph=nullptr; return false;
}
}
Bitu lin_page=lin_addr >> 12;
Bitu phys_page=lin_page;
const PageNum lin_page = PageNum(lin_addr >> 12);
PageNum phys_page = lin_page;
if (!PAGING_MakePhysPage(phys_page)) {
LOG_MSG("DYNX86:Can't find physpage");
cph=nullptr; return false;

View File

@@ -153,8 +153,8 @@ static bool MakeCodePage(Bitu lin_addr,CodePageHandlerDynRec * &cph) {
return false;
}
}
Bitu lin_page=lin_addr>>12;
Bitu phys_page=lin_page;
const PageNum lin_page = PageNum(lin_addr >> 12u);
PageNum phys_page = lin_page;
// find the physical page that the linear page is mapped to
if (!PAGING_MakePhysPage(phys_page)) {
LOG_MSG("DYNREC:Can't find physpage");

View File

@@ -930,7 +930,7 @@ initpage_retry:
}
};
bool PAGING_MakePhysPage(Bitu & page) {
bool PAGING_MakePhysPage(PageNum &page) {
// page is the linear address on entry
if (paging.enabled) {
// check the page directory entry for this address