fix: ata disk enumeration
This commit is contained in:
parent
008c7800f4
commit
29e5ba8116
|
@ -43,7 +43,7 @@ SRCS = kernel.asm \
|
|||
.PHONY: all
|
||||
all: $(KERNEL)
|
||||
|
||||
PHONY: const.inc
|
||||
.PHONY: const.inc
|
||||
const.inc: const.inc.in
|
||||
sh $(TOOLSDIR)/version.sh $< $@
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@ bio_init:
|
|||
rep stosb
|
||||
ret
|
||||
|
||||
bio_get:
|
||||
;; Function: bio_read
|
||||
;;
|
||||
bio_bread:
|
||||
mov eax, uBIOLock
|
||||
call lock_acquire
|
||||
|
||||
|
@ -27,7 +29,14 @@ bio_get:
|
|||
call lock_release
|
||||
ret
|
||||
|
||||
;; Function: bio_brelse
|
||||
;; Unbusy a buffer and release it to the free lists.
|
||||
bio_brelse:
|
||||
mov eax, uBIOLock
|
||||
call lock_acquire
|
||||
|
||||
mov eax, uBIOLock
|
||||
call lock_release
|
||||
ret
|
||||
|
||||
uBIOLock dd 0
|
||||
|
|
|
@ -156,17 +156,17 @@ ata_probe:
|
|||
jnz .skip
|
||||
|
||||
push ecx
|
||||
cmp ecx, ATA_CHAN1_IO
|
||||
cmp bx, ATA_CHAN1_IO
|
||||
jne @f
|
||||
add ecx, 2
|
||||
jmp .drive_found
|
||||
@@:
|
||||
cmp ecx, ATA_CHAN2_IO
|
||||
cmp bx, ATA_CHAN2_IO
|
||||
jne @f
|
||||
add ecx, 4
|
||||
jmp .drive_found
|
||||
@@:
|
||||
cmp ecx, ATA_CHAN3_IO
|
||||
cmp bx, ATA_CHAN3_IO
|
||||
jne @f
|
||||
add ecx, 8
|
||||
jmp .drive_found
|
||||
|
|
Loading…
Reference in a new issue