Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions devices/common/ata/atahd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void AtaHardDisk::prepare_identify_info() {
std::memset(this->data_buf, 0, sizeof(this->data_buf));

WRITE_WORD_LE_A(&buf_ptr[ 0], 0x0040); // ATA device, non-removable media, non-removable drive
WRITE_WORD_LE_A(&buf_ptr[49], 0x0200); // report LBA support
WRITE_WORD_LE_A(&buf_ptr[49], 0x0300); // report DMA and LBA support

// Maximum number of logical sectors per data block that the device supports
// for READ_MULTIPLE/WRITE_MULTIPLE commands.
Expand All @@ -307,15 +307,17 @@ void AtaHardDisk::prepare_identify_info() {

WRITE_WORD_LE_A(&buf_ptr[51], 0x0200); // max. PIO mode for a basic device

// report validity for the advanced PIO and MWDMA fields
//WRITE_WORD_LE_A(&buf_ptr[53], 0x0003);
// report validity for the MWDMA fields
WRITE_WORD_LE_A(&buf_ptr[53], 0x0002);

WRITE_DWORD_LE_A(&buf_ptr[57], this->total_sectors);

// report LBA capacity
WRITE_DWORD_LE_A(&buf_ptr[60], this->total_sectors);

WRITE_WORD_LE_A(&buf_ptr[63], ((1 << this->cur_dma_mode) << 8) | 7);
WRITE_WORD_LE_A(&buf_ptr[65], 120); // minimum MWDMA cycle time (ns)
WRITE_WORD_LE_A(&buf_ptr[66], 120); // recommended MWDMA cycle time (ns)
}

uint64_t AtaHardDisk::get_lba() {
Expand Down
Loading