/kernel/trunk/core/apic.inc |
---|
447,6 → 447,7 |
jz .old_tics |
push ebx |
push esi |
pushfd |
cli |
456,15 → 457,24 |
mov eax, [ebx+0xF0] |
mov ecx, [ebx+0xF4] |
cmp ecx, edx |
jnz @B |
jne @B |
mov ecx, [hpet_period] |
mov ebx, edx |
imul ebx, ecx |
mul ecx |
add edx, ebx |
mul [hpet_period] |
shrd eax, edx, 10 |
shr edx, 10 |
mov ebx, eax |
mov esi, edx |
mov eax, ecx |
mul [hpet_period] |
shld edx, eax, 22 |
shl eax, 22 |
add eax, ebx |
adc edx, esi |
popfd |
pop esi |
pop ebx |
ret |
/kernel/trunk/init.inc |
---|
623,10 → 623,12 |
mov ecx, eax |
mov eax, [ebx+HPET_PERIOD] |
mov edx, 0x431BDE83 |
mul edx |
shr edx, 18 |
mov [hpet_period-OS_BASE], edx |
xor edx, edx |
shld edx, eax, 10 |
shl eax, 10 |
mov esi, 1000000 |
div esi |
mov [hpet_period-OS_BASE], eax |
mov esi, [ebx+HPET_CFG] |
and esi, not HPET_CFG_ENABLE |