UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm

This change adds a new CpuIo driver instance for MM_STANDALONE type. The
new driver entrypoint is implemented in a separate file to match the
interface definition of MM_STANDALONE modules.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kun.q@outlook.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Kun Qin
2021-01-22 18:09:04 -08:00
parent 1ea21af13d
commit c2432b31ed
3 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
/** @file
Produces the SMM CPU I/O Protocol.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <PiMm.h>
#include "CpuIo2Mm.h"
/**
The module Entry Point for Standalone MM CpuIoProtocol driver
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The entry point is executed successfully.
@retval Other Some error occurs when executing this entry point.
**/
EFI_STATUS
EFIAPI
StandaloneMmCpuIo2Initialize (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *SystemTable
)
{
return CommonCpuIo2Initialize ();
}