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