coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
psp.c File Reference
#include <device/mmio.h>
#include <bootstate.h>
#include <console/console.h>
#include <amdblocks/psp.h>
#include <soc/iomap.h>
#include "psp_def.h"
Include dependency graph for psp.c:

Go to the source code of this file.

Functions

static const char * status_to_string (int err)
 
static u32 rd_resp_sts (struct mbox_buffer_header *header)
 
void psp_print_cmd_status (int cmd_status, struct mbox_buffer_header *header)
 
static void psp_notify_boot_done (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_PAYLOAD_BOOT, BS_ON_ENTRY, psp_notify_boot_done, NULL)
 

Variables

static const char * psp_status_nobase = "error: PSP_ADDR_MSR and PSP BAR3 not assigned"
 
static const char * psp_status_halted = "error: PSP in halted state"
 
static const char * psp_status_recovery = "error: PSP recovery required"
 
static const char * psp_status_errcmd = "error sending command"
 
static const char * psp_status_init_timeout = "error: PSP init timeout"
 
static const char * psp_status_cmd_timeout = "error: PSP command timeout"
 
static const char * psp_status_noerror = ""
 

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_PAYLOAD_BOOT  ,
BS_ON_ENTRY  ,
psp_notify_boot_done  ,
NULL   
)

◆ psp_notify_boot_done()

static void psp_notify_boot_done ( void unused)
static

Definition at line 63 of file psp.c.

References BIOS_DEBUG, buffer, MBOX_BIOS_CMD_BOOT_DONE, printk, psp_print_cmd_status(), and send_psp_command().

Here is the call graph for this function:

◆ 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:

◆ rd_resp_sts()

static u32 rd_resp_sts ( struct mbox_buffer_header header)
static

Definition at line 38 of file psp.c.

References header, and read32().

Referenced by psp_print_cmd_status().

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

◆ status_to_string()

static const char* status_to_string ( int  err)
static

Variable Documentation

◆ psp_status_cmd_timeout

const char* psp_status_cmd_timeout = "error: PSP command timeout"
static

Definition at line 15 of file psp.c.

Referenced by status_to_string().

◆ psp_status_errcmd

const char* psp_status_errcmd = "error sending command"
static

Definition at line 13 of file psp.c.

Referenced by status_to_string().

◆ psp_status_halted

const char* psp_status_halted = "error: PSP in halted state"
static

Definition at line 11 of file psp.c.

Referenced by status_to_string().

◆ psp_status_init_timeout

const char* psp_status_init_timeout = "error: PSP init timeout"
static

Definition at line 14 of file psp.c.

Referenced by status_to_string().

◆ psp_status_nobase

const char* psp_status_nobase = "error: PSP_ADDR_MSR and PSP BAR3 not assigned"
static

Definition at line 10 of file psp.c.

Referenced by status_to_string().

◆ psp_status_noerror

const char* psp_status_noerror = ""
static

Definition at line 16 of file psp.c.

Referenced by status_to_string().

◆ psp_status_recovery

const char* psp_status_recovery = "error: PSP recovery required"
static

Definition at line 12 of file psp.c.

Referenced by status_to_string().