![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <bootstate.h>
#include <console/console.h>
#include <cpu/amd/msr.h>
#include <cpu/x86/msr.h>
#include <device/mmio.h>
#include <timer.h>
#include <amdblocks/psp.h>
#include <soc/iomap.h>
#include "psp_def.h"
Go to the source code of this file.
Data Structures | |
union | pspv2_mbox_command |
struct | pspv2_mbox_command::pspv2_mbox_cmd_fields |
Macros | |
#define | PSP_MAILBOX_COMMAND_OFFSET 0x10570 /* 4 bytes */ |
#define | PSP_MAILBOX_BUFFER_OFFSET 0x10574 /* 8 bytes */ |
Functions | |
static uintptr_t | soc_get_psp_base_address (void) |
static u16 | rd_mbox_sts (uintptr_t psp_mmio) |
static void | wr_mbox_cmd (uintptr_t psp_mmio, u8 cmd) |
static u8 | rd_mbox_recovery (uintptr_t psp_mmio) |
static void | wr_mbox_buffer_ptr (uintptr_t psp_mmio, void *buffer) |
static int | wait_command (uintptr_t psp_mmio, bool wait_for_ready) |
int | send_psp_command (u32 command, void *buffer) |
enum cb_err | soc_read_c2p38 (uint32_t *msg_38_value) |
static void | psp_set_spl_fuse (void *unused) |
BOOT_STATE_INIT_ENTRY (BS_PAYLOAD_BOOT, BS_ON_ENTRY, psp_set_spl_fuse, NULL) | |
#define PSP_MAILBOX_BUFFER_OFFSET 0x10574 /* 8 bytes */ |
Definition at line 14 of file psp_gen2.c.
#define PSP_MAILBOX_COMMAND_OFFSET 0x10570 /* 4 bytes */ |
Definition at line 13 of file psp_gen2.c.
BOOT_STATE_INIT_ENTRY | ( | BS_PAYLOAD_BOOT | , |
BS_ON_ENTRY | , | ||
psp_set_spl_fuse | , | ||
NULL | |||
) |
Definition at line 132 of file psp_gen2.c.
References BIOS_DEBUG, BIOS_ERR, buffer, CB_SUCCESS, CONFIG, CORE_2_PSP_MSG_38_FUSE_SPL, MBOX_BIOS_CMD_SET_SPL_FUSE, NULL, printk, psp_print_cmd_status(), send_psp_command(), and soc_read_c2p38().
Definition at line 52 of file psp_gen2.c.
References pspv2_mbox_command::fields, PSP_MAILBOX_COMMAND_OFFSET, read32p(), pspv2_mbox_command::pspv2_mbox_cmd_fields::recovery, and pspv2_mbox_command::val.
Referenced by send_psp_command().
Definition at line 35 of file psp_gen2.c.
References pspv2_mbox_command::fields, pspv2_mbox_command::pspv2_mbox_cmd_fields::mbox_status, PSP_MAILBOX_COMMAND_OFFSET, read32p(), and pspv2_mbox_command::val.
Referenced by send_psp_command().
Definition at line 92 of file psp_gen2.c.
References buffer, MBOX_BIOS_CMD_SX_INFO, PSPSTS_CMD_TIMEOUT, PSPSTS_HALTED, PSPSTS_INIT_TIMEOUT, PSPSTS_NOBASE, PSPSTS_RECOVERY, PSPSTS_SEND_ERROR, PSPV1_STATUS_ERROR, PSPV1_STATUS_HALT, PSPV1_STATUS_RECOVERY, PSPV1_STATUS_TERMINATED, rd_mbox_recovery(), rd_mbox_sts(), soc_get_mbox_address(), soc_get_psp_base_address(), wait_command(), wait_initialized(), wr_mbox_buffer_ptr(), wr_mbox_cmd(), and wr_mbox_cmd_resp().
Referenced by psp_notify_boot_done(), psp_notify_smm(), psp_notify_sx_info(), and psp_set_spl_fuse().
Definition at line 27 of file psp_gen2.c.
References BIOS_ERR, msr_struct::lo, printk, PSP_ADDR_MSR, and rdmsr().
Referenced by send_psp_command().
Definition at line 92 of file psp_gen2.c.
Referenced by psp_set_spl_fuse().
Definition at line 65 of file psp_gen2.c.
References pspv2_mbox_command::fields, pspv2_mbox_command::pspv2_mbox_cmd_fields::mbox_command, PSP_CMD_TIMEOUT, PSP_MAILBOX_COMMAND_OFFSET, PSPSTS_CMD_TIMEOUT, read32p(), pspv2_mbox_command::pspv2_mbox_cmd_fields::ready, stopwatch_expired(), stopwatch_init_msecs_expire(), pspv2_mbox_command::val, and wait_for_ready().
Referenced by send_psp_command().
Definition at line 60 of file psp_gen2.c.
References buffer, PSP_MAILBOX_BUFFER_OFFSET, and write64p().
Referenced by send_psp_command().
Definition at line 43 of file psp_gen2.c.
References pspv2_mbox_command::fields, pspv2_mbox_command::pspv2_mbox_cmd_fields::mbox_command, PSP_MAILBOX_COMMAND_OFFSET, pspv2_mbox_command::val, and write32p().
Referenced by send_psp_command().