SecurityPkg: add DeviceSecurity support
This patch implement the SpdmSecurityLib, which is the core of DeviceSecurity. And the SpdmSecurityLib include Device Authentication and Measurement. The other library is to support SpdmSecurityLib. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
c3f615a1bd
commit
750d763623
@@ -0,0 +1,85 @@
|
||||
/** @file
|
||||
EDKII Device Security library for SPDM device.
|
||||
It follows the SPDM Specification.
|
||||
|
||||
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include "hal/base.h"
|
||||
|
||||
/**
|
||||
* Suspends the execution of the current thread until the time-out interval elapses.
|
||||
*
|
||||
* @param milliseconds The time interval for which execution is to be suspended, in milliseconds.
|
||||
*
|
||||
**/
|
||||
void
|
||||
libspdm_sleep (
|
||||
uint64_t milliseconds
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Suspends the execution of the current thread until the time-out interval elapses.
|
||||
*
|
||||
* @param microseconds The time interval for which execution is to be suspended, in milliseconds.
|
||||
*
|
||||
**/
|
||||
void
|
||||
libspdm_sleep_in_us (
|
||||
uint64_t microseconds
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* If no heartbeat arrives in seconds, the watchdog timeout event
|
||||
* should terminate the session.
|
||||
*
|
||||
* @param session_id Indicate the SPDM session ID.
|
||||
* @param seconds heartbeat period, in seconds.
|
||||
*
|
||||
**/
|
||||
bool
|
||||
libspdm_start_watchdog (
|
||||
uint32_t session_id,
|
||||
uint16_t seconds
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* stop watchdog.
|
||||
*
|
||||
* @param session_id Indicate the SPDM session ID.
|
||||
*
|
||||
**/
|
||||
bool
|
||||
libspdm_stop_watchdog (
|
||||
uint32_t session_id
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the watchdog in heartbeat response.
|
||||
*
|
||||
* @param session_id Indicate the SPDM session ID.
|
||||
*
|
||||
**/
|
||||
bool
|
||||
libspdm_reset_watchdog (
|
||||
uint32_t session_id
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
## @file
|
||||
# SPDM library.
|
||||
#
|
||||
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PlatformLibWrapper
|
||||
FILE_GUID = 2f8979d1-f9f0-4d51-9cbd-4f41dee59057
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PlatformLibWrapper
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 AARCH64
|
||||
#
|
||||
|
||||
[Sources]
|
||||
PlatformLibWrapper.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
SecurityPkg/SecurityPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
Reference in New Issue
Block a user