Changeset 38 for trunk/src/os2ahci/ata.h


Ignore:
Timestamp:
Nov 5, 2010, 7:13:11 PM (15 years ago)
Author:
markus
Message:

changes for drive geometry mapping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/ata.h

    r13 r38  
    2121
    2222/* -------------------------- macros and constants ------------------------- */
     23
     24/******************************************************************************
     25 * Macros to access geometry values in the ATA ID buffer
     26 */
     27#define ATA_CYLS(id_buf)            *((u32 *) (id_buf + ATA_ID_CYLS))
     28#define ATA_HEADS(id_buf)           *((u32 *) (id_buf + ATA_ID_HEADS))
     29#define ATA_SECTORS(id_buf)         *((u32 *) (id_buf + ATA_ID_SECTORS))
     30#define ATA_CAPACITY(id_buf)        *((u32 *) (id_buf + ATA_ID_LBA_CAPACITY))
     31
     32#define ATA_CAPACITY48_L(id_buf)    *((u32 *) (id_buf + ATA_ID_LBA_CAPACITY_2))
     33#define ATA_CAPACITY48_H(id_buf)    *((u32 *) (id_buf + ATA_ID_LBA_CAPACITY_2 + 2))
     34
     35#define CUR_CYLS(id_buf)            *((u32 *) (id_buf + ATA_ID_CUR_CYLS))
     36#define CUR_HEADS(id_buf)           *((u32 *) (id_buf + ATA_ID_CUR_HEADS))
     37#define CUR_SECTORS(id_buf)         *((u32 *) (id_buf + ATA_ID_CUR_SECTORS))
     38#define CUR_CAPACITY(id_buf)        *((u32 *) (id_buf + ATA_ID_CUR_CAPACITY))
     39
    2340
    2441/******************************************************************************
     
    5067#define ATA_ID_CUR_HEADS        55
    5168#define ATA_ID_CUR_SECTORS      56
     69#define ATA_ID_CUR_CAPACITY     57
    5270#define ATA_ID_MULTSECT         59
    5371#define ATA_ID_LBA_CAPACITY     60
Note: See TracChangeset for help on using the changeset viewer.