coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmc_ipc.h File Reference
#include <types.h>
Include dependency graph for pmc_ipc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pmc_ipc_buffer
 

Macros

#define PMC_IPC_BUF_COUNT   4
 
#define PMC_IPC_CMD_COMMAND_SHIFT   0
 
#define PMC_IPC_CMD_COMMAND_MASK   0xff
 
#define PMC_IPC_CMD_MSI_SHIFT   8
 
#define PMC_IPC_CMD_MSI_MASK   0x01
 
#define PMC_IPC_CMD_SUB_COMMAND_SHIFT   12
 
#define PMC_IPC_CMD_SUB_COMMAND_MASK   0x0f
 
#define PMC_IPC_CMD_SIZE_SHIFT   16
 
#define PMC_IPC_CMD_SIZE_MASK   0xff
 
#define PMC_IPC_CMD_COMMAND_FIVR   0xA3
 
#define PMC_IPC_CMD_CMD_ID_FIVR_READ   0x00
 
#define PMC_IPC_CMD_CMD_ID_FIVR_WRITE   0x01
 
#define PMC_IPC_SUBCMD_RFI_CTRL0_LOGIC   0
 
#define PMC_IPC_SUBCMD_RFI_CTRL4_LOGIC   1
 
#define PMC_IPC_SUBCMD_EMI_CTRL0_LOGIC   2
 
#define PMC_IPC_SUBCMD_FFFC_FAULT_STATUS   3
 
#define PMC_IPC_SUBCMD_FFFC_RFI_STATUS   4
 
#define PMC_IPC_CMD_FIELD(name, val)    ((((val) & PMC_IPC_CMD_##name##_MASK) << PMC_IPC_CMD_##name##_SHIFT))
 
#define PMC_IPC_CMD_NO_MSI   0
 
#define PMC_IPC_CMD_RD_PMC_REG   0xA0
 
#define PMC_IPC_CMD_SUBCMD_RD_PMC_REG   0x02
 
#define PMC_IPC_CMD_ID_SET_PCIE_CLOCK   0xAC
 
#define PMC_IPC_SUCCESS   0
 
#define PMC_IPC_ERROR   1
 
#define PMC_IPC_TIMEOUT   2
 

Functions

static uint32_t pmc_make_ipc_cmd (uint32_t cmd, uint32_t subcmd, uint32_t size)
 
enum cb_err pmc_send_ipc_cmd (uint32_t cmd, const struct pmc_ipc_buffer *wbuf, struct pmc_ipc_buffer *rbuf)
 
void pmc_ipc_acpi_fill_ssdt (void)
 
void pmc_ipc_acpi_set_pci_clock (unsigned int pcie_rp, unsigned int clock_pin, bool enable)
 

Macro Definition Documentation

◆ PMC_IPC_BUF_COUNT

#define PMC_IPC_BUF_COUNT   4

Definition at line 8 of file pmc_ipc.h.

◆ PMC_IPC_CMD_CMD_ID_FIVR_READ

#define PMC_IPC_CMD_CMD_ID_FIVR_READ   0x00

Definition at line 22 of file pmc_ipc.h.

◆ PMC_IPC_CMD_CMD_ID_FIVR_WRITE

#define PMC_IPC_CMD_CMD_ID_FIVR_WRITE   0x01

Definition at line 24 of file pmc_ipc.h.

◆ PMC_IPC_CMD_COMMAND_FIVR

#define PMC_IPC_CMD_COMMAND_FIVR   0xA3

Definition at line 20 of file pmc_ipc.h.

◆ PMC_IPC_CMD_COMMAND_MASK

#define PMC_IPC_CMD_COMMAND_MASK   0xff

Definition at line 11 of file pmc_ipc.h.

◆ PMC_IPC_CMD_COMMAND_SHIFT

#define PMC_IPC_CMD_COMMAND_SHIFT   0

Definition at line 10 of file pmc_ipc.h.

◆ PMC_IPC_CMD_FIELD

#define PMC_IPC_CMD_FIELD (   name,
  val 
)     ((((val) & PMC_IPC_CMD_##name##_MASK) << PMC_IPC_CMD_##name##_SHIFT))

Definition at line 36 of file pmc_ipc.h.

◆ PMC_IPC_CMD_ID_SET_PCIE_CLOCK

#define PMC_IPC_CMD_ID_SET_PCIE_CLOCK   0xAC

Definition at line 46 of file pmc_ipc.h.

◆ PMC_IPC_CMD_MSI_MASK

#define PMC_IPC_CMD_MSI_MASK   0x01

Definition at line 13 of file pmc_ipc.h.

◆ PMC_IPC_CMD_MSI_SHIFT

#define PMC_IPC_CMD_MSI_SHIFT   8

Definition at line 12 of file pmc_ipc.h.

◆ PMC_IPC_CMD_NO_MSI

#define PMC_IPC_CMD_NO_MSI   0

Definition at line 39 of file pmc_ipc.h.

◆ PMC_IPC_CMD_RD_PMC_REG

#define PMC_IPC_CMD_RD_PMC_REG   0xA0

Definition at line 42 of file pmc_ipc.h.

◆ PMC_IPC_CMD_SIZE_MASK

#define PMC_IPC_CMD_SIZE_MASK   0xff

Definition at line 17 of file pmc_ipc.h.

◆ PMC_IPC_CMD_SIZE_SHIFT

#define PMC_IPC_CMD_SIZE_SHIFT   16

Definition at line 16 of file pmc_ipc.h.

◆ PMC_IPC_CMD_SUB_COMMAND_MASK

#define PMC_IPC_CMD_SUB_COMMAND_MASK   0x0f

Definition at line 15 of file pmc_ipc.h.

◆ PMC_IPC_CMD_SUB_COMMAND_SHIFT

#define PMC_IPC_CMD_SUB_COMMAND_SHIFT   12

Definition at line 14 of file pmc_ipc.h.

◆ PMC_IPC_CMD_SUBCMD_RD_PMC_REG

#define PMC_IPC_CMD_SUBCMD_RD_PMC_REG   0x02

Definition at line 43 of file pmc_ipc.h.

◆ PMC_IPC_ERROR

#define PMC_IPC_ERROR   1

Definition at line 50 of file pmc_ipc.h.

◆ PMC_IPC_SUBCMD_EMI_CTRL0_LOGIC

#define PMC_IPC_SUBCMD_EMI_CTRL0_LOGIC   2

Definition at line 30 of file pmc_ipc.h.

◆ PMC_IPC_SUBCMD_FFFC_FAULT_STATUS

#define PMC_IPC_SUBCMD_FFFC_FAULT_STATUS   3

Definition at line 32 of file pmc_ipc.h.

◆ PMC_IPC_SUBCMD_FFFC_RFI_STATUS

#define PMC_IPC_SUBCMD_FFFC_RFI_STATUS   4

Definition at line 34 of file pmc_ipc.h.

◆ PMC_IPC_SUBCMD_RFI_CTRL0_LOGIC

#define PMC_IPC_SUBCMD_RFI_CTRL0_LOGIC   0

Definition at line 26 of file pmc_ipc.h.

◆ PMC_IPC_SUBCMD_RFI_CTRL4_LOGIC

#define PMC_IPC_SUBCMD_RFI_CTRL4_LOGIC   1

Definition at line 28 of file pmc_ipc.h.

◆ PMC_IPC_SUCCESS

#define PMC_IPC_SUCCESS   0

Definition at line 49 of file pmc_ipc.h.

◆ PMC_IPC_TIMEOUT

#define PMC_IPC_TIMEOUT   2

Definition at line 51 of file pmc_ipc.h.

Function Documentation

◆ pmc_ipc_acpi_fill_ssdt()

◆ pmc_ipc_acpi_set_pci_clock()

void pmc_ipc_acpi_set_pci_clock ( unsigned int  pcie_rp,
unsigned int  clock_pin,
bool  enable 
)

◆ pmc_make_ipc_cmd()

static uint32_t pmc_make_ipc_cmd ( uint32_t  cmd,
uint32_t  subcmd,
uint32_t  size 
)
inlinestatic

◆ pmc_send_ipc_cmd()

enum cb_err pmc_send_ipc_cmd ( uint32_t  cmd,
const struct pmc_ipc_buffer wbuf,
struct pmc_ipc_buffer rbuf 
)