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

Go to the source code of this file.

Data Structures

struct  mbox_buffer_header
 
struct  mbox_default_buffer
 
struct  smm_req_buffer
 
struct  mbox_cmd_smm_info_buffer
 
struct  mbox_cmd_sx_info_buffer
 
struct  mbox_cmd_late_spl_buffer
 

Macros

#define MBOX_BIOS_CMD_SMM_INFO   0x02
 
#define MBOX_BIOS_CMD_SX_INFO   0x03
 
#define MBOX_BIOS_CMD_SX_INFO_SLEEP_TYPE_MAX   0x07
 
#define MBOX_BIOS_CMD_RSM_INFO   0x04
 
#define MBOX_BIOS_CMD_PSP_QUERY   0x05
 
#define MBOX_BIOS_CMD_BOOT_DONE   0x06
 
#define MBOX_BIOS_CMD_CLEAR_S3_STS   0x07
 
#define MBOX_BIOS_CMD_S3_DATA_INFO   0x08
 
#define MBOX_BIOS_CMD_NOP   0x09
 
#define MBOX_BIOS_CMD_SET_SPL_FUSE   0x2d
 
#define MBOX_BIOS_CMD_QUERY_SPL_FUSE   0x47
 
#define MBOX_BIOS_CMD_ABORT   0xfe
 
#define MBOX_BIOS_CMD_DRAM_INFO   0x01
 
#define MBOX_BIOS_CMD_SMU_FW   0x19
 
#define MBOX_BIOS_CMD_SMU_FW2   0x1a
 
#define CORE_2_PSP_MSG_38_OFFSET   0x10998
 
#define CORE_2_PSP_MSG_38_FUSE_SPL   BIT(12)
 
#define PSP_INIT_TIMEOUT   10000 /* 10 seconds */
 
#define PSP_CMD_TIMEOUT   1000 /* 1 second */
 

Functions

void psp_print_cmd_status (int cmd_status, struct mbox_buffer_header *header)
 
int send_psp_command (u32 command, void *buffer)
 
enum cb_err soc_read_c2p38 (uint32_t *msg_38_value)
 

Variables

struct mbox_buffer_header __packed
 

Macro Definition Documentation

◆ CORE_2_PSP_MSG_38_FUSE_SPL

#define CORE_2_PSP_MSG_38_FUSE_SPL   BIT(12)

Definition at line 30 of file psp_def.h.

◆ CORE_2_PSP_MSG_38_OFFSET

#define CORE_2_PSP_MSG_38_OFFSET   0x10998

Definition at line 29 of file psp_def.h.

◆ MBOX_BIOS_CMD_ABORT

#define MBOX_BIOS_CMD_ABORT   0xfe

Definition at line 22 of file psp_def.h.

◆ MBOX_BIOS_CMD_BOOT_DONE

#define MBOX_BIOS_CMD_BOOT_DONE   0x06

Definition at line 16 of file psp_def.h.

◆ MBOX_BIOS_CMD_CLEAR_S3_STS

#define MBOX_BIOS_CMD_CLEAR_S3_STS   0x07

Definition at line 17 of file psp_def.h.

◆ MBOX_BIOS_CMD_DRAM_INFO

#define MBOX_BIOS_CMD_DRAM_INFO   0x01

Definition at line 25 of file psp_def.h.

◆ MBOX_BIOS_CMD_NOP

#define MBOX_BIOS_CMD_NOP   0x09

Definition at line 19 of file psp_def.h.

◆ MBOX_BIOS_CMD_PSP_QUERY

#define MBOX_BIOS_CMD_PSP_QUERY   0x05

Definition at line 15 of file psp_def.h.

◆ MBOX_BIOS_CMD_QUERY_SPL_FUSE

#define MBOX_BIOS_CMD_QUERY_SPL_FUSE   0x47

Definition at line 21 of file psp_def.h.

◆ MBOX_BIOS_CMD_RSM_INFO

#define MBOX_BIOS_CMD_RSM_INFO   0x04

Definition at line 14 of file psp_def.h.

◆ MBOX_BIOS_CMD_S3_DATA_INFO

#define MBOX_BIOS_CMD_S3_DATA_INFO   0x08

Definition at line 18 of file psp_def.h.

◆ MBOX_BIOS_CMD_SET_SPL_FUSE

#define MBOX_BIOS_CMD_SET_SPL_FUSE   0x2d

Definition at line 20 of file psp_def.h.

◆ MBOX_BIOS_CMD_SMM_INFO

#define MBOX_BIOS_CMD_SMM_INFO   0x02

Definition at line 11 of file psp_def.h.

◆ MBOX_BIOS_CMD_SMU_FW

#define MBOX_BIOS_CMD_SMU_FW   0x19

Definition at line 26 of file psp_def.h.

◆ MBOX_BIOS_CMD_SMU_FW2

#define MBOX_BIOS_CMD_SMU_FW2   0x1a

Definition at line 27 of file psp_def.h.

◆ MBOX_BIOS_CMD_SX_INFO

#define MBOX_BIOS_CMD_SX_INFO   0x03

Definition at line 12 of file psp_def.h.

◆ MBOX_BIOS_CMD_SX_INFO_SLEEP_TYPE_MAX

#define MBOX_BIOS_CMD_SX_INFO_SLEEP_TYPE_MAX   0x07

Definition at line 13 of file psp_def.h.

◆ PSP_CMD_TIMEOUT

#define PSP_CMD_TIMEOUT   1000 /* 1 second */

Definition at line 85 of file psp_def.h.

◆ PSP_INIT_TIMEOUT

#define PSP_INIT_TIMEOUT   10000 /* 10 seconds */

Definition at line 84 of file psp_def.h.

Function Documentation

◆ psp_print_cmd_status()

void psp_print_cmd_status ( int  cmd_status,
struct mbox_buffer_header header 
)

Definition at line 47 of file psp.c.

References BIOS_DEBUG, BIOS_WARNING, header, printk, rd_resp_sts(), and status_to_string().

Referenced by psp_load_named_blob(), psp_notify_boot_done(), psp_notify_dram(), psp_notify_smm(), psp_notify_sx_info(), and psp_set_spl_fuse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_psp_command()

◆ soc_read_c2p38()

enum cb_err soc_read_c2p38 ( uint32_t msg_38_value)

Definition at line 92 of file psp_gen2.c.

Referenced by psp_set_spl_fuse().

Here is the caller graph for this function:

Variable Documentation

◆ __packed