Skip to content

Commit

Permalink
CPU reset: Make sure to turn off PSE extensions flag, and clear CR4, …
Browse files Browse the repository at this point in the history
…so that Windows XP boots properly after a reboot if it used PSE extensions.
  • Loading branch information
joncampbell123 committed Dec 26, 2024
1 parent 1968d02 commit 81b0514
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cpu/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4222,6 +4222,11 @@ void CPU_OnReset(Section* sec) {
CPU_Snap_Back_Forget();
CPU_SetFlags(0,~0UL);

do_pse = false;
if(CPU_ArchitectureType >= CPU_ARCHTYPE_486NEW) {
cpu.cr4 = 0;
}

Segs.limit[cs]=0xFFFF;
Segs.expanddown[cs]=false;
if (CPU_ArchitectureType >= CPU_ARCHTYPE_386) {
Expand Down

0 comments on commit 81b0514

Please sign in to comment.