From 5c5874e6df0301f5d17f3b6f877927ad191fcf99 Mon Sep 17 00:00:00 2001 From: "Alexey Teplov (" Date: Thu, 7 Jan 2010 16:33:53 +0000 Subject: [PATCH] bugfix for svn rev. 1344 git-svn-id: svn://kolibrios.org@1365 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 3d95c6bf05..85236df83c 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -3408,7 +3408,6 @@ sheduler: endg sys_sheduler: ;rewritten by 29.12.2009 -; jmp dword [sheduler+eax*4] jmp dword [sheduler+ebx*4] ;.shed_counter: .00: @@ -3418,24 +3417,24 @@ sys_sheduler: .02: ;.perf_control: -; test ebx,ebx -; jz modify_pce ;if ecx=0 -; dec ebx -; jz is_cache_enabled ;if ecx=1 -; dec ebx -; jz cache_enable ;if ecx=2 -; ret -;;;;;;;; - test ecx,ecx + inc ebx ;before ebx=2, ebx=3 + cmp ebx,ecx ;if ecx=3, ebx=3 + jz cache_disable + + dec ebx ;ebx=2 + cmp ebx,ecx ; + jz cache_enable ;if ecx=2 and ebx=2 + + dec ebx ;ebx=1 + cmp ebx,ecx + jz is_cache_enabled ;if ecx=1 and ebx=1 + + dec ebx + test ebx,ecx ;ebx=0 and ecx=0 jz modify_pce ;if ecx=0 - dec ecx - jz is_cache_enabled ;if ecx=1 - dec ecx - jz cache_enable ;if ecx=2 + ret - - .03: ;.rdmsr_instr: ;now counter in ecx