![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/pci_def.h>
#include <device/device.h>
#include <stddef.h>
#include <OEM.h>
#include <vendorcode/amd/include/Porting.h>
#include <AGESA.h>
#include "chip.h"
#include "smbus_spd.h"
#include <northbridge/amd/agesa/dimmSpd.h>
Go to the source code of this file.
Functions | |
static UINT8 | readSmbusByte (UINT16 iobase, UINT8 address, char *buffer, int offset, int initial_offset) |
Read a single SPD byte. More... | |
static void | writePmReg (UINT8 reg, UINT8 data) |
static void | setupFch (UINT16 ioBase) |
static UINT8 | readspd (UINT16 iobase, UINT8 SmbusSlaveAddress, char *buffer, UINT16 count) |
Read one or more SPD bytes from a DIMM. More... | |
int | smbus_readSpd (int spdAddress, char *buf, size_t len) |
|
static |
Read a single SPD byte.
If the first byte is being read, set up the address and offset. Following bytes auto increment.
Definition at line 23 of file smbus_spd.c.
References address, AGESA_ERROR, AGESA_SUCCESS, buffer, HOSTBUSY_MASK, MAX_READ_TSC_COUNT, offset, READ_BIT, SMBUS_COMMAND_REG, SMBUS_CONTROL_REG, SMBUS_DATA0_REG, SMBUS_HOST_CMD_REG, SMBUS_INTERRUPT_MASK, SMBUS_READ_BYTE_COMMAND, SMBUS_READ_COMMAND, SMBUS_SLAVE_STATUS_REG, SMBUS_STATUS_REG, and STATUS__COMPLETED_SUCCESSFULLY.
Referenced by readspd().
|
static |
Read one or more SPD bytes from a DIMM.
Start with offset zero and read sequentially. Reads 128 bytes in 7-8 ms at 400 KHz.
Definition at line 82 of file smbus_spd.c.
References AGESA_SUCCESS, buffer, count, readSmbusByte(), and setupFch().
Referenced by smbus_readSpd().
|
static |
Definition at line 66 of file smbus_spd.c.
References SMBUS_BAR_HIGH_BYTE, SMBUS_BAR_LOW_BYTE, SMBUS_CLOCK_REG, SMBUS_FREQUENCY_CONST, and writePmReg().
Referenced by readspd(), and smbus_readSpd().
int smbus_readSpd | ( | int | spdAddress, |
char * | buf, | ||
size_t | len | ||
) |
Definition at line 101 of file smbus_spd.c.
References buf, readspd(), and setupFch().
Referenced by AmdMemoryReadSPD(), and sema_send_alive().
|
static |
Definition at line 60 of file smbus_spd.c.
References PMIO_DATA_REG, and PMIO_INDEX_REG.
Referenced by setupFch().