From 7d1826758eafa72f3d1a87654e9ebbfa1101ddc8 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Fri, 20 Oct 2006 08:35:15 +0000 Subject: [PATCH] Corrections in DMA code from Mario79 git-svn-id: svn://kolibrios.org@187 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 8 ++++---- kernel/trunk/core/sched.inc | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index d4a32e779b..745320d95b 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -465,15 +465,15 @@ sayerr: mov si, 0 ; device index = 0 int 0x1A jnc .found -; b) class 1, subclass 1, programming interface 0x85 +; b) class 1, subclass 1, programming interface 0x8A mov ax, 0xB103 - mov ecx, 1*10000h + 1*100h + 0x85 + mov ecx, 1*10000h + 1*100h + 0x8A mov si, 0 ; device index = 0 int 0x1A jnc .found -; c) class 1, subclass 1, programming interface 0x8A +; c) class 1, subclass 1, programming interface 0x85 mov ax, 0xB103 - mov ecx, 1*10000h + 1*100h + 0x8A + mov ecx, 1*10000h + 1*100h + 0x85 mov si, 0 int 0x1A jc .nopci diff --git a/kernel/trunk/core/sched.inc b/kernel/trunk/core/sched.inc index 5effb54a4b..a52bd0f631 100644 --- a/kernel/trunk/core/sched.inc +++ b/kernel/trunk/core/sched.inc @@ -62,10 +62,23 @@ change_task: pushad call update_counters +; \begin{Mario79} + cmp [dma_task_switched], 1 + jne .find_next_task + mov [dma_task_switched], 0 + mov ebx, [dma_process] + cmp [0x3000], ebx + je .return + mov edi, [dma_slot_ptr] + mov [0x3000], ebx + mov [0x3010], edi + jmp @f +.find_next_task: +; \end{Mario79} call find_next_task test eax, eax ; the same task -> skip switch jnz .return - +@@: mov [0xffff],byte 1 call do_change_task