forked from KolibriOS/kolibrios
kolibri-ahci:
- optimized signature checking git-svn-id: svn://kolibrios.org@9135 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a85d76349a
commit
b8a5378080
@ -504,29 +504,28 @@ ahci_init:
|
|||||||
|
|
||||||
; DEBUGF 1, "K: AHCI: After REBASING, signature = 0x%x\n", [edi + HBA_PORT.signature]
|
; DEBUGF 1, "K: AHCI: After REBASING, signature = 0x%x\n", [edi + HBA_PORT.signature]
|
||||||
|
|
||||||
|
; Determine drive type by checking port signature
|
||||||
.switch_sig:
|
.switch_sig:
|
||||||
cmp [edi + HBA_PORT.signature], SATA_SIG_ATA
|
cmp [edi + HBA_PORT.signature], SATA_SIG_ATA
|
||||||
jne @f
|
mov eax, AHCI_DEV_SATA
|
||||||
mov [ecx + PORT_DATA.drive_type], AHCI_DEV_SATA
|
jz .end_switch_sig
|
||||||
jmp .end_switch_sig
|
|
||||||
@@:
|
|
||||||
cmp [edi + HBA_PORT.signature], SATA_SIG_ATAPI
|
cmp [edi + HBA_PORT.signature], SATA_SIG_ATAPI
|
||||||
jne @f
|
mov eax, AHCI_DEV_SATAPI
|
||||||
mov [ecx + PORT_DATA.drive_type], AHCI_DEV_SATAPI
|
jz .end_switch_sig
|
||||||
jmp .end_switch_sig
|
|
||||||
@@:
|
|
||||||
cmp [edi + HBA_PORT.signature], SATA_SIG_SEMB
|
cmp [edi + HBA_PORT.signature], SATA_SIG_SEMB
|
||||||
jne @f
|
mov eax, AHCI_DEV_SEMB
|
||||||
mov [ecx + PORT_DATA.drive_type], AHCI_DEV_SEMB
|
jz .end_switch_sig
|
||||||
jmp .end_switch_sig
|
|
||||||
@@:
|
|
||||||
cmp [edi + HBA_PORT.signature], SATA_SIG_PM
|
cmp [edi + HBA_PORT.signature], SATA_SIG_PM
|
||||||
jne @f
|
mov eax, AHCI_DEV_PM
|
||||||
mov [ecx + PORT_DATA.drive_type], AHCI_DEV_PM
|
jz .end_switch_sig
|
||||||
jmp .end_switch_sig
|
|
||||||
@@:
|
|
||||||
DEBUGF 1, "Unknown device signature\n"
|
DEBUGF 1, "Unknown device signature\n"
|
||||||
|
mov eax, AHCI_DEV_NULL
|
||||||
.end_switch_sig:
|
.end_switch_sig:
|
||||||
|
mov [ecx + PORT_DATA.drive_type], eax
|
||||||
|
|
||||||
DEBUGF 1, "K: AHCI: found drive on port %u: TYPE = %u\n", ebx, [ecx + PORT_DATA.drive_type]
|
DEBUGF 1, "K: AHCI: found drive on port %u: TYPE = %u\n", ebx, [ecx + PORT_DATA.drive_type]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user