Changeset 421 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- May 9, 2012, 7:12:53 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 20 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r413 r421 66 66 resb 2 ; Zero word (ensures string terminates) 67 67 .wInitErrorFlags resb 2 ; Errors during initialization 68 69 %ifdef MODULE_ADVANCED_ATA 70 resb 6 ; padding to make DRVDETECTINFO size an even multiple of DPT size 71 %else 72 resb 2 ; padding to make DRVDETECTINFO size an even multiple of DPT size 73 %endif 68 69 %if LARGEST_DPT_SIZE == 28 70 resb 22 ; padding to make DRVDETECTINFO size an even multiple of DPT size 71 %elif LARGEST_DPT_SIZE == 20 72 resb 6 73 %elif LARGEST_DPT_SIZE == 18 74 resb 2 75 %else ; LARGEST_DPT_SIZE == 10 76 resb 6 77 %endif 74 78 endstruc 75 79 -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r411 r421 23 23 24 24 ; Base DPT for all device types 25 struc DPT ; 10bytes25 struc DPT ; 8 or 18 bytes 26 26 ; General Disk Parameter Table related 27 27 .wFlags: … … 30 30 .bIdevarsOffset resb 1 ; Offset to IDEVARS for this drive 31 31 32 ; IDE Drive related 33 ; .bLbaHeads and .twLbaSectors are used for LBA addressing only. 34 .bLbaHeads: resb 1 ; Number of LBA assisted heads (1...255) 35 .twLbaSectors resb 2 ; 48-bit sector count for LBA addressing 32 .bPchsHeads resb 1 ; (1...16) 33 .wLchsCylinders resb 2 ; (1...1027, yes 1027) 34 .wLchsHeadsAndSectors: 35 .bLchsHeads resb 1 ; (1...255) 36 .bLchsSectorsPerTrack resb 1 ; (1...63) 36 37 37 ; .wPchsCylinders and .bPchsSectors are used for CHS addressing only. 38 .wPchsCylinders resb 2 ; Number of P-CHS Cylinders (1...16383) 39 .wPchsHeadsAndSectors: 40 .bPchsHeads resb 1 ; Number of P-CHS heads (1...16) 41 .bPchsSectors resb 1 ; Number of P-CHS Sectors per Track (1...63) 38 %ifdef MODULE_EBIOS 39 .twLbaSectors resb 6 ; 48-bit sector count for LBA addressing 40 .wPchsCylinders resb 2 41 .bPchsSectorsPerTrack resb 1 42 resb 1 43 %endif 42 44 endstruc 43 45 44 46 ; Bit definitions for DPT.bFlagsLow 45 MASKL_DPT_CHS_SHIFT_COUNT EQU (7<<0) ; Bits 0...2, P-CHS to L-CHS bit shift count (0...4) 46 FLGL_DPT_SLAVE EQU FLG_DRVNHEAD_DRV ; (1<<4), Drive is slave drive 47 MASKL_DPT_ADDRESSING_MODE EQU (3<<ADDRESSING_MODE_FIELD_POSITION) ; Bits 5..6, Addressing Mode (bit 6 == FLG_DRVNHEAD_LBA) 47 MASKL_DPT_CHS_SHIFT_COUNT EQU (3<<0) ; Bits 0...1, P-CHS to L-CHS bit shift count (0...3) 48 MASKL_DPT_ADDRESSING_MODE EQU (3<<ADDRESSING_MODE_FIELD_POSITION) ; Bits 2...3, NORMAL, LARGE or Assisted LBA addressing mode 49 FLGL_DPT_ASSISTED_LBA EQU (1<<(ADDRESSING_MODE_FIELD_POSITION+1)) 50 FLGL_DPT_SLAVE EQU FLG_DRVNHEAD_DRV ; Bit 4, Drive is a Slave Drive 48 51 %ifdef MODULE_IRQ 49 FLGL_DPT_ENABLE_IRQ EQU (1<<7) 52 FLGL_DPT_ENABLE_IRQ EQU (1<<5) ; Bit 5, Enable IRQ 53 %endif 54 %ifdef MODULE_EBIOS 55 FLGL_DPT_LBA_AND_EBIOS_SUPPORTED EQU FLG_DRVNHEAD_LBA ; Bit 6, Drive supports LBA and so EBIOS functions can be supported 56 FLGL_DPT_LBA48 EQU (1<<7) ; Bit 7, Drive supports 48-bit LBA (Must be bit 7!) 50 57 %endif 51 58 59 ; Addressing modes for DPT.bFlagsLow 60 ADDRESSING_MODE_FIELD_POSITION EQU 2 61 ADDRESSING_MODE_NORMAL EQU 0 62 ADDRESSING_MODE_LARGE EQU 1 63 ADDRESSING_MODE_ASSISTED_LBA EQU 2 ; 28-bit or 48-bit LBA 64 65 52 66 ; Bit definitions for DPT.bFlagsHigh 53 FLGH_DPT_BLOCK_MODE_SUPPORTED EQU (1<<1) ;Use block transfer commands (must be bit 1!)67 FLGH_DPT_BLOCK_MODE_SUPPORTED EQU (1<<1) ; Bit 1, Use block transfer commands (must be bit 1!) 54 68 %ifdef MODULE_SERIAL 55 FLGH_DPT_SERIAL_DEVICE EQU (1<<2) ;Serial Port Device69 FLGH_DPT_SERIAL_DEVICE EQU (1<<2) ; Bit 2, Serial Port Device 56 70 %endif 57 71 %ifdef MODULE_IRQ 58 FLGH_DPT_INTERRUPT_IN_SERVICE EQU (1<<3) ;Set when waiting for IRQ72 FLGH_DPT_INTERRUPT_IN_SERVICE EQU (1<<3) ; Bit 3, Set when waiting for IRQ 59 73 %endif 60 74 %ifdef MODULE_FEATURE_SETS 61 FLGH_DPT_POWER_MANAGEMENT_SUPPORTED EQU (1<<5)75 FLGH_DPT_POWER_MANAGEMENT_SUPPORTED EQU (1<<5) ; Bit 4, Drive supports power management 62 76 %endif 63 64 ; IDE device only65 77 %ifdef MODULE_ADVANCED_ATA 66 FLGH_DPT_IORDY EQU (1<<7) ;Controller and Drive supports IORDY78 FLGH_DPT_IORDY EQU (1<<7) ; Bit 5, Controller and Drive supports IORDY 67 79 %endif 68 80 … … 74 86 %endif 75 87 76 ; Addressing modes for DPT.wFlags77 ADDRESSING_MODE_FIELD_POSITION EQU 578 ADDRESSING_MODE_LCHS EQU 0 ; L-CHS Addressing Mode (NORMAL in many other BIOSes)79 ADDRESSING_MODE_PCHS EQU 1 ; P-CHS Addressing Mode (LARGE in many other BIOSes)80 ADDRESSING_MODE_LBA28 EQU 2 ; 28-bit LBA Addressing Mode81 %ifdef MODULE_EBIOS82 ADDRESSING_MODE_LBA48 EQU 3 ; 48-bit LBA Addressing Mode83 %endif84 88 85 89 86 90 ; DPT for ATA devices 87 struc DPT_ATA ; 10 + 2 bytes = 12bytes91 struc DPT_ATA ; 8/18 bytes + 2 bytes = 10/20 bytes 88 92 .dpt resb DPT_size 89 93 .bBlockSize resb 1 ; Current block size in sectors (do not set to zero!) … … 92 96 93 97 98 94 99 ; Additional variables needed to initialize and reset Advanced IDE Controllers. 95 100 ; EBDA must be reserved for DPTs when using these! 96 101 %ifdef MODULE_ADVANCED_ATA 97 struc DPT_ADVANCED_ATA 102 struc DPT_ADVANCED_ATA ; 10/20 bytes + 8 bytes = 18/28 bytes 98 103 .dpt_ata resb DPT_ATA_size 99 104 .wControllerID resb 2 ; Controller specific ID WORD (from Advanced Controller detection) … … 117 122 ; DPT for Serial devices 118 123 %ifdef MODULE_SERIAL 119 struc DPT_SERIAL 124 struc DPT_SERIAL ; 8/18 bytes + 2 bytes = 10/20 bytes 120 125 .dpt resb DPT_size 121 126 .wSerialPortAndBaud: … … 140 145 141 146 142 ;--------------------------------------------------------------------143 ; LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS144 ; Parameters:145 ; DX:AX: Number of LBA cylinders146 ; Returns:147 ; AX: Number of L-CHS cylinders148 ; Corrupts registers:149 ; Nothing150 ;--------------------------------------------------------------------151 %macro LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS 0152 test dx, dx153 jnz SHORT %%LoadMaxValueToAX154 cmp ax, MAX_LCHS_CYLINDERS155 jb SHORT %%NoNeedToModify156 %%LoadMaxValueToAX:157 mov ax, MAX_LCHS_CYLINDERS158 %%NoNeedToModify:159 %endmacro160 161 162 147 %endif ; CUSTOMDPT_INC -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r411 r421 79 79 test bh, FLG_DRVNHEAD_DRV 80 80 jnz SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 81 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_ BSY)81 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_DRDY) 82 82 call IdeWait_PollStatusFlagInBLwithTimeoutInBH 83 83 .SkipLongWaitSinceDriveIsNotPrimaryMaster: … … 195 195 ALIGN JUMP_ALIGN 196 196 IdeCommand_SelectDrive: 197 %if 0 197 198 ; Wait until neither Master or Slave Drive is busy 198 199 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) … … 200 201 eCMOVE bh, TIMEOUT_IDENTIFY_DEVICE 201 202 call IdeWait_PollStatusFlagInBLwithTimeoutInBH 203 %endif 202 204 203 205 ; Select Master or Slave Drive -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r419 r421 119 119 jc SHORT ReturnWithTransferErrorInAH 120 120 121 ; All rectors succesfully transferred121 ; All sectors succesfully transferred 122 122 add cx, [bp+PIOVARS.bSectorsDone] ; Never sets CF 123 123 ret … … 371 371 pop ds 372 372 ret 373 374 373 %endif ; MODULE_8BIT_IDE 374 375 375 376 376 ;-------------------------------------------------------------------- … … 395 395 db 6Fh ; OUTSW/OUTSD 396 396 ret 397 %endif 397 %endif ; USE_AT 398 398 399 399 -
trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
r376 r421 70 70 71 71 and ah, 0Fh ; Limit bits for LBA28 72 call AccessDPT_GetDriveSelectByte ToAL72 call AccessDPT_GetDriveSelectByteForEbiosToAL 73 73 or al, ah 74 74 mov [bp+IDEPACK.bDrvAndHead], al … … 83 83 and si, BYTE 0Fh ; Offset normalized 84 84 jmp SHORT GetDeviceControlByteToIdepackAndStartTransfer 85 %endif 85 %endif ; MODULE_EBIOS 86 86 87 87 … … 114 114 push bx 115 115 call Address_OldInt13hAddressToIdeAddress 116 call AccessDPT_GetDriveSelectByte ToAL116 call AccessDPT_GetDriveSelectByteForOldInt13hToAL 117 117 or al, bh ; AL now has Drive and Head Select Byte 118 118 mov [bp+IDEPACK.bDrvAndHead], al … … 156 156 ; Drive and Head select byte 157 157 and ah, MASK_DRVNHEAD_HEAD ; Keep head bits only 158 call AccessDPT_GetDriveSelectByte ToAL158 call AccessDPT_GetDriveSelectByteForOldInt13hToAL 159 159 or al, ah 160 160 mov [bp+IDEPACK.bDrvAndHead], al -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r417 r421 115 115 ALIGN JUMP_ALIGN 116 116 .JumpToEbiosFunction: 117 test BYTE [di+DPT.bFlagsLow], FLG _DRVNHEAD_LBA117 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_LBA_AND_EBIOS_SUPPORTED 118 118 jz SHORT UnsupportedFunction ; No eINT 13h for CHS drives 119 119 sub bl, 41h<<1 ; BX = Offset to eINT 13h jump table -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r376 r421 101 101 AH8h_GetDriveParameters: 102 102 call AccessDPT_GetLCHStoAXBLBH 103 %ifdef RESERVE_DIAGNOSTIC_CYLINDER 104 dec ax 105 %endif 106 MIN_U ax, MAX_LCHS_CYLINDERS 103 107 ; Fall to .PackReturnValues 104 108 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r410 r421 99 99 ;;; SelectDrive 100 100 ; Try to select drive and wait until ready 101 call AccessDPT_GetDriveSelectByte ToAL101 call AccessDPT_GetDriveSelectByteForOldInt13hToAL 102 102 mov [bp+IDEPACK.bDrvAndHead], al 103 103 call Device_SelectDrive … … 109 109 110 110 ;;; InitializeDeviceParameters 111 ; Initialize CHS parameters if LBA is not used 112 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 111 ; Initialize CHS parameters if LBA is not used and 112 ; user has specified P-CHS parameters 113 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_ASSISTED_LBA 113 114 jnz SHORT .SkipInitializeDeviceParameters ; No need to initialize CHS parameters if LBA mode enabled 115 call AccessDPT_GetPointerToDRVPARAMStoCSBX 116 test BYTE [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS ; User specified P-CHS? 117 jz SHORT .SkipInitializeDeviceParameters 114 118 115 119 ; Initialize Logical Sectors per Track and Max Head number 116 mov ah, [di+DPT.bPchsHeads] 117 dec ah ; Max Head number 118 mov dl, [di+DPT.bPchsSectors] ; Sectors per Track 120 mov ax, [cs:bx+DRVPARAMS.wHeadsAndSectors] 121 dec ax ; Max Head number 122 xchg al, ah ; Heads now in AH 123 mov dx, ax ; Sectors per Track now in DL 119 124 mov al, COMMAND_INITIALIZE_DEVICE_PARAMETERS 120 125 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r376 r421 38 38 ;-------------------------------------------------------------------- 39 39 AH48h_HandlerForGetExtendedDriveParameters: 40 call AccessDPT_GetPointerToDRVPARAMStoCSBX41 push bx42 40 call AccessDPT_GetLbaSectorCountToBXDXAX 43 pop di ; CS:DI now points to DRVPARAMS44 41 45 42 ; Point DS:SI to Extended Drive Information Table to fill 43 push ds 44 pop es ; DPT now in ES:DI 46 45 mov ds, [bp+IDEPACK.intpack+INTPACK.ds] 47 46 mov cx, MINIMUM_EDRIVEINFO_SIZE … … 51 50 52 51 ; We do not support EDD Configuration Parameters so set to FFFF:FFFFh 53 mov cx, -1 ;FFFFh52 sub cx, BYTE MINIMUM_EDRIVEINFO_SIZE+1 ; CX => FFFFh 54 53 mov [si+EDRIVE_INFO.fpEDDparams], cx 55 54 mov [si+EDRIVE_INFO.fpEDDparams+2], cx … … 59 58 .SkipEddConfigurationParameters: 60 59 mov [si+EDRIVE_INFO.wSize], cx 61 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS 60 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS | FLG_CHS_INFORMATION_IS_VALID 62 61 63 62 ; Store total sector count … … 69 68 mov WORD [si+EDRIVE_INFO.wSectorSize], 512 70 69 70 ; Store P-CHS 71 eMOVZX dx, BYTE [es:di+DPT.bPchsHeads] 72 xor ax, ax ; Also a return code 73 mov [si+EDRIVE_INFO.dwHeads], dx 74 mov [si+EDRIVE_INFO.dwHeads+2], ax 75 76 mov dl, [es:di+DPT.bPchsSectorsPerTrack] 77 mov [si+EDRIVE_INFO.dwSectorsPerTrack], dx 78 mov [si+EDRIVE_INFO.dwSectorsPerTrack+2], ax 79 80 mov dx, [es:di+DPT.wPchsCylinders] 81 mov [si+EDRIVE_INFO.dwCylinders], dx 82 mov [si+EDRIVE_INFO.dwCylinders+2], ax 83 71 84 .ReturnWithError: 72 85 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r376 r421 47 47 48 48 ;--------------------------------------------------------------------- 49 ; Converts L CHS parameters to IDE P-CHS parameters.49 ; Converts LARGE addressing mode LCHS parameters to IDE P-CHS parameters. 50 50 ; PCylinder = (LCylinder << n) + (LHead / PHeadCount) 51 51 ; PHead = LHead % PHeadCount 52 52 ; PSector = LSector 53 53 ; 54 ; Address_ConvertLCHStoPCHS:54 ; ConvertLargeModeLCHStoPCHS: 55 55 ; Parameters: 56 56 ; BL: Sector number (1...63) 57 ; BH: Head number (0...2 55)57 ; BH: Head number (0...239) 58 58 ; CX: Cylinder number (0...1023) 59 59 ; DS:DI: Ptr to Disk Parameter Table … … 66 66 ;-------------------------------------------------------------------- 67 67 ALIGN JUMP_ALIGN 68 ConvertL CHStoPCHS:68 ConvertLargeModeLCHStoPCHS: 69 69 ; LHead / PHeadCount and LHead % PHeadCount 70 70 eMOVZX ax, bh ; Copy L-CHS Head number to AX … … 82 82 DoNotConvertLCHS: 83 83 ret 84 84 85 85 86 ;-------------------------------------------------------------------- … … 102 103 Address_OldInt13hAddressToIdeAddress: 103 104 call Address_ExtractLCHSparametersFromOldInt13hAddress 105 ACCESSDPT__GET_UNSHIFTED_ADDRESS_MODE_TO_AXZF 104 106 105 AccessDPT_GetUnshiftedAddressModeToALZF 107 ;;; 0: ADDRESSING_MODE_NORMAL 108 jz SHORT DoNotConvertLCHS 106 109 107 ;;; 0: ADDR_DPT_LCHS 108 jz DoNotConvertLCHS 110 ;;; 1: ADDRESSING_MODE_LARGE 111 test al, FLGL_DPT_ASSISTED_LBA 112 jz SHORT ConvertLargeModeLCHStoPCHS 109 113 110 ;;; 1: ADDR_DPT_PCHS 111 ; 112 ; Since we are only checking for zero, we can do our math in the high order bits, 113 ; in this case effectively subtracting 1 from the address mode. 114 ; 115 sub al,(1<<ADDRESSING_MODE_FIELD_POSITION) 116 jz ConvertLCHStoPCHS 114 ;;; 2: ADDRESSING_MODE_ASSISTED_LBA 115 ; Fall through to ConvertAssistedLBAModeLCHStoLBARegisterValues 117 116 118 ;;; 2: ADDR_DPT_LBA28 and 3: ADDR_DPT_LBA48119 ; Fall through to ConvertLCHStoLBARegisterValues120 117 121 118 ;--------------------------------------------------------------------- … … 125 122 ; 126 123 ; Returned address is in same registers that 127 ; Address_DoNotConvertLCHS and Address_ConvertLCHStoPCHS returns.124 ; DoNotConvertLCHS and ConvertLargeModeLCHStoPCHS returns. 128 125 ; 129 ; Convert LCHStoLBARegisterValues:126 ; ConvertAssistedLBAModeLCHStoLBARegisterValues: 130 127 ; Parameters: 131 128 ; BL: Sector number (1...63) 132 ; BH: Head number (0...25 5)129 ; BH: Head number (0...254) 133 130 ; CX: Cylinder number (0...1023) 134 131 ; DS:DI: Ptr to Disk Parameter Table … … 141 138 ; AX, DX 142 139 ;-------------------------------------------------------------------- 143 ALIGN JUMP_ALIGN 144 ConvertLCHStoLBARegisterValues: 140 ConvertAssistedLBAModeLCHStoLBARegisterValues: 145 141 ; cylToSeek*headsPerCyl (18-bit result) 142 ; Max = 1023 * 255 = 260,865 = 3FB01h 146 143 mov ax, LBA_ASSIST_SPT ; Load Sectors per Track 147 144 xchg cx, ax ; Cylinder number to AX, Sectors per Track to CX 148 149 145 %ifdef USE_386 150 movzx dx, [di+DPT.bL baHeads]146 movzx dx, [di+DPT.bLchsHeads] 151 147 %else 152 148 cwd 153 mov dl, [di+DPT.bL baHeads]149 mov dl, [di+DPT.bLchsHeads] 154 150 %endif 155 151 mul dx ; DX:AX = cylToSeek*headsPerCyl 156 152 157 153 ; +=headToSeek (18-bit result) 154 ; Max = 260,865 + 254 = 261,119 = 3FBFFh 158 155 add al, bh ; Add Head number to DX:AX 159 156 adc ah, dh ; DH = Zero after previous multiplication … … 161 158 162 159 ; *=sectPerTrack (18-bit by 6-bit multiplication with 24-bit result) 160 ; Max = 261,119 * 63 = 16,450,497 = FB03C1h 163 161 xchg ax, dx ; Hiword to AX, loword to DX 164 162 mul cl ; AX = hiword * Sectors per Track … … 169 167 170 168 ; +=sectToSeek-1 (24-bit result) 169 ; Max = 16,450,497 + 63 - 1 = 16,450,559 = FB03FFh 171 170 xor bh, bh ; Sector number now in BX 172 171 dec bx ; sectToSeek-=1 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r413 r421 53 53 ; Get EBIOS command index to BX 54 54 ; LBA28 or LBA48 command 55 cwd56 mov al, [es:si+DAP.qwLBA+3] ; Load LBA48 byte 3 (bits 24...31)57 and al, 0F0h ; Clear LBA28 bits 24...2758 or ax, [es:si+DAP.qwLBA+4] ; Set bits from LBA bytes 4 and 559 cmp dx, ax ; Set CF if any of bits 28...47 set60 rcl dx, 1 ; DX = 0 for LBA28, DX = 1 for LBA4861 55 call Prepare_GetOldInt13hCommandIndexToBX 62 or bx, dx ; Set block mode / single sector bit 56 mov al, [di+DPT.bFlagsLow] 57 shl al, 1 ; Set CF if LBA48 supported 58 adc bl, bh ; LBA48 EXT commands 63 59 ret 64 %endif 60 %endif ; MODULE_EBIOS 65 61 66 62 … … 116 112 ; Nothing 117 113 ;-------------------------------------------------------------------- 118 ALIGN JUMP_ALIGN119 114 Prepare_ByValidatingSectorsInALforOldInt13h: 120 115 test al, al -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r411 r421 21 21 ; Section containing code 22 22 SECTION .text 23 24 ;--------------------------------------------------------------------25 ; AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI26 ; Parameters:27 ; ES:SI: Ptr to 512-byte ATA information read from the drive28 ; Returns:29 ; AX: Number of user specified P-CHS cylinders30 ; BH: Number of user specified P-CHS sectors per track31 ; BL: Number of user specified P-CHS heads32 ; Corrupts registers:33 ; Nothing34 ;--------------------------------------------------------------------35 AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI:36 mov ax, [es:si+ATA1.wCylCnt] ; Cylinders (1...16383)37 mov bl, [es:si+ATA1.wHeadCnt] ; Heads (1...16)38 mov bh, [es:si+ATA1.wSPT] ; Sectors per Track (1...63)39 ret40 41 42 ;--------------------------------------------------------------------43 ; AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI44 ; Parameters:45 ; ES:SI: Ptr to 512-byte ATA information read from the drive46 ; Returns:47 ; BX:DX:AX: 48-bit sector count48 ; Corrupts registers:49 ; Nothing50 ;--------------------------------------------------------------------51 AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI:52 mov bx, Registers_ExchangeDSSIwithESDI53 call bx ; ATA info now in DS:DI54 push bx ; We will return via Registers_ExchangeDSSIwithESDI55 xor bx, bx56 test BYTE [di+ATA1.wCaps+1], A1_wCaps_LBA>>857 jz SHORT .GetChsSectorCount58 ; Fall to .GetLbaSectorCount59 60 ;--------------------------------------------------------------------61 ; .GetLbaSectorCount62 ; .GetLba28SectorCount63 ; .GetChsSectorCount64 ; Parameters:65 ; BX: Zero66 ; DS:DI: Ptr to 512-byte ATA information read from the drive67 ; Returns:68 ; BX:DX:AX: 48-bit sector count69 ; Corrupts registers:70 ; Nothing71 ;--------------------------------------------------------------------72 .GetLbaSectorCount:73 %ifdef MODULE_EBIOS74 test BYTE [di+ATA6.wSetSup83+1], A6_wSetSup83_LBA48>>875 jz SHORT .GetLba28SectorCount76 77 ; Get LBA48 sector count78 mov ax, [di+ATA6.qwLBACnt]79 mov dx, [di+ATA6.qwLBACnt+2]80 mov bx, [di+ATA6.qwLBACnt+4]81 ret82 %endif83 84 .GetLba28SectorCount:85 mov ax, [di+ATA1.dwLBACnt]86 mov dx, [di+ATA1.dwLBACnt+2]87 ret88 89 .GetChsSectorCount:90 mov al, [di+ATA1.wSPT] ; AL=Sectors per track91 mul BYTE [di+ATA1.wHeadCnt] ; AX=Sectors per track * number of heads92 mul WORD [di+ATA1.wCylCnt] ; DX:AX=Sectors per track * number of heads * number of cylinders93 ret94 95 23 96 24 %ifdef MODULE_ADVANCED_ATA -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r400 r421 186 186 %include "FindDPT.asm" ; For finding DPTs 187 187 %include "AccessDPT.asm" ; For accessing DPTs 188 %include " LbaAssist.asm" ; For generating L-CHS parameters to LBA drives188 %include "AtaGeometry.asm" ; For generating L-CHS parameters 189 189 %include "DrvDetectInfo.asm" ; For creating DRVDETECTINFO structs 190 190 %include "AtaID.asm" ; For ATA Identify Device information -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r399 r421 202 202 push dx ; Magnitude character 203 203 204 test di, di 204 test di, di ; Zero if foreign drive 205 205 jz SHORT BootMenuPrint_RefreshInformation.FormatRelay 206 206 … … 229 229 ; CX 230 230 ;-------------------------------------------------------------------- 231 GetTotalSectorCount: 232 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 233 jnz SHORT .ReturnFullCapacity 234 jmp AH15h_GetSectorCountToBXDXAX 235 .ReturnFullCapacity: 236 jmp AccessDPT_GetLbaSectorCountToBXDXAX 231 %ifdef MODULE_EBIOS 232 GetTotalSectorCount EQU AccessDPT_GetLbaSectorCountToBXDXAX 233 %else 234 GetTotalSectorCount EQU AH15h_GetSectorCountToBXDXAX 235 %endif -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm
r400 r421 43 43 eMOVZX ax, [di+DPT.bIdevarsOffset] 44 44 xchg bx, ax ; CS:BX now points to IDEVARS 45 ; Fall to .PushA ndFormatCfgString45 ; Fall to .PushAddressingMode 46 46 47 47 ;-------------------------------------------------------------------- 48 ; PushAddressingMode48 ; .PushAddressingMode 49 49 ; Parameters: 50 50 ; DS:DI: Ptr to DPT … … 53 53 ; Nothing (jumps to next push below) 54 54 ; Corrupts registers: 55 ; AX, CX 55 ; AX, CX, DX 56 56 ;-------------------------------------------------------------------- 57 57 .PushAddressingMode: 58 A ccessDPT_GetUnshiftedAddressModeToALZF58 ACCESSDPT__GET_UNSHIFTED_ADDRESS_MODE_TO_AXZF 59 59 ;; 60 60 ;; This multiply both shifts the addressing mode bits down to low order bits, and … … 62 62 ;; with AL clear, and so we exchange AL and AH after the multiply for the final result. 63 63 ;; 64 mov c l,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement65 mul c l66 xchg al, ah67 add ax, g_szAddressingModes64 mov cx, g_szAddressingModes_Displacement << (8-ADDRESSING_MODE_FIELD_POSITION) 65 mul cx 66 xchg al, ah ; AL = always zero after above multiplication 67 add ax, g_szAddressingModes 68 68 push ax 69 ; Fall to .PushBlockMode 69 70 70 71 ;-------------------------------------------------------------------- 71 ; PushBlockMode72 ; .PushBlockMode 72 73 ; Parameters: 73 74 ; DS:DI: Ptr to DPT -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r417 r421 97 97 98 98 g_szAddressingModes: 99 g_sz LCHS: db "L-CHS",NULL100 g_sz PCHS: db "P-CHS",NULL101 g_szLBA 28: db "LBA28",NULL102 g_szLBA48: db "LBA48",NULL 103 g_szAddressingModes_Displacement equ (g_sz PCHS- g_szAddressingModes)99 g_szNORMAL: db "NORMAL",NULL 100 g_szLARGE: db "LARGE ",NULL 101 g_szLBA: db "LBA ",NULL 102 wantToRemoveThis: db "4",NULL ; String compression want '4' somewhere 103 g_szAddressingModes_Displacement equ (g_szLARGE - g_szAddressingModes) 104 104 ; 105 105 ; Ensure that addressing modes are correctly spaced in memory 106 106 ; 107 107 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 108 %if g_sz LCHS<> g_szAddressingModes108 %if g_szNORMAL <> g_szAddressingModes 109 109 %error "g_szAddressingModes Displacement Incorrect 1" 110 110 %endif 111 %if g_sz PCHS <> g_szLCHS+ g_szAddressingModes_Displacement111 %if g_szLARGE <> g_szNORMAL + g_szAddressingModes_Displacement 112 112 %error "g_szAddressingModes Displacement Incorrect 2" 113 113 %endif 114 %if g_szLBA 28 <> g_szPCHS+ g_szAddressingModes_Displacement114 %if g_szLBA <> g_szLARGE + g_szAddressingModes_Displacement 115 115 %error "g_szAddressingModes Displacement Incorrect 3" 116 %endif117 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement118 %error "g_szAddressingModes Displacement Incorrect 4"119 116 %endif 120 117 %endif … … 166 163 g_szCapacityNum: db "%5-u.%u %ciB",NULL 167 164 g_szInformation: db "%s",LF,CR 168 db "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR165 db "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR 169 166 db "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL 170 167 … … 211 208 ;$translate{ord('2')} = 12; 212 209 ;$translate{ord('3')} = 13; 213 ;$translate{ord('4')} = 14; 210 ;$translate{ord('4')} = 14; ; Not used at the moment 214 211 ;$translate{ord('5')} = 15; 215 212 ;$translate{ord('6')} = 16; -
trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
r417 r421 185 185 186 186 g_szAddressingModes: 187 g_sz LCHS: ; db "L-CHS",NULL188 ; db 4ch, 2dh, 43h, 48h, 53h, 00h ; uncompressed189 db 52h, 28h, 49h, 4eh, 99h ; compressed190 191 g_sz PCHS: ; db "P-CHS",NULL192 ; db 50h, 2dh, 43h, 48h, 53h, 00h ; uncompressed193 db 56h, 28h, 49h, 4eh, 99h ; compressed194 195 g_szLBA 28: ; db "LBA28",NULL196 ; db 4ch, 42h, 41h, 32h, 38h, 00h ; uncompressed197 db 52h, 48h, 47h, 2ch, 11h; compressed198 199 g_szLBA48: ; db "LBA48",NULL 200 ; db 4ch, 42h, 41h, 34h, 38h, 00h ; uncompressed201 db 52h, 48h, 47h, 2eh, 11h ; compressed202 203 g_szAddressingModes_Displacement equ (g_sz PCHS- g_szAddressingModes)187 g_szNORMAL: ; db "NORMAL",NULL 188 ; db 4eh, 4fh, 52h, 4dh, 41h, 4ch, 00h ; uncompressed 189 db 54h, 55h, 58h, 53h, 47h, 92h ; compressed 190 191 g_szLARGE: ; db "LARGE ",NULL 192 ; db 4ch, 41h, 52h, 47h, 45h, 20h, 00h ; uncompressed 193 db 52h, 47h, 58h, 4dh, 4bh, 00h ; compressed 194 195 g_szLBA: ; db "LBA ",NULL 196 ; db 4ch, 42h, 41h, 20h, 20h, 20h, 00h ; uncompressed 197 db 52h, 48h, 0c7h, 20h, 00h ; compressed 198 199 wantToRemoveThis: ; db "4",NULL ; String compression want '4' somewhere 200 ; db 34h, 00h ; uncompressed 201 db 0eh ; compressed 202 203 g_szAddressingModes_Displacement equ (g_szLARGE - g_szAddressingModes) 204 204 ; 205 205 ; Ensure that addressing modes are correctly spaced in memory 206 206 ; 207 207 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 208 %if g_sz LCHS<> g_szAddressingModes208 %if g_szNORMAL <> g_szAddressingModes 209 209 %error "g_szAddressingModes Displacement Incorrect 1" 210 210 %endif 211 %if g_sz PCHS <> g_szLCHS+ g_szAddressingModes_Displacement211 %if g_szLARGE <> g_szNORMAL + g_szAddressingModes_Displacement 212 212 %error "g_szAddressingModes Displacement Incorrect 2" 213 213 %endif 214 %if g_szLBA 28 <> g_szPCHS+ g_szAddressingModes_Displacement214 %if g_szLBA <> g_szLARGE + g_szAddressingModes_Displacement 215 215 %error "g_szAddressingModes Displacement Incorrect 3" 216 %endif217 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement218 %error "g_szAddressingModes Displacement Incorrect 4"219 216 %endif 220 217 %endif … … 299 296 db 3eh, 3bh ; compressed 300 297 301 ; db "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR302 ; db 41h, 64h, 64h, 72h, 2eh, 0b3h, 42h, 6ch, 6fh, 63h, 6bh, 0b3h, 42h, 75h, 73h, 0b3h, 49h, 52h, 51h, 0b3h, 52h, 65h, 73h, 65h, 74h, 0ah, 0dh ; uncompressed303 db 47h, 6ah, 6ah, 78h, 29h, 2 3h, 48h, 72h, 75h, 69h, 71h, 23h, 48h, 7bh, 79h, 23h, 4fh, 58h, 57h, 23h, 58h, 6bh, 79h, 6bh, 7ah, 3bh ; compressed298 ; db "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR 299 ; db 41h, 64h, 64h, 72h, 2eh, 20h, 0b3h, 42h, 6ch, 6fh, 63h, 6bh, 0b3h, 42h, 75h, 73h, 0b3h, 49h, 52h, 51h, 0b3h, 52h, 65h, 73h, 65h, 74h, 0ah, 0dh ; uncompressed 300 db 47h, 6ah, 6ah, 78h, 29h, 20h, 23h, 48h, 72h, 75h, 69h, 71h, 23h, 48h, 7bh, 79h, 23h, 4fh, 58h, 57h, 23h, 58h, 6bh, 79h, 6bh, 7ah, 3bh ; compressed 304 301 305 302 ; db "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL … … 362 359 ;$translate{ord('2')} = 12; [StringsCompress Processed] 363 360 ;$translate{ord('3')} = 13; [StringsCompress Processed] 364 ;$translate{ord('4')} = 14; [StringsCompress Processed]361 ;$translate{ord('4')} = 14; ; Not used at the moment [StringsCompress Processed] 365 362 ;$translate{ord('5')} = 15; [StringsCompress Processed] 366 363 ;$translate{ord('6')} = 16; [StringsCompress Processed] … … 478 475 ;; translated usage stats 479 476 ;; 33:1 480 ;; 32:2 2477 ;; 32:26 481 478 ;; 181:1 482 479 ;; 53:2 … … 486 483 ;; 179:8 487 484 ;; 44:1 488 ;; 50: 3485 ;; 50:2 489 486 ;; 51:3 490 487 ;; 47:2 … … 493 490 ;; 34:3 494 491 ;; 49:1 495 ;; 56: 6496 ;; 45: 3492 ;; 56:4 493 ;; 45:1 497 494 ;; 175:1 498 495 ;; 171:2 … … 522 519 ;; 63,?: 523 520 ;; 64,@:1 524 ;; 65,A: 3525 ;; 66,B: 9526 ;; 67,C: 4521 ;; 65,A:4 522 ;; 66,B:8 523 ;; 67,C:2 527 524 ;; 68,D:10 528 ;; 69,E: 2525 ;; 69,E:3 529 526 ;; 70,F:4 530 ;; 71,G: 2531 ;; 72,H: 4527 ;; 71,G:3 528 ;; 72,H:2 532 529 ;; 73,I:1 533 530 ;; 74,J: 534 531 ;; 75,K:1 535 532 ;; 76,L:4 536 ;; 77,M: 4537 ;; 78,N: 1538 ;; 79,O: 1539 ;; 80,P: 2533 ;; 77,M:5 534 ;; 78,N:2 535 ;; 79,O:2 536 ;; 80,P:1 540 537 ;; 81,Q:1 541 ;; 82,R: 5542 ;; 83,S: 5538 ;; 82,R:7 539 ;; 83,S:3 543 540 ;; 84,T: 544 541 ;; 85,U:2 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r411 r421 36 36 mov bx, [cs:bx+IDEVARS.wPort] 37 37 ret 38 39 %endif 38 %endif ; MODULE_ADVANCED_ATA 40 39 41 40 42 41 ;-------------------------------------------------------------------- 43 ; AccessDPT_GetDriveSelectByteToAL 42 ; AccessDPT_GetDriveSelectByteForOldInt13hToAL 43 ; AccessDPT_GetDriveSelectByteForEbiosToAL 44 44 ; Parameters: 45 45 ; DS:DI: Ptr to Disk Parameter Table … … 50 50 ;-------------------------------------------------------------------- 51 51 ALIGN JUMP_ALIGN 52 AccessDPT_GetDriveSelectByteToAL: 52 AccessDPT_GetDriveSelectByteForOldInt13hToAL: 53 mov al, [di+DPT.bFlagsLow] 54 test al, FLGL_DPT_ASSISTED_LBA 55 jnz SHORT GetDriveSelectByteForAssistedLBAtoAL 56 57 and al, FLG_DRVNHEAD_DRV ; Clear all but drive select bit 58 or al, MASK_DRVNHEAD_SET ; Bits set to 1 for old drives 59 ret 60 61 %ifdef MODULE_EBIOS 62 ALIGN JUMP_ALIGN 63 AccessDPT_GetDriveSelectByteForEbiosToAL: 53 64 mov al, [di+DPT.wFlags] 54 and al, FLG_DRVNHEAD_LBA | FLG_DRVNHEAD_DRV 55 or al, MASK_DRVNHEAD_SET ; Bits set to 1 for old drives 65 ; Fall to GetDriveSelectByteForAssistedLBAtoAL 66 %endif ; MODULE_EBIOS 67 68 ALIGN JUMP_ALIGN 69 GetDriveSelectByteForAssistedLBAtoAL: 70 and al, FLG_DRVNHEAD_DRV ; Master / Slave select 71 or al, FLG_DRVNHEAD_LBA | MASK_DRVNHEAD_SET 56 72 ret 57 73 … … 89 105 ; BH: Number of L-CHS sectors per track 90 106 ; Corrupts registers: 91 ; CX, DX107 ; Nothing 92 108 ;-------------------------------------------------------------------- 93 109 AccessDPT_GetLCHStoAXBLBH: 94 ; Return LBA-assisted CHS if LBA addressing used 95 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 96 jz SHORT .ConvertPchsToLchs 97 98 call AccessDPT_GetLbaSectorCountToBXDXAX 99 call LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH 100 LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS 101 ret 102 103 .ConvertPchsToLchs: 104 mov ax, [di+DPT.wPchsCylinders] 105 mov bx, [di+DPT.wPchsHeadsAndSectors] 106 ; Fall to AccessDPT_ShiftPCHinAXBLtoLCH 107 108 109 ;-------------------------------------------------------------------- 110 ; AccessDPT_ShiftPCHinAXBLtoLCH 111 ; Parameters: 112 ; AX: P-CHS cylinders (1...16383) 113 ; BL: P-CHS heads (1...16) 114 ; Returns: 115 ; AX: Number of L-CHS cylinders (1...1024) 116 ; BL: Number of L-CHS heads (1...255) 117 ; CX: Number of bits shifted (4 at most) 118 ; Corrupts registers: 119 ; Nothing 120 ;-------------------------------------------------------------------- 121 AccessDPT_ShiftPCHinAXBLtoLCH: 122 xor cx, cx 123 .ShiftLoop: 124 cmp ax, MAX_LCHS_CYLINDERS ; Need to shift? 125 jbe SHORT .Return ; If not, return 126 inc cx ; Increment shift count 127 shr ax, 1 ; Halve cylinders 128 shl bl, 1 ; Double heads 129 jnz SHORT .ShiftLoop ; Falls through only on the last (4th) iteration and only if BL was 16 on entry 130 dec bl ; DOS doesn't support drives with 256 heads so we limit heads to 255 131 ; We can save a byte here by using DEC BX if we don't care about BH 132 .Return: 110 mov ax, [di+DPT.wLchsCylinders] 111 mov bx, [di+DPT.wLchsHeadsAndSectors] 133 112 ret 134 113 135 114 115 %ifdef MODULE_EBIOS 136 116 ;-------------------------------------------------------------------- 137 117 ; AccessDPT_GetLbaSectorCountToBXDXAX … … 148 128 mov bx, [di+DPT.twLbaSectors+4] 149 129 ret 130 %endif ; MODULE_EBIOS 150 131 151 132 … … 171 152 ret 172 153 154 173 155 ;-------------------------------------------------------------------- 174 ; A ccessDPT_GetUnshiftedAddressModeToALZF156 ; ACCESSDPT__GET_UNSHIFTED_ADDRESS_MODE_TO_AXZF 175 157 ; Parameters: 176 158 ; DS:DI: Ptr to Disk Parameter Table 177 159 ; Returns: 178 ; A L: Addressing Mode (L-CHS, P-CHS, LBA28, LBA48)160 ; AX: Addressing Mode (ADDRESSING_MODE_NORMAL, ADDRESSING_MODE_LARGE or ADDRESSING_MODE_ASSISTED_LBA) 179 161 ; unshifted (still shifted where it is in bFlagsLow) 180 162 ; ZF: Set based on value in AL 181 163 ; Corrupts registers: 182 ; AL164 ; Nothing 183 165 ;-------------------------------------------------------------------- 184 166 ; … … 186 168 ; is not worth it for these two instructions (4 bytes total) 187 169 ; 188 %macro A ccessDPT_GetUnshiftedAddressModeToALZF 0170 %macro ACCESSDPT__GET_UNSHIFTED_ADDRESS_MODE_TO_AXZF 0 189 171 mov al, [di+DPT.bFlagsLow] 190 and a l,MASKL_DPT_ADDRESSING_MODE172 and ax, BYTE MASKL_DPT_ADDRESSING_MODE 191 173 %endmacro -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
r419 r421 1 1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : Functions for generating L-CHS parameters for 3 ; LBA drives. 3 ; drives with more than 1024 cylinders. 4 ; 5 ; These algorithms are taken from: http://www.mossywell.com/boot-sequence 6 ; Take a look at it for more detailed information. 4 7 ; 5 8 ; This file is shared with BIOS Drive Information Tool. … … 24 27 SECTION .text 25 28 26 ;-------------------------------------------------------------------- 27 ; LBA assist calculation: 28 ; this is how to fit a big drive into INT13's skimpy size requirements, 29 ; with a maximum of 8.4G available. 30 ; 29 %ifdef MODULE_EBIOS 30 ;-------------------------------------------------------------------- 31 ; AtaGeometry_GetLbaSectorCountToBXDXAXfromAtaInfoInESSI 32 ; Parameters: 33 ; ES:SI: Ptr to 512-byte ATA information read from the drive 34 ; Returns: 35 ; BX:DX:AX: 48-bit sector count 36 ; CL: FLGL_DPT_LBA48 if LBA48 supported, zero otherwise 37 ; Corrupts registers: 38 ; Nothing 39 ;-------------------------------------------------------------------- 40 AtaGeometry_GetLbaSectorCountToBXDXAXfromAtaInfoInESSI: 41 mov bx, Registers_ExchangeDSSIwithESDI 42 call bx ; ATA info now in DS:DI 43 push bx ; We will return via Registers_ExchangeDSSIwithESDI 44 45 ; Check if LBA48 supported 46 test BYTE [di+ATA6.wSetSup83+1], A6_wSetSup83_LBA48>>8 47 jz SHORT .GetLba28SectorCount 48 49 ; Get LBA48 sector count 50 mov cl, FLGL_DPT_LBA48 51 mov ax, [di+ATA6.qwLBACnt] 52 mov dx, [di+ATA6.qwLBACnt+2] 53 mov bx, [di+ATA6.qwLBACnt+4] 54 ret 55 56 .GetLba28SectorCount: 57 xor cl, cl 58 xor bx, bx 59 mov ax, [di+ATA1.dwLBACnt] 60 mov dx, [di+ATA1.dwLBACnt+2] 61 ret 62 %endif ; MODULE_EBIOS 63 64 65 ;-------------------------------------------------------------------- 66 ; AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSI: 67 ; Parameters: 68 ; ES:SI: Ptr to 512-byte ATA information read from the drive 69 ; Returns: 70 ; AX: Number of L-CHS cylinders (1...1027, yes 1027) 71 ; BL: Number of L-CHS heads (1...255) 72 ; BH: Number of L-CHS sectors per track (1...63) 73 ; CX: Number of bits shifted (0...3) 74 ; DL: Addressing mode 75 ; Corrupts registers: 76 ; DH 77 ;-------------------------------------------------------------------- 78 AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSI: 79 call AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI 80 ; Fall to AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBH 81 82 AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBH: 83 ; Generate L-CHS using simple bit shift algorithm (ECHS) if 84 ; 8192 or less cylinders. 85 cmp ax, 8192 86 jbe SHORT ConvertPCHfromAXBXtoEnhancedCHinAXBX 87 88 ; We have 8193 or more cylinders so two algorithms are available: 89 ; Revised ECHS or Assisted LBA. The Assisted LBA provides larger 90 ; capacity but requires LBA support from drive (drives this large 91 ; always support LBA but we may have intentionally cleared the LBA 92 ; bit to force CHS addressing). 93 test BYTE [es:si+ATA1.wCaps+1], A1_wCaps_LBA>>8 94 jz SHORT ConvertPCHfromAXBXtoRevisedEnhancedCHinAXBX 95 96 ; Drive supports LBA 97 call AtaGeometry_GetSectorCountToDXAXfromCHSinAXBLBH 98 call ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH 99 xor cx, cx ; No bits to shift 100 mov dl, ADDRESSING_MODE_ASSISTED_LBA 101 ret 102 103 104 ;-------------------------------------------------------------------- 105 ; AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI 106 ; Parameters: 107 ; ES:SI: Ptr to 512-byte ATA information read from the drive 108 ; Returns: 109 ; AX: Number of P-CHS cylinders (1...16383) 110 ; BL: Number of P-CHS heads (1...16) 111 ; BH: Number of P-CHS sectors per track (1...63) 112 ; Corrupts registers: 113 ; Nothing 114 ;-------------------------------------------------------------------- 115 AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI: 116 mov ax, [es:si+ATA1.wCylCnt] ; Cylinders (1...16383) 117 mov bl, [es:si+ATA1.wHeadCnt] ; Heads (1...16) 118 mov bh, [es:si+ATA1.wSPT] ; Sectors per Track (1...63) 119 ret 120 121 122 ;-------------------------------------------------------------------- 123 ; AtaGeometry_GetSectorCountToDXAXfromCHSinAXBLBH 124 ; Parameters: 125 ; ES:SI: Ptr to 512-byte ATA information read from the drive 126 ; AX: Number of cylinders (1...16383) 127 ; BL: Number of heads (1...255) 128 ; BH: Number of sectors per track (1...63) 129 ; Returns: 130 ; DX:AX: Total number of CHS addressable sectors 131 ; Corrupts registers: 132 ; BX 133 ;-------------------------------------------------------------------- 134 AtaGeometry_GetSectorCountToDXAXfromCHSinAXBLBH: 135 xchg ax, bx 136 mul ah ; AX = Heads * Sectors per track 137 mul bx 138 ret 139 140 141 ;-------------------------------------------------------------------- 142 ; Revised Enhanced CHS calculation (Revised ECHS) 143 ; 144 ; This algorithm translates P-CHS sector count to L-CHS sector count 145 ; with bit shift algorithm. Since 256 heads are not allowed 146 ; (DOS limit), this algorithm makes translations so that maximum of 147 ; 240 L-CHS heads can be used. This makes the maximum addressable capacity 148 ; to 7,927,234,560 bytes ~ 7.38 GiB. LBA addressing needs to be used to 149 ; get more capacity. 150 ; 151 ; L-CHS parameters generated here require the drive to use CHS addressing. 152 ; 153 ; Here is the algorithm: 154 ; If cylinders > 8192 and heads = 16 155 ; Heads = 15 156 ; Cylinders = cylinders * 16 / 15 (losing the fraction component) 157 ; Do a standard ECHS translation 158 ; 159 ; ConvertPCHfromAXBXtoRevisedEnhancedCHinAXBX: 160 ; Parameters: 161 ; AX: Number of P-CHS cylinders (8193...16383) 162 ; BL: Number of P-CHS heads (1...16) 163 ; Returns: 164 ; AX: Number of L-CHS cylinders (?...1024) 165 ; BL: Number of L-CHS heads (?...240) 166 ; CX: Number of bits shifted (0...3) 167 ; DL: ADDRESSING_MODE_NORMAL or ADDRESSING_MODE_LARGE 168 ; Corrupts registers: 169 ; Nothing 170 ;-------------------------------------------------------------------- 171 ConvertPCHfromAXBXtoRevisedEnhancedCHinAXBX: 172 cmp bl, 16 ; Drives with 8193 or more cylinders can report 15 heads 173 jb SHORT ConvertPCHfromAXBXtoEnhancedCHinAXBX 174 175 eMOVZX cx, bl ; CX = 16 176 dec bx ; Heads = 15 177 mul cx ; DX:AX = Cylinders * 16 178 dec cx ; CX = 15 179 div cx ; AX = (Cylinders * 16) / 15 180 ; Fall to ConvertPCHfromAXBXtoEnhancedCHinAXBX 181 182 183 ;-------------------------------------------------------------------- 184 ; Enhanced CHS calculation (ECHS) 185 ; 186 ; This algorithm translates P-CHS sector count to L-CHS sector count 187 ; with simple bit shift algorithm. Since 256 heads are not allowed 188 ; (DOS limit), this algorithm require that there are at most 8192 189 ; P-CHS cylinders. This makes the maximum addressable capacity 190 ; to 4,227,858,432 bytes ~ 3.94 GiB. Use Revised ECHS or Assisted LBA 191 ; algorithms if there are more than 8192 P-CHS cylinders. 192 ; 193 ; L-CHS parameters generated here require the drive to use CHS addressing. 194 ; 195 ; Here is the algorithm: 196 ; Multiplier = 1 197 ; Cylinder = Cylinder - 1 198 ; Is Cylinder < 1024? If not: 199 ; Do a right bitwise rotation on the cylinder (i.e., divide by 2) 200 ; Do a left bitwise rotation on the multiplier (i.e., multiply by 2) 201 ; Use the multiplier on the Cylinder and Head values to obtain the translated values. 202 ; 203 ; ConvertPCHfromAXBXtoEnhancedCHinAXBX: 204 ; Parameters: 205 ; AX: Number of P-CHS cylinders (1...8192) 206 ; BL: Number of P-CHS heads (1...16) 207 ; Returns: 208 ; AX: Number of L-CHS cylinders (?...1024) 209 ; BL: Number of L-CHS heads (?...128) 210 ; CX: Number of bits shifted (0...3) 211 ; DL: ADDRESSING_MODE_NORMAL or ADDRESSING_MODE_LARGE 212 ; Corrupts registers: 213 ; Nothing 214 ;-------------------------------------------------------------------- 215 ConvertPCHfromAXBXtoEnhancedCHinAXBX: 216 xor cx, cx ; No bits to shift initially 217 xor dl, dl ; Assume ADDRESSING_MODE_NORMAL 218 .ShiftIfMoreThan1024Cylinder: 219 cmp ax, MAX_LCHS_CYLINDERS 220 jbe SHORT ReturnLCHSinAXBLBH 221 shr ax, 1 222 shl bl, 1 223 inc cx ; Increment bit shift count 224 mov dl, ADDRESSING_MODE_LARGE 225 jmp SHORT .ShiftIfMoreThan1024Cylinder 226 227 228 ;-------------------------------------------------------------------- 229 ; LBA assist calculation (or Assisted LBA) 230 ; 231 ; This algorithm translates P-CHS sector count up to largest possible 232 ; L-CHS sector count (1024, 255, 63). Note that INT 13h interface allows 233 ; 256 heads but DOS supports up to 255 head. That is why BIOSes never 234 ; use 256 heads. 235 ; 236 ; L-CHS parameters generated here require the drive to use LBA addressing. 237 ; 238 ; Here is the algorithm: 31 239 ; If cylinders > 8192 32 ; Variable CH = Total Sectors / 6333 ; Divide (CH 1) by 1024 (as an assembler bitwise right shift)and add 1240 ; Variable CH = Total CHS Sectors / 63 241 ; Divide (CH 1) by 1024 and add 1 34 242 ; Round the result up to the nearest of 16, 32, 64, 128 and 255. This is the value to be used for the number of heads. 35 243 ; Divide CH by the number of heads. This is the value to be used for the number of cylinders. 36 244 ; 37 ; There's a wealth of information at: http://www.mossywell.com/boot-sequence 38 ; they show a slightly different approach to LBA assist calulations, but 39 ; the method here provides compatibility with phoenix BIOS. 40 ; 41 ; LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH: 42 ; Parameters: 43 ; BX:DX:AX: Total number of sectors 44 ; Returns: 45 ; DX:AX: Number of cylinders 245 ; ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH: 246 ; Parameters: 247 ; DX:AX: Total number of P-CHS sectors for CHS addressing 248 ; (max = 16383 * 16 * 63 = 16,514,064) 249 ; Returns: 250 ; AX: Number of cylinders (?...1027) 251 ; BL: Number of heads (16, 32, 64, 128 or 255) 46 252 ; BH: Number of sectors per track (always 63) 47 ; BL: Number of heads (16, 32, 64, 128 or 255) 48 ; Corrupts registers: 49 ; CX 50 ;-------------------------------------------------------------------- 51 LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH: 52 push bp 253 ; Corrupts registers: 254 ; CX, DX 255 ;-------------------------------------------------------------------- 256 ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH: 257 ; Value CH = Total sector count / 63 258 ; Max = 16,514,064 / 63 = 262128 259 mov cx, LBA_ASSIST_SPT ; CX = 63 260 call Math_DivDXAXbyCX 261 push dx 262 push ax ; Value CH stored for later use 263 264 ; BX:DX:AX = Value CH - 1 265 ; Max = 262128 - 1 = 262127 266 xor bx, bx 267 sub ax, BYTE 1 268 sbb dx, bx 269 270 ; AX = Number of heads = ((Value CH - 1) / 1024) + 1 271 ; Max = (262127 / 1024) + 1 = 256 53 272 push si 54 55 ; Value CH = Total sector count / 6356 xor cx, cx57 push cx ; Push zero for bits 48...6358 push bx59 push dx60 push ax ; 64-bit sector count now in stack61 mov cl, LBA_ASSIST_SPT62 mov bp, sp ; SS:BP now points sector count63 call Math_DivQWatSSBPbyCX ; Temporary value A now in stack64 65 ; BX:DX:AX = Value CH - 166 mov ax, [bp]67 mov dx, [bp+2]68 mov bx, [bp+4]69 sub ax, BYTE 1 ; Subtract 170 sbb dx, BYTE 071 sbb bx, BYTE 072 73 ; DX:AX = Number of heads = ((Value CH - 1) / 1024) + 174 273 call Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX 75 add ax, BYTE 1 ; Add 176 adc dx, bx ; BX = 0274 pop si 275 inc ax ; + 1 77 276 78 277 ; Heads must be 16, 32, 64, 128 or 255 (round up to the nearest) 79 test dx, dx ; 65536 or more heads? 80 jnz SHORT .LimitHeadsTo255 278 ; Max = 255 81 279 mov cx, 16 ; Min number of heads 82 280 .CompareNextValidNumberOfHeads: … … 85 283 shl cx, 1 ; Double number of heads 86 284 test ch, ch ; Reached 256 heads? 87 jnz SHORT .CompareNextValidNumberOfHeads 88 .LimitHeadsTo255: 89 mov cx, 255 285 jz SHORT .CompareNextValidNumberOfHeads 286 dec cx ; If so, limit heads to 255 90 287 .NumberOfHeadsNowInCX: 91 288 mov bx, cx ; Number of heads are returned in BL … … 93 290 94 291 ; DX:AX = Number of cylinders = Value CH (without - 1) / number of heads 95 call Math_DivQWatSSBPbyCX 96 mov ax, [bp] 97 mov dx, [bp+2] ; Cylinders now in DX:AX 98 99 ; Return LBA assisted CHS 100 add sp, BYTE 8 ; Clean stack 101 pop si 102 pop bp 103 ret 292 ; Max = 262128 / 255 = 1027 293 pop ax 294 pop dx ; Value CH back to DX:AX 295 div cx 296 297 ; Return L-CHS 298 ReturnLCHSinAXBLBH: 299 ret -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r411 r421 33 33 ; ES: BDA Segment 34 34 ; Returns: 35 ; DL: Drive number for new drive36 35 ; DS:DI: Ptr to Disk Parameter Table (if successful) 37 36 ; CF: Cleared if DPT created successfully … … 81 80 %endif 82 81 mov [di+DPT.wFlags], ax 83 ; Fall to .Store Addressing84 85 ;-------------------------------------------------------------------- 86 ; .Store Addressing82 ; Fall to .StoreCHSparametersAndAddressingMode 83 84 ;-------------------------------------------------------------------- 85 ; .StoreCHSparametersAndAddressingMode 87 86 ; Parameters: 88 87 ; DS:DI: Ptr to Disk Parameter Table … … 94 93 ; AX, BX, CX, DX 95 94 ;-------------------------------------------------------------------- 96 .Store Addressing:95 .StoreCHSparametersAndAddressingMode: 97 96 ; Check if CHS defined in ROMVARS 98 97 call AccessDPT_GetPointerToDRVPARAMStoCSBX 99 test byte [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS ; User specified CHS? 100 jnz SHORT .StoreUserDefinedPCHS 101 98 test byte [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS ; User specified P-CHS? 99 jz SHORT .AutodetectPCHSvalues 100 101 ; Use DRVPARAMS P-CHS values instead of autodetected 102 mov ax, [cs:bx+DRVPARAMS.wCylinders] 103 mov bx, [cs:bx+DRVPARAMS.wHeadsAndSectors] 104 call AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBH 105 jmp SHORT .StoreLCHStoDPT 106 107 ; Get L-CHS parameters and addressing mode 108 .AutodetectPCHSvalues: 109 call AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSI 110 111 .StoreLCHStoDPT: 112 eSHL_IM dl, ADDRESSING_MODE_FIELD_POSITION 113 or cl, dl 114 or [di+DPT.bFlagsLow], cl ; Shift count and addressing mode 115 mov [di+DPT.wLchsCylinders], ax 116 mov [di+DPT.wLchsHeadsAndSectors], bx 117 118 ; Store P-CHS to DPT 119 call AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI 120 mov [di+DPT.bPchsHeads], bl 121 %ifdef MODULE_EBIOS 122 mov [di+DPT.wPchsCylinders], ax 123 mov [di+DPT.bPchsSectorsPerTrack], bh 124 ; Fall to .StoreNumberOfLbaSectors 125 126 ;-------------------------------------------------------------------- 127 ; .StoreNumberOfLbaSectors 128 ; Parameters: 129 ; DS:DI: Ptr to Disk Parameter Table 130 ; ES:SI: Ptr to 512-byte ATA information read from the drive 131 ; CS:BP: Ptr to IDEVARS for the controller 132 ; Returns: 133 ; Nothing 134 ; Corrupts registers: 135 ; AX, BX, CX, DX 136 ;-------------------------------------------------------------------- 102 137 ; Check if LBA supported 103 call AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI104 138 test BYTE [es:si+ATA1.wCaps+1], A1_wCaps_LBA>>8 105 jz SHORT . StoreCHSfromAXBHBL ; Small old drive with CHS addressing only106 107 ; Store LBA 28/48 addressing andtotal sector count108 call Ata ID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI109 call StoreLba AddressingAndTotalSectorCountFromBXDXAX110 111 ; Replace sector count with user defined if necessary139 jz SHORT .NoLbaSupportedSoNoEBIOS 140 141 ; Store LBA 28/48 total sector count 142 call AtaGeometry_GetLbaSectorCountToBXDXAXfromAtaInfoInESSI 143 call StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX 144 145 ; Load user defined LBA 112 146 call AccessDPT_GetPointerToDRVPARAMStoCSBX 113 147 test BYTE [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERLBA … … 126 160 jae SHORT .KeepTotalSectorsFromAtaID 127 161 .StoreUserDefinedSectorCountToDPT: 128 call StoreLbaAddressingAndTotalSectorCountFromBXDXAX129 130 ; Calculate L-CHS for old INT 13h 162 xor cx, cx ; Always LBA28 for user defined values 163 call StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX 164 131 165 .KeepTotalSectorsFromAtaID: 132 mov bx, [di+DPT.twLbaSectors+4] ; Restore BX 133 call LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH 134 mov [di+DPT.bLbaHeads], bl 135 jmp SHORT .StoreBlockMode 136 137 ;-------------------------------------------------------------------- 138 ; .StoreUserDefinedPCHS 139 ; Parameters: 140 ; DS:DI: Ptr to Disk Parameter Table 141 ; ES:SI: Ptr to 512-byte ATA information read from the drive 142 ; CS:BP: Ptr to IDEVARS for the controller 143 ; Returns: 144 ; AX: Number of P-CHS cylinders 145 ; BH: Number of P-CHS sectors per track 146 ; BL: Number of P-CHS heads 147 ; Corrupts registers: 148 ; Nothing 149 ;-------------------------------------------------------------------- 150 .StoreUserDefinedPCHS: 151 call AccessDPT_GetPointerToDRVPARAMStoCSBX 152 mov ax, [cs:bx+DRVPARAMS.wCylinders] 153 mov bx, [cs:bx+DRVPARAMS.wHeadsAndSectors] 154 ; Fall to .StoreCHSfromAXBHBL 155 156 ;-------------------------------------------------------------------- 157 ; .StoreCHSfromAXBHBL 158 ; Parameters: 159 ; AX: Number of P-CHS cylinders 160 ; BH: Number of P-CHS sectors per track 161 ; BL: Number of P-CHS heads 162 ; DS:DI: Ptr to Disk Parameter Table 163 ; ES:SI: Ptr to 512-byte ATA information read from the drive 164 ; CS:BP: Ptr to IDEVARS for the controller 165 ; Returns: 166 ; AX: Number of P-CHS cylinders 167 ; BH: Number of P-CHS sectors per track 168 ; BL: Number of P-CHS heads 169 ; Corrupts registers: 170 ; CX 171 ;-------------------------------------------------------------------- 172 .StoreCHSfromAXBHBL: 173 push ax 174 push bx 175 call AccessDPT_ShiftPCHinAXBLtoLCH ; Get number of bits to shift 176 pop bx 177 pop ax 178 jcxz .StorePCHSfromAXDX ; Small drive so use L-CHS addressing 179 180 ; Store P-CHS addressing mode and number of bits to shift in L-CHS to P-CHS translation 181 or cl, ADDRESSING_MODE_PCHS<<ADDRESSING_MODE_FIELD_POSITION 182 or [di+DPT.bFlagsLow], cl 183 ; Fall to .StoreChsFromAXBLBH 184 185 ;-------------------------------------------------------------------- 186 ; .StoreChsFromAXBLBH 187 ; Parameters: 188 ; AX: Number of P-CHS cylinders 189 ; BH: Number of P-CHS sectors per track 190 ; BL: Number of P-CHS heads 191 ; DS:DI: Ptr to Disk Parameter Table 192 ; ES:SI: Ptr to 512-byte ATA information read from the drive 193 ; CS:BP: Ptr to IDEVARS for the controller 194 ; Returns: 195 ; Nothing 196 ; Corrupts registers: 197 ; Nothing 198 ;-------------------------------------------------------------------- 199 .StorePCHSfromAXDX: 200 mov [di+DPT.wPchsCylinders], ax 201 mov [di+DPT.wPchsHeadsAndSectors], bx 166 .NoLbaSupportedSoNoEBIOS: 167 %endif ; MODULE_EBIOS 202 168 ; Fall to .StoreBlockMode 203 169 … … 268 234 269 235 270 ;-------------------------------------------------------------------- 271 ; StoreLbaAddressingAndTotalSectorCountFromBXDXAX 236 %ifdef MODULE_EBIOS 237 ;-------------------------------------------------------------------- 238 ; StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX 272 239 ; Parameters: 273 240 ; BX:DX:AX: Total Sector Count 241 ; CL: FLGL_DPT_LBA48 if LBA48 supported 274 242 ; DS:DI: Ptr to Disk Parameter Table 275 243 ; Returns: 276 244 ; Nothing 277 245 ; Corrupts registers: 278 ; CX 279 ;-------------------------------------------------------------------- 280 StoreLbaAddressingAndTotalSectorCountFromBXDXAX: 246 ; CL 247 ;-------------------------------------------------------------------- 248 StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX: 249 or cl, FLGL_DPT_LBA_AND_EBIOS_SUPPORTED 250 and BYTE [di+DPT.bFlagsLow], ~FLGL_DPT_LBA48 251 or [di+DPT.bFlagsLow], cl 281 252 mov [di+DPT.twLbaSectors], ax 282 253 mov [di+DPT.twLbaSectors+2], dx 283 254 mov [di+DPT.twLbaSectors+4], bx 284 285 %ifdef MODULE_EBIOS286 and BYTE [di+DPT.bFlagsLow], ~MASKL_DPT_ADDRESSING_MODE287 test bx, bx288 jnz SHORT .SetLba48AddressingToDPT ; Must be LBA48289 290 ; Drives can report at most 0FFF FFFFh LBA28 sectors according to ATA specification.291 ; That is (2^28)-1 so we can simply check if DH is zero or not.292 test dh, dh293 jz SHORT .SetLba28AddressingToDPT294 .SetLba48AddressingToDPT:295 or BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA48<<ADDRESSING_MODE_FIELD_POSITION296 .SetLba28AddressingToDPT:297 %endif298 or BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA28<<ADDRESSING_MODE_FIELD_POSITION299 255 ret 256 %endif ; MODULE_EBIOS -
trunk/XTIDE_Universal_BIOS/makefile
r417 r421 30 30 # ELIMINATE_CGA_SNOW Prevents CGA snowing at the cost of a few bytes # 31 31 # RELOCATE_INT13H_STACK Relocates INT 13h stack to top of stolen conventional memory # 32 # RESERVE_DIAGNOSTIC_CYLINDER Reserve one L-CHS cylinder for compatibility with old BIOSes # 32 33 # USE_186 Use instructions supported by 80188/80186 and V20/V30 and later # 33 34 # USE_286 Use instructions supported by 286 and later # … … 94 95 # Assembler preprocessor defines. # 95 96 ################################################################# 96 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS MODULE_FEATURE_SETS 97 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS MODULE_FEATURE_SETS RESERVE_DIAGNOSTIC_CYLINDER 97 98 DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_SERIAL MODULE_SERIAL_FLOPPY 98 99
Note:
See TracChangeset
for help on using the changeset viewer.