coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smbus_spd.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _SMBUS_SPD_H_
4 #define _SMBUS_SPD_H_
5 
6 #define READ_BIT 0x01
7 
8 #define SMBUS_INTERRUPT_MASK 0x02
9 #define HOSTBUSY_MASK 0x01
10 
11 #define SMBUS_READ_BYTE_COMMAND 0x48
12 #define SMBUS_READ_COMMAND 0x44
13 
14 #define MAX_READ_TSC_COUNT (2000000000 / 10)
15 
16 #define PMIO_INDEX_REG 0xCD6
17 #define PMIO_DATA_REG 0xCD7
18 
19 #define SMBUS_BAR_LOW_BYTE 0x2C
20 #define SMBUS_BAR_HIGH_BYTE 0x2D
21 
22 #define SMBUS_STATUS_REG 0x00
23 #define SMBUS_SLAVE_STATUS_REG 0x01
24 #define SMBUS_COMMAND_REG 0x02
25 #define SMBUS_CONTROL_REG 0x03
26 #define SMBUS_HOST_CMD_REG 0x04
27 #define SMBUS_DATA0_REG 0x05
28 #define SMBUS_CLOCK_REG 0x0E
29 
30 #define STATUS__COMPLETED_SUCCESSFULLY 0x02
31 
32 #define SMBUS_FREQUENCY_CONST 66000000 / 4
33 
34 #endif