Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MdeModulePkg: Enable VarCheckHiiLibStandaloneMm #5938

Merged
merged 11 commits into from
Sep 2, 2024

Conversation

xieyuanh
Copy link
Contributor

@xieyuanh xieyuanh commented Jul 22, 2024

Description

VarCheckHiiLib is a library for handling HII (Human Interface Infrastructure) variable checking tasks in a UEF environment. HII allows firmware to provide user interface elements such as forms, keyboard input, and display text.

This patch series introduces a standalone MM module for managing HII variable checks. It consists of two components:

  • VarCheckHiiLibMmDependency: Retrieves data (mVarCheckHiiBin) at the end of the DXE phase and transmits it to VarCheckHiiLibStandaloneMm via the communication protocol.

  • VarCheckHiiLibStandaloneMm: A library within the Standalone MM environment designed to handle HII variable checks. It features functions for registering handlers that process data received from VarCheckHiiLibMmDependency.

  • Breaking change - Does this PR cause a break in build or boot behavior?
    Examples: Does it add a new library class or move a module to a different repo.

  • Impacts security? - Does this PR have a direct security impact?
    Examples: Crypto algorithm change or buffer overflow fix.

  • Includes tests? - Does this PR include any explicit test code?
    Examples: Unit tests or integration tests.

How This Was Tested

The testing on Intel's next-generation server processor platform. It confirms that debug messages are properly printed out with correct attributes, including binary size and GUID. It also verifies that the corresponding SMI handler is registered and operates successfully.

Integration Instructions

N/A

@xieyuanh xieyuanh changed the title MdeModulePkg: VarCheckHiiLibStandaloneMM for test final MdeModulePkg: VarCheckHiiLibStandaloneMM Jul 23, 2024
@xieyuanh xieyuanh changed the title MdeModulePkg: VarCheckHiiLibStandaloneMM MdeModulePkg: VarCheckHiiLibStandaloneMM test Jul 23, 2024
@xieyuanh xieyuanh force-pushed the VarFinal branch 2 times, most recently from db3856b to 2438b1d Compare July 25, 2024 08:06
@xieyuanh xieyuanh marked this pull request as draft July 25, 2024 08:45
@xieyuanh xieyuanh requested a review from xuweiintel July 25, 2024 08:46
@xieyuanh xieyuanh marked this pull request as ready for review August 15, 2024 08:21
@xieyuanh xieyuanh changed the title MdeModulePkg: VarCheckHiiLibStandaloneMM test MdeModulePkg: Enable VarCheckHiiLibStandaloneMm Aug 15, 2024
@xieyuanh xieyuanh requested a review from jiaxinwu August 16, 2024 07:35
@github-actions github-actions bot added the impact:security This change has a direct security impact such as changing a crypto algorithm. label Aug 23, 2024
@github-actions github-actions bot added the impact:testing This contribution includes tests such as unit and/or integration tests. label Aug 23, 2024
@lgao4
Copy link
Contributor

lgao4 commented Aug 30, 2024

I agree this change. I only have one minor comment. Please check.

Relocate the declaration of mVarCheckHiiBin to support for standalone
MM modules utilizing the same mVarCheckHiiBin.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
VarCheckHiiLibMmDependency retrieve data (mVarCheckHiiBin) at the end
of the DXE phase, and pass the acquired data to the
VarCheckHiiLibStandaloneMm through a communication protocol.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
Change the Size parameter of BuildVarCheckHiiBin from OUT to an
input-output parameter.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
No functional changes.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
Rename SetVariableCheckHandlerHii and wrap it as a common API to
facilitate the usage in the following patches.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
Move VarCheckHiiInternalDumpHex and VarCheckHiiQuestion to the common
file.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
No functional changes.
Move DUMP_VAR_CHECK_HII in common file

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
This library is designed for handling variable HII checks within the
Standalone MMm environment. It includes the functions
dedicated to registering handlers that process information received
from VarCheckHiiLibMmDependency.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
Enable VarCheckHiiLibStandaloneMm.

Cc: Liming Gao <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Hongbin1 Zhang <[email protected]>
Cc: Wei6 Xu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Dandan Bi <[email protected]>

Signed-off-by: Yuanhao Xie <[email protected]>
@lgao4 lgao4 added the push Auto push patch series in PR if all checks pass label Sep 2, 2024
@mergify mergify bot merged commit eaf78e4 into tianocore:master Sep 2, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:security This change has a direct security impact such as changing a crypto algorithm. impact:testing This contribution includes tests such as unit and/or integration tests. push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants