Changeset 227 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS
- Timestamp:
- Jan 29, 2012, 1:33:44 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r221 r227 21 21 ; CF: 0 if succesfull, 1 if error 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN24 23 AH48h_HandlerForGetExtendedDriveParameters: 25 ; Get our buffer to ES:SI 26 push di 27 call FindDPT_ForNewDriveToDSDI 28 lea si, [di+LARGEST_DPT_SIZE] ; IdeCommand.asm required fake DPT 29 pop di 30 push ds 31 pop es 24 call AccessDPT_GetLbaSectorCountToBXDXAX 32 25 33 ; Get Drive ID and total sector count from it 34 call AH25h_GetDriveInformationToBufferInESSI 35 jc SHORT .ReturnWithError 36 37 ; Point DS:DI to Destination buffer 38 mov di, [bp+IDEPACK.intpack+INTPACK.si] 26 ; Point DS:SI to Extended Drive Information Table to fill 39 27 mov ds, [bp+IDEPACK.intpack+INTPACK.ds] 40 mov ax, MINIMUM_EDRIVEINFO_SIZE41 cmp [ di+EDRIVE_INFO.wSize], ax28 mov cx, MINIMUM_EDRIVEINFO_SIZE 29 cmp [si+EDRIVE_INFO.wSize], cx 42 30 jb SHORT Prepare_ReturnFromInt13hWithInvalidFunctionError 43 31 je SHORT .SkipEddConfigurationParameters 44 32 45 33 ; We do not support EDD Configuration Parameters so set to FFFF:FFFFh 46 mov ax, -1 ; AX =FFFFh47 mov [ di+EDRIVE_INFO.fpEDDparams], ax48 mov [ di+EDRIVE_INFO.fpEDDparams+2], ax49 mov ax, EDRIVE_INFO_size34 mov cx, -1 ; FFFFh 35 mov [si+EDRIVE_INFO.fpEDDparams], cx 36 mov [si+EDRIVE_INFO.fpEDDparams+2], cx 37 mov cx, EDRIVE_INFO_size 50 38 51 ; Fill Extended Drive Information Table in DS: DI39 ; Fill Extended Drive Information Table in DS:SI 52 40 .SkipEddConfigurationParameters: 53 mov [ di+EDRIVE_INFO.wSize], ax54 mov WORD [ di+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS | FLG_CHS_INFORMATION_IS_VALID41 mov [si+EDRIVE_INFO.wSize], cx 42 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS 55 43 56 call AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI57 xor cx, cx58 mov [di+EDRIVE_INFO.dwCylinders], ax59 mov [di+EDRIVE_INFO.dwCylinders+2], cx60 eMOVZX ax, bl61 mov [di+EDRIVE_INFO.dwHeads], ax62 mov [di+EDRIVE_INFO.dwHeads+2], cx63 mov al, bh64 mov [di+EDRIVE_INFO.dwSectorsPerTrack], ax65 mov [di+EDRIVE_INFO.dwSectorsPerTrack+2], cx66 67 call AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI68 44 mov [di+EDRIVE_INFO.qwTotalSectors], ax 45 xor ax, ax ; Return with success 69 46 mov [di+EDRIVE_INFO.qwTotalSectors+2], dx 70 47 mov [di+EDRIVE_INFO.qwTotalSectors+4], bx 71 mov [di+EDRIVE_INFO.qwTotalSectors+6], cx 72 48 mov [di+EDRIVE_INFO.qwTotalSectors+6], ax 73 49 mov WORD [di+EDRIVE_INFO.wSectorSize], 512 74 50 75 ; Return with success76 xor ah, ah77 51 .ReturnWithError: 78 52 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Note:
See TracChangeset
for help on using the changeset viewer.