else
{
// Large page
- // TODO:
Log_Warning("MMVirt", "TODO: Implement large pages in MM_int_SetPageInfo");
}
break;
case 20: // Section or unmapped
- Warning("TODO: Implement sections");
+ Log_Warning("MMVirt", "TODO: Implement sections in MM_int_SetPageInfo");
break;
case 24: // Supersection
// Error if not aligned
{
if( pi->PhysAddr == 0 ) {
*desc = 0;
- // TODO: Apply to all entries
- LEAVE('i', 0);
- return 0;
}
- // Apply
- *desc = pi->PhysAddr & 0xFF000000;
-// *desc |= ((pi->PhysAddr >> 32) & 0xF) << 20;
-// *desc |= ((pi->PhysAddr >> 36) & 0x7) << 5;
- *desc |= 2 | (1 << 18);
+ else {
+ // Apply
+ *desc = pi->PhysAddr & 0xFF000000;
+// *desc |= ((pi->PhysAddr >> 32) & 0xF) << 20;
+// *desc |= ((pi->PhysAddr >> 36) & 0x7) << 5;
+ *desc |= 2 | (1 << 18);
+ }
// TODO: Apply to all entries
+ Log_Warning("MMVirt", "TODO: Apply changes to all entries of supersections");
LEAVE('i', 0);
return 0;
}
// TODO: What here?
+ Log_Warning("MMVirt", "TODO: 24-bit not on supersection?");
LEAVE('i', 1);
return 1;
}
return ret;
}
-tPAddr MM_ClearUser(void)
+void MM_ClearUser(void)
{
- // TODO: Implement ClearUser
- return 0;
+ Log_KernelPanic("MMVirt", "TODO: Implement MM_ClearUser");
}
tVAddr MM_MapTemp(tPAddr PAddr)
if( MM_int_GetPageInfo(ret, &pi) == 0 )
continue;
-// Log("MapTemp %P at %p", PAddr, ret);
+ Log("MapTemp %P at %p by %p", PAddr, ret, __builtin_return_address(0));
MM_RefPhys(PAddr); // Counter the MM_Deallocate in FreeTemp
MM_Map(ret, PAddr);
void MM_FreeTemp(tVAddr VAddr)
{
- // TODO: Implement FreeTemp
if( VAddr < MM_TMPMAP_BASE || VAddr >= MM_TMPMAP_END ) {
Log_Warning("MMVirt", "MM_FreeTemp: Passed an addr not from MM_MapTemp (%p)", VAddr);
return ;
range_start = Start;
for( addr = Start; i == 0 || (addr && addr < End); i = 1 )
{
+ int rv;
// Log("addr = %p", addr);
- int rv = MM_int_GetPageInfo(addr, &pi);
+ rv = MM_int_GetPageInfo(addr, &pi);
if( rv
|| pi.Size != pi_old.Size
|| pi.Domain != pi_old.Domain