Public Domain Atapi Cd-Rom Driver Failure
Problem on first use - elitebook 8. HP Support Forum.
Hi,I just bought a new PC, an elitebook 8. Free. DOS). After a few weeks waiting, I finally received it and I wanted to try it immediately. Unfortunately, since the first boot, the computer boots and asks me to choose a country and keyboard layout, but, just after, it shows an error message : "Unable to switch off A2. Size clamped down [..]_________________________________________Public domain ATAPI CD- Rom Driver v. ALPHAFailure! no IDE/ATAPI Drivers found![..]Error setting soft hotkey mode[..]Can't open CD driver FDCD0. SHSUCDX can't install."Followed by a prompt : "C: \> ".
What should I do if there is Driver Power State Failure? what drivers were loaded. atapi.sys. Try GEARAspiWDM.sys. Includes cd-rom,cdrom driver,cd-rw,drivers,dvd drivers,cd-r,driver,drvers,drivrs,dvd-r,files,file,cd. • Atapi • ATEN. © 2000-CDROM-Drivers.com. How to install Ubuntu on a HP computer with Freedos? How to install Ubuntu on a HP computer with Freedos? Public Domain ATAPI CD-ROM Driver v0.2.10 ALPHA. . so it's best to consult the associated ATAPI spec for a device. CD-ROM command packets were. http:// Public Domain C driver sourcecode.
Can I fix this or should I return it to the HP tech support ? If I can fix this, can someone give the steps ?
ATAPI - OSDev Wiki. ATAPI refers to devices that use the Packet Interface of the ATA6 (or higher) standard command set. It is basically a way to issue SCSI commands to a CDROM, CD- RW, DVD, or tape drive, attached to the ATA bus. ATAPI uses a very small number of ATA commands.
The most important are the PACKET command (0x. A0), and IDENTIFY PACKET DEVICE (0x. A1). Detecting. From a draft copy of the ATA/ATAPI spec (T1. D rev 3b, page 3. To detect if a ATA disk is a non- packet or packet device, you can use the presence of a signature stored in the "Sector Count" and "LBA Low,Mid,High" registers (registers 0x. F2- 0x. 1F5 for ATA controllers). If these registers contain 0x.


The connected device is a non- packet device, and `IDENTIFY DEVICE` (0x. EC) should work. If they contain 0x. EB then the device is a packet device, and `IDENTIFY PACKET DEVICE` (0x. A1) should be used. This signature is set/reset when the device is powered on, reset, or receives the `EXECUTE DEVICE DIAGNOSTIC` command (for packet devices, `IDENTIFY DEVICE` also resets the signature).
PACKET command (0x. A0)Each ATAPI command packet is made of a 'command byte' (from the SCSI command set - - see below for a partial list), followed by 1. For instance, reading the table of contents is achieved by sending the following byte string to the device, as a "command". ATAPI_READTOC */,0,1,0,0,0,0,0,1. The ATA PACKET command works in three phases, in PIO mode.
Phase 1) Set up the standard ATA IO port registers with ATAPI specific values. Then Send the ATA PACKET command to the device exactly as you would with any other ATA command: outb (ATA Command Register, 0x. A0). Phase 2) Prepare to do a PIO data transfer, the normal way, to the device. When the device is ready (BSY clear, DRQ set) you send the ATAPI command string (like the one above) as a 6 word PIO transfer to the device. Phase 3) Wait for an IRQ. When it arrives, you must read the LBA Mid and LBA High IO port registers.
They tell you the packet byte count that the ATAPI drive will send to you, or must receive from you. In a loop, you transmit that number of bytes, then wait for the next IRQ. In DMA mode, only the first two phases happen.
The device handles the details of phase 3 itself, with the PCI drive controller. IDENTIFY PACKET DEVICE command (0x. A1)This command is a "normal" ATA PIO mode command, used during initialization. It is an exact mirror of the ATA IDENTIFY command, except that it only returns information about ATAPI devices.
Use it in exactly the same way as you use IDENTIFY, including the meanings of all the bits in all the 2. Disc Content. Optical media and drives are governed by the MMC part of SCSI specs. They are structured in sessions and tracks. The readable entities are called Logical Track.
They are contiguous. Some media types can bear several sessions with. For more informations about assessing, reading and writing. Readable Disc Content. Optical Drive. x. Directions. Important note: on the Primary bus, the standard set of ATA IO ports is 0x. F0 through 0x. 1F7.
In much or all of the ATAPI documentation, you will see this set of IO ports called the "Task File". The term seems very confusing. First, you need to have a buffer.
If it is going to be a DMA buffer, it needs to follow the PRD rules (see the ATA/ATAPI using DMA article). If it is going to be a PIO buffer, then you need to know the size of the buffer. Call this size "max. Byte. Count". It must be an unsigned word, and 0 is illegal for PIO mode. A value of zero is mandatory for DMA mode, no matter what size the PRD buffers are. Assume that the command is in words Command.
Command. 6. Device is the Primary slave. Select the target device by setting the master/slave bit in the Device Select Register. There are no other bits needed.
F6, slavebit< < 4)If the command is going to use DMA, set the Features Register to 1, otherwise 0 for PIO. The Sectorcount Register and LBA Low Register are unused currently. Send max. Byte. Count in LBA Mid and LBA High Registers. F4,(max. Byte. Count & 0xff)). F5,(max. Byte. Count > > 8))Send the ATAPI PACKET command to the Command Register. Wait for an IRQ, or poll for BSY to clear and DRQ to set.
Then send the ATAPI command as 6 words, to the data port. F0, Command. 1). outw (0x. F0, Command. 2). outw (0x.
F0, Command. 3). outw (0x. F0, Command. 4). outw (0x. F0, Command. 5). outw (0x. F0, Command. 6)Then wait for another IRQ. You cannot poll. If this was a DMA command (is.
DMA == 1), then you are done. When the IRQ arrives, the transfer is complete.
If it was a PIO command, when the IRQ arrives, read the LBA Mid and LBA High Registers. This is vital. You told the drive the maximum amount of data to transfer at one time. Now the drive has to tell you the actual transfer size.
Once you have the transfer size (bytecount = LBA High < < 8 | LBA Mid), do the PIO transfer. F0) or outw(0x. 1f. If the transfer is complete, BSY and DRQ will clear. Otherwise, wait for the next IRQ, and read or write the same number of words again. Notes: there is a possible future change planned to increase the length of ATAPI command strings to 8 words. Check the two bottom bits of ATAPI Identify word 0 to verify 6 or 8 word command size. Once again, if you use polling to check BSY, DRQ, and ERR after sending the PACKET command, then you should probably ignore the ERR bit for the first four loops.
ATAPI calls this the "CHECK" bit, instead of ERR, but it means the same thing.). Complete Command Set SCSI Command Name.
Command Byte (Op. Code). TEST UNIT READY. REQUEST SENSE. START STOP UNIT. PREVENT ALLOW MEDIUM REMOVAL. READ FORMAT CAPACITIES.
READ CAPACITY. WRITE AND VERIFY (1. SYNCHRONIZE CACHE.
READ TOC/PMA/ATIP. GET CONFIGURATION. GET EVENT STATUS NOTIFICATION. READ DISC INFORMATION. READ TRACK INFORMATION. RESERVE TRACK. SEND OPC INFORMATION. MODE SELECT (1. 0).
MODE SENSE (1. 0). CLOSE TRACK SESSION. READ BUFFER CAPACITY. SEND CUE SHEET. SECURITY PROTOCOL IN. LOAD/UNLOAD MEDIUM.
SET READ AHEAD. READ MEDIA SERIAL NUMBER / SERVICE ACTION IN (1. GET PERFORMANCE. READ DISC STRUCTURE. SECURITY PROTOCOL OUT. SET STREAMING. MECHANISM STATUS. SEND DISC STRUCTURE. Examples. Here is an example adapted from a working driver implementation. The default and seemingly universal sector size for CD- ROMs.
ATAPI_SECTOR_SIZE 2. The default ISA IRQ numbers of the ATA controllers. ATA_IRQ_PRIMARY 0x. E#define ATA_IRQ_SECONDARY 0x. F. /* The necessary I/O ports, indexed by "bus". ATA_DATA(x) (x)#define ATA_FEATURES(x) (x+1)#define ATA_SECTOR_COUNT(x) (x+2)#define ATA_ADDRESS1(x) (x+3)#define ATA_ADDRESS2(x) (x+4)#define ATA_ADDRESS3(x) (x+5)#define ATA_DRIVE_SELECT(x) (x+6)#define ATA_COMMAND(x) (x+7)#define ATA_DCR(x) (x+0x.
ATA_BUS_PRIMARY 0x. F0#define ATA_BUS_SECONDARY 0x. ATA_DRIVE_MASTER 0x.
A0#define ATA_DRIVE_SLAVE 0x. B0. /* ATA specifies a 4. Alternative Status queries. ATA_SELECT_DELAY(bus) \. ATA_DCR(bus)); inb(ATA_DCR(bus)); inb(ATA_DCR(bus)); inb(ATA_DCR(bus)); }. Use the ATAPI protocol to read a single sector from the given.
A8 is READ SECTORS command byte. A8,0,0,0,0,0,0,0,0,0,0,0}; uint. Tell the scheduler that this process is using the ATA subsystem. Select drive (only the slave- bit is set) */. ATA_DRIVE_SELECT (bus)). ATA_SELECT_DELAY (bus); /* 4. ATA_FEATURES (bus)); /* PIO mode */.
ATAPI_SECTOR_SIZE & 0x. FF, ATA_ADDRESS2 (bus)). ATAPI_SECTOR_SIZE > > 8, ATA_ADDRESS3 (bus)). A0, ATA_COMMAND (bus)); /* ATA PACKET command */while((status = inb (ATA_COMMAND (bus)))& 0x. BUSY */. asm volatile("pause"); while(!((status = inb (ATA_COMMAND (bus)))& 0x.
DRQ or ERROR set */if(status & 0x. FF; /* most sig. byte of LBA */. FF. read_cmd[4]=(lba > > 0x. FF. read_cmd[5]=(lba > > 0x. FF; /* least sig. LBA *//* Send ATAPI/SCSI command */. ATA_DATA (bus),(uint.
Wait for IRQ that says the data is ready. Read actual size */. ATA_ADDRESS3 (bus)))< < 8)|(int)(inb (ATA_ADDRESS2 (bus))); /* This example code only supports the case where the data transfer.
ASSERT (size == ATAPI_SECTOR_SIZE); /* Read data. ATA_DATA (bus), buffer, size /2); /* The controller will send another IRQ even though we've read all. Wait for it - - so it doesn't interfere with.
Wait for BSY and DRQ to clear, indicating Command Finished */while((status = inb (ATA_COMMAND (bus)))& 0x. Exit the ATA subsystem */. Detecting a Medium's Capacity. A medium is any media inserted in the ATAPI Drive, like a CD or a DVD. By using the 'SCSI Read Capacity' command, you can read the last LBA of the medium, then you calculate the medium's capacity using this relationship. Capacity = (Last LBA + 1) * Block Size.
Last LBA and Block Size are returned after processing the command. Almost all CDs and DVDs use blocks with size of 2.
KB each. Processing this command goes in the following algorithm. Selecting the Drive [Master/Slave]. Waiting 4. 00ns for select to complete. Setting FEATURES Register to 0 [PIO Mode]. Setting LBA1 and LBA2 Registers to 0x. Number of Bytes will be returned]. Sending Packet Command, then Polling.
Sending the ATAPI Packet, then polling. ATAPI packet must be 6 words long (1. If there isn't an error, reading 4 Words [8 bytes] from the DATA Register.
The ATAPI packet should be in this formulation. Operation code = 2.
LBA (MSB) LBA (LSB). Note: The last two reserved fields are ATAPI specific. They are not part of the SCSI command packet version. The special control fields in the CDB have the following meaning. Rel. Adr - indicates that the logical block address (LBA) value is relative (only used with linked commands). PMI - partial medium indicator.
LBA. 1 - return value for the last LBA after which a substantial delay in data transfer will be encountered (e. The target will return capacity data structured as follows. Block length in bytes. If there is an error after polling, there may be no medium inserted, so this command may be also used to detect whether there is a medium or not, and if there is a medium, its capacity is read. Operating Theory.
Quoting The Guide to ATA/ATAPI documentation (stanford.