X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FAtapiPassThruDxe%2FAtapiPassThru.h;h=9086dd9bdcaba491fa5f8431b97db2432a1d543f;hp=2187580bb6e59ea1d5c16aabcf2cb1ab2baf8c02;hb=0bce7349f5519e364f2463856b5f4c0712be5c9b;hpb=823f7d4f93b79c12ba521e7193bf1136ff0f2bfa diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h index 2187580bb6..9086dd9bdc 100644 --- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h +++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -31,12 +32,9 @@ #include #include #include -#include +#include -/// -/// bit definition -/// -#define bit(a) (1 << (a)) +#include #define MAX_TARGET_ID 4 @@ -96,7 +94,7 @@ typedef struct { UINT16 DriveAddress; } IDE_BASE_REGISTERS; -#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE EFI_SIGNATURE_32 ('a', 's', 'p', 't') +#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE SIGNATURE_32 ('a', 's', 'p', 't') typedef struct { UINTN Signature; @@ -139,9 +137,10 @@ typedef struct { // // Global Variables // -extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName; -extern EFI_COMPONENT_NAME2_PROTOCOL gAtapiScsiPassThruComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gAtapiScsiPassThruComponentName2; +extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gAtapiScsiPassThruDriverSupportedEfiVersion; // // ATAPI Command op code @@ -207,31 +206,31 @@ typedef struct { // // ATA Err Reg bitmap // -#define BBK_ERR bit (7) ///< Bad block detected -#define UNC_ERR bit (6) ///< Uncorrectable Data -#define MC_ERR bit (5) ///< Media Change -#define IDNF_ERR bit (4) ///< ID Not Found -#define MCR_ERR bit (3) ///< Media Change Requested -#define ABRT_ERR bit (2) ///< Aborted Command -#define TK0NF_ERR bit (1) ///< Track 0 Not Found -#define AMNF_ERR bit (0) ///< Address Mark Not Found +#define BBK_ERR BIT7 ///< Bad block detected +#define UNC_ERR BIT6 ///< Uncorrectable Data +#define MC_ERR BIT5 ///< Media Change +#define IDNF_ERR BIT4 ///< ID Not Found +#define MCR_ERR BIT3 ///< Media Change Requested +#define ABRT_ERR BIT2 ///< Aborted Command +#define TK0NF_ERR BIT1 ///< Track 0 Not Found +#define AMNF_ERR BIT0 ///< Address Mark Not Found // // ATAPI Err Reg bitmap // -#define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4)) -#define EOM_ERR bit (1) ///< End of Media Detected -#define ILI_ERR bit (0) ///< Illegal Length Indication +#define SENSE_KEY_ERR (BIT7 | BIT6 | BIT5 | BIT4) +#define EOM_ERR BIT1 ///< End of Media Detected +#define ILI_ERR BIT0 ///< Illegal Length Indication // // Device/Head Reg // -#define LBA_MODE bit (6) -#define DEV bit (4) -#define HS3 bit (3) -#define HS2 bit (2) -#define HS1 bit (1) -#define HS0 bit (0) +#define LBA_MODE BIT6 +#define DEV BIT4 +#define HS3 BIT3 +#define HS2 BIT2 +#define HS1 BIT1 +#define HS0 BIT0 #define CHS_MODE (0) #define DRV0 (0) #define DRV1 (1) @@ -241,34 +240,34 @@ typedef struct { // // Status Reg // -#define BSY bit (7) ///< Controller Busy -#define DRDY bit (6) ///< Drive Ready -#define DWF bit (5) ///< Drive Write Fault -#define DSC bit (4) ///< Disk Seek Complete -#define DRQ bit (3) ///< Data Request -#define CORR bit (2) ///< Corrected Data -#define IDX bit (1) ///< Index -#define ERR bit (0) ///< Error -#define CHECK bit (0) ///< Check bit for ATAPI Status Reg +#define BSY BIT7 ///< Controller Busy +#define DRDY BIT6 ///< Drive Ready +#define DWF BIT5 ///< Drive Write Fault +#define DSC BIT4 ///< Disk Seek Complete +#define DRQ BIT3 ///< Data Request +#define CORR BIT2 ///< Corrected Data +#define IDX BIT1 ///< Index +#define ERR BIT0 ///< Error +#define CHECK BIT0 ///< Check bit for ATAPI Status Reg // // Device Control Reg // -#define SRST bit (2) ///< Software Reset -#define IEN_L bit (1) ///< Interrupt Enable +#define SRST BIT2 ///< Software Reset +#define IEN_L BIT1 ///< Interrupt Enable // // ATAPI Feature Register // -#define OVERLAP bit (1) -#define DMA bit (0) +#define OVERLAP BIT1 +#define DMA BIT0 // // ATAPI Interrupt Reason Reson Reg (ATA Sector Count Register) // -#define RELEASE bit (2) -#define IO bit (1) -#define CoD bit (0) +#define RELEASE BIT2 +#define IO BIT1 +#define CoD BIT0 #define PACKET_CMD 0xA0 @@ -331,7 +330,7 @@ AtapiScsiPassThruDriverBindingStop ( languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified - in RFC 3066 or ISO 639-2 language code format. + in RFC 4646 or ISO 639-2 language code format. @param DriverName[out] A pointer to the Unicode string to return. This Unicode string is the name of the @@ -396,7 +395,7 @@ AtapiScsiPassThruComponentNameGetDriverName ( languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in - RFC 3066 or ISO 639-2 language code format. + RFC 4646 or ISO 639-2 language code format. @param ControllerName[out] A pointer to the Unicode string to return. This Unicode string is the name of the