Changeset 422 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc
- Timestamp:
- May 12, 2012, 1:58:25 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Inc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r421 r422 63 63 64 64 struc DRVDETECTINFO 65 .StartOfDrvDetectInfo: 65 66 .szDrvName resb MAX_HARD_DISK_NAME_LENGTH 66 67 resb 2 ; Zero word (ensures string terminates) 67 68 .wInitErrorFlags resb 2 ; Errors during initialization 68 69 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 70 ; DRVDETECTINFO's size must be an even multiple of DPT's size 71 .EndOfDriveDetectInfo: resb LARGEST_DPT_SIZE - (.EndOfDriveDetectInfo % LARGEST_DPT_SIZE) 78 72 endstruc 79 73 -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r421 r422 23 23 24 24 ; Base DPT for all device types 25 struc DPT ; 8or 18 bytes25 struc DPT ; 10 or 18 bytes 26 26 ; General Disk Parameter Table related 27 27 .wFlags: … … 29 29 .bFlagsHigh resb 1 30 30 .bIdevarsOffset resb 1 ; Offset to IDEVARS for this drive 31 .bInitError resb 1 ; Flags for AH=09h initialization errors 31 32 32 .bPchsHeads resb 1 ; (1...16)33 ; CHS variables 33 34 .wLchsCylinders resb 2 ; (1...1027, yes 1027) 34 35 .wLchsHeadsAndSectors: 35 36 .bLchsHeads resb 1 ; (1...255) 36 37 .bLchsSectorsPerTrack resb 1 ; (1...63) 38 .bPchsHeads resb 1 ; (1...16) 37 39 40 ; LBA and remaining P-CHS variables 38 41 %ifdef MODULE_EBIOS 42 .bPchsSectorsPerTrack resb 1 43 .wPchsCylinders resb 2 39 44 .twLbaSectors resb 6 ; 48-bit sector count for LBA addressing 40 .wPchsCylinders resb 2 41 .bPchsSectorsPerTrack resb 1 42 resb 1 45 %else 46 resb 1 ; Alignment 43 47 %endif 44 48 endstruc … … 46 50 ; Bit definitions for DPT.bFlagsLow 47 51 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 mode49 FLGL_DPT_ASSISTED_LBA EQU (1<<( ADDRESSING_MODE_FIELD_POSITION+1))52 MASKL_DPT_TRANSLATEMODE EQU MASK_DRVPARAMS_TRANSLATEMODE ; Bits 2...3, NORMAL, LARGE or Assisted LBA addressing mode 53 FLGL_DPT_ASSISTED_LBA EQU (1<<(TRANSLATEMODE_FIELD_POSITION+1)) 50 54 FLGL_DPT_SLAVE EQU FLG_DRVNHEAD_DRV ; Bit 4, Drive is a Slave Drive 51 55 %ifdef MODULE_IRQ … … 56 60 FLGL_DPT_LBA48 EQU (1<<7) ; Bit 7, Drive supports 48-bit LBA (Must be bit 7!) 57 61 %endif 58 59 ; Addressing modes for DPT.bFlagsLow60 ADDRESSING_MODE_FIELD_POSITION EQU 261 ADDRESSING_MODE_NORMAL EQU 062 ADDRESSING_MODE_LARGE EQU 163 ADDRESSING_MODE_ASSISTED_LBA EQU 2 ; 28-bit or 48-bit LBA64 62 65 63 … … 87 85 88 86 87 ; Flags for DPT_ADVANCED_ATA.bInitError 88 FLG_INITERROR_FAILED_TO_SELECT_DRIVE EQU (1<<0) 89 FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS EQU (1<<1) 90 FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE EQU (1<<2) 91 FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE EQU (1<<3) 92 FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE EQU (1<<4) 93 FLG_INITERROR_FAILED_TO_SET_PIO_MODE EQU (1<<5) 94 FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER EQU (1<<6) 95 96 89 97 90 98 ; DPT for ATA devices 91 struc DPT_ATA ; 8/18 bytes + 2 bytes = 10/20 bytes99 struc DPT_ATA ; 10/18 bytes + 2 bytes = 12/20 bytes 92 100 .dpt resb DPT_size 93 101 .bBlockSize resb 1 ; Current block size in sectors (do not set to zero!) … … 100 108 ; EBDA must be reserved for DPTs when using these! 101 109 %ifdef MODULE_ADVANCED_ATA 102 struc DPT_ADVANCED_ATA ; 1 0/20 bytes + 8 bytes = 18/28 bytes110 struc DPT_ADVANCED_ATA ; 12/20 bytes + 8 bytes = 20/28 bytes 103 111 .dpt_ata resb DPT_ATA_size 104 112 .wControllerID resb 2 ; Controller specific ID WORD (from Advanced Controller detection) … … 106 114 .wMinPioCycleTime resb 2 ; Minimum PIO Cycle Time in ns 107 115 .bPioMode resb 1 ; Best supported PIO mode 108 .bInitError resb 1 ; Flags for initialization errors116 resb 1 109 117 endstruc 110 111 ; Flags for DPT_ADVANCED_ATA.bInitError112 FLG_INITERROR_FAILED_TO_SELECT_DRIVE EQU (1<<0)113 FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS EQU (1<<1)114 FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE EQU (1<<2)115 FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE EQU (1<<3)116 FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE EQU (1<<4)117 FLG_INITERROR_FAILED_TO_SET_PIO_MODE EQU (1<<5)118 FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER EQU (1<<6)119 118 %endif 120 119 -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r408 r422 164 164 165 165 ; Bit defines for DRVPARAMS.wFlags 166 MASK_DRVPARAMS_WRITECACHE EQU (3<<0) ; Drive internal write cache settings (must start at bit 0) 167 FLG_DRVPARAMS_BLOCKMODE EQU (1<<2) ; Enable Block mode transfers 168 FLG_DRVPARAMS_USERCHS EQU (1<<3) ; User specified P-CHS values 169 FLG_DRVPARAMS_USERLBA EQU (1<<4) ; User specified LBA values 166 MASK_DRVPARAMS_WRITECACHE EQU (3<<0) ; Bits 0...1, Drive internal write cache settings (must start at bit 0) 167 DEFAULT_WRITE_CACHE EQU 0 ; Must be 0 168 DISABLE_WRITE_CACHE EQU 1 169 ENABLE_WRITE_CACHE EQU 2 170 MASK_DRVPARAMS_TRANSLATEMODE EQU (3<<TRANSLATEMODE_FIELD_POSITION) ; Bits 2...3, Position shared with DPT 171 TRANSLATEMODE_FIELD_POSITION EQU 2 172 TRANSLATEMODE_NORMAL EQU 0 173 TRANSLATEMODE_LARGE EQU 1 174 TRANSLATEMODE_ASSISTED_LBA EQU 2 ; 28-bit or 48-bit LBA 175 TRANSLATEMODE_AUTO EQU 3 ; Only available in ROMVARS, not in DPTs 176 FLG_DRVPARAMS_BLOCKMODE EQU (1<<4) ; Enable Block mode transfers 177 FLG_DRVPARAMS_USERCHS EQU (1<<5) ; User specified P-CHS values 178 MAX_USER_CYLINDERS EQU 16383 179 MAX_USER_HEADS EQU 16 180 MAX_USER_SECTORS_PER_TRACK EQU 63 181 FLG_DRVPARAMS_USERLBA EQU (1<<6) ; User specified LBA value 182 MIN_USER_LBA_COUNT EQU ((MAX_USER_CYLINDERS*MAX_USER_HEADS*MAX_USER_SECTORS_PER_TRACK)+1) 183 MAX_USER_LBA_COUNT EQU ((2^28)-1) 170 184 171 ; Drive Write Cache values for DRVPARAMS.wFlags.MASK_DRVPARAMS_WRITECACHE172 DEFAULT_WRITE_CACHE EQU 0 ; Must be 0173 DISABLE_WRITE_CACHE EQU 1174 ENABLE_WRITE_CACHE EQU 2175 185 176 186 %endif ; ROMVARS_INC
Note:
See TracChangeset
for help on using the changeset viewer.