- Fixed TLB flush on CR3 change - flush all pages is CR4.PGE is OFF
This commit is contained in:
parent
f275eb3e86
commit
e2fa98b629
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.508 2008-08-13 21:51:53 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.509 2008-08-16 15:35:35 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2996,8 +2996,6 @@ public: // for now...
|
||||
|
||||
#if BX_SUPPORT_GLOBAL_PAGES
|
||||
BX_SMF void TLB_flushNonGlobal(void);
|
||||
#else
|
||||
#define TLB_flushNonGlobal() TLB_flush()
|
||||
#endif
|
||||
BX_SMF void TLB_flush(void);
|
||||
BX_SMF void TLB_invlpg(bx_address laddr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: paging.cc,v 1.153 2008-08-15 14:30:50 sshwarts Exp $
|
||||
// $Id: paging.cc,v 1.154 2008-08-16 15:35:35 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -427,7 +427,12 @@ BX_CPU_C::pagingCR4Changed(Bit32u oldCR4, Bit32u newCR4)
|
||||
BX_CPU_C::SetCR3(bx_address val)
|
||||
{
|
||||
// flush TLB even if value does not change
|
||||
#if BX_SUPPORT_GLOBAL_PAGES
|
||||
if (BX_CPU_THIS_PTR cr4.get_PGE())
|
||||
TLB_flushNonGlobal(); // Don't flush Global entries.
|
||||
else
|
||||
#endif
|
||||
TLB_flush(); // Flush Global entries also.
|
||||
|
||||
#if BX_SUPPORT_PAE
|
||||
if (BX_CPU_THIS_PTR cr4.get_PAE() && !long_mode()) {
|
||||
|
Loading…
Reference in New Issue
Block a user