KolibriOS kernel
cd_drv.inc File Reference

Functions

void check_ATAPI_device_event_has_work ()
 --------------------------------------------------------------------------— More...
 

Variables

label ReadCDWRetr
 ******************************************** READING SECTOR WITH REPEATS * Repeated reads on failures * More...
 
label ReadCDWRetr_1
 --------------------------------------------------------------------------— More...
 
label NextRetr
 -----------------------------------— More...
 
label End_4
 -----------------------------------— More...
 
label PacketCommand
 Memory area for generating a packet command. More...
 
label CDSectorAddress
 address of reading data sector More...
 
dd TickCounter_1
 Start time of the next disk operation. More...
 
dd WURStartTime
 Time to start waiting for device readiness. More...
 
dd CDDataBuf_pointer
 pointer to buffer to read data into More...
 
label SendPacketDatCommand
 --------------------------------------------------------------------------— More...
 
label WaitDevice0
 -----------------------------------— More...
 
label WaitDevice1
 -----------------------------------— More...
 
label End_8
 -----------------------------------— Successful completion of data receive More...
 
label Err1_1
 -----------------------------------— Write error code More...
 
label Err6_temp
 -----------------------------------— More...
 
label Err6
 -----------------------------------— More...
 
label SendPacketNoDatCommand
 --------------------------------------------------------------------------— More...
 
label WaitDevice0_1
 -----------------------------------— More...
 
label WaitDevice1_1
 -----------------------------------— More...
 
label clear_DEC
 -----------------------------------— More...
 
label Err1_3
 -----------------------------------— Write error code More...
 
label Err6_1
 -----------------------------------— More...
 
label End_9
 -----------------------------------— More...
 
label SendCommandToHDD_1
 --------------------------------------------------------------------------— More...
 
label WaitHDReady_2
 -----------------------------------— More...
 
label End_10
 -----------------------------------— More...
 
label Err1_4
 -----------------------------------— Write error code More...
 
label Err2_4
 -----------------------------------— More...
 
label Err3_4
 -----------------------------------— More...
 
label Err4_4
 -----------------------------------— More...
 
label Err5_4
 -----------------------------------— More...
 
label WaitUnitReady
 --------------------------------------------------------------------------— More...
 
label SendCommand
 -----------------------------------— More...
 
label End_11
 -----------------------------------— More...
 
label prevent_medium_removal
 --------------------------------------------------------------------------— More...
 
label allow_medium_removal
 --------------------------------------------------------------------------— More...
 
label LoadMedium
 --------------------------------------------------------------------------— More...
 
label EjectMedium
 --------------------------------------------------------------------------— More...
 
label check_ATAPI_device_event
 --------------------------------------------------------------------------— More...
 
dd timer_ATAPI_check
 
db ATAPI_IDE0_lock
 
db ATAPI_IDE1_lock
 
db ATAPI_IDE2_lock
 
db ATAPI_IDE3_lock
 
db ATAPI_IDE4_lock
 
db ATAPI_IDE5_lock
 
db ATAPI_IDE6_lock
 
db ATAPI_IDE7_lock
 
db ATAPI_IDE8_lock
 
db ATAPI_IDE9_lock
 
db ATAPI_IDE10_lock
 
db ATAPI_IDE11_lock
 
db ignore_CD_eject_wait
 
label GetEvent_StatusNotification
 --------------------------------------------------------------------------— More...
 
label Read_TOC
 --------------------------------------------------------------------------— More...
 
label clear_packet_buffer
 --------------------------------------------------------------------------— More...
 

Function Documentation

◆ check_ATAPI_device_event_has_work()

void check_ATAPI_device_event_has_work ( )

--------------------------------------------------------------------------—

Check the event of pressing the eject button *

  • Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *
Source
blkdev/cd_drv.inc:724

Variable Documentation

◆ allow_medium_removal

label allow_medium_removal

--------------------------------------------------------------------------—

         ALLOW DISK CHANGE                  *

Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *

Source
blkdev/cd_drv.inc:657

◆ ATAPI_IDE0_lock

db ATAPI_IDE0_lock
Initial value
0
Source
blkdev/cd_drv.inc:1126

◆ ATAPI_IDE10_lock

db ATAPI_IDE10_lock
Initial value
0
Source
blkdev/cd_drv.inc:1136

◆ ATAPI_IDE11_lock

db ATAPI_IDE11_lock
Initial value
0
Source
blkdev/cd_drv.inc:1137

◆ ATAPI_IDE1_lock

db ATAPI_IDE1_lock
Initial value
0
Source
blkdev/cd_drv.inc:1127

◆ ATAPI_IDE2_lock

db ATAPI_IDE2_lock
Initial value
0
Source
blkdev/cd_drv.inc:1128

◆ ATAPI_IDE3_lock

db ATAPI_IDE3_lock
Initial value
0
Source
blkdev/cd_drv.inc:1129

◆ ATAPI_IDE4_lock

db ATAPI_IDE4_lock
Initial value
0
Source
blkdev/cd_drv.inc:1130

◆ ATAPI_IDE5_lock

db ATAPI_IDE5_lock
Initial value
0
Source
blkdev/cd_drv.inc:1131

◆ ATAPI_IDE6_lock

db ATAPI_IDE6_lock
Initial value
0
Source
blkdev/cd_drv.inc:1132

◆ ATAPI_IDE7_lock

db ATAPI_IDE7_lock
Initial value
0
Source
blkdev/cd_drv.inc:1133

◆ ATAPI_IDE8_lock

db ATAPI_IDE8_lock
Initial value
0
Source
blkdev/cd_drv.inc:1134

◆ ATAPI_IDE9_lock

db ATAPI_IDE9_lock
Initial value
0
Source
blkdev/cd_drv.inc:1135

◆ CDDataBuf_pointer

dd CDDataBuf_pointer

pointer to buffer to read data into

Initial value
0
Source
blkdev/cd_drv.inc:169

◆ CDSectorAddress

label CDSectorAddress

address of reading data sector

Source
blkdev/cd_drv.inc:163

◆ check_ATAPI_device_event

label check_ATAPI_device_event

--------------------------------------------------------------------------—

Source
blkdev/cd_drv.inc:740

◆ clear_DEC

label clear_DEC

-----------------------------------—

Source
blkdev/cd_drv.inc:408

◆ clear_packet_buffer

label clear_packet_buffer

--------------------------------------------------------------------------—

DETERMINE THE TOTAL NUMBER OF SECTORS ON THE DISK * Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel *

ReadCapacity: pusha ; Clear the packet command buffer call clear_packet_buffer ; Set the buffer size in bytes mov [CDBlockSize],8 ; Generate READ CAPACITY command mov [PacketCommand],word 25h ; Send command call SendPacketDatCommand popa

ret

Source
blkdev/cd_drv.inc:1211

◆ EjectMedium

label EjectMedium

--------------------------------------------------------------------------—

      REMOVE THE DISK FROM THE DRIVE        *

Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *

Source
blkdev/cd_drv.inc:702

◆ End_10

label End_10

-----------------------------------—

Source
blkdev/cd_drv.inc:546

◆ End_11

label End_11

-----------------------------------—

Source
blkdev/cd_drv.inc:622

◆ End_4

label End_4

-----------------------------------—

Source
blkdev/cd_drv.inc:149

◆ End_8

label End_8

-----------------------------------— Successful completion of data receive

Source
blkdev/cd_drv.inc:303

◆ End_9

label End_9

-----------------------------------—

Source
blkdev/cd_drv.inc:422

◆ Err1_1

label Err1_1

-----------------------------------— Write error code

Source
blkdev/cd_drv.inc:308

◆ Err1_3

label Err1_3

-----------------------------------— Write error code

Source
blkdev/cd_drv.inc:414

◆ Err1_4

label Err1_4

-----------------------------------— Write error code

Source
blkdev/cd_drv.inc:551

◆ Err2_4

label Err2_4

-----------------------------------—

Source
blkdev/cd_drv.inc:556

◆ Err3_4

label Err3_4

-----------------------------------—

Source
blkdev/cd_drv.inc:560

◆ Err4_4

label Err4_4

-----------------------------------—

Source
blkdev/cd_drv.inc:564

◆ Err5_4

label Err5_4

-----------------------------------—

Source
blkdev/cd_drv.inc:568

◆ Err6

label Err6

-----------------------------------—

Source
blkdev/cd_drv.inc:317

◆ Err6_1

label Err6_1

-----------------------------------—

Source
blkdev/cd_drv.inc:419

◆ Err6_temp

label Err6_temp

-----------------------------------—

Source
blkdev/cd_drv.inc:313

◆ GetEvent_StatusNotification

label GetEvent_StatusNotification

--------------------------------------------------------------------------—

Get an event or device status message *

  • Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel *
Source
blkdev/cd_drv.inc:1149

◆ ignore_CD_eject_wait

db ignore_CD_eject_wait
Initial value
0
Source
blkdev/cd_drv.inc:1138

◆ LoadMedium

label LoadMedium

--------------------------------------------------------------------------—

      LOAD DISK TO THE DRIVE                *

Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *

Source
blkdev/cd_drv.inc:681

◆ NextRetr

label NextRetr

-----------------------------------—

Source
blkdev/cd_drv.inc:92

◆ PacketCommand

label PacketCommand

Memory area for generating a packet command.

Source
blkdev/cd_drv.inc:160

◆ prevent_medium_removal

label prevent_medium_removal

--------------------------------------------------------------------------—

         FORBID DISK CHANGE                 *

Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *

Source
blkdev/cd_drv.inc:633

◆ Read_TOC

label Read_TOC

--------------------------------------------------------------------------—

Read information from TOC (Table of contents) * Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel *

Source
blkdev/cd_drv.inc:1174

◆ ReadCDWRetr

label ReadCDWRetr

******************************************** READING SECTOR WITH REPEATS * Repeated reads on failures *

Source
blkdev/cd_drv.inc:27

◆ ReadCDWRetr_1

label ReadCDWRetr_1

--------------------------------------------------------------------------—

Source
blkdev/cd_drv.inc:86

◆ SendCommand

label SendCommand

-----------------------------------—

Source
blkdev/cd_drv.inc:592

◆ SendCommandToHDD_1

label SendCommandToHDD_1

--------------------------------------------------------------------------—

       SEND COMMAND TO GIVEN DISK              *

Input parameters are passed through the global * variables: * ChannelNumber - channel number (1 or 2); * DiskNumber - disk number (0 or 1); * ATAFeatures - "features"; * ATASectorCount - sector count; * ATASectorNumber - initial sector number; * ATACylinder - initial cylinder number; * ATAHead - initial head number; * ATAAddressMode - addressing mode (0-CHS, 1-LBA); * ATACommand - command code. * If the function finished successfully: * in ATABasePortAddr - base address of HDD; * in DevErrorCode - zero. * If error has occured then in DevErrorCode will * be the error code. *

Source
blkdev/cd_drv.inc:446

◆ SendPacketDatCommand

label SendPacketDatCommand

--------------------------------------------------------------------------—

 SEND TO ATAPI DEVICE PACKET COMMAND,          *

THAT MEANS TRASMIT ONE DATA SECTOR OF SIZE * 2048 BYTE FROM DEVICE TO HOST * Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. * PacketCommand - 12-byte command packet; * CDBlockSize - size of receiving data block. * return eax DevErrorCode

Source
blkdev/cd_drv.inc:184

◆ SendPacketNoDatCommand

label SendPacketNoDatCommand

--------------------------------------------------------------------------—

SEND TO ATAPI DEVICE PACKET COMMAND, * THAT DOESNT MEAN TRANSMIT DATA * Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. * PacketCommand - 12-byte command packet. *

Source
blkdev/cd_drv.inc:330

◆ TickCounter_1

dd TickCounter_1

Start time of the next disk operation.

Initial value
0
Source
blkdev/cd_drv.inc:165

◆ timer_ATAPI_check

dd timer_ATAPI_check
Initial value
0
Source
blkdev/cd_drv.inc:1125

◆ WaitDevice0

label WaitDevice0

-----------------------------------—

Source
blkdev/cd_drv.inc:205

◆ WaitDevice0_1

label WaitDevice0_1

-----------------------------------—

Source
blkdev/cd_drv.inc:350

◆ WaitDevice1

label WaitDevice1

-----------------------------------—

Source
blkdev/cd_drv.inc:257

◆ WaitDevice1_1

label WaitDevice1_1

-----------------------------------—

Source
blkdev/cd_drv.inc:390

◆ WaitHDReady_2

label WaitHDReady_2

-----------------------------------—

Source
blkdev/cd_drv.inc:483

◆ WaitUnitReady

label WaitUnitReady

--------------------------------------------------------------------------—

 WAIT FOR THE DEVICE IS READY FOR WORK      *

Input parameters are passed through global * variables: * ChannelNumber - channel number; * DiskNumber - disk number on channel. *

Source
blkdev/cd_drv.inc:579

◆ WURStartTime

dd WURStartTime

Time to start waiting for device readiness.

Initial value
0
Source
blkdev/cd_drv.inc:167