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

Implement StandaloneMmGenericIpmi driver and IpmiBaseLibMm library #268

Merged
merged 10 commits into from
Nov 19, 2024

Conversation

MarcChen46
Copy link
Contributor

Description

Implement the StandaloneMmGenericIpmi driver

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Verified the build and boot on a simulator

Integration Instructions

Include the driver in DSC and FDF file

@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Nov 12, 2024
@MarcChen46
Copy link
Contributor Author

MarcChen46 commented Nov 12, 2024

#150

@MarcChen46 MarcChen46 changed the title Implement StandaloneMmGenericIpmi driver Implement StandaloneMmGenericIpmi driver and IpmiBaseLibMm library Nov 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 102 lines in your changes missing coverage. Please review.

Project coverage is 27.27%. Comparing base (8b659c6) to head (9b5e2cf).

Files with missing lines Patch % Lines
...GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c 0.00% 55 Missing ⚠️
...miFeaturePkg/Library/IpmiBaseLibMm/IpmiBaseLibMm.c 0.00% 47 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   28.20%   27.27%   -0.93%     
==========================================
  Files          44       46       +2     
  Lines        3003     3105     +102     
  Branches      404      404              
==========================================
  Hits          847      847              
- Misses       2144     2246     +102     
  Partials       12       12              
Flag Coverage Δ
IpmiFeaturePkg 27.27% <0.00%> (-0.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcChen46
Copy link
Contributor Author

@apop5 @cfernald
Please take a look, and the build failed is only happened on AARCH64 build even without my code, could you please also provide some advice?

@MarcChen46
Copy link
Contributor Author

@apop5 @cfernald @os-d @kuqin12

Just confirmed that the build failed is caused by below commit from MU_BASECORE that change the /GS for AARCH64 build, so the build prior to 11/9 before this commit was pass, and after including below commit will start failing on AARCH64 build.

Other MU's packages does not have the build issue due to the SUPPORTED_ARCHITECTURES does not list AARCH64

Should we also remove the AARCH64 from IpmiFeaturePkg.dsc like other MU packages?

microsoft/mu_basecore@86d984c#diff-1076da6462ee674323da1943762adf983e446819071ecff44ac68524bbab4ac3R882

@MarcChen46
Copy link
Contributor Author

@apop5 @cfernald @os-d @kuqin12

Just confirmed that the build failed is caused by below commit from MU_BASECORE that change the /GS for AARCH64 build, so the build prior to 11/9 before this commit was pass, and after including below commit will start failing on AARCH64 build.

Other MU's packages does not have the build issue due to the SUPPORTED_ARCHITECTURES does not list AARCH64

Should we also remove the AARCH64 from IpmiFeaturePkg.dsc like other MU packages?

microsoft/mu_basecore@86d984c#diff-1076da6462ee674323da1943762adf983e446819071ecff44ac68524bbab4ac3R882

Thanks @apop5 for offline discussion, after add below ArmCompilerIntrinsicsLib for AARCH64, it can pass the AARCH64 build now.

[LibraryClasses.AARCH64]
  NULL|MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf

@MarcChen46
Copy link
Contributor Author

@apop5 @cfernald @os-d @kuqin12
Just confirmed that the build failed is caused by below commit from MU_BASECORE that change the /GS for AARCH64 build, so the build prior to 11/9 before this commit was pass, and after including below commit will start failing on AARCH64 build.
Other MU's packages does not have the build issue due to the SUPPORTED_ARCHITECTURES does not list AARCH64
Should we also remove the AARCH64 from IpmiFeaturePkg.dsc like other MU packages?
microsoft/mu_basecore@86d984c#diff-1076da6462ee674323da1943762adf983e446819071ecff44ac68524bbab4ac3R882

Thanks @apop5 for offline discussion, after add below ArmCompilerIntrinsicsLib for AARCH64, it can pass the AARCH64 build now.

[LibraryClasses.AARCH64]
  NULL|MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf

@apop5, sorry, actually after adding ArmCompilerIntrinsicsLib for AARCH64, it is still failed to build with AARCH64, the reason is still relate to the /GS is enabled for AARCH64 recently, but the StackCheckLibNull only support IA32 and X64 for now, so all the drivers that build with UefiDriverEntryPoint, PeimEntryPoint and StandaloneMmDriverEntryPoint are failed.

Now I have updated the DSC file first to build all supported archs for libraries, and only build IA32 and X64 for Drivers as a w/a until AARCH64 can build with /GS successfully.
Let me know if there is any suggestion for next step.
image

@apop5
Copy link
Contributor

apop5 commented Nov 13, 2024

@apop5 @cfernald @os-d @kuqin12
Just confirmed that the build failed is caused by below commit from MU_BASECORE that change the /GS for AARCH64 build, so the build prior to 11/9 before this commit was pass, and after including below commit will start failing on AARCH64 build.
Other MU's packages does not have the build issue due to the SUPPORTED_ARCHITECTURES does not list AARCH64
Should we also remove the AARCH64 from IpmiFeaturePkg.dsc like other MU packages?
microsoft/mu_basecore@86d984c#diff-1076da6462ee674323da1943762adf983e446819071ecff44ac68524bbab4ac3R882

Thanks @apop5 for offline discussion, after add below ArmCompilerIntrinsicsLib for AARCH64, it can pass the AARCH64 build now.

[LibraryClasses.AARCH64]
  NULL|MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf

@apop5, sorry, actually after adding ArmCompilerIntrinsicsLib for AARCH64, it is still failed to build with AARCH64, the reason is still relate to the /GS is enabled for AARCH64 recently, but the StackCheckLibNull only support IA32 and X64 for now, so all the drivers that build with UefiDriverEntryPoint, PeimEntryPoint and StandaloneMmDriverEntryPoint are failed.

Now I have updated the DSC file first to build all supported archs for libraries, and only build IA32 and X64 for Drivers as a w/a until AARCH64 can build with /GS successfully. Let me know if there is any suggestion for next step. image

@MarcChen46 @os-d

It appears that we have enabled stack cookie support for MSVC AARCH64, but that StackCheckLibNull does not contain the necessary asm file for supporting MSVC AARCH64. StackCheckLib does contain the necessary implementation. The solution will be to add MSVC AARCH64 support for StackCheckLibNull.

This is breaking in other repos as well (mu_plus AdvLogger, for example)

We will get a basecore PR up to fix this.

Marc Chen added 2 commits November 14, 2024 09:21
@MarcChen46
Copy link
Contributor Author

Thanks @os-d for reverting the /GS in mu_basecore, I have reverted the w/s in this PR.

@apop5 @cfernald @kuqin12, please take a look at this PR again, thanks.

@kuqin12 kuqin12 added type:enhancement New feature or pull request and removed impact:non-functional Does not have a functional impact labels Nov 19, 2024
@kuqin12 kuqin12 merged commit ff0ac37 into microsoft:main Nov 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants