Fixed tripple-fault when creating a new frame, after the current was gc'd.
We'll need to get rid of that awful VGA sometime soon.
This commit is contained in:
parent
313079483a
commit
eb035d6a4a
|
@ -207,6 +207,7 @@ namespace Sortix
|
||||||
if ( process != NULL ) { ASSERT(CurrentProcess() == process); }
|
if ( process != NULL ) { ASSERT(CurrentProcess() == process); }
|
||||||
if ( userframe != NULL ) { Memory::UnmapUser((addr_t) userframe); Memory::InvalidatePage((addr_t) userframe); }
|
if ( userframe != NULL ) { Memory::UnmapUser((addr_t) userframe); Memory::InvalidatePage((addr_t) userframe); }
|
||||||
if ( physical != 0 ) { Page::Put(physical); }
|
if ( physical != 0 ) { Page::Put(physical); }
|
||||||
|
if ( VGA::currentframe == this ) { VGA::currentframe = NULL; }
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DevVGAFrame::IsType(unsigned type)
|
bool DevVGAFrame::IsType(unsigned type)
|
||||||
|
|
|
@ -217,6 +217,8 @@ namespace Sortix
|
||||||
// Don't switch if we are already there.
|
// Don't switch if we are already there.
|
||||||
if ( addrspace == currentdir ) { return currentdir; }
|
if ( addrspace == currentdir ) { return currentdir; }
|
||||||
|
|
||||||
|
if ( addrspace & 0xFFFUL ) { PanicF("addrspace 0x%zx was not page-aligned!", addrspace); }
|
||||||
|
|
||||||
addr_t previous = currentdir;
|
addr_t previous = currentdir;
|
||||||
|
|
||||||
// Switch and flush the TLB.
|
// Switch and flush the TLB.
|
||||||
|
|
Loading…
Reference in New Issue