Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5644 → Rev 5645

/kernel/branches/Kolibri-acpi/core/apic.inc
441,11 → 441,16
 
align 4
get_clock_ns:
 
mov eax, [hpet_base]
test eax, eax
jz .old_tics
 
push ebx
pushfd
cli
 
mov ebx, [hpet_base]
mov ebx, eax
@@:
mov edx, [ebx+0xF4]
mov eax, [ebx+0xF0]
463,3 → 468,9
pop ebx
ret
 
.old_tics:
mov eax, [timer_ticks]
mov edx, 10000000
mul edx
ret
 
/kernel/branches/Kolibri-acpi/init.inc
438,6 → 438,7
acpi_hpet_base rd 1
hpet_base rd 1
hpet_period rd 1
hpet_timers rd 1
 
cpu_count rd 1
smpt rd 16
605,7 → 606,15
align 4
init_hpet:
mov ebx, [hpet_base-OS_BASE]
test ebx, ebx
jz @F
 
mov eax, [ebx]
and ah, 0x1F
inc ah
movzx eax, ah
mov [hpet_timers-OS_BASE], eax
 
mov eax, [ebx+HPET_PERIOD]
mov edx, 0x431BDE83
mul edx
622,6 → 631,7
 
or eax, HPET_CFG_ENABLE
mov [ebx+HPET_CFG], eax ;and start again
@@:
ret
 
 
/kernel/branches/Kolibri-acpi/kernel.asm
698,17 → 698,23
@@:
mov [clipboard_main_list], eax
 
mov eax, [acpi_hpet_base]
DEBUGF 1, "K : ACPI HPET base %x\n", eax
mov eax, [hpet_base]
test eax, eax
jz @F
DEBUGF 1, "K : HPET base %x\n", eax
mov eax, [hpet_period]
DEBUGF 1, "K : HPET period %d\n", eax
mov eax, [hpet_timers]
DEBUGF 1, "K : HPET timers %d\n", eax
 
mov eax, [hpet_base]
stdcall map_io_mem, [hpet_base], 1024, PG_GLOBAL+PAT_UC+PG_SWR
mov [hpet_base], eax
 
mov eax, [eax]
DEBUGF 1, "K : HPET caps %x\n", eax
 
@@:
; SET UP OS TASK
 
mov esi, boot_setostask