-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace PlatformPowerRestorePolicyConfigurationLib with PlatformPower…
…RestorePolicy (#182) ## Description In IpmiPowerRestorePolicy module, replace PlatformPowerRestorePolicyConfigurationLib with PlatformPowerRestorePolicy policy. Now, the platform specific power restore configuration is read via. PlatformPowerRestorePolicy.PolicyValue instead of GetPowerRestorePolicy API. Default implementation of PlatformPowerRestorePolicy is provided which always returns "no change". This simplifies interface to provide platform specific configuration for power restore and reduce the number of libraires. - [ ] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [x] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [x] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [ ] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... ## How This Was Tested This was tested with consumer build pipeline on proprietary platforms. ## Integration Instructions 1. Remove PlatformPowerRestorePolicyConfigurationLib library implementation in the platform code. 2. Use PlatformPowerRestorePolicyDefault.inf or introduce platform code to produce PlatformPowerRestorePolicy policy.
- Loading branch information
Showing
13 changed files
with
222 additions
and
163 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,32 @@ | ||
/** @file PlatformPowerRestorePolicy.h | ||
Platform Power Restore Policy Definition | ||
Copyright (c) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef PLATFORM_POWER_RESTORE_POLICY_H_ | ||
#define PLATFORM_POWER_RESTORE_POLICY_H_ | ||
|
||
#define PLATFORM_POWER_RESTORE_POLICY_GUID {0x85bcbff7, 0x8f9d, 0x4997, {0xac, 0x46, 0x5b, 0x36, 0x70, 0x0b, 0x0b, 0x85}} | ||
|
||
// | ||
// Power Restore Policy definition from IPMI Spec. | ||
// | ||
typedef enum { | ||
PowerRestorePolicyPowerOff = 0x00, | ||
PowerRestorePolicyLastState = 0x01, | ||
PowerRestorePolicyPowerOn = 0x02, | ||
PowerRestorePolicyNoChange = 0x03, | ||
} PLATFORM_POWER_RESTORE_POLICY_TYPE; | ||
|
||
#pragma pack(1) | ||
|
||
typedef struct _PLATFORM_POWER_RESTORE_POLICY { | ||
PLATFORM_POWER_RESTORE_POLICY_TYPE PolicyValue; | ||
} PLATFORM_POWER_RESTORE_POLICY; | ||
|
||
#pragma pack() | ||
|
||
#endif //#ifdef PLATFORM_POWER_RESTORE_POLICY_H_ |
35 changes: 0 additions & 35 deletions
35
IpmiFeaturePkg/Include/Library/PlatformPowerRestorePolicyConfigurationLib.h
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.