Changeset 580 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Feb 19, 2015, 1:38:02 PM (10 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm
r567 r580 49 49 ALIGN JUMP_ALIGN 50 50 .InswLoop: 51 %rep 8 51 %rep 8 ; WORDs 52 52 XTIDE_INSW 53 53 %endrep … … 76 76 rep insb 77 77 ret 78 %else ; If 8088/808678 %else ; 808x 79 79 UNROLL_SECTORS_IN_CX_TO_OWORDS 80 80 ALIGN JUMP_ALIGN … … 112 112 ret 113 113 114 %else ; If 8088/8086114 %else ; 808x 115 115 UNROLL_SECTORS_IN_CX_TO_OWORDS 116 116 ALIGN JUMP_ALIGN … … 130 130 db 0C1h ; SHL 131 131 db 0E1h ; CX 132 db 7 ; 7 132 db 7 ; 7 (Sectors to DWORDs) 133 133 rep 134 134 db 66h ; Override operand size to 32-bit … … 155 155 ; Nothing 156 156 ; Corrupts registers: 157 ; AX, BX, CX , DX157 ; AX, BX, CX 158 158 ;-------------------------------------------------------------------- 159 159 ALIGN JUMP_ALIGN … … 162 162 UNROLL_SECTORS_IN_CX_TO_QWORDS 163 163 mov bl, 8 ; Bit mask for toggling data low/high reg 164 push es ; Copy ES...165 pop ds ; ...to DS164 push es 165 pop ds 166 166 ALIGN JUMP_ALIGN 167 167 .OutswLoop: … … 183 183 ; Nothing 184 184 ; Corrupts registers: 185 ; AX, BX, CX , DX185 ; AX, BX, CX 186 186 ;-------------------------------------------------------------------- 187 187 ALIGN JUMP_ALIGN … … 189 189 UNROLL_SECTORS_IN_CX_TO_QWORDS 190 190 push ds 191 push es ; Copy ES...192 pop ds ; ...to DS191 push es 192 pop ds 193 193 ALIGN JUMP_ALIGN 194 194 .WriteNextQword: 195 195 %rep 4 ; WORDs 196 XTIDE_MOD_OUTSW ; special macro196 XTIDE_MOD_OUTSW 197 197 %endrep 198 198 loop .WriteNextQword … … 210 210 ; Nothing 211 211 ; Corrupts registers: 212 ; AX, BX, CX , DX212 ; AX, BX, CX 213 213 ;-------------------------------------------------------------------- 214 214 ALIGN JUMP_ALIGN … … 220 220 ret 221 221 222 %else ; If 8088/8086 223 UNROLL_SECTORS_IN_CX_TO_QWORDS 224 push ds 225 ;mov ax, es 226 ;mov ds, ax ; move es to ds via ax (does this run faster on 8088?) 222 %else ; 808x 223 UNROLL_SECTORS_IN_CX_TO_QWORDS 224 push ds 227 225 push es 228 226 pop ds … … 231 229 %rep 8 ; BYTEs 232 230 lodsb ; Load BYTE from [DS:SI] 233 out dx, al; Write BYTE231 out dx, al ; Write BYTE 234 232 %endrep 235 233 loop .WriteNextQword … … 251 249 ; Nothing 252 250 ; Corrupts registers: 253 ; AX, BX, CX , DX251 ; AX, BX, CX 254 252 ;-------------------------------------------------------------------- 255 253 ALIGN JUMP_ALIGN … … 261 259 ret 262 260 263 %else ; If 8088/8086 264 UNROLL_SECTORS_IN_CX_TO_QWORDS 265 push ds 266 ;mov ax, es 267 ;mov ds, ax ; move es to ds via ax (does this run faster on 8088?) 261 %else ; 808x 262 UNROLL_SECTORS_IN_CX_TO_QWORDS 263 push ds 268 264 push es 269 265 pop ds … … 272 268 %rep 4 ; WORDs 273 269 lodsw ; Load WORD from [DS:SI] 274 out dx, ax; Write WORD270 out dx, ax ; Write WORD 275 271 %endrep 276 272 loop .WriteNextQword 277 273 pop ds 278 274 ret 279 %endif ; if/else USE_186275 %endif 280 276 281 277 ;-------------------------------------------------------------------- … … 284 280 db 0C1h ; SHL 285 281 db 0E1h ; CX 286 db 7 ; 7 282 db 7 ; 7 (Sectors to DWORDs) 287 283 es ; Source is ES segment 288 284 rep -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r567 r580 74 74 75 75 ;-------------------------------------------------------------------- 76 ; AH15h_GetSectorCountFromForeignDriveToDXAX :77 ; AH15h_GetSectorCountToBXDXAX :76 ; AH15h_GetSectorCountFromForeignDriveToDXAX 77 ; AH15h_GetSectorCountToBXDXAX 78 78 ; Parameters: 79 79 ; DL: Drive number (AH15h_GetSectorCountFromForeignDriveToDXAX only) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r568 r580 100 100 jb Prepare_ReturnFromInt13hWithInvalidFunctionError 101 101 mov [di+EDRIVE_INFO.wSize], ax 102 add al, EDRIVEINFO_SIZE_WITH_DPTE - MINIMUM_EDRIVEINFO_SIZE102 mov al, EDRIVEINFO_SIZE_WITH_DPTE 103 103 cmp cx, ax 104 104 jb SHORT .SkipEddConfigurationParameters 105 mov [di+EDRIVE_INFO.wSize], a x105 mov [di+EDRIVE_INFO.wSize], al 106 106 107 107 ; Store DPTE for standard controllers only, … … 159 159 mov [di+EDRIVE_INFO.dwCylinders+2], cx 160 160 161 x or ax, ax ; Success161 xchg ax, cx ; Success 162 162 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r568 r580 32 32 ; AX, BX, CX 33 33 ;-------------------------------------------------------------------- 34 %ifndef NO_ATAID_VALIDATION 34 35 AtaID_VerifyFromESSI: 35 36 ; We cannot start by reading ATA version since the ID might be … … 87 88 .ValidPCHorSinOffsetBX: 88 89 ret 90 %endif ; NO_ATAID_VALIDATION 89 91 90 92 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r568 r580 48 48 call StartDetectionWithDriveSelectByteInBHandStringInCX 49 49 50 %ifdef MODULE_HOTKEYS 51 %ifdef MODULE_SERIAL 52 ; This is only needed for hotkey F6 (ComDtct) to work 53 call ScanHotkeysFromKeyBufferAndStoreToBootvars ; Done here while CX is still protected 54 %endif 55 %endif 56 50 57 pop cx 51 58 … … 68 75 69 76 %ifdef MODULE_HOTKEYS 70 cmp al, COM_DETECT_HOTKEY_SCANCODE ; Set by last call to HotkeyBar_UpdateDuringDriveDetectionabove77 cmp al, COM_DETECT_HOTKEY_SCANCODE ; Set by last call to ScanHotkeysFromKeyBufferAndStoreToBootvars above 71 78 je .DriveDetectLoop 72 79 %endif … … 76 83 and al, 8 ; 8 = alt key depressed, same as FLG_ROMVARS_SERIAL_ALWAYSDETECT 77 84 jnz .DriveDetectLoop 78 %endif 85 %endif ; MODULE_SERIAL 79 86 80 87 .AddHardDisks: … … 226 233 ;-------------------------------------------------------------------- 227 234 CreateBiosTablesForHardDisk: 235 %ifndef NO_ATAID_VALIDATION 228 236 push bx 229 237 call AtaID_VerifyFromESSI 230 238 pop bx 231 239 jnz SHORT DetectDrives_DriveNotFound 240 %endif 232 241 call CreateDPT_FromAtaInformation 233 242 jc SHORT DetectDrives_DriveNotFound -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r567 r580 82 82 call RamVars_Initialize 83 83 call BootVars_Initialize 84 %ifdef MODULE_HOTKEYS 85 ; This is a simple fix for the so called "No Fixed Disk Present in FDISK"-bug introduced in r551. MODULE_HOTKEYS includes the internal 86 ; module MODULE_DRIVEXLATE which is needed if interrupt handlers are installed before drive detection. The reason for this is that 87 ; Interrupts_InitializeInterruptVectors won't install our interrupt 13h handler if no drives were detected (unless MODULE_DRIVEXLATE is included). 88 ; Since the drive detection hasn't been done yet, the handler will not be installed, causing the above mentioned bug. 84 89 call Interrupts_InitializeInterruptVectors ; HotkeyBar requires INT 40h so install handlers before drive detection 85 90 call DetectDrives_FromAllIDEControllers 91 %else 92 ; Without MODULE_HOTKEYS (or actually MODULE_DRIVEXLATE) we *must* use this call order. 93 call DetectDrives_FromAllIDEControllers 94 call Interrupts_InitializeInterruptVectors 95 %endif 86 96 mov [RAMVARS.wDrvDetectSignature], es ; No longer in drive detection mode (set normal timeouts) 87 97 ; Fall to .StoreDptPointersToIntVectors -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r558 r580 22 22 23 23 ;-------------------------------------------------------------------- 24 ; Drives must be detected before this function is called! 24 ; Drives must be detected before this function is called unless 25 ; MODULE_DRIVEXLATE has been included in the BIOS. 25 26 ; 26 27 ; Interrupts_InitializeInterruptVectors -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
r568 r580 304 304 ; Max = 16,514,064 / 63 = 262128 305 305 mov cx, LBA_ASSIST_SPT ; CX = 63 306 call Math_DivDXAXbyCX 306 call Math_DivDXAXbyCX ; Preserves CX 307 307 push dx 308 308 push ax ; Value CH stored for later use … … 316 316 ; AX = Number of heads = ((Value CH - 1) / 1024) + 1 317 317 ; Max = (262127 / 1024) + 1 = 256 318 push si 319 call Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX 320 pop si 318 call Size_DivideSizeInBXDXAXby1024 ; Preserves CX 321 319 inc ax ; + 1 322 320 323 321 ; Heads must be 16, 32, 64, 128 or 255 (round up to the nearest) 324 322 ; Max = 255 325 mov c x, 16 ; Min number of heads323 mov cl, 16 ; Min number of heads 326 324 .CompareNextValidNumberOfHeads: 327 325 cmp ax, cx
Note:
See TracChangeset
for help on using the changeset viewer.