forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from haiwei-li/guest_s3
ovmf booted Guest s3 support
- Loading branch information
Showing
11 changed files
with
137 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** @file | ||
S3 support for ACRN | ||
This library class enables driver modules to query whether S3 support was | ||
enabled on ACRN. | ||
Copyright (C) 2024, Intel, Inc. | ||
This program and the accompanying materials are licensed and made available | ||
under the terms and conditions of the BSD License which accompanies this | ||
distribution. The full text of the license may be found at | ||
http://opensource.org/licenses/bsd-license.php | ||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | ||
**/ | ||
|
||
#ifndef __ACRN_S3_LIB__ | ||
#define __ACRN_S3_LIB__ | ||
|
||
#include <Base.h> | ||
|
||
/** | ||
Determine if S3 support is explicitly enabled. | ||
@retval TRUE If S3 support is explicitly enabled. Other functions in this | ||
library may be called (subject to their individual | ||
restrictions). | ||
FALSE Otherwise. This includes unavailability of the firmware | ||
configuration interface. No other function in this library | ||
must be called. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
AcrnS3Enabled ( | ||
VOID | ||
); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** @file | ||
S3 Library functions for OVMF on ACRN | ||
Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR> | ||
This program and the accompanying materials | ||
are licensed and made available under the terms and conditions of the BSD License | ||
which accompanies this distribution. The full text of the license may be found at | ||
http://opensource.org/licenses/bsd-license.php | ||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | ||
**/ | ||
|
||
#include <Library/AcrnS3Lib.h> | ||
|
||
/** | ||
Determine if S3 support is explicitly enabled. | ||
@retval TRUE If S3 support is explicitly enabled. Other functions in this | ||
library may be called (subject to their individual | ||
restrictions). | ||
FALSE Otherwise. This includes unavailability of the firmware | ||
configuration interface. No other function in this library | ||
must be called. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
AcrnS3Enabled ( | ||
VOID | ||
) | ||
{ | ||
// | ||
// Assumes that ACRN always supports S3. | ||
// | ||
// TODO: AcrnDetected() logic | ||
return TRUE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## @file | ||
# Library instance for AcrnS3Lib class for OVMF | ||
# | ||
# Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR> | ||
# This program and the accompanying materials | ||
# are licensed and made available under the terms and conditions of the BSD License | ||
# which accompanies this distribution. The full text of the license may be found at | ||
# http://opensource.org/licenses/bsd-license.php | ||
# | ||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | ||
# | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = AcrnS3Lib | ||
FILE_GUID = 4fbe8dc8-eb23-4856-8496-6616f84ee9dd | ||
MODULE_TYPE = BASE | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = AcrnS3Lib | ||
|
||
# | ||
# The following information is for reference only and not required by the build tools. | ||
# | ||
# VALID_ARCHITECTURES = IA32 X64 | ||
# | ||
|
||
[Sources] | ||
AcrnS3Lib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
OvmfPkg/OvmfPkg.dec | ||
|
||
[LibraryClasses] | ||
DebugLib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ | |
PeimEntryPoint | ||
QemuFwCfgLib | ||
QemuFwCfgS3Lib | ||
AcrnS3Lib | ||
MtrrLib | ||
MemEncryptSevLib | ||
PcdLib | ||
|