Changeset 542 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Apr 15, 2013, 4:03:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm
r534 r542 41 41 in al, QD65XX_BASE_PORT + QD65XX_CONFIG_REGISTER_in 42 42 43 %if 043 %ifdef DANGEROUS_DETECTION 44 44 ; Checking alternative base port is currently commented away 45 45 ; since Intel PIIX4 south bridge mirrors Interrupt Controller registers … … 51 51 or dl, QD65XX_ALTERNATIVE_BASE_PORT 52 52 in al, QD65XX_ALTERNATIVE_BASE_PORT + QD65XX_CONFIG_REGISTER_in 53 %endif ; 053 %endif ; DANGEROUS_DETECTION 54 54 ; Fall to IsConfigRegisterWithIDinAL 55 55 … … 65 65 ; Nothing 66 66 ;-------------------------------------------------------------------- 67 ;IsConfigRegisterWithIDinAL:67 IsConfigRegisterWithIDinAL: 68 68 mov ah, al 69 69 and al, MASK_QDCONFIG_CONTROLLER_ID -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r526 r542 95 95 96 96 97 ;-------------------------------------------------------------------- 98 ; Writes user defined limits from ROMVARS to ATA ID read from the drive. 99 ; Modifying the ATA ID reduces code and possibilites for bugs since 100 ; only little furher checks are needed elsewhere. 101 ; 102 ; AtaID_ModifyESSIforUserDefinedLimitsAndReturnTranslateModeInDX 103 ; Parameters: 104 ; DS:DI: Ptr to incomplete Disk Parameter Table 105 ; ES:SI: Ptr to 512-byte ATA information read from the drive 106 ; CS:BP: Ptr to IDEVARS for the controller 107 ; Returns: 108 ; DX: User defined P-CHS to L-CHS translate mode 109 ; Corrupts registers: 110 ; AX, BX, CX 111 ;-------------------------------------------------------------------- 112 AtaID_ModifyESSIforUserDefinedLimitsAndReturnTranslateModeInDX: 113 call AccessDPT_GetPointerToDRVPARAMStoCSBX 114 push ds 115 push es 116 pop ds ; DS:SI now points to ATA information 117 118 ; Load User Defined CHS or LBA to CX:AX 119 mov dx, [cs:bx+DRVPARAMS.wFlags] 120 mov ax, [cs:bx+DRVPARAMS.wCylinders] ; Or .dwMaximumLBA 121 mov cx, [cs:bx+DRVPARAMS.wHeadsAndSectors] ; Or .dwMaximumLBA+2 122 123 ; * User defined CHS * 124 test dl, FLG_DRVPARAMS_USERCHS 125 jz SHORT .NoUserDefinedCHS 126 127 ; Apply new CHS and disable LBA (we also want to set CHS addressing) 128 mov [si+ATA1.wCylCnt], ax 129 eMOVZX ax, cl 130 mov [si+ATA1.wHeadCnt], ax 131 mov al, ch 132 mov [si+ATA1.wSPT], ax 133 and BYTE [si+ATA1.wCaps+1], ~(A1_wCaps_LBA>>8) 134 and BYTE [si+ATA6.wSetSup83+1], ~(A6_wSetSup83_LBA48>>8) 135 .NoUserDefinedCHS: 136 137 ; * User defined LBA * 138 test dl, FLG_DRVPARAMS_USERLBA 139 jz SHORT .NoUserDefinedLBA 140 141 ; Apply new LBA and disable LBA48 142 cmp cx, [si+ATA1.dwLBACnt+2] 143 ja SHORT .NoUserDefinedLBA ; Do not set larger than drive 144 jb SHORT .StoreNewLBA 145 cmp ax, [si+ATA1.dwLBACnt] 146 ja SHORT .NoUserDefinedLBA ; Allow same size to disable LBA48 147 .StoreNewLBA: 148 mov [si+ATA1.dwLBACnt], ax 149 mov [si+ATA1.dwLBACnt+2], cx 150 and BYTE [si+ATA6.wSetSup83+1], ~(A6_wSetSup83_LBA48>>8) 151 .NoUserDefinedLBA: 152 153 ; * Disable Block Mode transfers * 154 test dl, FLG_DRVPARAMS_BLOCKMODE 155 jnz SHORT .NoNeedToDisableBlockMode 156 mov BYTE [si+ATA1.bBlckSize], 1 ; sectors 157 .NoNeedToDisableBlockMode: 158 159 ; * Load P-CHS to L-CHS translate mode to DX * 160 and dx, BYTE MASK_DRVPARAMS_TRANSLATEMODE 161 eSHR_IM dx, TRANSLATEMODE_FIELD_POSITION 162 163 pop ds 164 ret 165 166 97 167 %ifdef MODULE_ADVANCED_ATA 98 168 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r541 r542 95 95 ;-------------------------------------------------------------------- 96 96 .StoreDptPointersToIntVectors: 97 %ifndef USE_AT 98 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 99 jz SHORT .CompatibleDPTsCreated ; Only Full operating mode has extra RAM to spare 100 %endif 101 97 102 mov dl, 80h 98 103 call FindDPT_ForDriveNumberInDL ; DPT to DS:DI
Note:
See TracChangeset
for help on using the changeset viewer.