⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buslogic.h

📁 讲述linux的初始化过程
💻 H
📖 第 1 页 / 共 4 页
字号:
#define BusLogic_ControlRegisterOffset		0	/* WO register */#define BusLogic_StatusRegisterOffset		0	/* RO register */#define BusLogic_CommandParameterRegisterOffset	1	/* WO register */#define BusLogic_DataInRegisterOffset		1	/* RO register */#define BusLogic_InterruptRegisterOffset	2	/* RO register */#define BusLogic_GeometryRegisterOffset		3	/* RO register *//*  Define the structure of the write-only Control Register.*/typedef union BusLogic_ControlRegister{  unsigned char All;  struct {    unsigned char :4;					/* Bits 0-3 */    boolean SCSIBusReset:1;				/* Bit 4 */    boolean InterruptReset:1;				/* Bit 5 */    boolean SoftReset:1;				/* Bit 6 */    boolean HardReset:1;				/* Bit 7 */  } Bits;}BusLogic_ControlRegister_T;/*  Define the structure of the read-only Status Register.*/typedef union BusLogic_StatusRegister{  unsigned char All;  struct {    boolean CommandInvalid:1;				/* Bit 0 */    boolean Reserved:1;					/* Bit 1 */    boolean DataInRegisterReady:1;			/* Bit 2 */    boolean CommandParameterRegisterBusy:1;		/* Bit 3 */    boolean HostAdapterReady:1;				/* Bit 4 */    boolean InitializationRequired:1;			/* Bit 5 */    boolean DiagnosticFailure:1;			/* Bit 6 */    boolean DiagnosticActive:1;				/* Bit 7 */  } Bits;}BusLogic_StatusRegister_T;/*  Define the structure of the read-only Interrupt Register.*/typedef union BusLogic_InterruptRegister{  unsigned char All;  struct {    boolean IncomingMailboxLoaded:1;			/* Bit 0 */    boolean OutgoingMailboxAvailable:1;			/* Bit 1 */    boolean CommandComplete:1;				/* Bit 2 */    boolean ExternalBusReset:1;				/* Bit 3 */    unsigned char Reserved:3;				/* Bits 4-6 */    boolean InterruptValid:1;				/* Bit 7 */  } Bits;}BusLogic_InterruptRegister_T;/*  Define the structure of the read-only Geometry Register.*/typedef union BusLogic_GeometryRegister{  unsigned char All;  struct {    BusLogic_BIOS_DiskGeometryTranslation_T Drive0Geometry:2; /* Bits 0-1 */    BusLogic_BIOS_DiskGeometryTranslation_T Drive1Geometry:2; /* Bits 2-3 */    unsigned char :3;					/* Bits 4-6 */    boolean ExtendedTranslationEnabled:1;		/* Bit 7 */  } Bits;}BusLogic_GeometryRegister_T;/*  Define the BusLogic SCSI Host Adapter Command Register Operation Codes.*/typedef enum{  BusLogic_TestCommandCompleteInterrupt =	0x00,  BusLogic_InitializeMailbox =			0x01,  BusLogic_ExecuteMailboxCommand =		0x02,  BusLogic_ExecuteBIOSCommand =			0x03,  BusLogic_InquireBoardID =			0x04,  BusLogic_EnableOutgoingMailboxAvailableInt =	0x05,  BusLogic_SetSCSISelectionTimeout =		0x06,  BusLogic_SetPreemptTimeOnBus =		0x07,  BusLogic_SetTimeOffBus =			0x08,  BusLogic_SetBusTransferRate =			0x09,  BusLogic_InquireInstalledDevicesID0to7 =	0x0A,  BusLogic_InquireConfiguration =		0x0B,  BusLogic_EnableTargetMode =			0x0C,  BusLogic_InquireSetupInformation =		0x0D,  BusLogic_WriteAdapterLocalRAM =		0x1A,  BusLogic_ReadAdapterLocalRAM =		0x1B,  BusLogic_WriteBusMasterChipFIFO =		0x1C,  BusLogic_ReadBusMasterChipFIFO =		0x1D,  BusLogic_EchoCommandData =			0x1F,  BusLogic_HostAdapterDiagnostic =		0x20,  BusLogic_SetAdapterOptions =			0x21,  BusLogic_InquireInstalledDevicesID8to15 =	0x23,  BusLogic_InquireTargetDevices =		0x24,  BusLogic_DisableHostAdapterInterrupt =	0x25,  BusLogic_InitializeExtendedMailbox =		0x81,  BusLogic_ExecuteSCSICommand =			0x83,  BusLogic_InquireFirmwareVersion3rdDigit =	0x84,  BusLogic_InquireFirmwareVersionLetter =	0x85,  BusLogic_InquirePCIHostAdapterInformation =	0x86,  BusLogic_InquireHostAdapterModelNumber =	0x8B,  BusLogic_InquireSynchronousPeriod =		0x8C,  BusLogic_InquireExtendedSetupInformation =	0x8D,  BusLogic_EnableStrictRoundRobinMode =		0x8F,  BusLogic_StoreHostAdapterLocalRAM =		0x90,  BusLogic_FetchHostAdapterLocalRAM =		0x91,  BusLogic_StoreLocalDataInEEPROM =		0x92,  BusLogic_UploadAutoSCSICode =			0x94,  BusLogic_ModifyIOAddress =			0x95,  BusLogic_SetCCBFormat =			0x96,  BusLogic_WriteInquiryBuffer =			0x9A,  BusLogic_ReadInquiryBuffer =			0x9B,  BusLogic_FlashROMUploadDownload =		0xA7,  BusLogic_ReadSCAMData =			0xA8,  BusLogic_WriteSCAMData =			0xA9}BusLogic_OperationCode_T;/*  Define the Inquire Board ID reply structure.*/typedef struct BusLogic_BoardID{  unsigned char BoardType;				/* Byte 0 */  unsigned char CustomFeatures;				/* Byte 1 */  unsigned char FirmwareVersion1stDigit;		/* Byte 2 */  unsigned char FirmwareVersion2ndDigit;		/* Byte 3 */}BusLogic_BoardID_T;/*  Define the Inquire Installed Devices ID 0 to 7 and Inquire Installed  Devices ID 8 to 15 reply type.  For each Target Device, a byte is returned  where bit 0 set indicates that Logical Unit 0 exists, bit 1 set indicates  that Logical Unit 1 exists, and so on.*/typedef unsigned char BusLogic_InstalledDevices8_T[8];/*  Define the Inquire Target Devices reply type.  Inquire Target Devices only  tests Logical Unit 0 of each Target Device unlike the Inquire Installed  Devices commands which test Logical Units 0 - 7.  Two bytes are returned,  where byte 0 bit 0 set indicates that Target Device 0 exists, and so on.*/typedef unsigned short BusLogic_InstalledDevices_T;/*  Define the Inquire Configuration reply structure.*/typedef struct BusLogic_Configuration{  unsigned char :5;					/* Byte 0 Bits 0-4 */  boolean DMA_Channel5:1;				/* Byte 0 Bit 5 */  boolean DMA_Channel6:1;				/* Byte 0 Bit 6 */  boolean DMA_Channel7:1;				/* Byte 0 Bit 7 */  boolean IRQ_Channel9:1;				/* Byte 1 Bit 0 */  boolean IRQ_Channel10:1;				/* Byte 1 Bit 1 */  boolean IRQ_Channel11:1;				/* Byte 1 Bit 2 */  boolean IRQ_Channel12:1;				/* Byte 1 Bit 3 */  unsigned char :1;					/* Byte 1 Bit 4 */  boolean IRQ_Channel14:1;				/* Byte 1 Bit 5 */  boolean IRQ_Channel15:1;				/* Byte 1 Bit 6 */  unsigned char :1;					/* Byte 1 Bit 7 */  unsigned char HostAdapterID:4;			/* Byte 2 Bits 0-3 */  unsigned char :4;					/* Byte 2 Bits 4-7 */}BusLogic_Configuration_T;/*  Define the Inquire Setup Information reply structure.*/typedef struct BusLogic_SynchronousValue{  unsigned char Offset:4;				/* Bits 0-3 */  unsigned char TransferPeriod:3;			/* Bits 4-6 */  boolean Synchronous:1;				/* Bit 7 */}BusLogic_SynchronousValue_T;typedef BusLogic_SynchronousValue_T  BusLogic_SynchronousValues8_T[8];typedef BusLogic_SynchronousValue_T  BusLogic_SynchronousValues_T[BusLogic_MaxTargetDevices];typedef struct BusLogic_SetupInformation{  boolean SynchronousInitiationEnabled:1;		/* Byte 0 Bit 0 */  boolean ParityCheckingEnabled:1;			/* Byte 0 Bit 1 */  unsigned char :6;					/* Byte 0 Bits 2-7 */  unsigned char BusTransferRate;			/* Byte 1 */  unsigned char PreemptTimeOnBus;			/* Byte 2 */  unsigned char TimeOffBus;				/* Byte 3 */  unsigned char MailboxCount;				/* Byte 4 */  unsigned char MailboxAddress[3];			/* Bytes 5-7 */  BusLogic_SynchronousValues8_T SynchronousValuesID0to7; /* Bytes 8-15 */  unsigned char DisconnectPermittedID0to7;		/* Byte 16 */  unsigned char Signature;				/* Byte 17 */  unsigned char CharacterD;				/* Byte 18 */  unsigned char HostBusType;				/* Byte 19 */  unsigned char WideTransfersPermittedID0to7;		/* Byte 20 */  unsigned char WideTransfersActiveID0to7;		/* Byte 21 */  BusLogic_SynchronousValues8_T SynchronousValuesID8to15; /* Bytes 22-29 */  unsigned char DisconnectPermittedID8to15;		/* Byte 30 */  unsigned char :8;					/* Byte 31 */  unsigned char WideTransfersPermittedID8to15;		/* Byte 32 */  unsigned char WideTransfersActiveID8to15;		/* Byte 33 */}BusLogic_SetupInformation_T;/*  Define the Initialize Extended Mailbox request structure.*/typedef struct BusLogic_ExtendedMailboxRequest{  unsigned char MailboxCount;				/* Byte 0 */  BusLogic_BusAddress_T BaseMailboxAddress;		/* Bytes 1-4 */}__attribute__ ((packed))BusLogic_ExtendedMailboxRequest_T;/*  Define the Inquire Firmware Version 3rd Digit reply type.*/typedef unsigned char BusLogic_FirmwareVersion3rdDigit_T;/*  Define the Inquire Firmware Version Letter reply type.*/typedef unsigned char BusLogic_FirmwareVersionLetter_T;/*  Define the Inquire PCI Host Adapter Information reply type.  The ISA  Compatible I/O Port values are defined here and are also used with  the Modify I/O Address command.*/typedef enum BusLogic_ISACompatibleIOPort{  BusLogic_IO_330 =				0,  BusLogic_IO_334 =				1,  BusLogic_IO_230 =				2,  BusLogic_IO_234 =				3,  BusLogic_IO_130 =				4,  BusLogic_IO_134 =				5,  BusLogic_IO_Disable =				6,  BusLogic_IO_Disable2 =			7}__attribute__ ((packed))BusLogic_ISACompatibleIOPort_T;typedef struct BusLogic_PCIHostAdapterInformation{  BusLogic_ISACompatibleIOPort_T ISACompatibleIOPort;	/* Byte 0 */  unsigned char PCIAssignedIRQChannel;			/* Byte 1 */  boolean LowByteTerminated:1;				/* Byte 2 Bit 0 */  boolean HighByteTerminated:1;				/* Byte 2 Bit 1 */  unsigned char :2;					/* Byte 2 Bits 2-3 */  boolean JP1:1;					/* Byte 2 Bit 4 */  boolean JP2:1;					/* Byte 2 Bit 5 */  boolean JP3:1;					/* Byte 2 Bit 6 */  boolean GenericInfoValid:1;				/* Byte 2 Bit 7 */  unsigned char :8;					/* Byte 3 */}BusLogic_PCIHostAdapterInformation_T;/*  Define the Inquire Host Adapter Model Number reply type.*/typedef unsigned char BusLogic_HostAdapterModelNumber_T[5];/*  Define the Inquire Synchronous Period reply type.  For each Target Device,  a byte is returned which represents the Synchronous Transfer Period in units  of 10 nanoseconds.*/typedef unsigned char BusLogic_SynchronousPeriod_T[BusLogic_MaxTargetDevices];/*  Define the Inquire Extended Setup Information reply structure.*/typedef struct BusLogic_ExtendedSetupInformation{  unsigned char BusType;				/* Byte 0 */  unsigned char BIOS_Address;				/* Byte 1 */  unsigned short ScatterGatherLimit;			/* Bytes 2-3 */  unsigned char MailboxCount;				/* Byte 4 */  BusLogic_BusAddress_T BaseMailboxAddress;		/* Bytes 5-8 */  struct { unsigned char :2;				/* Byte 9 Bits 0-1 */	   boolean FastOnEISA:1;			/* Byte 9 Bit 2 */	   unsigned char :3;				/* Byte 9 Bits 3-5 */	   boolean LevelSensitiveInterrupt:1;		/* Byte 9 Bit 6 */	   unsigned char :1; } Misc;			/* Byte 9 Bit 7 */  unsigned char FirmwareRevision[3];			/* Bytes 10-12 */  boolean HostWideSCSI:1;				/* Byte 13 Bit 0 */  boolean HostDifferentialSCSI:1;			/* Byte 13 Bit 1 */  boolean HostSupportsSCAM:1;				/* Byte 13 Bit 2 */  boolean HostUltraSCSI:1;				/* Byte 13 Bit 3 */  boolean HostSmartTermination:1;			/* Byte 13 Bit 4 */  unsigned char :3;					/* Byte 13 Bits 5-7 */}__attribute__ ((packed))BusLogic_ExtendedSetupInformation_T;/*  Define the Enable Strict Round Robin Mode request type.*/typedef enum BusLogic_RoundRobinModeRequest{  BusLogic_AggressiveRoundRobinMode =		0,  BusLogic_StrictRoundRobinMode =		1}__attribute__ ((packed))BusLogic_RoundRobinModeRequest_T;/*  Define the Fetch Host Adapter Local RAM request type.*/#define BusLogic_BIOS_BaseOffset		0#define BusLogic_AutoSCSI_BaseOffset		64typedef struct BusLogic_FetchHostAdapterLocalRAMRequest{  unsigned char ByteOffset;				/* Byte 0 */  unsigned char ByteCount;				/* Byte 1 */}BusLogic_FetchHostAdapterLocalRAMRequest_T;/*  Define the Host Adapter Local RAM AutoSCSI structure.*/typedef struct BusLogic_AutoSCSIData{  unsigned char InternalFactorySignature[2];		/* Bytes 0-1 */  unsigned char InformationByteCount;			/* Byte 2 */  unsigned char HostAdapterType[6];			/* Bytes 3-8 */  unsigned char :8;					/* Byte 9 */  boolean FloppyEnabled:1;				/* Byte 10 Bit 0 */  boolean FloppySecondary:1;				/* Byte 10 Bit 1 */  boolean LevelSensitiveInterrupt:1;			/* Byte 10 Bit 2 */  unsigned char :2;					/* Byte 10 Bits 3-4 */  unsigned char SystemRAMAreaForBIOS:3;			/* Byte 10 Bits 5-7 */  unsigned char DMA_Channel:7;				/* Byte 11 Bits 0-6 */  boolean DMA_AutoConfiguration:1;			/* Byte 11 Bit 7 */  unsigned char IRQ_Channel:7;				/* Byte 12 Bits 0-6 */  boolean IRQ_AutoConfiguration:1;			/* Byte 12 Bit 7 */  unsigned char DMA_TransferRate;			/* Byte 13 */  unsigned char SCSI_ID;				/* Byte 14 */  boolean LowByteTerminated:1;				/* Byte 15 Bit 0 */  boolean ParityCheckingEnabled:1;			/* Byte 15 Bit 1 */  boolean HighByteTerminated:1;				/* Byte 15 Bit 2 */  boolean NoisyCablingEnvironment:1;			/* Byte 15 Bit 3 */  boolean FastSynchronousNegotiation:1;			/* Byte 15 Bit 4 */  boolean BusResetEnabled:1;				/* Byte 15 Bit 5 */  boolean :1;						/* Byte 15 Bit 6 */  boolean ActiveNegationEnabled:1;			/* Byte 15 Bit 7 */  unsigned char BusOnDelay;				/* Byte 16 */  unsigned char BusOffDelay;				/* Byte 17 */  boolean HostAdapterBIOSEnabled:1;			/* Byte 18 Bit 0 */  boolean BIOSRedirectionOfINT19Enabled:1;		/* Byte 18 Bit 1 */  boolean ExtendedTranslationEnabled:1;			/* Byte 18 Bit 2 */  boolean MapRemovableAsFixedEnabled:1;			/* Byte 18 Bit 3 */  boolean :1;						/* Byte 18 Bit 4 */  boolean BIOSSupportsMoreThan2DrivesEnabled:1;		/* Byte 18 Bit 5 */  boolean BIOSInterruptModeEnabled:1;			/* Byte 18 Bit 6 */  boolean FlopticalSupportEnabled:1;			/* Byte 19 Bit 7 */  unsigned short DeviceEnabled;				/* Bytes 19-20 */  unsigned short WidePermitted;				/* Bytes 21-22 */  unsigned short FastPermitted;				/* Bytes 23-24 */  unsigned short SynchronousPermitted;			/* Bytes 25-26 */  unsigned short DisconnectPermitted;			/* Bytes 27-28 */  unsigned short SendStartUnitCommand;			/* Bytes 29-30 */  unsigned short IgnoreInBIOSScan;			/* Bytes 31-32 */  unsigned char PCIInterruptPin:2;			/* Byte 33 Bits 0-1 */  unsigned char HostAdapterIOPortAddress:2;		/* Byte 33 Bits 2-3 */  boolean StrictRoundRobinModeEnabled:1;		/* Byte 33 Bit 4 */  boolean VESABusSpeedGreaterThan33MHz:1;		/* Byte 33 Bit 5 */  boolean VESABurstWriteEnabled:1;			/* Byte 33 Bit 6 */  boolean VESABurstReadEnabled:1;			/* Byte 33 Bit 7 */  unsigned short UltraPermitted;			/* Bytes 34-35 */  unsigned int :32;					/* Bytes 36-39 */  unsigned char :8;					/* Byte 40 */  unsigned char AutoSCSIMaximumLUN;			/* Byte 41 */  boolean :1;						/* Byte 42 Bit 0 */  boolean SCAM_Dominant:1;				/* Byte 42 Bit 1 */  boolean SCAM_Enabled:1;				/* Byte 42 Bit 2 */  boolean SCAM_Level2:1;				/* Byte 42 Bit 3 */  unsigned char :4;					/* Byte 42 Bits 4-7 */  boolean INT13ExtensionEnabled:1;			/* Byte 43 Bit 0 */  boolean :1;						/* Byte 43 Bit 1 */  boolean CDROMBootEnabled:1;				/* Byte 43 Bit 2 */  unsigned char :5;					/* Byte 43 Bits 3-7 */  unsigned char BootTargetID:4;				/* Byte 44 Bits 0-3 */  unsigned char BootChannel:4;				/* Byte 44 Bits 4-7 */  unsigned char ForceBusDeviceScanningOrder:1;		/* Byte 45 Bit 0 */  unsigned char :7;					/* Byte 45 Bits 1-7 */  unsigned short NonTaggedToAlternateLUNPermitted;	/* Bytes 46-47 */  unsigned short RenegotiateSyncAfterCheckCondition;	/* Bytes 48-49 */  unsigned char Reserved[10];				/* Bytes 50-59 */  unsigned char ManufacturingDiagnostic[2];		/* Bytes 60-61 */  unsigned short Checksum;				/* Bytes 62-63 */}__attribute__ ((packed))BusLogic_AutoSCSIData_T;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -