Changeset 445 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Aug 29, 2012, 12:59:23 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r442 r445 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ; GNU General Public License for more details. 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 ; 19 ; 20 20 21 21 ; Section containing code … … 28 28 ; Returns: 29 29 ; CF: Set if failed to verify ATA-ID 30 ; Cleared if ATA-ID verified succes fully30 ; Cleared if ATA-ID verified successfully 31 31 ; Corrupts registers: 32 32 ; AX, BX, CX … … 44 44 call .CompareCHorSfromOffsetBXtoMaxValueInCX 45 45 46 add bx, BYTE ATA1.wHeadCnt - ATA1.wCylCnt46 mov bl, ATA1.wHeadCnt & 0FFh 47 47 mov cx, MAX_VALID_PCHS_HEADS 48 48 call .CompareCHorSfromOffsetBXtoMaxValueInCX 49 49 50 add bx, BYTE ATA1.wSPT - ATA1.wHeadCnt50 mov bl, ATA1.wSPT & 0FFh 51 51 mov cl, MAX_VALID_PCHS_SECTORS_PER_TRACK 52 52 call .CompareCHorSfromOffsetBXtoMaxValueInCX … … 69 69 ; Check checksum byte 70 70 mov cx, ATA6_size 71 call Memory_SumCXbytesFromESSItoAL 72 test al, al 71 call Memory_SumCXbytesFromESSItoAL ; Returns with ZF set according to result 73 72 jnz SHORT .FailedToVerifyAtaID 74 73 … … 119 118 mov bx, [es:si+ATA1.bPioMode] 120 119 mov ax, bx ; AH = 0, AL = PIO mode 0, 1 or 2 121 shlbx, 1 ; Shift for WORD lookup120 eSHL_IM bx, 1 ; Shift for WORD lookup 122 121 mov cx, [cs:bx+.rgwPio0to2CycleTimeInNanosecs] 123 122 … … 187 186 ;-------------------------------------------------------------------- 188 187 AtaID_GetActiveTimeToAXfromPioModeInBX: 189 shl bx, 1 190 mov ax, [cs:bx+.rgwPioModeToActiveTimeNs] 191 shr bx, 1 192 ret 193 194 .rgwPioModeToActiveTimeNs: 195 dw PIO_0_MIN_ACTIVE_TIME_NS 196 dw PIO_1_MIN_ACTIVE_TIME_NS 197 dw PIO_2_MIN_ACTIVE_TIME_NS 198 dw PIO_3_MIN_ACTIVE_TIME_NS 199 dw PIO_4_MIN_ACTIVE_TIME_NS 200 dw PIO_5_MIN_ACTIVE_TIME_NS 201 dw PIO_6_MIN_ACTIVE_TIME_NS 188 eMOVZX ax, [cs:bx+.rgbPioModeToActiveTimeNs] 189 ret 190 191 .rgbPioModeToActiveTimeNs: 192 db PIO_0_MIN_ACTIVE_TIME_NS 193 db PIO_1_MIN_ACTIVE_TIME_NS 194 db PIO_2_MIN_ACTIVE_TIME_NS 195 db PIO_3_MIN_ACTIVE_TIME_NS 196 db PIO_4_MIN_ACTIVE_TIME_NS 197 db PIO_5_MIN_ACTIVE_TIME_NS 198 db PIO_6_MIN_ACTIVE_TIME_NS 202 199 203 200 %endif ; MODULE_ADVANCED_ATA
Note:
See TracChangeset
for help on using the changeset viewer.