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

📄 defines.h

📁 grub源码分析文档
💻 H
📖 第 1 页 / 共 3 页
字号:
/* 1000BASE-T Control Register */#define CR_1000T_HD_CAPS         0x0100 /* Advertise 1000T HD capability */#define CR_1000T_FD_CAPS         0x0200 /* Advertise 1000T FD capability  */					/* 0=DTE device */#define CR_1000T_MS_VALUE        0x0800 /* 1=Configure PHY as Master */					/* 0=Configure PHY as Slave */#define CR_1000T_MS_ENABLE       0x1000 /* 1=Master/Slave manual config value */					/* 0=Automatic Master/Slave config *//* 1000BASE-T Status Register */#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */#define SR_1000T_LOCAL_RX_STATUS  0x2000 /* Local receiver OK *//* PHY 1000 MII Register/Bit Definitions *//* PHY Registers defined by IEEE */#define PHY_CONTROL      0x00 /* Control Register */#define PHY_STATUS       0x01 /* Status Register */#define PHY_ID1          0x02 /* Phy Id Reg (word 1) */#define PHY_ID2          0x03 /* Phy Id Reg (word 2) */#define PHY_AUTONEG_ADV  0x04 /* Autoneg Advertisement */#define PHY_LP_ABILITY   0x05 /* Link Partner Ability (Base Page) */#define PHY_AUTONEG_EXP  0x06 /* Autoneg Expansion Reg */#define PHY_1000T_CTRL   0x09 /* 1000Base-T Control Reg */#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */#define PHY_EXT_STATUS   0x0F /* Extended Status Reg *//* NVM Control */#define E1000_EECD_SK        0x00000001 /* NVM Clock */#define E1000_EECD_CS        0x00000002 /* NVM Chip Select */#define E1000_EECD_DI        0x00000004 /* NVM Data In */#define E1000_EECD_DO        0x00000008 /* NVM Data Out */#define E1000_EECD_REQ       0x00000040 /* NVM Access Request */#define E1000_EECD_GNT       0x00000080 /* NVM Access Grant */#define E1000_EECD_PRES      0x00000100 /* NVM Present */#define E1000_EECD_SIZE      0x00000200 /* NVM Size (0=64 word 1=256 word) *//* NVM Addressing bits based on type (0-small, 1-large) */#define E1000_EECD_ADDR_BITS 0x00000400#define E1000_NVM_GRANT_ATTEMPTS   1000 /* NVM # attempts to gain grant */#define E1000_EECD_AUTO_RD          0x00000200  /* NVM Auto Read done */#define E1000_EECD_SIZE_EX_MASK     0x00007800  /* NVM Size */#define E1000_EECD_SIZE_EX_SHIFT     11#define E1000_EECD_FLUPD     0x00080000 /* Update FLASH */#define E1000_EECD_AUPDEN    0x00100000 /* Enable Autonomous FLASH update */#define E1000_EECD_SEC1VAL   0x00400000 /* Sector One Valid */#define E1000_NVM_RW_REG_DATA   16   /* Offset to data in NVM read/write registers */#define E1000_NVM_RW_REG_DONE   2    /* Offset to READ/WRITE done bit */#define E1000_NVM_RW_REG_START  1    /* Start operation */#define E1000_NVM_RW_ADDR_SHIFT 2    /* Shift to the address bits */#define E1000_NVM_POLL_WRITE    1    /* Flag for polling for write complete */#define E1000_NVM_POLL_READ     0    /* Flag for polling for read complete */#define E1000_FLASH_UPDATES  2000/* NVM Word Offsets */#define NVM_ID_LED_SETTINGS        0x0004#define NVM_INIT_CONTROL2_REG      0x000F#define NVM_INIT_CONTROL3_PORT_B   0x0014#define NVM_INIT_3GIO_3            0x001A#define NVM_INIT_CONTROL3_PORT_A   0x0024#define NVM_CFG                    0x0012#define NVM_ALT_MAC_ADDR_PTR       0x0037#define NVM_CHECKSUM_REG           0x003F#define E1000_NVM_CFG_DONE_PORT_0  0x40000 /* MNG config cycle done */#define E1000_NVM_CFG_DONE_PORT_1  0x80000 /* ...for second port *//* Mask bits for fields in Word 0x0f of the NVM */#define NVM_WORD0F_PAUSE_MASK       0x3000#define NVM_WORD0F_PAUSE            0x1000#define NVM_WORD0F_ASM_DIR          0x2000/* Mask bits for fields in Word 0x1a of the NVM */#define NVM_WORD1A_ASPM_MASK  0x000C/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */#define NVM_SUM                    0xBABA/* PBA (printed board assembly) number words */#define NVM_PBA_OFFSET_0           8#define NVM_PBA_OFFSET_1           9#define NVM_WORD_SIZE_BASE_SHIFT   6/* NVM Commands - SPI */#define NVM_MAX_RETRY_SPI          5000 /* Max wait of 5ms, for RDY signal */#define NVM_READ_OPCODE_SPI        0x03 /* NVM read opcode */#define NVM_WRITE_OPCODE_SPI       0x02 /* NVM write opcode */#define NVM_A8_OPCODE_SPI          0x08 /* opcode bit-3 = address bit-8 */#define NVM_WREN_OPCODE_SPI        0x06 /* NVM set Write Enable latch */#define NVM_RDSR_OPCODE_SPI        0x05 /* NVM read Status register *//* SPI NVM Status Register */#define NVM_STATUS_RDY_SPI         0x01/* Word definitions for ID LED Settings */#define ID_LED_RESERVED_0000 0x0000#define ID_LED_RESERVED_FFFF 0xFFFF#define ID_LED_DEFAULT       ((ID_LED_OFF1_ON2  << 12) | \			      (ID_LED_OFF1_OFF2 <<  8) | \			      (ID_LED_DEF1_DEF2 <<  4) | \			      (ID_LED_DEF1_DEF2))#define ID_LED_DEF1_DEF2     0x1#define ID_LED_DEF1_ON2      0x2#define ID_LED_DEF1_OFF2     0x3#define ID_LED_ON1_DEF2      0x4#define ID_LED_ON1_ON2       0x5#define ID_LED_ON1_OFF2      0x6#define ID_LED_OFF1_DEF2     0x7#define ID_LED_OFF1_ON2      0x8#define ID_LED_OFF1_OFF2     0x9#define IGP_ACTIVITY_LED_MASK   0xFFFFF0FF#define IGP_ACTIVITY_LED_ENABLE 0x0300#define IGP_LED3_MODE           0x07000000/* PCI/PCI-X/PCI-EX Config space */#define PCI_HEADER_TYPE_REGISTER     0x0E#define PCIE_LINK_STATUS             0x12#define PCI_HEADER_TYPE_MULTIFUNC    0x80#define PCIE_LINK_WIDTH_MASK         0x3F0#define PCIE_LINK_WIDTH_SHIFT        4#define PHY_REVISION_MASK      0xFFFFFFF0#define MAX_PHY_REG_ADDRESS    0x1F  /* 5 bit address bus (0-0x1F) */#define MAX_PHY_MULTI_PAGE_REG 0xF/* Bit definitions for valid PHY IDs. *//* * I = Integrated * E = External */#define M88E1000_E_PHY_ID    0x01410C50#define M88E1000_I_PHY_ID    0x01410C30#define M88E1011_I_PHY_ID    0x01410C20#define IGP01E1000_I_PHY_ID  0x02A80380#define M88E1111_I_PHY_ID    0x01410CC0#define GG82563_E_PHY_ID     0x01410CA0#define IGP03E1000_E_PHY_ID  0x02A80390#define IFE_E_PHY_ID         0x02A80330#define IFE_PLUS_E_PHY_ID    0x02A80320#define IFE_C_E_PHY_ID       0x02A80310#define BME1000_E_PHY_ID     0x01410CB0#define BME1000_E_PHY_ID_R2  0x01410CB1/* M88E1000 Specific Registers */#define M88E1000_PHY_SPEC_CTRL     0x10  /* PHY Specific Control Register */#define M88E1000_PHY_SPEC_STATUS   0x11  /* PHY Specific Status Register */#define M88E1000_EXT_PHY_SPEC_CTRL 0x14  /* Extended PHY Specific Control */#define M88E1000_PHY_PAGE_SELECT   0x1D  /* Reg 29 for page number setting */#define M88E1000_PHY_GEN_CONTROL   0x1E  /* Its meaning depends on reg 29 *//* M88E1000 PHY Specific Control Register */#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reversal enabled */#define M88E1000_PSCR_MDI_MANUAL_MODE  0x0000  /* MDI Crossover Mode bits 6:5 */					       /* Manual MDI configuration */#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020  /* Manual MDIX configuration *//* 1000BASE-T: Auto crossover, 100BASE-TX/10BASE-T: MDI Mode */#define M88E1000_PSCR_AUTO_X_1000T     0x0040/* Auto crossover enabled all speeds */#define M88E1000_PSCR_AUTO_X_MODE      0x0060/* * 1=Enable Extended 10BASE-T distance (Lower 10BASE-T Rx Threshold) * 0=Normal 10BASE-T Rx Threshold */#define M88E1000_PSCR_EN_10BT_EXT_DIST 0x0080#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit *//* M88E1000 PHY Specific Status Register */#define M88E1000_PSSR_REV_POLARITY       0x0002 /* 1=Polarity reversed */#define M88E1000_PSSR_DOWNSHIFT          0x0020 /* 1=Downshifted */#define M88E1000_PSSR_MDIX               0x0040 /* 1=MDIX; 0=MDI *//* 0=<50M; 1=50-80M; 2=80-110M; 3=110-140M; 4=>140M */#define M88E1000_PSSR_CABLE_LENGTH       0x0380#define M88E1000_PSSR_SPEED              0xC000 /* Speed, bits 14:15 */#define M88E1000_PSSR_1000MBS            0x8000 /* 10=1000Mbs */#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7/* * Number of times we will attempt to autonegotiate before downshifting if we * are the master */#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X   0x0000/* * Number of times we will attempt to autonegotiate before downshifting if we * are the slave */#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK  0x0300#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X    0x0100#define M88E1000_EPSCR_TX_CLK_25      0x0070 /* 25  MHz TX_CLK *//* M88EC018 Rev 2 specific DownShift settings */#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK  0x0E00#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X    0x0800/* BME1000 PHY Specific Control Register */#define BME1000_PSCR_ENABLE_DOWNSHIFT   0x0800 /* 1 = enable downshift */#define PHY_PAGE_SHIFT 5#define PHY_REG(page, reg) (((page) << PHY_PAGE_SHIFT) | \                           ((reg) & MAX_PHY_REG_ADDRESS))/* * Bits... * 15-5: page * 4-0: register offset */#define GG82563_PAGE_SHIFT        5#define GG82563_REG(page, reg)    \	(((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))#define GG82563_MIN_ALT_REG       30/* GG82563 Specific Registers */#define GG82563_PHY_SPEC_CTRL           \	GG82563_REG(0, 16) /* PHY Specific Control */#define GG82563_PHY_PAGE_SELECT         \	GG82563_REG(0, 22) /* Page Select */#define GG82563_PHY_SPEC_CTRL_2         \	GG82563_REG(0, 26) /* PHY Specific Control 2 */#define GG82563_PHY_PAGE_SELECT_ALT     \	GG82563_REG(0, 29) /* Alternate Page Select */#define GG82563_PHY_MAC_SPEC_CTRL       \	GG82563_REG(2, 21) /* MAC Specific Control Register */#define GG82563_PHY_DSP_DISTANCE    \	GG82563_REG(5, 26) /* DSP Distance *//* Page 193 - Port Control Registers */#define GG82563_PHY_KMRN_MODE_CTRL   \	GG82563_REG(193, 16) /* Kumeran Mode Control */#define GG82563_PHY_PWR_MGMT_CTRL       \	GG82563_REG(193, 20) /* Power Management Control *//* Page 194 - KMRN Registers */#define GG82563_PHY_INBAND_CTRL         \	GG82563_REG(194, 18) /* Inband Control *//* MDI Control */#define E1000_MDIC_REG_SHIFT 16#define E1000_MDIC_PHY_SHIFT 21#define E1000_MDIC_OP_WRITE  0x04000000#define E1000_MDIC_OP_READ   0x08000000#define E1000_MDIC_READY     0x10000000#define E1000_MDIC_ERROR     0x40000000/* SerDes Control */#define E1000_GEN_POLL_TIMEOUT          640#endif /* _E1000_DEFINES_H_ */

⌨️ 快捷键说明

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