coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
oem_s3.c File Reference
#include <spi-generic.h>
#include <spi_flash.h>
#include <string.h>
#include <cbmem.h>
#include <console/console.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <AGESA.h>
#include <northbridge/amd/agesa/agesa_helper.h>
Include dependency graph for oem_s3.c:

Go to the source code of this file.

Macros

#define S3_DATA_MTRR_SIZE   0x1000
 
#define S3_DATA_NONVOLATILE_SIZE   0x1000
 

Enumerations

enum  S3_DATA_TYPE { S3DataTypeNonVolatile = 0 , S3DataTypeMTRR }
 

Functions

static void get_s3nv_data (S3_DATA_TYPE S3DataType, uintptr_t *pos, uintptr_t *len)
 
AGESA_STATUS OemInitResume (AMD_S3_PARAMS *dataBlock)
 
AGESA_STATUS OemS3LateRestore (AMD_S3_PARAMS *dataBlock)
 
const voidOemS3Saved_MTRR_Storage (void)
 

Macro Definition Documentation

◆ S3_DATA_MTRR_SIZE

#define S3_DATA_MTRR_SIZE   0x1000

Definition at line 18 of file oem_s3.c.

◆ S3_DATA_NONVOLATILE_SIZE

#define S3_DATA_NONVOLATILE_SIZE   0x1000

Definition at line 19 of file oem_s3.c.

Enumeration Type Documentation

◆ S3_DATA_TYPE

Enumerator
S3DataTypeNonVolatile 

NonVolatile Data Type.

S3DataTypeMTRR 

MTRR storage.

Definition at line 12 of file oem_s3.c.

Function Documentation

◆ get_s3nv_data()

static void get_s3nv_data ( S3_DATA_TYPE  S3DataType,
uintptr_t pos,
uintptr_t len 
)
static

Definition at line 26 of file oem_s3.c.

References S3_DATA_MTRR_SIZE, S3_DATA_NONVOLATILE_SIZE, S3DataTypeMTRR, and S3DataTypeNonVolatile.

Referenced by OemInitResume(), and OemS3Saved_MTRR_Storage().

Here is the caller graph for this function:

◆ OemInitResume()

AGESA_STATUS OemInitResume ( AMD_S3_PARAMS *  dataBlock)

Definition at line 47 of file oem_s3.c.

References AGESA_FATAL, AGESA_SUCCESS, get_s3nv_data(), and S3DataTypeNonVolatile.

Referenced by amd_init_resume(), platform_BeforeInitPost(), and platform_BeforeInitResume().

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

◆ OemS3LateRestore()

AGESA_STATUS OemS3LateRestore ( AMD_S3_PARAMS *  dataBlock)

Definition at line 63 of file oem_s3.c.

References AGESA_FATAL, AGESA_SUCCESS, BIOS_DEBUG, cbmem_find(), CBMEM_ID_RESUME_SCRATCH, HIGH_MEMORY_SCRATCH, NULL, and printk.

Referenced by amd_s3final_restore(), amd_s3late_restore(), and platform_BeforeS3LateRestore().

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

◆ OemS3Saved_MTRR_Storage()

const void* OemS3Saved_MTRR_Storage ( void  )

Definition at line 142 of file oem_s3.c.

References get_s3nv_data(), NULL, S3DataTypeMTRR, and spi_flash::size.

Referenced by restore_mtrr().

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