diff --git a/kernel/branches/Kolibri-acpi/core/apic.inc b/kernel/branches/Kolibri-acpi/core/apic.inc index 70c4aaf195..0128307b54 100644 --- a/kernel/branches/Kolibri-acpi/core/apic.inc +++ b/kernel/branches/Kolibri-acpi/core/apic.inc @@ -339,17 +339,19 @@ IRQ_mask_all: ret ; ----------------------------------------- ; End Of Interrupt -; al - IRQ number +; cl - IRQ number align 16 -IRQ_EOI: +irq_eoi: ; __fastcall test dword[APIC], 0xffffffff jnz .APIC - cmp al, 8 + cmp cl, 8 mov al, 0x20 jb @f out 0xa0, al -@@: out 0x20, al +@@: + out 0x20, al ret + .APIC: mov eax, [LAPIC_BASE] mov dword [eax + APIC_EOI], 0 ; EOI diff --git a/kernel/branches/Kolibri-acpi/core/heap.inc b/kernel/branches/Kolibri-acpi/core/heap.inc index ca3b9e6a05..a1a6d41fdd 100644 --- a/kernel/branches/Kolibri-acpi/core/heap.inc +++ b/kernel/branches/Kolibri-acpi/core/heap.inc @@ -7,7 +7,6 @@ $Revision$ -HASH_IT = 1 struc MEM_BLOCK { @@ -279,8 +278,6 @@ align 4 proc alloc_kernel_space stdcall, size:dword local block_ind:DWORD -; xchg bx, bx - push ebx push esi push edi @@ -386,8 +383,6 @@ endp align 4 proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword -; xchg bx, bx - mov ecx, heap_mutex call mutex_lock @@ -566,7 +561,8 @@ proc kernel_free stdcall, base:dword call mutex_unlock - mov ecx, [esi+block_size]; + mov eax, [esi+block_base] + mov ecx, [esi+block_size] shr ecx, 12 call release_pages ;eax, ecx stdcall free_kernel_space, [base] diff --git a/kernel/branches/Kolibri-acpi/core/irq.inc b/kernel/branches/Kolibri-acpi/core/irq.inc index 87e5eddfdf..6d1af88aa1 100644 --- a/kernel/branches/Kolibri-acpi/core/irq.inc +++ b/kernel/branches/Kolibri-acpi/core/irq.inc @@ -184,8 +184,9 @@ align 16 .exit: mov [check_idle_semaphore],5 - mov eax, ebp - call IRQ_EOI + mov ecx, ebp + call irq_eoi + restore_ring3_context add esp, 4 iret @@ -196,8 +197,8 @@ irqD: push ecx xor eax,eax out 0xf0,al - mov eax, 13 - call IRQ_EOI + mov cl, 13 + call irq_eoi pop ecx pop eax iret diff --git a/kernel/branches/Kolibri-acpi/core/peload.inc b/kernel/branches/Kolibri-acpi/core/peload.inc index 809926d93f..9856b070ac 100644 --- a/kernel/branches/Kolibri-acpi/core/peload.inc +++ b/kernel/branches/Kolibri-acpi/core/peload.inc @@ -314,6 +314,7 @@ __exports: pci_write16, 'PciWrite16', \ ; stdcall pci_write32, 'PciWrite32', \ ; stdcall \ + get_pid, 'GetPid', \ get_service, 'GetService', \ ; reg_service, 'RegService', \ ; stdcall attach_int_handler, 'AttachIntHandler', \ ; stdcall diff --git a/kernel/branches/Kolibri-acpi/core/sched.inc b/kernel/branches/Kolibri-acpi/core/sched.inc index 03b23b594e..7612a0df94 100644 --- a/kernel/branches/Kolibri-acpi/core/sched.inc +++ b/kernel/branches/Kolibri-acpi/core/sched.inc @@ -27,8 +27,8 @@ irq0: add [next_usage_update],100 call updatecputimes .nocounter: - mov al, 0 ; send End Of Interrupt signal - call IRQ_EOI + xor ecx, ecx ; send End Of Interrupt signal + call irq_eoi btr dword[DONT_SWITCH], 0 jc .return call find_next_task diff --git a/kernel/branches/Kolibri-acpi/core/sys32.inc b/kernel/branches/Kolibri-acpi/core/sys32.inc index 341bcca448..5cc16ae918 100644 --- a/kernel/branches/Kolibri-acpi/core/sys32.inc +++ b/kernel/branches/Kolibri-acpi/core/sys32.inc @@ -127,9 +127,9 @@ exc_c: ; reg_esi equ esp+0x04 reg_edi equ esp+0x00 - mov ax, app_data ;исключение - mov ds, ax ;загрузим правильные значени - mov es, ax ;в регистры + mov ax, app_data ;исключение + mov ds, ax ;загрузим правильные значения + mov es, ax ;в регистры cld ; и приводим DF к стандарту movzx ebx,bl ; redirect to V86 manager? (EFLAGS & 0x20000) != 0? diff --git a/kernel/branches/Kolibri-acpi/core/taskman.inc b/kernel/branches/Kolibri-acpi/core/taskman.inc index 643424f1c3..05e52bf0ac 100644 --- a/kernel/branches/Kolibri-acpi/core/taskman.inc +++ b/kernel/branches/Kolibri-acpi/core/taskman.inc @@ -127,7 +127,7 @@ proc fs_execute @@: lea eax, [filename] stdcall load_file, eax - mov ecx, -ERROR_FILE_NOT_FOUND + mov esi, -ERROR_FILE_NOT_FOUND test eax, eax jz .err_file @@ -136,13 +136,10 @@ proc fs_execute lea ebx, [hdr_cmdline] call test_app_header - mov ecx, -0x1F + mov esi, -0x1F test eax, eax jz .err_hdr - ;mov esi, new_process_loading - ;call sys_msg_board_str ; write message to message board - .wait_lock: cmp [application_table_status],0 je .get_lock @@ -159,7 +156,7 @@ proc fs_execute call get_new_process_place test eax, eax - mov ecx, -0x20 ; too many processes + mov esi, -0x20 ; too many processes jz .err mov [slot], eax @@ -194,7 +191,7 @@ proc fs_execute mov [save_cr3], ebx stdcall create_app_space,[hdr_mem],[file_base],[file_size] - mov ecx, -30 ; no memory + mov esi, -30 ; no memory test eax, eax jz .failed @@ -250,7 +247,7 @@ end if .err_file: xor eax, eax mov [application_table_status],eax - mov eax, ecx + mov eax, esi ret endp diff --git a/kernel/branches/Kolibri-acpi/core/v86.inc b/kernel/branches/Kolibri-acpi/core/v86.inc index 238b0ab4ff..1c96fe475b 100644 --- a/kernel/branches/Kolibri-acpi/core/v86.inc +++ b/kernel/branches/Kolibri-acpi/core/v86.inc @@ -898,10 +898,8 @@ v86_irq2: pop ecx .cont: loop .scan - - mov eax, edi - call IRQ_EOI - + mov ecx, edi + call irq_eoi popad iretd .found: