UefiPayloadPkg: Add SmmStoreInfoGuid

Add a new InfoHob that contains the SmmStore information passed from
coreboot tables when the SMMSTOREV2 feature is enabled.

This will be used to implement the FVB in top of the MM installed by
coreboot.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: Ia3f7eef27d4758768c1a6736afe1cb77ee6a2f8f
This commit is contained in:
Patrick Rudolph
2022-02-25 11:58:59 +01:00
committed by Tim Crawford
parent bb19b4bc30
commit 13dd54ae32
8 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/** @file
This file defines the hob structure for coreboot's SmmStore.
Copyright (c) 2022, 9elements GmbH<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef SMMSTORE_GUID_H_
#define SMMSTORE_GUID_H_
///
/// System Table Information GUID
///
extern EFI_GUID gEfiSmmStoreInfoHobGuid;
typedef struct {
UINT64 ComBuffer;
UINT32 ComBufferSize;
UINT32 NumBlocks;
UINT32 BlockSize;
UINT64 MmioAddress;
UINT8 ApmCmd;
UINT8 Reserved0[3];
} SMMSTORE_INFO;
#endif // SMMSTORE_GUID_H_

View File

@@ -0,0 +1,29 @@
/** @file
This library will parse the coreboot table in memory and extract those required
information.
Copyright (c) 2021, Star Labs Systems. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef SMM_STORE_PARSE_LIB_H_
#define SMM_STORE_PARSE_LIB_H_
#include <Guid/SmmStoreInfoGuid.h>
/**
Find the SmmStore HOB.
@param SmmStoreInfo Pointer to the SMMSTORE_INFO structure
@retval RETURN_SUCCESS Successfully find the Smm store buffer information.
@retval RETURN_NOT_FOUND Failed to find the Smm store buffer information .
**/
RETURN_STATUS
EFIAPI
ParseSmmStoreInfo (
OUT SMMSTORE_INFO *SmmStoreInfo
);
#endif // SMM_STORE_PARSE_LIB_H_